Re: [OT] LaTeX and \input{file}
>>>>> "Johannes" == Johannes Jörg <liste_joerg@gmx.de> writes:
Johannes> I need to input a file as raw text (every linbreak must
Johannes> be a linebreak, there are some backslashes in it etc.)
Johannes> I tried \input[verbatim]{file}, but this does not what I
Johannes> want it to (It gives an error message instead ;-) ) The
Johannes> problem is: I do not want to make a second copy of the
Johannes> file where I could put a \begin{verbatim} at the
Johannes> beginning and an \end{verbatim} at the end. Including
Johannes> the whole text is not good, because this does not
Johannes> improve the readability of the .tex file. Any idea?
There is a package called verbatimfile, which I believe will do everything
you want.
I have:
%\usepackage{verbatimfile}
at the top of my file. Remove the comment character at the start.
unfortunately, it has been ages since I last used it. I think you do
something like
\verbatimfile{filename.txt}
to include the file, but not sure what the command is called. I
suspect there might be documentation somewhere in tetex-doc.
Also, beware, as IIRC, it can't properly handle special characters
(eg. TABs, which I had to expand out first). Always check to make sure
it comes out as expected, with no errors.
--
Brian May <bam@debian.org>
Reply to: