I've got a number of separate .tex
files that are all \documentclass{article}
. I'm inputting these into a \documentclass{book}
file as chapters. In the book.tex
file, then, I've got inputs like this:
\chapter{Chapter One!}
\input{article}
But I want to be able to compile article.tex
separately when I need to. So in article.tex
, I've kept the \begin{spacing}{1.5}
, \end{spacing}
, and \maketitle
commands.
Is there any way to have these commands ignored when I compile book.tex
? The \standaloneignore
command seems to work only for ignoring things above the \documentclass
declaration.
\documentclass{standalone}
. This will then ignore the preamble in the separate .tex files up until\begin{document}
. Martin provides a good example herestandalone
class. It is only required if you want to crop them automatically. Just usestandalone
package in the main document and it will remove all preambles independent of the used class in these sub-files.