This is a needs when I begin to write my thesis. Still didn’t write any thing yet
The macro file (bookmacro.tex):
\def\booksectionbegin{
\ifdefined\thebook
\empty
\else
\documentclass[12pt]{amsart}
\include{mypackage}
\include{mymacros}
\begin{document}
\fi
}
\def\booksectionend{
\ifdefined\thebook
\empty
\else
\end{document}
\fi
}
The main file (thesis.tex):
\documentclass[12pt]{book}
\def\thebook{\empty}
\begin{document}
\input{thesisintro}
\end{document}
a file contain some “part” (thesisintro.tex):
\input{bookmacros}
\booksectionbegin
si
abcd\booksectionend
% Local Variables:
% mode: latex
% End:
Note that the last line of the “thesisintro.tex” if for auctex to recognize it as latex file not tex file (other whiles it will not compilable).






































































































