| 1 |
\levelstay{\fixedwidth{modular} to the rescue} |
| 2 |
|
| 3 |
The \fixedwidth{modular} package provides the \fixedwidth{subimportlevel} macro to solve our problem: |
| 4 |
|
| 5 |
\lstinputlisting[title=\textbf{article.tex}]{example/article.tex} |
| 6 |
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! |
| 7 |
|
| 8 |
The \fixedwidth{subimportlevel} macro takes three arguments: |
| 9 |
\begin{itemize} |
| 10 |
\item The relative path of the directory containing the file to import. |
| 11 |
\item The file to import |
| 12 |
\item The number of levels to go down when importing. Usually, this will be 0 or 1. |
| 13 |
\end{itemize} |
| 14 |
|