![编译错误](https://linux22.com/image/309250/%E7%BC%96%E8%AF%91%E9%94%99%E8%AF%AF.png)
对于以下代码:
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{setspace}
\usepackage{graphicx}
\include{\frontmatter/title}
\include{\frontmatter/abstract}
\include{\frontmatter/declaration}
\include{\frontmatter/quotation}
\include{\frontmatter/acknowledgements}
\end{document}
我收到此错误:
main.tex, line 7
Undefined control sequence.
<write> \string \@input {\frontmatter /title.aux}
l.7 \include{\frontmatter/title}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
答案1
OP\include
与另一份完整文档一起使用,即在声明\documentclass
中使用完整的序言\include{foo}
。
这行不通,至少这种方式不行。对于特殊用途,combine
可以使用该包。
此外,在\include
d 文件中,\chapter
不应出现等情况。
由于没有提供更多信息,所以除了阅读入门级 LaTeX 书籍之外没有其他建议。楼主已经有半年没有回来了。