gpt4 book ai didi

latex - 使 latex 荣誉换行

转载 作者:行者123 更新时间:2023-12-04 15:48:17 25 4
gpt4 key购买 nike

LaTeX 中是否有环境来完成此操作?

Feb 22 06:00AM - Wake up
Feb 22 06:15AM - Have breakfast
Feb 22 08:00AM - A very long sentence that I will have to break at some point
but maintaining indentation
Feb 22 08:00AM - Or maybe just a list here
One
Two
Three

逐字逐句不是我想要的,并且用\\结束每个句子不尊重缩进。有没有一种简单的方法来实现这一点,还是我必须手动调整它?

最佳答案

我建议使用 tabularx包裹。这将让 LaTeX 自动断行,不像普通的 tabular环境。

\documentclass{article}
\usepackage{tabularx}

\begin{document}
\begin{tabularx}{\columnwidth}{rX}
Feb 22 06:00AM -& Wake up \\
Feb 22 06:15AM -& Have breakfast \\
Feb 22 08:00AM -& A very long sentence that I will have to break at some point
but maintaining indentation \\
Feb 22 08:00AM -& Or maybe just a list here
One
Two
Three
\end{tabularx}
\end{document}

如果您想手动设置中断,这很容易:
Feb 22 08:00AM -& Or maybe just a list here \\
& One \\
& Two \\
& Three

更多信息:
  • LaTeX documentation (我使用 Visual LaTeX FAQ 找到了这个)
  • TeX 常见问题条目 Fixed-width tables
  • 关于latex - 使 latex 荣誉换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5112551/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com