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
逐字不是我想要的,用\\完成每一句话并不尊重缩进。有没有一种简单的方法可以实现这一目标,还是我必须手动调整它?
答案 0 :(得分:1)
我建议使用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
更多信息:
答案 1 :(得分:0)
确定我到目前为止找到的最好方法是使用org-mode(因为这是我在第一时间生成LaTeX的方式)并使用orgmode表。
| 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 |
| | Or maybe just a list here |
| | One |
| | Two |
| | Three |
然后它将作为表格环境导出,如下所示:
\begin{tabular}{ll}
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 \\
& Or maybe just a list here \\
& One \\
& Two \\
& Three \\
\end{tabular}
答案 2 :(得分:0)
将parindent设置为负值,并将每个项目设为段落:
\documentclass{article}
\parindent -4em
\begin{document}
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{document}
答案 3 :(得分:0)
也许我在之前的回答中误解了你的问题。如果您希望缩进的amont自动调整为最长的标签,请使用itemize:
\documentclass{article}
\begin{document}
\begin{itemize}
\item[Feb 22 06:00AM -] Wake up
\item[Feb 22 06:15AM -] Have breakfast
\item[Feb 22 08:00AM -] A very long sentence that I will have to break at some point but maintaining indentation
\item[Feb 22 08:00AM -] Or maybe just a list here\\
One\\
Two\\
Three\\
\end{itemize}
\end{document}