Tag Info

77

You can process your TeX files with the Perl program latexdiff that is included with most LaTeX distributions. From the manual: Briefly, latexdiff is a utility program to aid in the management of revisions of latex documents. It compares two valid latex files, here called old.tex and new.tex, finds significant differences between them (i.e., ...

49

I have used the changes package in the past and I find it very useful. It has a key=value system so most of the things are customizable. You can define different authors and the changes are tracked depending on the id; here is a simple example (mostly from the manual). \documentclass{article} \usepackage{changes} \usepackage{lipsum}% <- For dummy text ...

32

Latex documents are plain text. Therefore you can handle tracking changes for Latex documents using the same robust methods that millions of software developers have been using for decades! Short description of how software developers track changes in their source code: keep the source in version control (git, svn, or whatever) use differencing software ...

21

I've made a quick comparison between some of the methods suggested here. This answer will be a community wiki, and I will made this the accepted one. Hopefully nobody will mind the loss of 15 rep. I upvoted all useful answers, and I urge you to do the same -- all of them were ideas with potential. Adobe Acrobat Professional -- Compare files I've used ...

15

If you want a revision history table showing the following four items, you should look at the vhistory package. Version Date Authors Summary of the changes If you're wanting the exact revision history from SVN, this might not be the package for you, as this revision history table is created in the LaTeX document. I find this advantageous since I want a ...

14

I would try pdftotext and then compare the two text files. This might work if it really is mostly text. For comparing the text files you may need a program that is more advanced than diff since you will have probably have different line breaks in the two files. I'm not sure what to recommend for this.

13

The ltxdoc document class loads the doc package for the core functionality. The package can be used in other document classes too: \documentclass{article} \usepackage{doc} \RecordChanges \begin{document} \changes{v1}{2011/03/24}{Initial version} Test \PrintChanges \end{document} Process the .glo file with: > makeindex -s gglo.ist -o ...

11

Rewritten answer Because of the regular structure of typical Latex documents, it's feasible to write a diff-like program that looks at the two Latex source files and creates a compilable Latex diff output where additions and deletions are delineated using macros. With the appropriate macro definitions, you can make these appear as appropriate ...

9

See latexdiff on ctan: Latexdiff is a Perl script for visual mark up and revision of significant differences between two latex files. Various options are available for visual markup using standard latex packages such as color . Changes not directly affecting visible text, for example in formatting commands, are still marked in the latex source. A ...

8

Marking changes: the changebar package allows marking changes by bars. Not automatically, it has to be done by commands:\cbstart and \cbend. Change may can be nested within each other and with other environments, they can be colored and can cross page boundaries. the chbar package is an alternative for plain TeX. Comparing files: Since LaTeX files are ...

8

The changebar package internally uses \ltx@footnotetext (a replacement of the kernel \@footnotetext command) to include the bar if changebars are active, and if so, wraps the the footnote text in changebars. To "reverse" this behaviour, the following reassignment will do the job: \documentclass{article} \usepackage[paperheight=10cm]{geometry}% just for the ...

7

Adobe Acrobat Pro can do a direct comparison of PDFs. The tool is in the menu at: Document->Compare Documents... You can choose whether to include or ignore changes that are only of formatting, only in the header/footer, etc. It's pretty good assuming both PDFs were generated using the same workflow (eg, both using pdflatex but with slightly different ...

7

For completeness sake, Adobe Acrobat Professional offers an excellent tool to compare PDFs. That tool has been heavily revised for v9 and now works extremely well for all sorts of text, including tables, font changes etc. Some advantages over latexdiff: Can track changes in the bibliography Changed text is "overlayed", not crossed out or underlined, ...

6

There is a number of packages that you could use: todonotes and changebar are two of them; a little example: \documentclass{article} \usepackage{todonotes} \usepackage{changebar} \usepackage{lipsum} \begin{document} \lipsum[2] \begin{changebar} \lipsum[2] \end{changebar} \lipsum*[2] text text \todo[prepend]{A very long and tedious note that cannot be on ...

6

The problem here is actually an interaction with the \sout command from the ulem package. Essentially, there is a clash over the insertion of a \penalty between the number and the unit: ulem alters how this expects to work and that doesn't agree with the box/grouping in siunitx. I've not traced it all back to a minimal example of the low-level code, but that ...

6

Adobe Acrobat can dump text from a PDF into a word or other text format. This isn't free, or even cheap, but it should work. You could also try just highlighting all the text in Foxit reader (allows you to copy text from the pdf) and paste it into a plain text file, then use any diff tool to look at it. But really, you should be using some kind of version ...

6

The problem based on the package ulem which is loaded by the package changes to highlight your changes. In the documentation of ulem you can find the following paragraph Text produced by expansion of a command (macro) is boxed too, but \\, \ , and \- still work properly in the expansion text so that while \newcommand\iff{if and only if}` ... ...

6

You can do this using the changebar package. In the following minimal example, the use of colour (red) merely highlights the changes as reflected by the contents between \cbstart and \cbend: \documentclass{article} \usepackage[pdftex]{changebar}% http://ctan.org/pkg/changebar \usepackage{xcolor}% http://ctan.org/pkg/xcolor \begin{document} Lorem ipsum dolor ...

6

The \quickprofile command simply reports in the console output and the log file the result of doing n repetitions of the code of its argument. e.g. \documentclass{article} \usepackage{interfaces} \begin{document} \def\foo{This is some text.} \quickprofile1000{\foo} \end{document} The output of the console of this run is: Profiler: step 0 Profiler: step ...

5

I have previously used the svninfo Herbert already mentioned. But I recently found the vc bundle. It has the advantage/difference of not only tracking the included .tex files but any file in the directory. You will get the global revision, including images or .bib files as well. Apart from svn it supports bzr and git. On the other hand, it is an external ...

5

A less automated way respect to texdiff is changebar. Use in this way: ...some text \cbstart the text you modified \cbend some text... \cbdelete %to put where some text have been deleted from \cbstart to \cbend a grey bar is displayed near the text. \cbdelete will display a little grey square instead.

5

If you do want to use highlighting with soul, then this approach seems fine to me. Even better would be to create a sematic macro, like \ifhighlight \let\change\hl \else \newcommand{\change}[1]{#1} \fi Depending on how you compile your file, Passing parameters to a document (or any of its near-duplicates) could be of interest. Since the trickery ...

5

You can do this on a per author basis with the \definechangesauthor command. Changing Changes@Color (with \colorlet) will change the color for remarks with no associated author. A little example: \documentclass{book} \usepackage{changes} \usepackage{lipsum} \definechangesauthor[Gonzalo Medina]{GM}{orange} \definechangesauthor[John Doe]{JD}{blue} ...

5

Both packages seem to be quite different. latexdiff marks changes between two versions of a file automatically and trackchanges seems to be for manually tracking changes. I don't think a person telling you to "compile it with track-change option" means automatically to use the trackchanges packages. I would just ask this person if you are in doubt. You ...

5

Try enclosing the \cite commands inside curly braces: \change{text 1 {\cite{Fels\_81}}pad1}{text2 {\cite{Fels\_81}} pad2} I would suggest you not to use underscores in the argument of \cite. I would use something like Fels-81 instead of Fels\_81; the latter produced some errors in the example I built to test the problem; of course, you'll have to change ...

5

The trackchanges package defines its \add command (roughly) to set the colour of its argument and pass it to the \ul command of the soul package for underlining. You simply can't pass any environment to the \ul command. (So it's not just equations that won't work; no environment will work.) The only way around this, as far as I can see is to never put ...

5

The changes package supports a few babel languages, but not british. You can solve the issue by adding the support yourself: \documentclass{article} \usepackage[british]{babel} \usepackage{changes} \addto\captionsbritish{\def\listofchangesname{List of changes}} \addto\captionsbritish{\def\summaryofchangesname{Changes}} ...

4

You can control the appearance of added and deleted text through the commands \setaddedmarkup and \setdeletedmarkup, respectively. So you can define, for example: \setaddedmarkup{\colorbox{yellow}{#1}} \setdeletedmarkup{\colorbox{red}{\sout{#1}}} With the following code \documentclass{article} \usepackage{changes} ...

4

You can simply create two commands for marking added and deleted text and display them as you wish. LyX features a change tracking mechanism, which is implemented in the source like this: \PassOptionsToPackage{normalem}{ulem} \usepackage{ulem} \providecolor{added}{rgb}{0,0,1} \providecolor{deleted}{rgb}{1,0,0} %% Change tracking with ulem ...

4

If you only need Greek, do \usepackage[utf8]{inputenc} \usepackage[greek]{babel} If your TeX distribution is up-to-date this will be sufficient, provided you save your documents as UTF-8. With an older TeX distribution (such as TeX Live 2012), one has to add \usepackage[LGRx]{fontenc} With much older TeX distributions something like ...

Only top voted, non community-wiki answers of a minimum length are eligible