Tag Info

Hot answers tagged

68

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., ...


43

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 ...


29

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 ...


20

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 ...


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 ...


13

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.


11

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 ...


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 ...


9

  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 ...


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

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, ...


7

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 ...


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 ...


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 ...


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 ...


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

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

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

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 ...


4

I Use package rcs and put \usepackage{rcs} in the preamble. Then, lines such as: \RCS $Id:$ \RCS $Source:$ \pagestyle{myheadings} \markright{\RCSId} put version information in the formated document. I notice that there is also a package rcsinfo with a similar purpose, but have not used it.


4

If you are looking for minor changes then pdfpagediff might be useful for you. The package overlays two pdf files and lets you spot minor changes easily. It's not useful if the two versions are significantly different.


4

Based on the comments I provide an answer. The error occurs by an encoding problem. To avoid this you can load the package inputenc with your used encoding. Normally the encoding is utf8. So add to your preamble: \usepackage[utf8]{inputenc}


4

A quick fix is redefining the internal macro \v@rid: \documentclass[changemarks]{memoir} \makeatletter \renewcommand{\v@rid}[2]{% \@bsphack \ifchangemarks \marginpar[#1]{#2}% \fi \@esphack} \makeatother \changemarks \begin{document} \added{text} XXXXXXXXXXXXXXXX YYYYYYYYYYYYY ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ \end{document}‚Äč Here, the change ...


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