summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/modular/modular_to_the_rescue.tex
blob: 7aa864e58a534b9adea03546be284418a428f856 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
\levelstay{\fixedwidth{modular} to the rescue}

The \fixedwidth{modular} package provides the \fixedwidth{subimportlevel} macro to solve our problem:

\lstinputlisting[title=\textbf{article.tex}]{example/article.tex}
When you build \fixedwidth{article.tex} you'll see that the habitat and lifecycle bits are subsections under the octopus section, just as we wanted!

The \fixedwidth{subimportlevel} macro takes three arguments:
\begin{itemize}
  \item The relative path of the directory containing the file to import.
  \item The file to import
  \item The number of levels to go down when importing. Usually, this will be 0 or 1.
\end{itemize}