带有多行单元格的 LaTeX 高级表格
我试图在 LaTeX 中实现类似的目标: http://sorenhaagerup.dk/files/ table-sample.pdf(在 OpenOffice.org 中制作的示例)
最重要的部分是单元格内的多行逐字环境。这有可能吗?
我将非常感谢任何答案,因为这一直困扰着我。
I'm trying to achieve something like this in LaTeX: http://sorenhaagerup.dk/files/table-sample.pdf (sample made in OpenOffice.org)
The most important part is the multiline verbatim-environment inside a cell. Is this possible at all?
I will be very grateful to any answers, since this has been bugging me quite a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我查看了您的表格并重建了它的第一部分 - “var”部分。
由于用乳胶构建表格不是我的专长,因此代码看起来相当混乱,但可以完成工作。相关的包是
multirow
- 实现嵌套表 - 和verbatim
以获得您要求的逐字环境。正如您将看到的,我必须使用额外的minipages
来处理逐字环境的正确放置。您可以将它们注释掉以查看差异。此外,我使用以下行开始该表,否则如果您在最后一列中不使用
p
-aragraph 列,则在使用列内的指定环境时可能会出现一些错误。作为参考,我建议使用 latex-wikibooks ,其中包含其他示例和提示。
这是整个 .tex 示例:
I have looked at your table and rebuild the first part of it - the "var" part.
Since building tables with latex isn't my speciality the code looks pretty messy but does the job. The relevant packages are
multirow
- to achieve the nested table - andverbatim
to get the verbatim environment you asked for. As you will see I had to use additionalminipages
the handle the proper placing of the verbatim environment. You can comment them out to see the difference. Furthermore I started the table with the following lineotherwise if you don't use
p
-aragraph colums for the last column you might get some errors using specified environments inside the columns.As references I would suggest the latex-wikibooks which have additional examples and tips.
Here is the whole .tex example: