Advertisement
Ladislav

modular.tex

Oct 8th, 2015
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 0.44 KB | None | 0 0
  1. Create a blank file called modular.tex and insert the following (preferably with no whitespace before or after):
  2.  
  3. \def\mainfile#1{
  4.  \ifx\processingmainfile\undefined
  5.    \def\processingmainfile{processingmainfile}
  6.    \message{TeX run on an included file, jumping to the main file (#1)}
  7.    \input #1
  8.  \fi
  9. }
  10.  
  11. Include the file in all your subordinate files and reference the main file like this:
  12.  
  13. \input modular
  14. \mainfile{thesis.tex}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement