I would like to include only a part of a .tex
file into a different .tex
file. The part I want to include is delimited by some comment tags, as it is used by catchfilebetweentags package.
I tried the solution of Will Robertson posted in \input only part of a file and it worked wonderfully ... except that the space that should appear in the output PDF file when the text jumps from one line to another in the source .tex
file disappears.
The main file is the following:
\documentclass{article}%
\usepackage{catchfilebetweentags}
\begin{document}
\ExecuteMetaData[inputfile]{mytag}
\end{document}
while the file where I want the text from (i.e., inputfile.tex
) is the following:
\documentclass{article}%
\begin{document}
Some text.
%<*mytag>
Text to be included in the main file. This is the first line
and this is the second line. See the problem?
%</mytag>
\end{document}
In my case, when I proccess the main file I get lineand
instead of line and
in the PDF file.
Where is the problem? Is it a catcode problem? I use MiKTeX 2.9 on a Windows 7 machine, if it helps.