我的 latex 文档越来越大了。今天我再也无法编译它了,编译需要很长时间,但什么都没有改变。
我想知道我是否应该将每一章写在单独的独立文档中?
或者有没有办法把所有内容写在同一个文档中,并快速、顺利、轻松地进行编译?怎么做?
PS:我用的是Texpad。排版成pdf。
\documentclass[french]{report}
\renewcommand{\baselinestretch}{1.5}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[LGR,T1]{fontenc}
\newcommand{\textgreek}[1]{\begingroup\fontencoding{LGR}\selectfont#1\endgroup}
\usepackage[round]{natbib}
\usepackage{makeidx}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage{tocbibind}
\usepackage{graphicx}
\graphicspath{{my_images/}}
\usepackage{hhline}
\usepackage{makecell}
\usepackage{import}
\usepackage[section]{placeins}
\usepackage{tabularx}
\makeindex
\setlength{\parskip}{1em}
\interfootnotelinepenalty=10000
\begin{document}
\renewcommand\indexname{New Name Of Index}
\renewcommand{\tablename}{Tableau}
\newcolumntype{?}{!{\vrule width 1pt}}
\input{Chapters/titlepage}
\tableofcontents
\chapter*{Introduction}
\input{Chapters/Introduction}
\addcontentsline{toc}{chapter}{Introduction}
\chapter{Supports Théoriques}
\input{Chapters/Chapter1}
\chapter{Revue de littérature}
\input{Chapters/Chapter2}
\chapter{Méthodologie}
\input{Chapters/Chapter3}
\chapter{Méthodes}
\input{Chapters/Chapter4}
\chapter{Résultats}
\input{Chapters/Chapter5}
\chapter{Discussion}
\input{Chapters/Chapter6}
\chapter*{Conclusion}
\input{Chapters/Conclusion}
\addcontentsline{toc}{chapter}{Conclusion}
\bibliographystyle{apalike-fr}
\bibliography{Mabibliographie}
\printindex
\cleardoublepage
% \phantomsection
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
\cleardoublepage
% \phantomsection
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\end{document}
答案1
将文档分成几部分,并将它们放入单独的 tex 文件中。这些 tex 文件可以通过 来包含\include
。
此后,您只需取消注释您正在处理的部分。即:
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\begin{document}
%\include{./chapter1.tex}
%\include{./chapter2.tex}
%\include{./chapter3.tex}
\include{./chapter4.tex} %What should be included
Some stuff, you are writing right now. Lots of text text text text text text.
\end{document}
那应该可行。