1

I would like to use the catchfilebetweentags package together with the lstlisting one. The output is a fatal error. Let us consider below the following minimal example.

\documentclass{article}
\usepackage{catchfilebetweentags}
\usepackage{listings}
\begin{document}

\begin{lstlisting}%This one works fine
    x=0
    L=[]
\end{lstlisting}
\ExecuteMetaData[Untitled2.tex]{mytag}
\end{document} 

and the auxiliary file that I want to include, containing few lines of lstlisting code.

\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?
\begin{lstlisting}
    x=0
    L=[]
\end{lstlisting}
%</mytag>
\end{document}
2

0

Browse other questions tagged .