I have a little problem when I would like to insert the svn diff of a LaTeX document into another LaTeX document, the goal is to show what has changed since the XXX revision. However, since diff contains many LaTeX commands, I cannot include it directly in the document, since LaTeX will interpret them, and not just "print" them.
Today I have it in my Makefile
DIFF_INFO=diff.info.tex DIFF_REV=167 diffinfo: $(shell echo "\n" > $(DIFF_INFO) ) $(shell echo "\\section{diff $(DIFF_REV)} \n" >> $(DIFF_INFO) ) $(shell echo \\\\begin{verbatim} >> $(DIFF_INFO) ) $(shell svn diff --revision $(DIFF_REV) $(N).tex >> $(DIFF_INFO) ) $(shell echo \\\\end{verbatim} >> $(DIFF_INFO) )
And at the end of the LaTeX document, I have the following:
\IfFileExists{diff.info.tex} { \newpage \input{diff.info.tex} }
But it fails!
My next idea is to write a perl script that replaces all invalid characters with what LaTeX can show, but it seems to me that I risk reinventing the wheel, so I decided I could ask if anyone has a better idea?
How to enable and show LaTeX code in a document?
Thanks Johan
Update : Thanks to "unknown (google)" for pointing verbatim, he did what I wanted.
Update : It also seems to me that I should try the lists that las3rjock told us about, as they look nice.
Update : Failed to get lists to work in my case, I get some weird utf warnings about invalid characters. But verbatim works, so I will use this path this time.
latex
Johan
source share