I have two TeX files that I need to compare, and I thought texdiff could do this for me. Unfortunately, in the manual page, it reads
For texdiff to work, the following LaTeX code must be inserted in the preamble of the LaTeX document:
\usepackage{xcolor} \usepackage{ulem} \usepackage{changebar} \newcommand\TLSins[1]{\cbstart{}\textcolor{ins}{\uline{#1}}\cbend{}} \newcommand\TLSdel[1]{\cbdelete{}\textcolor{del}{\sout{#1}}}
Now, I'm a bit lost as I have never actually used plain TeX and using LaTeX code inside a TeX file is obviously not going to work.
Example:
Let's consider a very simple plain TeX example. If you use a file with the following content:
Let $D$ be a subset of $\bf R$ and let $f \colon D \to
{\bf R}$ be a real-valued function on $D$. The function $f$ is said to be
{\it continuous} on $D$ if, for all $\epsilon > 0$ and for all $x \in D$,
there exists some $\delta > 0$ (which may depend on $x$) such that if $y
\in D$ satisfies $$|y - x| < \delta$$ then $$|f(y) - f(x)| < \epsilon.$$
\bye
With pdftex file.tex
this can easily be converted to
Now, if you make a change in the file and store it under a different name, you can run
texdiff file1.tex file2.tex diff.tex
you will have the following content inside diff.tex
Let $D$ be a subset of $\bf R$ and let $f \colon D \to
{\bf R}$ be a real-valued function on $D$. The function $f$ is said to be
{\it continuous} on $D$ if, for all $\epsilon > 0$ and for all $x \in D$,
there exists some $\delta > 0$ \protect\TLSins{(which may depend on $x$)} such that if $y
\in D$ satisfies $$|y - x| < \delta$$ then $$|f(y) - f(x)| < \protect\TLSdel{\epsilon$$ should hold.}
\protect\TLSins{\epsilon.$$}
\bye
The commands \TLSins
and TLSdel
don't exist in plain TeX,
and I cannot only put \usepackage
and \newcommand
inside this file. This would not work.
Question: How must the header look like to define the required commands correctly in plain TeX?
texdiff
itself, but the output it creates, because, in the resulting diff, there are LaTeX commands while I need to use TeX to compile the file.