LaTeX 表格中的自动换行符
在我的论文中,我有一个术语表解释了我使用的一些缩写。我把它放在桌子上,让它看起来更漂亮。然而,LaTeX 不会在页面末尾换行。
我知道我可以在表格中的任何位置强制换行,但它是一个很长的表格(工作量很大!)并且手动换行会使文本看起来锯齿状且难看。有没有一种好方法可以拥有一个漂亮的术语表或让 LaTeX 在表格中自动换行?
...如果 LaTeX 不经常做这些事情,我真的会喜欢它。就这样,我不断地在爱与怒之间切换……
In my dissertation, I have a glossary that explains some abbreviations I use. I put this in a table to make it look nicer. However, LaTeX does not break lines at the end of the page.
I know that I could force a line break at any point in the table, but it is a long table (much work!) and manual line breaks make the text look jagged and ugly. Is there a nice way to either have a nice-looking glossary or make LaTeX break lines automatically in a table?
...if LaTeX wouldn't do these things every so often I would really love it. The way it is, I constantly switch between affection and anger...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您为什么使用表格作为词汇表?您知道 glossaries 包吗?它可以让您以最小的努力创建漂亮的术语表。
如果您仍然想使用表格,我建议您使用 tabularx,它定义了 < code>X 列类型,用于创建可自动换行的宽度可调的列。
例如:
Why are you using a table for your glossary? Are you aware of the glossaries package? It lets you create beautiful glossaries with a minimum effort.
If you still want to use a table, I suggest you to use the tabularx, it defines the
X
column type which creates columns of adjustable width with word wrapping.For example:
查看
longtable
包。它会自动处理分页符。http://ctan.org/tex-archive/macros/latex /required/tools/longtable.pdf
look at the
longtable
package. it handles pages breaks automatically.http://ctan.org/tex-archive/macros/latex/required/tools/longtable.pdf
尝试:
try:
该解决方案适用于我的情况:(
在 在 TeX Stack Exchange 上回答类似问题。)
This solution worked in my case:
(Found on the answer to a similar question on TeX Stack Exchange.)
在每个
\\
(或\cr
)之后插入以下内容:示例:
如果您想在每行之后使用该规则,则编写
Insert after each
\\
(or\cr
) the following:Example:
If you want to use the rule after each line then write