Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin{document}
- input{contents}
- end{document}
- % compile with pdflatex -shell-escape
- documentclass[preview,border=12pt]{standalone}
- usepackage{filecontents}
- begin{filecontents*}{template.tex}
- documentclass[preview,border=12pt]{standalone}
- newififsecret
- begin{document}
- common 1
- ifsecret
- I have a top secret message here.
- fi
- common 2
- end{document}
- end{filecontents*}
- usepackage{graphicx}
- begin{document}
- immediatewrite18{unexpanded{pdflatex -jobname=secret-included "AtBeginDocument{secrettrue} input{template}"}}
- immediatewrite18{unexpanded{pdflatex -jobname=secret-excluded "AtBeginDocument{secretfalse} input{template}"}}
- Done, secret-included.pdf and secret-excluded.pdf have been generated!
- fbox{includegraphics[width=.5linewidth]{secret-included}}%
- fbox{includegraphics[width=.5linewidth]{secret-excluded}}
- end{document}
- documentclass[final]{article}
- makeatletter
- newififfinal
- @ifclasswith{article}{final}{
- typeout{FINAL}finaltrue}{
- typeout{DRAFT}finalfalse}
- makeatother
- begin{document}
- iffinal
- textbf{fbox{This is the author's manuscript.}}
- fi
- blabla
- end{document}
- newtoggle{<section>}
- settoggle{<section>}{true}
- iftoggle{<section>}{input{section.tex}}{}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement