You can use the collect
package:
\documentclass{article}
\usepackage{collect}
\makeatletter
\newenvironment{contsummary}[1]
{\@nameuse{collect*}{contsum}{\par}{\par}{\subsection*{#1}}{}}
{\@nameuse{endcollect*}}
\makeatother
\definecollection{contsum}
\begin{document}
\section{Contents summary}
\includecollection{contsum}
\section{Test section one}
\begin{contsummary}{Test section one}
This is the description of the first section. Here we add some more text for the example
\end{contsummary}
\section{Test section two}
\begin{contsummary}{Test section two}
This is the description of the second section. Here we add some more text for the example
\end{contsummary}
\section{Test section three}
\begin{contsummary}{Test section three}
This is the description of the third section. Here we add some more text for the example
\end{contsummary}
\end{document}
![enter image description here](https://i.stack.imgur.com/jytOa.png)
I declared a collection contsum
. For each \section
, use the contsummary
environment (which will add its contents to the collection) to enclose the corresponding summary. In the section containing the summaries all you have to do is to invoke \includecollection{contsum}
. The mandatory argument for the contsummary
environment is used to produce a heading in the contents summary section.
You don't mention what kind of thesis you have, pictures and so on, so I'm just going to go with what I got. I'd put the two parts in environments and \excludecomment
them using the comment
package.
![enter image description here](https://i.stack.imgur.com/qVXwR.png)
\documentclass{article}
\newenvironment{partone}{}{}
\newenvironment{parttwo}{}{}
\usepackage{comment}
%\excludecomment{partone}
\excludecomment{parttwo}
\usepackage{filecontents}
\begin{filecontents*}{mychapter.tex}
\begin{partone}
Part one of your thesis
\end{partone}
\begin{parttwo}
Part two
\end{parttwo}
\end{filecontents*}
\begin{document}
Tableofcontents
\input mychapter.tex
Chapter 2,3,4,5
\end{document}
For completeness, I will also include something to externalize images (as mentioned in comments to the question). The image below doesn't mean anything. I just wanted to use something with at least some compilation time. You will need to run pdflatex
(or whatever engine you require for your thesis) with the shell escape option to make use of this method.
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{external}
\tikzexternalize
\begin{document}
\tdplotsetmaincoords{65}{155}
\begin{tikzpicture}
[scale=5,
tdplot_main_coords,
axis/.style={->,black,very thin},
vector/.style={-stealth,black,thick },
curve/.style={black,thin}]
\coordinate (O) at (0,0,0);
\draw[axis] (0,0,0) -- (1.2,0,0) node[anchor=north east]{$x$};
\draw[axis] (0,0,0) -- (0,1.2,0) node[anchor=north west]{$y$};
\draw[axis] (0,0,0) -- (0,0,1.2) node[anchor=south]{$z$};
\draw[axis,dashed] (0,0,0) -- (-1.2,0,0) node[anchor=south west]{};
\draw[axis,dashed] (0,0,0) -- (0,-1.2,0) node[anchor=south east]{};
\tdplotsinandcos{\sintheta}{\costheta}{45}
\draw[vector,green!80!black] (0,0,0) -- (.62*\costheta,.62*\sintheta,0) node[above=.27in,right=.03in] {\Large $\rho$};
\tdplotsetthetaplanecoords{0}
\tdplotdrawarc[curve,tdplot_rotated_coords,thick,magenta!80,<-]{(O)}{1}{0}{90}{}{}
\node[magenta!80] at (.8,0,.8) {\Large$\phi$};
\foreach \angle in {0,30,...,180}
{
\tdplotsinandcos{\sintheta}{\costheta}{\angle}%
\coordinate (P) at (0,0,.62*\sintheta);
\tdplotdrawarc[curve,very thin]{(P)}{.62*\costheta}{0}{180}{}{}
}
\tdplotsinandcos{\sintheta}{\costheta}{180}
\tdplotdrawarc[curve,thick,cyan!80,->]{(P)}{.8*\costheta}{-90}{260}{}{}
\node[cyan!80] at (.7,.7,0) {\Large$\theta$};
\foreach \angle in {0,30,...,360}
{
\tdplotsetthetaplanecoords{\angle}
\tdplotdrawarc[curve,tdplot_rotated_coords,very thin]{(O)}{.62}{0}{90}{}{}
}
\end{tikzpicture}
\end{document}
Best Answer
First of all use
\include
instead of\input
for your chapter files; included files always start a new page so that's OK for chapters. You can use the\includeonly
macro in the preamble to specify which particular files are to be included for processing. For instance:Excluded files will be treated as unchanged so that numbering, etc., will be consistent across the whole document.
After that it is up to you whether you like a smaller number of larger files or a larger number of smaller files; see David Carlisle's comment about this. However you can only
\input
subsidiary files into an included file.