LATEXREVISE(1)
๐ LATEXREVISE(1) โ the manual page, but make it cute โจ
okay so bestie, welcome to latexrevise, section 1 of the manual pages. it's giving "quietly powerful little cleanup tool" and honestly? we're obsessed. ๐ซถ
โจ NAME โจ
latexrevise โ selectively remove markup and text from latexdiff output. no cap, that's the whole job description. ๐
๐ธ SYNOPSIS ๐ธ
latexrevise [ OPTIONS ] [ diff.tex ] > revised.tex
like. that's it. that's the whole vibe. ๐
๐ฆ DESCRIPTION ๐ฆ
so latexrevise reads a file called diff.tex (which is the output of latexdiff, obviously, the whole family tree iykyk) and it removes the markup commands. if you don't hand it a filename, it just reads from standard input instead. lowkey flexible of it. ๐
the command can run in ACCEPT mode, DECLINE mode, or SIMPLIFY mode โ or it can be used to remove user-defined latex commands from the input (peep -c, -e, -m, and -n below, bestie, don't skip them).
- ACCEPT mode โ all appended text fragments (or preamble lines) are kept, and all discarded text fragments (or preamble lines) get deleted. bye. ๐
- DECLINE mode โ flip it: all discarded text fragments are kept, and all appended text fragments are deleted. ๐ชฆ
now, if you want to keep some changes, you gotta edit the diff.tex file in advance and manually remove those tokens which would otherwise be deleted. it does not read your mind, bestie. ๐ญ
heads up:latexreviseonly pays attention to the"\DIFaddbegin","\DIFaddend","\DIFdelbegin", and"\DIFdelend"tokens and the corresponding FL varieties. that's the whole guest list.
all "\DIFadd" and "\DIFdel" commands (but not their contents) are simply deleted. the commands that latexdiff added to the preamble are also removed. ๐งนโจ
in SIMPLIFY mode, the "\DIFaddbegin, \DIFaddend, \DIFdelbegin, \DIFdelend" tokens and their corresponding "FL" varieties are kept but all other markup (e.g. "DIFadd" and <\DIFdel>) is removed. fair warning: the result will not in general be valid latex-code โ but it will be easier to read and edit while you get ready for a subsequent run in ACCEPT or DECLINE mode. it's giving โจrough draft energyโจ.
in SIMPLIFY mode the preamble is left unmodified. untouched. pristine. we respect her boundaries. ๐
๐ OPTIONS ๐
-aor--acceptโ run in ACCEPT mode (delete all blocks marked by"\DIFdelbegin"and"\DIFdelend"). ๐๏ธ-dor--declineโ run in DECLINE mode (delete all blocks marked by"\DIFaddbegin"and"\DIFaddend"). ๐๏ธ-sor--simplifyโ run in SIMPLIFY mode (keep all"\DIFaddbegin","\DIFaddend","\DIFdelbegin","\DIFdelend"tokens, but remove all other latexdiff markup from body). ๐งผ
ok so the three mode options are mutually exclusive, bestie. pick ONE. you cannot have all three. that's not how this works. ๐
if no mode option is given, latexrevise simply removes user annotations and markup according to the following four options. and honestly? these functions can be very useful outside the latexdiff context, too. they're not just side characters, they're main characters. ๐
-c cmdor--comment=cmdโ remove"\cmd{...}"sequences."cmd"is supposed to mark some explicit annotations which should be removed from the file before release. so like, the notes you left for yourself that absolutely cannot go out into the world. ๐ซฃ-e enviror--comment-environment=envirโ remove explicit annotation environments from the text, i.e. remove these blocks:
\begin{envir}
...
\end{envir}
whole thing. gone. ๐ง
-m cmdor--markup=cmdโ remove the markup command"\cmd"but leave its argument, i.e. turn"\cmd{abc}"into"abc". the wrapper leaves, the filling stays. iconic behaviour tbh. ๐-n enviror--markup-environment=envirโ similarly, remove"\begin{envir}"and"\end{envir}"commands but leave content of the environment in the text. same energy, different costume. ๐-r cmdor--replace=cmdโ for constructions"\\cmd{..}{..}", remove the command, leave the content of the first argument, and delete the second argument, i.e. turn"\cmd{abc}{def}"into"abc". one argument survives. the other one... didn't make it. ๐ญ-Vor--verboseโ verbose output. she will talk. ๐ฃ๏ธ-qor--no-warningsโ do not warn users about"\DIDadd{..}"or"\DIFdel{..}"statements which should have been removed already. (yes,DIDadd, that's exactly how it's spelled in the manual, don't come for me, i'm just the messenger ๐)
๐ BUGS ๐
ngl bestie, the current version is a beta version which has not yet been extensively tested. it has not been actively maintained, so it might not process output of newer versions of latexdiff entirely correctly. she's doing her best but she's been through a lot. ๐ญ
please submit bug reports using the issue tracker of the github repository page https://github.com/ftilmann/latexdiff.git, or send them to tilmann -- AT -- gfz-potsdam.de. include the serial number of latexrevise (Option --version). ๐ฎ
if you come across latexdiff output which is not processed correctly by latexrevise, please include the problem file as well as the old and new files on which it is based, ideally edited to only contain the offending passage โ as long as that still reproduces the problem. yes, we need the receipts. all of them. ๐งพ
โ ๏ธ also note:latexrevisegets confused by commented"\begin{document}"or"\end{document}"statements. so. don't do that. or do, but know she's gonna spiral. ๐
๐ SEE ALSO ๐
latexdiff
(that's it. that's the whole list. the origin story. the mothership. ๐ธ)
๐ง PORTABILITY ๐ง
latexrevise does not make use of external commands and thus should run on any platform supporting PERL v5 or higher. no dependencies, no drama, no "but have you installed..." โ she's self-sufficient. ๐
๐ AUTHOR ๐
Copyright (C) 2004 Frederik Tilmann
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3. slay, legally. ๐โจ
and that's the whole page, bestie!! ๐ this was perl v5.34.0, dated 2021-12-27, and you've been reading LATEXREVISE(1). go forth and revise your latex. periodt. ๐๐ฆ๐ธ
๐ฆ where this page comes from
- fedora 44: texlive-latexdiff 12:svn77278-105.fc44 ยท GPL-3.0-or-later
- fedora 44: texlive-latexdiff 12:svn77278-111.fc44 ยท GPL-3.0-or-later
- opensuse-leap 16.0: texlive-latexdiff-doc 2025.222.1.3.4svn72099-160000.3.1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms