包含多个 LaTeX 文档
我不确定这个问题是否适合超级用户,但无论如何我都会问。
目前我正在为我的最终项目编写文档。我必须附加几个其他 LaTeX 文档作为附件。它们必须在第一个目录中作为字母附录提及。我尝试了subfiles
包,但随后的目录总是空的,除非单独翻译它们。
还有其他方法可以使用自己的文档类附加多个完整文档吗?
I am not sure if this question is suitable for superuser instead, but I'll ask anyway.
Currently I'm writing on my documentation for my final project. I must append several other LaTeX documents as enclosure. They must be mentioned in the first Table of Contents as alphabetical appendix. I tried the package subfiles
, but the subsequent TOC´s are always empty exept in case of translating them alone.
Is there any other way to append multiple full documents with there own documentclass??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
subfiles 是一个非常简单的包 - 除了管理文档级别之外,它不会尝试执行任何其他操作宏。在每次包含子文件之前,您需要发出
\appendix
cs。当心不同的乳胶文档共享辅助文件:如果他们这样做,那么子文件基本上将不起作用 - 你最好使用 pdfpages 包。
Postscript 如果您希望附属文档有自己的目录,您必须更改它们的辅助文件(至少是它们的 .aux 和 .toc 文件),或者切换到其他机制。也许 minitoc 会更适合?
subfiles is a very simple package - it doesn't try to do anything other than manage the document-level macros. You will need to issue an
\appendix
cs before each inclusion of a subfile.Beware of the different latex documents sharing auxiliary files: if they do this, then subfiles will basically not work - you will be better off using the pdfpages package that absz mentions.
Postscript If you want the subsidiary documents to have their own tables of contents, you have either to change their auxiliary files (at least, their .aux and .toc files), or switch to another mechanism. Maybe minitoc will fit better?
难道你不能去掉其他 LaTeX 文档的序言,然后根据是否需要分页符使用
\include
或\input
吗?Couldn't you strip out the preamble of the other LaTeX documents and then use
\include
or\input
depending on whether you want pagebreaks?