summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FILES.byname182
-rw-r--r--FILES.byname.gzbin2671272 -> 2671415 bytes
-rw-r--r--FILES.last07days215
-rw-r--r--biblio/ctan-bibdata/ctan.bib29
-rw-r--r--macros/latex/contrib/interlinear/DEPENDS.txt6
-rw-r--r--macros/latex/contrib/interlinear/LICENSE.txt415
-rw-r--r--macros/latex/contrib/interlinear/README.md89
-rw-r--r--macros/latex/contrib/interlinear/VERSION_1_03
-rw-r--r--macros/latex/contrib/interlinear/interlinear-doc.pdfbin0 -> 118771 bytes
-rw-r--r--macros/latex/contrib/interlinear/interlinear-doc.tex215
-rw-r--r--macros/latex/contrib/interlinear/interlinear.sty1176
-rw-r--r--macros/latex/contrib/tutodoc/code/tutodoc.sty4
-rw-r--r--macros/latex/contrib/tutodoc/doc/tutodoc-en.pdfbin713562 -> 714026 bytes
-rw-r--r--macros/latex/contrib/tutodoc/doc/tutodoc-en.tex4
-rw-r--r--macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdfbin748226 -> 748835 bytes
-rw-r--r--macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex4
-rw-r--r--support/latexdiff/README55
-rw-r--r--support/latexdiff/doc/example-diff.tex4
-rw-r--r--support/latexdiff/doc/latexdiff-man.pdfbin272513 -> 290596 bytes
-rwxr-xr-xsupport/latexdiff/latexdiff836
-rwxr-xr-xsupport/latexdiff/latexdiff-fast836
-rwxr-xr-xsupport/latexdiff/latexdiff-so836
-rwxr-xr-xsupport/latexdiff/latexdiff-vc111
-rw-r--r--support/latexdiff/latexdiff-vc.116
-rw-r--r--support/latexdiff/latexdiff.1155
-rw-r--r--support/latexdiff/latexrevise.14
-rw-r--r--systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl2
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb93
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.md52
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha5122
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc16
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.xzbin2589680 -> 2590824 bytes
-rw-r--r--timestamp2
33 files changed, 3752 insertions, 1560 deletions
diff --git a/FILES.byname b/FILES.byname
index ff75588377..b26e9ad671 100644
--- a/FILES.byname
+++ b/FILES.byname
@@ -2077,12 +2077,12 @@
2024/08/21 | 1837 | biblio/citation-style-language/README.md
2024/08/21 | 12878 | biblio/citation-style-language/vancouver.csl
2024/08/21 | 4573853 | biblio/citation-style-language.zip
-2024/08/23 | 1678 | biblio/ctan-bibdata/biblatex-ctan/ctan.bbx
+2024/08/24 | 1678 | biblio/ctan-bibdata/biblatex-ctan/ctan.bbx
2022/10/08 | 127 | biblio/ctan-bibdata/biblatex-ctan/ctan.cbx
-2024/08/23 | 2881318 | biblio/ctan-bibdata/ctan.bib
-2024/08/23 | 3708800 | biblio/ctan-bibdata/ctan.pdf
+2024/08/24 | 2881318 | biblio/ctan-bibdata/ctan.bib
+2024/08/24 | 3708800 | biblio/ctan-bibdata/ctan.pdf
2023/01/16 | 1489 | biblio/ctan-bibdata/README
-2024/08/23 | 4124191 | biblio/ctan-bibdata.zip
+2024/08/24 | 4124199 | biblio/ctan-bibdata.zip
2023/02/23 | 3126 | biblio/pbibtex/pbibtex-base/cpp.awk
2023/02/23 | 1009 | biblio/pbibtex/pbibtex-base/generate.sh
2023/02/23 | 22362 | biblio/pbibtex/pbibtex-base/jabbrv.bst
@@ -5444,7 +5444,7 @@
1990/10/02 | 5440 | dviware/vutex/vaxvms.hlp
1990/10/02 | 812 | dviware/vutex/vaxvms.ins
1990/10/02 | 127576 | dviware/vutex/vutex.web
-2024/08/23 | 48598 | FILES.last07days
+2024/08/24 | 65405 | FILES.last07days
2021/07/24 | 1139410 | fonts/aboensis/Aboensis.glyphs
2021/07/24 | 18907382 | fonts/aboensis/aboensis.pdf
2021/07/24 | 137860 | fonts/aboensis/Aboensis-Regular.otf
@@ -239720,6 +239720,14 @@
2011/02/19 | 1303605 | macros/latex/contrib/interfaces/interfaces.pdf
2010/11/14 | 3251 | macros/latex/contrib/interfaces/README
2011/02/19 | 869795 | macros/latex/contrib/interfaces.zip
+2024/08/24 | 124 | macros/latex/contrib/interlinear/DEPENDS.txt
+2024/08/24 | 118771 | macros/latex/contrib/interlinear/interlinear-doc.pdf
+2024/08/24 | 9869 | macros/latex/contrib/interlinear/interlinear-doc.tex
+2024/08/23 | 47105 | macros/latex/contrib/interlinear/interlinear.sty
+2024/08/24 | 19101 | macros/latex/contrib/interlinear/LICENSE.txt
+2024/08/24 | 2860 | macros/latex/contrib/interlinear/README.md
+2024/08/24 | 236 | macros/latex/contrib/interlinear/VERSION_1_0
+2024/08/24 | 138159 | macros/latex/contrib/interlinear.zip
2019/03/06 | 323101 | macros/latex/contrib/interval/interval.pdf
2019/03/06 | 2603 | macros/latex/contrib/interval/interval.sty
2019/03/04 | 5487 | macros/latex/contrib/interval/interval.tex
@@ -256317,16 +256325,16 @@
2011/09/02 | 2391 | macros/latex/contrib/turnthepage/turnpagewoetex.sty
2011/03/24 | 1101 | macros/latex/contrib/turnthepage/turnthepage.sty
2011/09/03 | 87208 | macros/latex/contrib/turnthepage.zip
-2024/08/23 | 1045 | macros/latex/contrib/tutodoc/code/tutodoc-locale-main-english.cfg.sty
-2024/08/23 | 1085 | macros/latex/contrib/tutodoc/code/tutodoc-locale-main-french.cfg.sty
-2024/08/23 | 24973 | macros/latex/contrib/tutodoc/code/tutodoc.sty
-2024/08/23 | 713562 | macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
-2024/08/23 | 29315 | macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
-2024/08/23 | 748226 | macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
-2024/08/23 | 31344 | macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
-2024/08/23 | 1691 | macros/latex/contrib/tutodoc/MANIFEST.md
-2024/08/23 | 532 | macros/latex/contrib/tutodoc/README.md
-2024/08/23 | 1441197 | macros/latex/contrib/tutodoc.zip
+2024/08/24 | 1045 | macros/latex/contrib/tutodoc/code/tutodoc-locale-main-english.cfg.sty
+2024/08/24 | 1085 | macros/latex/contrib/tutodoc/code/tutodoc-locale-main-french.cfg.sty
+2024/08/24 | 24975 | macros/latex/contrib/tutodoc/code/tutodoc.sty
+2024/08/24 | 714026 | macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
+2024/08/24 | 29319 | macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
+2024/08/24 | 748835 | macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
+2024/08/24 | 31348 | macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
+2024/08/24 | 1691 | macros/latex/contrib/tutodoc/MANIFEST.md
+2024/08/24 | 532 | macros/latex/contrib/tutodoc/README.md
+2024/08/24 | 1442315 | macros/latex/contrib/tutodoc.zip
2022/03/30 | 6929935 | macros/latex/contrib/twemojis/all-twemojis.pdf
2022/03/30 | 4161 | macros/latex/contrib/twemojis/README.md
2022/03/30 | 861548 | macros/latex/contrib/twemojis/twemojis.dtx
@@ -264380,7 +264388,7 @@
2004/12/19 | 17114 | macros/texinfo/contrib/texinfo-hu/texinfo/util/texinfo.dtd
2004/04/10 | 4702 | macros/texinfo/contrib/texinfo-hu/texinfo/util/texinfo.xsl
2004/04/10 | 2052 | macros/texinfo/contrib/texinfo-hu/texinfo/util/txitextest
-2024/07/20 | 24741 | macros/texinfo/latest/htmlxref.cnf
+2024/08/22 | 24826 | macros/texinfo/latest/htmlxref.cnf
2023/11/10 | 56926 | macros/texinfo/latest/texi2dvi
2023/10/18 | 1163 | macros/texinfo/latest/texi2pdf
2024/02/09 | 381586 | macros/texinfo/latest/texinfo.tex
@@ -299777,27 +299785,27 @@
2024/01/17 | 224 | support/latex-dependency-grapher/source/test/resources/LaTexFolder/includes/abstract.tex
2024/01/17 | 218 | support/latex-dependency-grapher/source/test/resources/test.txt
2024/01/18 | 3049467 | support/latex-dependency-grapher.zip
-2022/09/25 | 2212 | support/latexdiff/contrib/latexchanges.py
-2022/09/25 | 1491 | support/latexdiff/contrib/latexdiff.spec
-2022/09/25 | 4454 | support/latexdiff/contrib/latexdiff-wrap
-2022/09/25 | 575 | support/latexdiff/contrib/README.latexchanges
-2022/09/25 | 32474 | support/latexdiff/COPYING
-2022/09/25 | 4177 | support/latexdiff/doc/example-diff.tex
-2022/09/25 | 272513 | support/latexdiff/doc/latexdiff-man.pdf
-2022/09/25 | 12080 | support/latexdiff/doc/latexdiff-man.tex
-2022/09/25 | 1356 | support/latexdiff/example/example-draft.tex
-2022/09/25 | 1414 | support/latexdiff/example/example-rev.tex
-2022/09/25 | 238876 | support/latexdiff/latexdiff
-2022/09/25 | 49173 | support/latexdiff/latexdiff.1
-2022/09/25 | 255075 | support/latexdiff/latexdiff-fast
-2022/09/25 | 250686 | support/latexdiff/latexdiff-so
-2022/09/25 | 31055 | support/latexdiff/latexdiff-vc
-2022/09/25 | 13667 | support/latexdiff/latexdiff-vc.1
-2022/09/25 | 22241 | support/latexdiff/latexrevise
-2022/09/25 | 9913 | support/latexdiff/latexrevise.1
-2022/09/25 | 3293 | support/latexdiff/Makefile
-2022/09/25 | 5296 | support/latexdiff/README
-2022/11/09 | 549472 | support/latexdiff.zip
+2024/07/20 | 2212 | support/latexdiff/contrib/latexchanges.py
+2024/07/20 | 1491 | support/latexdiff/contrib/latexdiff.spec
+2024/07/20 | 4454 | support/latexdiff/contrib/latexdiff-wrap
+2024/07/20 | 575 | support/latexdiff/contrib/README.latexchanges
+2024/07/20 | 32474 | support/latexdiff/COPYING
+2024/07/20 | 4205 | support/latexdiff/doc/example-diff.tex
+2024/07/20 | 290596 | support/latexdiff/doc/latexdiff-man.pdf
+2024/07/20 | 12080 | support/latexdiff/doc/latexdiff-man.tex
+2024/07/20 | 1356 | support/latexdiff/example/example-draft.tex
+2024/07/20 | 1414 | support/latexdiff/example/example-rev.tex
+2024/07/20 | 242764 | support/latexdiff/latexdiff
+2024/07/20 | 50574 | support/latexdiff/latexdiff.1
+2024/07/20 | 258963 | support/latexdiff/latexdiff-fast
+2024/07/20 | 254574 | support/latexdiff/latexdiff-so
+2024/07/20 | 33783 | support/latexdiff/latexdiff-vc
+2024/07/20 | 14311 | support/latexdiff/latexdiff-vc.1
+2024/07/20 | 22241 | support/latexdiff/latexrevise
+2024/07/20 | 9913 | support/latexdiff/latexrevise.1
+2024/07/20 | 3293 | support/latexdiff/Makefile
+2024/07/20 | 5746 | support/latexdiff/README
+2024/08/24 | 568260 | support/latexdiff.zip
1997/05/24 | 9592 | support/latexdraw/bin/latex2epc
1996/03/06 | 8149 | support/latexdraw/bin/ldstapeldiagramm
1996/03/06 | 5576 | support/latexdraw/bin/ldtortendiagramm
@@ -306864,9 +306872,9 @@
2022/05/18 | 312532 | systems/texlive/tlnet/archive/adjmulticol.doc.r63320.tar.xz
2022/05/18 | 3080 | systems/texlive/tlnet/archive/adjmulticol.r63320.tar.xz
2022/05/18 | 7400 | systems/texlive/tlnet/archive/adjmulticol.source.r63320.tar.xz
-2022/11/08 | 739224 | systems/texlive/tlnet/archive/adjustbox.doc.r64967.tar.xz
-2022/11/08 | 13608 | systems/texlive/tlnet/archive/adjustbox.r64967.tar.xz
-2022/11/08 | 49568 | systems/texlive/tlnet/archive/adjustbox.source.r64967.tar.xz
+2024/08/24 | 739228 | systems/texlive/tlnet/archive/adjustbox.doc.r72097.tar.xz
+2024/08/24 | 13616 | systems/texlive/tlnet/archive/adjustbox.r72097.tar.xz
+2024/08/24 | 49572 | systems/texlive/tlnet/archive/adjustbox.source.r72097.tar.xz
2023/03/11 | 2178116 | systems/texlive/tlnet/archive/adobemapping.r66552.tar.xz
2019/02/28 | 690600 | systems/texlive/tlnet/archive/adrconv.doc.r46817.tar.xz
2019/02/28 | 2812 | systems/texlive/tlnet/archive/adrconv.r46817.tar.xz
@@ -307282,7 +307290,7 @@
2021/05/09 | 344 | systems/texlive/tlnet/archive/asymptote.amd64-netbsd.r59140.tar.xz
2019/02/28 | 526632 | systems/texlive/tlnet/archive/asymptote-by-example-zh-cn.doc.r15878.tar.xz
2019/02/28 | 388 | systems/texlive/tlnet/archive/asymptote-by-example-zh-cn.r15878.tar.xz
-2024/06/24 | 2345040 | systems/texlive/tlnet/archive/asymptote.doc.r71609.tar.xz
+2024/08/24 | 2345036 | systems/texlive/tlnet/archive/asymptote.doc.r72097.tar.xz
2019/02/28 | 373604 | systems/texlive/tlnet/archive/asymptote-faq-zh-cn.doc.r15878.tar.xz
2019/02/28 | 380 | systems/texlive/tlnet/archive/asymptote-faq-zh-cn.r15878.tar.xz
2024/06/06 | 1482436 | systems/texlive/tlnet/archive/asymptote.i386-freebsd.r71441.tar.xz
@@ -307290,7 +307298,7 @@
2024/03/12 | 1443008 | systems/texlive/tlnet/archive/asymptote.i386-solaris.r70582.tar.xz
2019/02/28 | 898452 | systems/texlive/tlnet/archive/asymptote-manual-zh-cn.doc.r15878.tar.xz
2019/02/28 | 400 | systems/texlive/tlnet/archive/asymptote-manual-zh-cn.r15878.tar.xz
-2024/06/24 | 380420 | systems/texlive/tlnet/archive/asymptote.r71609.tar.xz
+2024/08/24 | 380424 | systems/texlive/tlnet/archive/asymptote.r72097.tar.xz
2024/03/11 | 5583936 | systems/texlive/tlnet/archive/asymptote.universal-darwin.r70570.tar.xz
2024/03/09 | 3444488 | systems/texlive/tlnet/archive/asymptote.windows.r70502.tar.xz
2024/03/10 | 1251084 | systems/texlive/tlnet/archive/asymptote.x86_64-cygwin.r70539.tar.xz
@@ -309106,7 +309114,7 @@
2024/07/28 | 708 | systems/texlive/tlnet/archive/collection-latex.r71912.tar.xz
2024/06/15 | 740 | systems/texlive/tlnet/archive/collection-latexrecommended.r71527.tar.xz
2024/08/17 | 1052 | systems/texlive/tlnet/archive/collection-luatex.r72049.tar.xz
-2024/07/16 | 1764 | systems/texlive/tlnet/archive/collection-mathscience.r71810.tar.xz
+2024/08/24 | 1772 | systems/texlive/tlnet/archive/collection-mathscience.r72095.tar.xz
2024/05/23 | 572 | systems/texlive/tlnet/archive/collection-metapost.r71319.tar.xz
2024/01/28 | 508 | systems/texlive/tlnet/archive/collection-music.r69613.tar.xz
2024/08/02 | 1696 | systems/texlive/tlnet/archive/collection-pictures.r71947.tar.xz
@@ -309892,9 +309900,9 @@
2022/01/18 | 590640 | systems/texlive/tlnet/archive/dbshow.doc.r61634.tar.xz
2022/01/18 | 7092 | systems/texlive/tlnet/archive/dbshow.r61634.tar.xz
2022/01/18 | 29152 | systems/texlive/tlnet/archive/dbshow.source.r61634.tar.xz
-2023/08/12 | 291696 | systems/texlive/tlnet/archive/dccpaper.doc.r67890.tar.xz
-2023/08/12 | 25060 | systems/texlive/tlnet/archive/dccpaper.r67890.tar.xz
-2023/08/12 | 27072 | systems/texlive/tlnet/archive/dccpaper.source.r67890.tar.xz
+2024/08/24 | 296688 | systems/texlive/tlnet/archive/dccpaper.doc.r72097.tar.xz
+2024/08/24 | 25084 | systems/texlive/tlnet/archive/dccpaper.r72097.tar.xz
+2024/08/24 | 27100 | systems/texlive/tlnet/archive/dccpaper.source.r72097.tar.xz
2019/02/28 | 927712 | systems/texlive/tlnet/archive/dcpic.doc.r30206.tar.xz
2019/02/28 | 13996 | systems/texlive/tlnet/archive/dcpic.r30206.tar.xz
2019/09/02 | 284556 | systems/texlive/tlnet/archive/ddphonism.doc.r52009.tar.xz
@@ -310115,6 +310123,8 @@
2019/02/28 | 1932 | systems/texlive/tlnet/archive/doipubmed.r15878.tar.xz
2019/02/28 | 4020 | systems/texlive/tlnet/archive/doipubmed.source.r15878.tar.xz
2019/02/28 | 2152 | systems/texlive/tlnet/archive/doi.r48634.tar.xz
+2024/08/24 | 6885376 | systems/texlive/tlnet/archive/domaincoloring.doc.r72095.tar.xz
+2024/08/24 | 596 | systems/texlive/tlnet/archive/domaincoloring.r72095.tar.xz
2020/05/27 | 63244 | systems/texlive/tlnet/archive/domitian.doc.r55286.tar.xz
2020/05/27 | 1376968 | systems/texlive/tlnet/archive/domitian.r55286.tar.xz
2019/02/28 | 340 | systems/texlive/tlnet/archive/dosepsbin.aarch64-linux.r46208.tar.xz
@@ -310612,8 +310622,8 @@
2019/02/28 | 300996 | systems/texlive/tlnet/archive/edmargin.doc.r27599.tar.xz
2019/02/28 | 4676 | systems/texlive/tlnet/archive/edmargin.r27599.tar.xz
2019/02/28 | 14440 | systems/texlive/tlnet/archive/edmargin.source.r27599.tar.xz
-2024/08/21 | 8224 | systems/texlive/tlnet/archive/edmaths.doc.r72074.tar.xz
-2024/08/21 | 4324 | systems/texlive/tlnet/archive/edmaths.r72074.tar.xz
+2024/08/24 | 8224 | systems/texlive/tlnet/archive/edmaths.doc.r72097.tar.xz
+2024/08/24 | 4336 | systems/texlive/tlnet/archive/edmaths.r72097.tar.xz
2019/02/28 | 2824 | systems/texlive/tlnet/archive/ed.r25231.tar.xz
2019/02/28 | 7676 | systems/texlive/tlnet/archive/ed.source.r25231.tar.xz
2019/02/28 | 135680 | systems/texlive/tlnet/archive/eemeir.doc.r15878.tar.xz
@@ -312925,9 +312935,9 @@
2019/02/28 | 1564 | systems/texlive/tlnet/archive/jlabels.r24858.tar.xz
2024/02/19 | 66496 | systems/texlive/tlnet/archive/jlreq-deluxe.doc.r69961.tar.xz
2024/02/19 | 22328 | systems/texlive/tlnet/archive/jlreq-deluxe.r69961.tar.xz
-2024/02/17 | 535612 | systems/texlive/tlnet/archive/jlreq.doc.r69911.tar.xz
-2024/02/17 | 137500 | systems/texlive/tlnet/archive/jlreq.r69911.tar.xz
-2024/02/17 | 8316 | systems/texlive/tlnet/archive/jlreq.source.r69911.tar.xz
+2024/08/24 | 588336 | systems/texlive/tlnet/archive/jlreq.doc.r72091.tar.xz
+2024/08/24 | 147944 | systems/texlive/tlnet/archive/jlreq.r72091.tar.xz
+2024/08/24 | 8316 | systems/texlive/tlnet/archive/jlreq.source.r72091.tar.xz
2019/11/12 | 10072 | systems/texlive/tlnet/archive/jmb.r52718.tar.xz
2022/02/10 | 965184 | systems/texlive/tlnet/archive/jmlr.doc.r61957.tar.xz
2022/02/10 | 17520 | systems/texlive/tlnet/archive/jmlr.r61957.tar.xz
@@ -313356,9 +313366,9 @@
2024/06/05 | 66452 | systems/texlive/tlnet/archive/latex-amsmath-dev.source.r71433.tar.xz
2020/06/08 | 147412 | systems/texlive/tlnet/archive/latexbangla.doc.r55475.tar.xz
2020/06/08 | 3268 | systems/texlive/tlnet/archive/latexbangla.r55475.tar.xz
-2024/08/16 | 35961120 | systems/texlive/tlnet/archive/latex-base-dev.doc.r72039.tar.xz
-2024/08/16 | 248484 | systems/texlive/tlnet/archive/latex-base-dev.r72039.tar.xz
-2024/08/16 | 784424 | systems/texlive/tlnet/archive/latex-base-dev.source.r72039.tar.xz
+2024/08/24 | 35951060 | systems/texlive/tlnet/archive/latex-base-dev.doc.r72097.tar.xz
+2024/08/24 | 248500 | systems/texlive/tlnet/archive/latex-base-dev.r72097.tar.xz
+2024/08/24 | 784452 | systems/texlive/tlnet/archive/latex-base-dev.source.r72097.tar.xz
2020/03/03 | 384 | systems/texlive/tlnet/archive/latex-bin.aarch64-linux.r54018.tar.xz
2020/03/03 | 384 | systems/texlive/tlnet/archive/latex-bin.amd64-freebsd.r54018.tar.xz
2020/03/03 | 380 | systems/texlive/tlnet/archive/latex-bin.amd64-netbsd.r54018.tar.xz
@@ -313507,9 +313517,9 @@
2019/02/28 | 348 | systems/texlive/tlnet/archive/latexindent.x86_64-linuxmusl.r46840.tar.xz
2019/02/28 | 344 | systems/texlive/tlnet/archive/latexindent.x86_64-linux.r32150.tar.xz
2019/02/28 | 344 | systems/texlive/tlnet/archive/latexindent.x86_64-solaris.r32150.tar.xz
-2024/08/16 | 8754360 | systems/texlive/tlnet/archive/latex-lab-dev.doc.r72039.tar.xz
-2024/08/16 | 44912 | systems/texlive/tlnet/archive/latex-lab-dev.r72039.tar.xz
-2024/08/16 | 125544 | systems/texlive/tlnet/archive/latex-lab-dev.source.r72039.tar.xz
+2024/08/24 | 8769012 | systems/texlive/tlnet/archive/latex-lab-dev.doc.r72097.tar.xz
+2024/08/24 | 45408 | systems/texlive/tlnet/archive/latex-lab-dev.r72097.tar.xz
+2024/08/24 | 126188 | systems/texlive/tlnet/archive/latex-lab-dev.source.r72097.tar.xz
2024/06/03 | 8509724 | systems/texlive/tlnet/archive/latex-lab.doc.r71408.tar.xz
2024/06/03 | 43088 | systems/texlive/tlnet/archive/latex-lab.r71408.tar.xz
2024/06/03 | 120348 | systems/texlive/tlnet/archive/latex-lab.source.r71408.tar.xz
@@ -316487,8 +316497,8 @@
2023/06/09 | 340 | systems/texlive/tlnet/archive/platex.i386-solaris.r67315.tar.xz
2024/05/27 | 42292 | systems/texlive/tlnet/archive/platex.r71363.tar.xz
2024/05/27 | 140240 | systems/texlive/tlnet/archive/platex.source.r71363.tar.xz
-2023/02/27 | 576584 | systems/texlive/tlnet/archive/platex-tools.doc.r66185.tar.xz
-2023/02/27 | 8284 | systems/texlive/tlnet/archive/platex-tools.r66185.tar.xz
+2024/08/24 | 576584 | systems/texlive/tlnet/archive/platex-tools.doc.r72097.tar.xz
+2024/08/24 | 8284 | systems/texlive/tlnet/archive/platex-tools.r72097.tar.xz
2023/06/09 | 344 | systems/texlive/tlnet/archive/platex.universal-darwin.r67315.tar.xz
2023/06/10 | 2388 | systems/texlive/tlnet/archive/platex.windows.r67319.tar.xz
2023/06/09 | 348 | systems/texlive/tlnet/archive/platex.x86_64-cygwin.r67315.tar.xz
@@ -317161,8 +317171,8 @@
2024/08/13 | 9212 | systems/texlive/tlnet/archive/pwebmac.r72015.tar.xz
2023/02/27 | 167592 | systems/texlive/tlnet/archive/pxbase.doc.r66187.tar.xz
2023/02/27 | 12464 | systems/texlive/tlnet/archive/pxbase.r66187.tar.xz
-2023/08/30 | 336476 | systems/texlive/tlnet/archive/pxchfon.doc.r68103.tar.xz
-2023/08/30 | 19976 | systems/texlive/tlnet/archive/pxchfon.r68103.tar.xz
+2024/08/24 | 358776 | systems/texlive/tlnet/archive/pxchfon.doc.r72097.tar.xz
+2024/08/24 | 21080 | systems/texlive/tlnet/archive/pxchfon.r72097.tar.xz
2022/07/24 | 211444 | systems/texlive/tlnet/archive/pxcjkcat.doc.r63967.tar.xz
2022/07/24 | 10196 | systems/texlive/tlnet/archive/pxcjkcat.r63967.tar.xz
2019/02/28 | 421672 | systems/texlive/tlnet/archive/pxfonts.doc.r15878.tar.xz
@@ -317960,8 +317970,8 @@
2019/02/28 | 292656 | systems/texlive/tlnet/archive/simplecv.doc.r35537.tar.xz
2019/02/28 | 2112 | systems/texlive/tlnet/archive/simplecv.r35537.tar.xz
2019/02/28 | 5844 | systems/texlive/tlnet/archive/simplecv.source.r35537.tar.xz
-2024/08/17 | 2562052 | systems/texlive/tlnet/archive/simpleicons.doc.r72048.tar.xz
-2024/08/17 | 3511244 | systems/texlive/tlnet/archive/simpleicons.r72048.tar.xz
+2024/08/24 | 2562296 | systems/texlive/tlnet/archive/simpleicons.doc.r72097.tar.xz
+2024/08/24 | 3508816 | systems/texlive/tlnet/archive/simpleicons.r72097.tar.xz
2019/02/28 | 224844 | systems/texlive/tlnet/archive/simpleinvoice.doc.r45673.tar.xz
2019/02/28 | 2420 | systems/texlive/tlnet/archive/simpleinvoice.r45673.tar.xz
2023/10/03 | 142696 | systems/texlive/tlnet/archive/simplekv.doc.r68439.tar.xz
@@ -318580,8 +318590,8 @@
2019/02/28 | 462992 | systems/texlive/tlnet/archive/tcldoc.doc.r22018.tar.xz
2019/02/28 | 7004 | systems/texlive/tlnet/archive/tcldoc.r22018.tar.xz
2019/02/28 | 41140 | systems/texlive/tlnet/archive/tcldoc.source.r22018.tar.xz
-2024/07/24 | 4746260 | systems/texlive/tlnet/archive/tcolorbox.doc.r71883.tar.xz
-2024/07/24 | 234056 | systems/texlive/tlnet/archive/tcolorbox.r71883.tar.xz
+2024/08/24 | 4746260 | systems/texlive/tlnet/archive/tcolorbox.doc.r72097.tar.xz
+2024/08/24 | 234064 | systems/texlive/tlnet/archive/tcolorbox.r72097.tar.xz
2019/02/28 | 244100 | systems/texlive/tlnet/archive/tdclock.doc.r33043.tar.xz
2019/02/28 | 3944 | systems/texlive/tlnet/archive/tdclock.r33043.tar.xz
2022/09/23 | 260804 | systems/texlive/tlnet/archive/tds.doc.r64477.tar.xz
@@ -318949,7 +318959,7 @@
2022/09/13 | 600 | systems/texlive/tlnet/archive/texlive-scripts.amd64-freebsd.r64356.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.amd64-netbsd.r64356.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.armhf-linux.r64356.tar.xz
-2024/08/23 | 436212 | systems/texlive/tlnet/archive/texlive-scripts.doc.r72085.tar.xz
+2024/08/24 | 436212 | systems/texlive/tlnet/archive/texlive-scripts.doc.r72096.tar.xz
2024/07/09 | 908 | systems/texlive/tlnet/archive/texlive-scripts-extra.aarch64-linux.r71749.tar.xz
2024/07/09 | 920 | systems/texlive/tlnet/archive/texlive-scripts-extra.amd64-freebsd.r71749.tar.xz
2024/07/09 | 908 | systems/texlive/tlnet/archive/texlive-scripts-extra.amd64-netbsd.r71749.tar.xz
@@ -318971,7 +318981,7 @@
2022/09/13 | 592 | systems/texlive/tlnet/archive/texlive-scripts.i386-linux.r64356.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.i386-netbsd.r64356.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.i386-solaris.r64356.tar.xz
-2024/08/23 | 114460 | systems/texlive/tlnet/archive/texlive-scripts.r72085.tar.xz
+2024/08/24 | 114484 | systems/texlive/tlnet/archive/texlive-scripts.r72096.tar.xz
2022/09/13 | 580 | systems/texlive/tlnet/archive/texlive-scripts.universal-darwin.r64356.tar.xz
2024/05/10 | 60592 | systems/texlive/tlnet/archive/texlive-scripts.windows.r71215.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.x86_64-cygwin.r64356.tar.xz
@@ -320900,9 +320910,9 @@
2023/11/15 | 1015828 | systems/texlive/tlnet/archive/zref-check.doc.r68846.tar.xz
2023/11/15 | 5612 | systems/texlive/tlnet/archive/zref-check.r68846.tar.xz
2023/11/15 | 14048 | systems/texlive/tlnet/archive/zref-check.source.r68846.tar.xz
-2024/05/22 | 1063896 | systems/texlive/tlnet/archive/zref-clever.doc.r71315.tar.xz
-2024/05/22 | 25724 | systems/texlive/tlnet/archive/zref-clever.r71315.tar.xz
-2024/05/22 | 55424 | systems/texlive/tlnet/archive/zref-clever.source.r71315.tar.xz
+2024/08/24 | 1074860 | systems/texlive/tlnet/archive/zref-clever.doc.r72097.tar.xz
+2024/08/24 | 25780 | systems/texlive/tlnet/archive/zref-clever.r72097.tar.xz
+2024/08/24 | 57008 | systems/texlive/tlnet/archive/zref-clever.source.r72097.tar.xz
2023/09/15 | 668780 | systems/texlive/tlnet/archive/zref.doc.r68278.tar.xz
2023/09/15 | 14528 | systems/texlive/tlnet/archive/zref.r68278.tar.xz
2023/09/15 | 37528 | systems/texlive/tlnet/archive/zref.source.r68278.tar.xz
@@ -320924,16 +320934,16 @@
2020/07/18 | 47816 | systems/texlive/tlnet/archive/zztex.doc.r55862.tar.xz
2020/07/18 | 101724 | systems/texlive/tlnet/archive/zztex.r55862.tar.xz
2024/07/20 | 125851 | systems/texlive/tlnet/install-tl
-2024/08/23 | 5751250 | systems/texlive/tlnet/install-tl-unx.tar.gz
-2024/08/23 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
-2024/08/23 | 488 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
+2024/08/24 | 5752772 | systems/texlive/tlnet/install-tl-unx.tar.gz
+2024/08/24 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
+2024/08/24 | 488 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
2024/04/13 | 5743 | systems/texlive/tlnet/install-tl-windows.bat
-2024/08/23 | 27715500 | systems/texlive/tlnet/install-tl-windows.exe
-2024/08/23 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
-2024/08/23 | 488 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
-2024/08/23 | 34425913 | systems/texlive/tlnet/install-tl.zip
-2024/08/23 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
-2024/08/23 | 488 | systems/texlive/tlnet/install-tl.zip.sha512.asc
+2024/08/24 | 27718643 | systems/texlive/tlnet/install-tl-windows.exe
+2024/08/24 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
+2024/08/24 | 488 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
+2024/08/24 | 34425942 | systems/texlive/tlnet/install-tl.zip
+2024/08/24 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
+2024/08/24 | 488 | systems/texlive/tlnet/install-tl.zip.sha512.asc
2024/03/13 | 1229 | systems/texlive/tlnet/README.md
2024/03/13 | 0 | systems/texlive/tlnet/TEXLIVE_2024
2024/01/02 | 9011 | systems/texlive/tlnet/tlpkg/gpg/pubring.gpg
@@ -320943,7 +320953,7 @@
2024/01/02 | 1280 | systems/texlive/tlnet/tlpkg/gpg/trustdb.gpg
2024/07/29 | 50743 | systems/texlive/tlnet/tlpkg/installer/config.guess
2010/11/11 | 11651 | systems/texlive/tlnet/tlpkg/installer/COPYING.MinGW-runtime.txt
-2024/08/23 | 7589 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
+2024/08/24 | 7767 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2024/07/03 | 228633 | systems/texlive/tlnet/tlpkg/installer/curl/curl-ca-bundle.crt
2020/04/15 | 2606592 | systems/texlive/tlnet/tlpkg/installer/curl/curl.exe
2017/04/16 | 2629 | systems/texlive/tlnet/tlpkg/installer/installer-options.txt
@@ -320985,12 +320995,12 @@
2023/02/21 | 20371 | systems/texlive/tlnet/tlpkg/TeXLive/TLCrypto.pm
2024/05/02 | 5898 | systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm
2023/04/08 | 28167 | systems/texlive/tlnet/tlpkg/TeXLive/TLPaper.pm
-2024/08/23 | 19572855 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
-2024/08/23 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+2024/08/24 | 19574817 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
+2024/08/24 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
2024/06/22 | 87725 | systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm
-2024/08/23 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
-2024/08/23 | 488 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
-2024/08/23 | 2589780 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+2024/08/24 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+2024/08/24 | 488 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+2024/08/24 | 2589680 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
2023/02/20 | 58928 | systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
2023/06/11 | 42749 | systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm
2023/02/21 | 16138 | systems/texlive/tlnet/tlpkg/TeXLive/TLTREE.pm
@@ -332627,7 +332637,7 @@
2014/07/05 | 611 | systems/win32/yandy/README
2014/07/05 | 1004628 | systems/win32/yandy/yandy-src.tar.xz
2014/07/05 | 1012416 | systems/win32/yandy.zip
-2024/08/24 | 186 | timestamp
+2024/08/25 | 186 | timestamp
2002/08/26 | 61898 | usergrps/dante/antrag.pdf
2002/08/26 | 118217 | usergrps/dante/antrag.ps
2021/11/11 | 917 | usergrps/dante/dtk/doc/beispiel.bib
diff --git a/FILES.byname.gz b/FILES.byname.gz
index d23df72b40..cee2924fb0 100644
--- a/FILES.byname.gz
+++ b/FILES.byname.gz
Binary files differ
diff --git a/FILES.last07days b/FILES.last07days
index e255017967..43ffdd2e93 100644
--- a/FILES.last07days
+++ b/FILES.last07days
@@ -1,3 +1,75 @@
+2024/08/24 | 9869 | macros/latex/contrib/interlinear/interlinear-doc.tex
+2024/08/24 | 8769012 | systems/texlive/tlnet/archive/latex-lab-dev.doc.r72097.tar.xz
+2024/08/24 | 8316 | systems/texlive/tlnet/archive/jlreq.source.r72091.tar.xz
+2024/08/24 | 8284 | systems/texlive/tlnet/archive/platex-tools.r72097.tar.xz
+2024/08/24 | 8224 | systems/texlive/tlnet/archive/edmaths.doc.r72097.tar.xz
+2024/08/24 | 784452 | systems/texlive/tlnet/archive/latex-base-dev.source.r72097.tar.xz
+2024/08/24 | 7767 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
+2024/08/24 | 748835 | macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
+2024/08/24 | 739228 | systems/texlive/tlnet/archive/adjustbox.doc.r72097.tar.xz
+2024/08/24 | 714026 | macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
+2024/08/24 | 6885376 | systems/texlive/tlnet/archive/domaincoloring.doc.r72095.tar.xz
+2024/08/24 | 596 | systems/texlive/tlnet/archive/domaincoloring.r72095.tar.xz
+2024/08/24 | 588336 | systems/texlive/tlnet/archive/jlreq.doc.r72091.tar.xz
+2024/08/24 | 576584 | systems/texlive/tlnet/archive/platex-tools.doc.r72097.tar.xz
+2024/08/24 | 5752772 | systems/texlive/tlnet/install-tl-unx.tar.gz
+2024/08/24 | 57008 | systems/texlive/tlnet/archive/zref-clever.source.r72097.tar.xz
+2024/08/24 | 568260 | support/latexdiff.zip
+2024/08/24 | 532 | macros/latex/contrib/tutodoc/README.md
+2024/08/24 | 49572 | systems/texlive/tlnet/archive/adjustbox.source.r72097.tar.xz
+2024/08/24 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+2024/08/24 | 488 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+2024/08/24 | 488 | systems/texlive/tlnet/install-tl.zip.sha512.asc
+2024/08/24 | 488 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
+2024/08/24 | 488 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
+2024/08/24 | 4746260 | systems/texlive/tlnet/archive/tcolorbox.doc.r72097.tar.xz
+2024/08/24 | 45408 | systems/texlive/tlnet/archive/latex-lab-dev.r72097.tar.xz
+2024/08/24 | 436212 | systems/texlive/tlnet/archive/texlive-scripts.doc.r72096.tar.xz
+2024/08/24 | 4336 | systems/texlive/tlnet/archive/edmaths.r72097.tar.xz
+2024/08/24 | 4124199 | biblio/ctan-bibdata.zip
+2024/08/24 | 380424 | systems/texlive/tlnet/archive/asymptote.r72097.tar.xz
+2024/08/24 | 3708800 | biblio/ctan-bibdata/ctan.pdf
+2024/08/24 | 35951060 | systems/texlive/tlnet/archive/latex-base-dev.doc.r72097.tar.xz
+2024/08/24 | 358776 | systems/texlive/tlnet/archive/pxchfon.doc.r72097.tar.xz
+2024/08/24 | 3508816 | systems/texlive/tlnet/archive/simpleicons.r72097.tar.xz
+2024/08/24 | 34425942 | systems/texlive/tlnet/install-tl.zip
+2024/08/24 | 31348 | macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
+2024/08/24 | 296688 | systems/texlive/tlnet/archive/dccpaper.doc.r72097.tar.xz
+2024/08/24 | 29319 | macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
+2024/08/24 | 2881318 | biblio/ctan-bibdata/ctan.bib
+2024/08/24 | 2860 | macros/latex/contrib/interlinear/README.md
+2024/08/24 | 27718643 | systems/texlive/tlnet/install-tl-windows.exe
+2024/08/24 | 27100 | systems/texlive/tlnet/archive/dccpaper.source.r72097.tar.xz
+2024/08/24 | 2589680 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+2024/08/24 | 25780 | systems/texlive/tlnet/archive/zref-clever.r72097.tar.xz
+2024/08/24 | 2562296 | systems/texlive/tlnet/archive/simpleicons.doc.r72097.tar.xz
+2024/08/24 | 25084 | systems/texlive/tlnet/archive/dccpaper.r72097.tar.xz
+2024/08/24 | 24975 | macros/latex/contrib/tutodoc/code/tutodoc.sty
+2024/08/24 | 248500 | systems/texlive/tlnet/archive/latex-base-dev.r72097.tar.xz
+2024/08/24 | 236 | macros/latex/contrib/interlinear/VERSION_1_0
+2024/08/24 | 2345036 | systems/texlive/tlnet/archive/asymptote.doc.r72097.tar.xz
+2024/08/24 | 234064 | systems/texlive/tlnet/archive/tcolorbox.r72097.tar.xz
+2024/08/24 | 21080 | systems/texlive/tlnet/archive/pxchfon.r72097.tar.xz
+2024/08/24 | 19574817 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
+2024/08/24 | 19101 | macros/latex/contrib/interlinear/LICENSE.txt
+2024/08/24 | 1772 | systems/texlive/tlnet/archive/collection-mathscience.r72095.tar.xz
+2024/08/24 | 1691 | macros/latex/contrib/tutodoc/MANIFEST.md
+2024/08/24 | 1678 | biblio/ctan-bibdata/biblatex-ctan/ctan.bbx
+2024/08/24 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
+2024/08/24 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
+2024/08/24 | 147944 | systems/texlive/tlnet/archive/jlreq.r72091.tar.xz
+2024/08/24 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
+2024/08/24 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+2024/08/24 | 1442315 | macros/latex/contrib/tutodoc.zip
+2024/08/24 | 138159 | macros/latex/contrib/interlinear.zip
+2024/08/24 | 13616 | systems/texlive/tlnet/archive/adjustbox.r72097.tar.xz
+2024/08/24 | 126188 | systems/texlive/tlnet/archive/latex-lab-dev.source.r72097.tar.xz
+2024/08/24 | 124 | macros/latex/contrib/interlinear/DEPENDS.txt
+2024/08/24 | 118771 | macros/latex/contrib/interlinear/interlinear-doc.pdf
+2024/08/24 | 114484 | systems/texlive/tlnet/archive/texlive-scripts.r72096.tar.xz
+2024/08/24 | 1085 | macros/latex/contrib/tutodoc/code/tutodoc-locale-main-french.cfg.sty
+2024/08/24 | 1074860 | systems/texlive/tlnet/archive/zref-clever.doc.r72097.tar.xz
+2024/08/24 | 1045 | macros/latex/contrib/tutodoc/code/tutodoc-locale-main-english.cfg.sty
2024/08/23 | 99 | macros/latex-dev/base/ltpara-code.tex
2024/08/23 | 9935 | macros/latex-dev/base/ltnews21.tex
2024/08/23 | 9713 | macros/latex-dev/required/latex-lab/latex-lab-marginpar.dtx
@@ -34,13 +106,11 @@
2024/08/23 | 777735 | macros/latex-dev/required/latex-lab/latex-lab-math.pdf
2024/08/23 | 7675932 | install/macros/jptex/latex/jlreq.tds.zip
2024/08/23 | 762282 | macros/latex-dev/base/lthooks-doc.pdf
-2024/08/23 | 7589 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2024/08/23 | 758260 | macros/latex-dev/base/doc.pdf
2024/08/23 | 75698 | macros/latex-dev/base/ltluatex.dtx
2024/08/23 | 753718 | macros/latex-dev/base/ltcmdhooks-code.pdf
2024/08/23 | 7528 | macros/latex-dev/base/ltxguide.cls
2024/08/23 | 75111 | macros/latex-dev/base/ltfssdcl.dtx
-2024/08/23 | 748226 | macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
2024/08/23 | 7424 | macros/latex-dev/required/latex-lab/latex-lab-amsmath.dtx
2024/08/23 | 72493 | macros/latex-dev/base/ltfsstrc.dtx
2024/08/23 | 7244 | macros/latex-dev/base/ltnews20.tex
@@ -48,7 +118,6 @@
2024/08/23 | 721456 | macros/jptex/latex/jlreq.zip
2024/08/23 | 7200 | macros/latex-dev/base/sample2e.tex
2024/08/23 | 718185 | macros/latex-dev/base/ltmarks-code.pdf
-2024/08/23 | 713562 | macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
2024/08/23 | 7103 | macros/latex-dev/base/alltt.dtx
2024/08/23 | 70 | macros/latex/contrib/zref-clever/DEPENDS.txt
2024/08/23 | 7029 | macros/latex-dev/base/ltnews13.tex
@@ -87,7 +156,6 @@
2024/08/23 | 5825 | macros/latex-dev/base/ltnews10.tex
2024/08/23 | 5775 | macros/latex-dev/base/ltnews16.tex
2024/08/23 | 576257 | macros/latex-dev/base/ltmarks-doc.pdf
-2024/08/23 | 5751250 | systems/texlive/tlnet/install-tl-unx.tar.gz
2024/08/23 | 5733 | macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.dtx
2024/08/23 | 5732 | macros/latex-dev/base/ltnews08.tex
2024/08/23 | 572645 | macros/latex-dev/required/latex-lab/latex-lab-table.pdf
@@ -118,7 +186,6 @@
2024/08/23 | 539538 | macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdf
2024/08/23 | 5369 | macros/latex-dev/base/ltnews03.tex
2024/08/23 | 53334 | macros/latex-dev/base/lb2.err
-2024/08/23 | 532 | macros/latex/contrib/tutodoc/README.md
2024/08/23 | 52813 | macros/latex-dev/base/encguide.tex
2024/08/23 | 527408 | macros/latex-dev/required/latex-lab/latex-lab-sec.pdf
2024/08/23 | 5273 | macros/latex-dev/base/cmextra.ins
@@ -143,11 +210,6 @@
2024/08/23 | 49842 | macros/latex-dev/required/latex-lab/latex-lab-table.dtx
2024/08/23 | 4945 | macros/latex-dev/base/lthyphen.dtx
2024/08/23 | 490531 | macros/latex-dev/base/clsguide.pdf
-2024/08/23 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
-2024/08/23 | 488 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
-2024/08/23 | 488 | systems/texlive/tlnet/install-tl.zip.sha512.asc
-2024/08/23 | 488 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
-2024/08/23 | 488 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
2024/08/23 | 487553 | macros/latex-dev/base/usrguide.pdf
2024/08/23 | 486033 | macros/latex-dev/required/latex-lab/blocks-doc.pdf
2024/08/23 | 4824 | macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx
@@ -155,6 +217,7 @@
2024/08/23 | 47895 | macros/latex-dev/base/lttab.dtx
2024/08/23 | 4757 | macros/latex-dev/base/ltlength.dtx
2024/08/23 | 47308 | macros/latex-dev/base/ltspace.dtx
+2024/08/23 | 47105 | macros/latex/contrib/interlinear/interlinear.sty
2024/08/23 | 456933 | macros/latex-dev/base/ltnews37.pdf
2024/08/23 | 455437 | macros/latex-dev/base/ltnews29.pdf
2024/08/23 | 45498 | macros/jptex/latex/jlreq/README.md
@@ -164,7 +227,6 @@
2024/08/23 | 44531 | macros/latex-dev/base/cmfonts.fdd
2024/08/23 | 439393 | macros/latex-dev/base/usrguide-historic.pdf
2024/08/23 | 4390 | macros/latex-dev/base/ec.ins
-2024/08/23 | 436212 | systems/texlive/tlnet/archive/texlive-scripts.doc.r72085.tar.xz
2024/08/23 | 4324 | macros/latex-dev/base/cmfonts.ins
2024/08/23 | 432407 | macros/latex-dev/base/ltproperties-doc.pdf
2024/08/23 | 43112 | systems/texlive/tlnet/archive/nicematrix.r72084.tar.xz
@@ -182,7 +244,6 @@
2024/08/23 | 416620 | macros/latex-dev/base/changes.txt
2024/08/23 | 415956 | macros/latex-dev/base/clsguide-historic.pdf
2024/08/23 | 414425 | macros/latex-dev/required/latex-lab/latex-lab-marginpar.pdf
-2024/08/23 | 4124191 | biblio/ctan-bibdata.zip
2024/08/23 | 410540 | macros/latex-dev/required/latex-lab/latex-lab-toc.pdf
2024/08/23 | 4087 | macros/latex-dev/base/classes.ins
2024/08/23 | 40804 | macros/latex-dev/base/ltlists.dtx
@@ -209,7 +270,6 @@
2024/08/23 | 3725 | macros/latex-dev/base/ltlogos.dtx
2024/08/23 | 372090 | macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdf
2024/08/23 | 3711 | fonts/simpleicons/enc/simpleiconsoneone.enc
-2024/08/23 | 3708800 | biblio/ctan-bibdata/ctan.pdf
2024/08/23 | 3680 | fonts/simpleicons/enc/simpleiconsonezero.enc
2024/08/23 | 367986 | macros/latex-dev/required/latex-lab/latex-lab-firstaid.pdf
2024/08/23 | 3674 | macros/latex-dev/required/latex-lab/latex-lab-text.dtx
@@ -228,7 +288,6 @@
2024/08/23 | 349755 | macros/latex/contrib/dccpaper.zip
2024/08/23 | 348117 | macros/latex-dev/required/latex-lab/latex-lab-title.pdf
2024/08/23 | 34478 | macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx
-2024/08/23 | 34425913 | systems/texlive/tlnet/install-tl.zip
2024/08/23 | 3434 | macros/latex-dev/base/makeindx.ins
2024/08/23 | 34137 | macros/latex-dev/base/ltproperties.dtx
2024/08/23 | 3401 | macros/latex-dev/base/proc.ins
@@ -250,7 +309,6 @@
2024/08/23 | 3181 | macros/latex-dev/base/unpack.ins
2024/08/23 | 318193 | macros/latex-dev/base/ltnews20.pdf
2024/08/23 | 318026 | macros/latex-dev/base/ltnews22.pdf
-2024/08/23 | 31344 | macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
2024/08/23 | 3083 | macros/latex-dev/base/README.md
2024/08/23 | 307812 | macros/latex-dev/required/latex-lab/latex-lab-text.pdf
2024/08/23 | 306325 | macros/latex-dev/base/lthooks.dtx
@@ -262,7 +320,6 @@
2024/08/23 | 297622 | fonts/simpleicons/tex/simpleiconsglyphs-xeluatex.tex
2024/08/23 | 29669 | macros/latex-dev/base/lttagging.dtx
2024/08/23 | 296124 | macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdf
-2024/08/23 | 29315 | macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
2024/08/23 | 29270 | macros/latex-dev/base/ltfntcmd.dtx
2024/08/23 | 292600 | macros/latex-dev/base/cmfonts.pdf
2024/08/23 | 290737 | macros/jptex/latex/jlreq/jlreq.cls
@@ -274,14 +331,12 @@
2024/08/23 | 2892 | macros/latex-dev/base/fix-cm.ins
2024/08/23 | 2890 | macros/latex-dev/base/alltt.ins
2024/08/23 | 2888 | macros/latex-dev/base/ifthen.ins
-2024/08/23 | 2881318 | biblio/ctan-bibdata/ctan.bib
2024/08/23 | 287727 | macros/latex-dev/base/fix-cm.pdf
2024/08/23 | 286824 | macros/latex-dev/base/ltnews23.pdf
2024/08/23 | 282447 | macros/latex-dev/base/latexrelease.pdf
2024/08/23 | 282245 | macros/latex-dev/required/latex-lab/latex-lab-minipage.pdf
2024/08/23 | 2821 | macros/latex/contrib/dccpaper/Makefile
2024/08/23 | 279 | fonts/simpleicons/tex/usimpleiconsonethree.fd
-2024/08/23 | 27715500 | systems/texlive/tlnet/install-tl-windows.exe
2024/08/23 | 274 | fonts/simpleicons/tex/usimpleiconsonezero.fd
2024/08/23 | 2728 | macros/latex-dev/base/ltpageno.dtx
2024/08/23 | 27122 | macros/latex-dev/base/ltxcheck.tex
@@ -299,7 +354,6 @@
2024/08/23 | 259 | fonts/simpleicons/tex/usimpleiconsnine.fd
2024/08/23 | 259 | fonts/simpleicons/tex/usimpleiconsfour.fd
2024/08/23 | 259 | fonts/simpleicons/tex/usimpleiconsfive.fd
-2024/08/23 | 2589780 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
2024/08/23 | 257825 | macros/latex-dev/base/modguide.pdf
2024/08/23 | 257359 | macros/latex-dev/base/cyrguide.pdf
2024/08/23 | 2550797 | fonts/simpleicons/doc/simpleicons.pdf
@@ -309,7 +363,6 @@
2024/08/23 | 252519 | macros/latex-dev/base/lb2.pdf
2024/08/23 | 251283 | macros/latex-dev/base/ltnews27.pdf
2024/08/23 | 2499608 | systems/texlive/tlnet/archive/nicematrix.doc.r72084.tar.xz
-2024/08/23 | 24973 | macros/latex/contrib/tutodoc/code/tutodoc.sty
2024/08/23 | 24869 | macros/latex-dev/base/ltcounts.dtx
2024/08/23 | 2468116 | fonts/simpleicons/opentype/SimpleIcons.otf
2024/08/23 | 245228 | macros/latex-dev/base/ltnews21.pdf
@@ -352,7 +405,6 @@
2024/08/23 | 204708 | macros/latex-dev/base/exscale.pdf
2024/08/23 | 200759 | macros/latex-dev/base/latexsym.pdf
2024/08/23 | 20030 | macros/latex-dev/base/ltexpl.dtx
-2024/08/23 | 19572855 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
2024/08/23 | 1941 | macros/latex-dev/base/minimal.cls
2024/08/23 | 19333 | macros/latex-dev/base/ltnews36.tex
2024/08/23 | 193083 | macros/latex-dev/base/ltcmd.dtx
@@ -380,8 +432,6 @@
2024/08/23 | 169553 | macros/latex-dev/base/ltnews01.pdf
2024/08/23 | 1694 | macros/latex-dev/base/small2e.tex
2024/08/23 | 169433 | macros/latex-dev/base/ltnews10.pdf
-2024/08/23 | 1691 | macros/latex/contrib/tutodoc/MANIFEST.md
-2024/08/23 | 1678 | biblio/ctan-bibdata/biblatex-ctan/ctan.bbx
2024/08/23 | 166269 | macros/latex-dev/base/ltnews17.pdf
2024/08/23 | 165816 | macros/latex-dev/base/makeindx.pdf
2024/08/23 | 16500 | macros/latex-dev/base/modguide.tex
@@ -393,9 +443,7 @@
2024/08/23 | 156258 | macros/latex-dev/base/classes.dtx
2024/08/23 | 15553 | macros/latex-dev/base/source2e.tex
2024/08/23 | 155442 | macros/latex-dev/base/ltnews08.pdf
-2024/08/23 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
2024/08/23 | 15384 | macros/latex-dev/base/ltvers.dtx
-2024/08/23 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
2024/08/23 | 15289 | macros/latex-dev/required/latex-lab/changes.txt
2024/08/23 | 152551 | macros/latex-dev/base/ltnews04.pdf
2024/08/23 | 151962 | macros/latex-dev/base/ltclass.dtx
@@ -405,10 +453,7 @@
2024/08/23 | 148564 | macros/latex-dev/base/ltoutenc.dtx
2024/08/23 | 1476 | fonts/simpleicons/map/simpleicons.map
2024/08/23 | 146205 | macros/latex-dev/base/webcomp.pdf
-2024/08/23 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
-2024/08/23 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
2024/08/23 | 14421 | macros/latex-dev/base/lppl-1-2.txt
-2024/08/23 | 1441197 | macros/latex/contrib/tutodoc.zip
2024/08/23 | 14380 | macros/latex-dev/required/latex-lab/latex-lab-bib.dtx
2024/08/23 | 14341 | macros/latex-dev/base/lppl-1-1.txt
2024/08/23 | 142867 | macros/latex-dev/base/ltnews06.pdf
@@ -453,12 +498,10 @@
2024/08/23 | 1156 | macros/latex-dev/required/latex-lab/README.md
2024/08/23 | 1152088 | macros/latex/contrib/zref-clever.zip
2024/08/23 | 114477 | macros/latex-dev/base/lttextcomp.dtx
-2024/08/23 | 114460 | systems/texlive/tlnet/archive/texlive-scripts.r72085.tar.xz
2024/08/23 | 112208 | macros/latex-dev/base/ltnews11.pdf
2024/08/23 | 111448 | macros/latex-dev/base/fntguide.tex
2024/08/23 | 11065 | macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx
2024/08/23 | 108 | macros/latex-dev/required/latex-lab/blocks-code.tex
-2024/08/23 | 1085 | macros/latex/contrib/tutodoc/code/tutodoc-locale-main-french.cfg.sty
2024/08/23 | 107 | macros/latex-dev/base/ltproperties-code.tex
2024/08/23 | 10798 | macros/latex-dev/base/ltnews26.tex
2024/08/23 | 1079325 | macros/latex-dev/base/doc-code.pdf
@@ -471,7 +514,6 @@
2024/08/23 | 104 | macros/latex-dev/base/ltsockets-code.tex
2024/08/23 | 104 | macros/latex-dev/base/ltshipout-code.tex
2024/08/23 | 10479 | macros/jptex/latex/jlreq/jlreq-complements.sty
-2024/08/23 | 1045 | macros/latex/contrib/tutodoc/code/tutodoc-locale-main-english.cfg.sty
2024/08/23 | 103 | macros/latex-dev/base/ltcmdhooks-code.tex
2024/08/23 | 10370 | macros/latex-dev/base/ltfsscmp.dtx
2024/08/23 | 102 | macros/latex-dev/base/ltmarks-code.tex
@@ -501,6 +543,7 @@
2024/08/22 | 2786 | macros/luatex/latex/domaincoloring/latex/domaincoloring.sty
2024/08/22 | 260340 | systems/texlive/tlnet/archive/citation-style-language.doc.r72078.tar.xz
2024/08/22 | 254230 | macros/latex/contrib/nicematrix/nicematrix.tex
+2024/08/22 | 24826 | macros/texinfo/latest/htmlxref.cnf
2024/08/22 | 2372556 | macros/latex/contrib/nicematrix/nicematrix-code.pdf
2024/08/22 | 187 | macros/luatex/latex/domaincoloring/Changes
2024/08/22 | 15164 | systems/texlive/tlnet/archive/biblatex-publist.r72079.tar.xz
@@ -515,7 +558,6 @@
2024/08/21 | 9190 | biblio/citation-style-language/citeproc-node-choose.lua
2024/08/21 | 91520 | biblio/citation-style-language/citeproc-bibtex-data.lua
2024/08/21 | 84519 | biblio/citation-style-language/apa.csl
-2024/08/21 | 8224 | systems/texlive/tlnet/archive/edmaths.doc.r72074.tar.xz
2024/08/21 | 8222 | biblio/citation-style-language/american-political-science-association.csl
2024/08/21 | 8128 | biblio/citation-style-language/elsevier-harvard.csl
2024/08/21 | 7815 | biblio/citation-style-language/citeproc-node-style.lua
@@ -539,7 +581,6 @@
2024/08/21 | 4581487 | install/biblio/citation-style-language.tds.zip
2024/08/21 | 4573853 | biblio/citation-style-language.zip
2024/08/21 | 454 | biblio/citation-style-language/citeproc.lua
-2024/08/21 | 4324 | systems/texlive/tlnet/archive/edmaths.r72074.tar.xz
2024/08/21 | 428272 | macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
2024/08/21 | 4178 | biblio/citation-style-language/citeproc-cli.lua
2024/08/21 | 38783 | biblio/citation-style-language/citeproc-engine.lua
@@ -787,111 +828,3 @@
2024/08/18 | 11356 | systems/texlive/tlnet/archive/penlightplus.r72053.tar.xz
2024/08/18 | 1089319 | macros/latex/required/babel/base/locale.zip
2024/08/18 | 10573 | macros/latex/contrib/lstaddons/lstautogobble.dtx
-2024/08/17 | 988844 | macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
-2024/08/17 | 970 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-20-listing.sty
-2024/08/17 | 93724 | macros/luatex/generic/penlightplus.zip
-2024/08/17 | 896 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-17-appendices.sty
-2024/08/17 | 89273 | macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
-2024/08/17 | 88118 | macros/luatex/latex/yamlvars.zip
-2024/08/17 | 85368 | macros/luatex/latex/yamlvars/yamlvars.pdf
-2024/08/17 | 850174 | macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
-2024/08/17 | 8409 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-10-titlepage.sty
-2024/08/17 | 837 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-14-terms-and-definitions.sty
-2024/08/17 | 82217 | macros/luatex/generic/penlightplus/penlightplus.pdf
-2024/08/17 | 7654 | macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
-2024/08/17 | 7539 | macros/luatex/generic/penlightplus/penlightplus.sty
-2024/08/17 | 753951 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
-2024/08/17 | 740 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-15-list-of-abbreviations.sty
-2024/08/17 | 711589 | macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
-2024/08/17 | 687 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-18-extra.sty
-2024/08/17 | 686108 | macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
-2024/08/17 | 67779 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
-2024/08/17 | 668 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-19-counters.sty
-2024/08/17 | 667400 | systems/texlive/tlnet/archive/easybook.doc.r72046.tar.xz
-2024/08/17 | 6414 | macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
-2024/08/17 | 63443 | macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
-2024/08/17 | 622588 | systems/texlive/tlnet/archive/l3kernel-dev.source.r72047.tar.xz
-2024/08/17 | 6222 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-06-tables.sty
-2024/08/17 | 603025 | macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
-2024/08/17 | 594625 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
-2024/08/17 | 588321 | macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
-2024/08/17 | 568542 | macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
-2024/08/17 | 558991 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
-2024/08/17 | 544112 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
-2024/08/17 | 542144 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
-2024/08/17 | 538574 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
-2024/08/17 | 535800 | systems/texlive/tlnet/archive/luamml.doc.r72049.tar.xz
-2024/08/17 | 53203 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/inc/bmstu.png
-2024/08/17 | 5316 | systems/texlive/tlnet/archive/luamml.source.r72049.tar.xz
-2024/08/17 | 530920 | macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
-2024/08/17 | 516817 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
-2024/08/17 | 516309 | macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
-2024/08/17 | 508 | macros/latex/contrib/bmstu-iu8/README.md
-2024/08/17 | 4761 | macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.ins
-2024/08/17 | 465204 | macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
-2024/08/17 | 4510 | macros/luatex/latex/yamlvars/yamlvars.sty
-2024/08/17 | 435158 | macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
-2024/08/17 | 428630 | macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
-2024/08/17 | 422 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-21-math.sty
-2024/08/17 | 4073 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-05-figures.sty
-2024/08/17 | 400 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/DEPENDS.txt
-2024/08/17 | 3854 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-02-construction.sty
-2024/08/17 | 3560 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-04-section-numbering.sty
-2024/08/17 | 3511244 | systems/texlive/tlnet/archive/simpleicons.r72048.tar.xz
-2024/08/17 | 33290 | macros/luatex/generic/penlightplus/penlightplus.lua
-2024/08/17 | 31145 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx
-2024/08/17 | 29935 | macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
-2024/08/17 | 2985 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-07-footnotes.sty
-2024/08/17 | 2881 | macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty
-2024/08/17 | 28684 | macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
-2024/08/17 | 2843 | macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
-2024/08/17 | 2840 | systems/texlive/tlnet/archive/harmony.r72045.tar.xz
-2024/08/17 | 2832 | systems/texlive/tlnet/archive/magicwatermark.r72044.tar.xz
-2024/08/17 | 26550 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx
-2024/08/17 | 26540 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx
-2024/08/17 | 2580 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-01-base.sty
-2024/08/17 | 2562052 | systems/texlive/tlnet/archive/simpleicons.doc.r72048.tar.xz
-2024/08/17 | 2463 | macros/latex/contrib/gridset/README.md
-2024/08/17 | 244 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-11-performers.sty
-2024/08/17 | 244985 | macros/latex/contrib/gridset.zip
-2024/08/17 | 244186 | macros/latex/contrib/gridset/gridset.pdf
-2024/08/17 | 23162 | macros/latex/contrib/gridset/gridset.dtx
-2024/08/17 | 21991 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx
-2024/08/17 | 213 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-08-formulas.sty
-2024/08/17 | 213352 | systems/texlive/tlnet/archive/magicwatermark.doc.r72044.tar.xz
-2024/08/17 | 2108 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/BMSTU-IU8.cls
-2024/08/17 | 20733 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx
-2024/08/17 | 20720 | systems/texlive/tlnet/archive/luamml.r72049.tar.xz
-2024/08/17 | 201934 | macros/latex/contrib/bmstu-iu8.zip
-2024/08/17 | 19628 | systems/texlive/tlnet/archive/easybook.r72046.tar.xz
-2024/08/17 | 19508 | systems/texlive/tlnet/archive/easybook.source.r72046.tar.xz
-2024/08/17 | 19338 | macros/luatex/generic/penlightplus/penlightplus.tex
-2024/08/17 | 19207 | macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
-2024/08/17 | 18170 | macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx
-2024/08/17 | 180552 | macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
-2024/08/17 | 180148 | systems/texlive/tlnet/archive/l3kernel-dev.r72047.tar.xz
-2024/08/17 | 177182 | macros/latex/contrib/bmstu-iu8/bmstu-example.pdf
-2024/08/17 | 17338 | macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
-2024/08/17 | 17316 | macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
-2024/08/17 | 1719 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-12-abstract.sty
-2024/08/17 | 1694 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-13-contents.sty
-2024/08/17 | 166700 | systems/texlive/tlnet/archive/harmony.doc.r72045.tar.xz
-2024/08/17 | 16636 | macros/luatex/latex/yamlvars/yamlvars.lua
-2024/08/17 | 1614 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-09-cites.sty
-2024/08/17 | 15699 | macros/luatex/latex/yamlvars/yamlvars.tex
-2024/08/17 | 1520 | macros/latex/contrib/bmstu-iu8/bmstu-example.tex
-2024/08/17 | 1437 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-22-algorithms.sty
-2024/08/17 | 1354 | macros/latex/contrib/pdfmanagement-testphase/update-metadata.txt
-2024/08/17 | 1339 | macros/luatex/latex/yamlvars/README.md
-2024/08/17 | 1315 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-03-numbering.sty
-2024/08/17 | 12622 | macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
-2024/08/17 | 12362 | macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
-2024/08/17 | 12045456 | systems/texlive/tlnet/archive/l3kernel-dev.doc.r72047.tar.xz
-2024/08/17 | 11838 | macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
-2024/08/17 | 1162 | macros/latex/contrib/pdfmanagement-testphase/README.md
-2024/08/17 | 1132 | macros/luatex/generic/penlightplus/README.md
-2024/08/17 | 11093909 | macros/latex/contrib/pdfmanagement-testphase.zip
-2024/08/17 | 1082 | macros/latex/contrib/gridset/LICENSE.md
-2024/08/17 | 107064 | macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
-2024/08/17 | 1052 | systems/texlive/tlnet/archive/collection-luatex.r72049.tar.xz
-2024/08/17 | 1026 | macros/latex/contrib/bmstu-iu8/bmstu-iu8/styles/IU8-16-references.sty
diff --git a/biblio/ctan-bibdata/ctan.bib b/biblio/ctan-bibdata/ctan.bib
index 622cc0e6a3..47478cb075 100644
--- a/biblio/ctan-bibdata/ctan.bib
+++ b/biblio/ctan-bibdata/ctan.bib
@@ -1,7 +1,7 @@
%% bib file of all CTAN packages
%% (C) Herbert Voß
%%
-%% created at 24-08-2024, 02:00:03
+%% created at 25-08-2024, 02:00:03
%%
%% This file is provided under the terms of the LPPL v1.3 or
@@ -19495,7 +19495,7 @@
title = {The \texttt{domaincoloring} package},
subtitle = {Draw colored represenations of complex functions},
author = {Herbert Voß},
- date = {2024-08-22},
+ date = {2024-08-24},
version = {0.02},
license = {lppl1.3},
mirror = {https://mirror.ctan.org/macros/luatex/latex/domaincoloring},
@@ -34963,6 +34963,23 @@
url = {https://ctan.org/pkg/interfaces},
}
+@manual{ctan-interlinear,
+ title = {The \texttt{interlinear} package},
+ subtitle = {A package for creating interlinear glossed texts with customizable formatting},
+ author = {Akpoué Kouamé Josué},
+ date = {2024-08-24},
+ version = {1.0},
+ license = {lppl1.3c},
+ mirror = {https://mirror.ctan.org/macros/latex/contrib/interlinear},
+ url = {https://ctan.org/pkg/interlinear},
+ annotation = {The package facilitates the creation of interlinear glossed texts,
+ commonly used in linguistic examples. It is based on the
+ package and builds upon its functionality to provide enhanced features. It offers extensive
+ customization options, allowing users to control font styles, formatting, and layout.
+ With predefined styles and margin note customization, provides a flexible
+ solution for presenting linguistic data.},
+}
+
@manual{ctan-interpol,
title = {The \texttt{interpol} package},
subtitle = {Add interpolation to MetaPost graph package},
@@ -39053,8 +39070,8 @@
title = {The \texttt{latexdiff} package},
subtitle = {Determine and mark up significant differences between \LaTeX{} files},
author = {Frederik Tilmann},
- date = {2022-11-09},
- version = {1.3.3},
+ date = {2024-08-24},
+ version = {1.3.4},
license = {gpl3},
mirror = {https://mirror.ctan.org/support/latexdiff},
url = {https://ctan.org/pkg/latexdiff},
@@ -73960,8 +73977,8 @@
title = {The \texttt{tutodoc} package},
subtitle = {Typeset tutorial-like documentations},
author = {Christophe Bal},
- date = {2024-08-23},
- version = {1.2.0},
+ date = {2024-08-24},
+ version = {1.2.0-a},
license = {gpl3},
mirror = {https://mirror.ctan.org/macros/latex/contrib/tutodoc},
url = {https://ctan.org/pkg/tutodoc},
diff --git a/macros/latex/contrib/interlinear/DEPENDS.txt b/macros/latex/contrib/interlinear/DEPENDS.txt
new file mode 100644
index 0000000000..e06d77ce7c
--- /dev/null
+++ b/macros/latex/contrib/interlinear/DEPENDS.txt
@@ -0,0 +1,6 @@
+hard marginnote # for marginnotes
+hard xifthen
+hard xkeyval # For key=val options
+hard xparse
+hard etoolbox
+hard enumitem
diff --git a/macros/latex/contrib/interlinear/LICENSE.txt b/macros/latex/contrib/interlinear/LICENSE.txt
new file mode 100644
index 0000000000..842cf85e3c
--- /dev/null
+++ b/macros/latex/contrib/interlinear/LICENSE.txt
@@ -0,0 +1,415 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2008 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % https://www.latex-project.org/lppl.txt
+ % and version 1.3c or later is part of all distributions of LaTeX
+ % version 2008 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
diff --git a/macros/latex/contrib/interlinear/README.md b/macros/latex/contrib/interlinear/README.md
new file mode 100644
index 0000000000..1a13cca806
--- /dev/null
+++ b/macros/latex/contrib/interlinear/README.md
@@ -0,0 +1,89 @@
+# Interlinear
+
+## Overview
+
+**Interlinear** is a LaTeX package designed to facilitate the typesetting of interlinear glossed text, commonly used in linguistic examples. This package provides customizable formatting for interlinear text, allows for the specification of multiple lines with different formatting, and includes options for managing the presentation of context and language information.
+
+The package also supports predefined styles for common use cases, such as glossing text in italics or setting up non-interlinear modes, making it versatile for a variety of linguistic documentation needs.
+
+## Installation
+
+To install this package, follow these steps:
+
+1. **Manual Installation:**
+ - Download the package files.
+ - Place the `interlinear.sty` file in your LaTeX working directory or a directory that is part of your LaTeX path.
+
+2. **Required Packages:**
+ - marginnote : for marginnotes
+ - xifthen
+ - xkeyval : For key=val options
+ - xparse
+ - etoolbox
+ - enumitem
+
+3. **Using a LaTeX Distribution:**
+ - If the package is included in a LaTeX distribution like TeX Live or MikTeX, you can install it using the distribution's package manager.
+ - Example (for TeX Live users on Linux):
+ ```bash
+ sudo tlmgr install interlinear
+ ```
+ - Example (for MikTeX users on Windows):
+ ```bash
+ miktex-console
+ ```
+
+## Usage
+
+After installation, you can use **Interlinear** in your LaTeX documents by adding the following line in the preamble of your document:
+
+```latex
+\usepackage{interlinear}
+```
+
+## Basic Example
+
+Here’s a basic usage example:
+
+```latex
+\documentclass{article}
+\usepackage{interlinear}
+
+\begin{document}
+
+\begin{interlinear}[linesnumber=3,linefourformat=\itshape]
+% Interlinear content here
+\end{interlinear}
+
+\end{document}
+```
+
+## License
+
+This work (this version and later ones) may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), version 1.3c or later.
+
+The latest version of this license is available at: [LaTeX Project Public License](https://www.latex-project.org/lppl/)
+
+This package is maintained (as per LPPL maintenance status) by **Kouamé Josué Akpoué**.
+
+## Contributing
+
+If you would like to contribute to the development of this package, you can do so by:
+
+- Reporting bugs or suggesting features via the issue tracker.
+- Submitting pull requests with improvements or bug fixes.
+
+## Contact Information
+
+For any inquiries or support requests, please contact:
+
+**Kouamé Josué Akpoué**
+**Email:** [josueakpoue@gmail.com](mailto: josueakpoue@gmail.com)
+**GitHub:** [https://github.com/dbjoshua](https://github.com/dbjoshua)
+
+## Changelog
+
+### Version 1.0.0 (2024-08-22)
+
+- Initial release.
+- Key features include customizable formatting for interlinear text, predefined styles, and margin note customization.
diff --git a/macros/latex/contrib/interlinear/VERSION_1_0 b/macros/latex/contrib/interlinear/VERSION_1_0
new file mode 100644
index 0000000000..f27673edf3
--- /dev/null
+++ b/macros/latex/contrib/interlinear/VERSION_1_0
@@ -0,0 +1,3 @@
+version 1.0
+- initial release
+- main functionalities: interlinear environnement supporting SIL Field's Linguists Toolbox's markers; supporting optional customization and defined styles. Also supports four-lines interlinear gloss texts.
diff --git a/macros/latex/contrib/interlinear/interlinear-doc.pdf b/macros/latex/contrib/interlinear/interlinear-doc.pdf
new file mode 100644
index 0000000000..ab72182639
--- /dev/null
+++ b/macros/latex/contrib/interlinear/interlinear-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/interlinear/interlinear-doc.tex b/macros/latex/contrib/interlinear/interlinear-doc.tex
new file mode 100644
index 0000000000..f16f120754
--- /dev/null
+++ b/macros/latex/contrib/interlinear/interlinear-doc.tex
@@ -0,0 +1,215 @@
+\documentclass{article}
+%\usepackage{interlinear}
+\usepackage{xparse}
+\usepackage{verbatim}
+
+% Commande pour afficher du code (sans les délimiteurs `d```)
+\NewDocumentCommand{\code}{m}{\texttt{#1}}
+\def\interlinearstyle{$\backslash$interlinearstyle}
+
+% Commande pour du texte en gras
+\NewDocumentCommand{\bftext}{m}{\textbf{#1}}
+
+% Commande pour liste avec itemize
+\NewDocumentCommand{\itm}{m}{\begin{itemize}\item #1\end{itemize}}
+
+% Metadata
+\title{interlinear Package Documentation}
+\author{Akpoué Kouamé Josué}
+\date{\today}
+
+\begin{document}
+
+\maketitle
+
+\section{Package Description}
+\subsection{Purpose}
+The \code{interlinear} package provides a new interface for typesetting interlinear texts. It is based on \code{cgloss4e.sty} and is designed to avoid conflicts with other packages, such as \code{linguex}. This package allows for the simultaneous use of \code{linguex} and \code{interlinear} by renaming commands from \code{cgloss4e.sty} for better clarity and maintenance. The package is part of a larger set of tools to facilitate linguistic document preparation using LaTeX.
+
+\subsection{What's New}
+
+\itm{\bftext{Toolbox Integration:} Support for SIL Linguists Field's Toolbox input (with some modifications). You can copy-paste the interlinear text from Toolbox directly into LaTeX.}
+\itm{\bftext{Four-Line Option:} Adds support for a fourth line (Part of speech) in interlinear texts.}
+\itm{\bftext{Markers:} New markers are provided for various parts of the example, including \code{\textbackslash ct} (context), \code{\textbackslash li} (language information), \code{\textbackslash lt} (literal translation), and \code{\textbackslash gj} (grammaticality judgments).}
+\itm{\bftext{Environment:} Defines an \code{interlinear} environment with options for fine-grained control over element appearance.}
+
+\section{Installation and Loading}
+To install, place \code{interlinear.sty} in a directory where LaTeX can find it. Load the package using:
+\begin{verbatim}
+\usepackage{interlinear}
+\end{verbatim}
+Alternatively, use:
+\begin{verbatim}
+\input{path/to/interlinear.sty}
+\end{verbatim}
+
+%\subsection{Required Packages}
+
+To ensure the proper functioning of the \texttt{interlinear} package, the following LaTeX packages are required:
+
+\begin{itemize}
+ \item \texttt{marginnote}: This package is used for creating margin notes in your document.
+ \item \texttt{xifthen}: Provides conditional commands for handling various logic in the package.
+ \item \texttt{xkeyval}: Used to implement key=value options for customizing the behavior of the \texttt{interlinear} environment.
+ \item \texttt{xparse}: Facilitates the definition of commands and environments with a more flexible interface.
+ \item \texttt{etoolbox}: Supplies advanced tools for programming within LaTeX, such as patching and extending existing commands.
+ \item \texttt{enumitem}: Allows customization of list environments (like \texttt{itemize}, \texttt{enumerate}, etc.), which may be used within \texttt{interlinear}.
+\end{itemize}
+
+Ensure that these packages are included in your LaTeX distribution.
+
+\section{Basic Usage}
+The main feature of \code{interlinear} is the \code{interlinear} environment. This environment allows you to structure interlinear texts using markers. Below is a comparison between \code{cgloss4e} and \code{interlinear} syntax.
+
+\subsection{Example 1: Two-Line Interlinear}
+\textbf{cgloss4e} code:
+\begin{verbatim}
+\gll lorem ipsum dolor\\
+ sit amet consegur\\
+\glt `Lorem ipsum dolor'
+\end{verbatim}
+
+\textbf{interlinear} code:
+\begin{verbatim}
+\begin{interlinear}
+\tx lorem ipsum dolor\\
+\gl sit amet consegur\\
+\ft `Lorem ipsum dolor'\\
+\end{interlinear}
+\end{verbatim}
+
+\subsection{Example 2: Three-Line Interlinear}
+\textbf{cgloss4e} code:
+\begin{verbatim}
+\glll lorem ipsum\\
+ dolor sit\\
+ amet consegur\\
+\glt `Lorem ipsum dolor'
+\end{verbatim}
+
+\textbf{interlinear} code:
+\begin{verbatim}
+\begin{interlinear}
+\tx lorem ipsum\\
+\mb dolor sit\\
+\gl amet consegur\\
+\ft `Lorem ipsum dolor'\\
+\end{interlinear}
+\end{verbatim}
+
+\subsection{Complete Example}
+\begin{verbatim}
+\begin{interlinear}
+\li Language\\
+\rf Identifier of the data in the corpus/corpora\\
+\ct Context\\
+\gj Grammaticality judgment\\
+\tx Object language text\\
+\mb Morpheme breaks\\
+\gl Glosses\\
+\ps Part-of-speech\\
+\ft Free translation\\
+\lt Literal translation\\
+\nt Extra note\\
+\end{interlinear}
+\end{verbatim}
+
+\section{Setting Options}
+The \code{interlinear} environment can be customized using the options described below.
+
+\subsection{Interlinear Lines Number}
+The number of interlinear lines is controlled by the \code{linesnumber} option. Possible values are 0, 2, 3, 4 (default is 2).
+
+\subsection{Markers and Customization}
+You can define custom markers for each part of the interlinear text:
+\begin{verbatim}
+\li languageinfomarker
+\rf referencemarker
+\ct contextmarker
+\gj gramjudgmarker
+\tx textmarker
+\mb morphbreakmarker
+\gl glossmarker
+\ps partofspeechmarker
+\ft freetranslationmarker
+\lt literaltranslationmarker
+\nt extranotemarker
+\end{verbatim}
+
+\subsection{Appearance Customization}
+You can modify the appearance of different elements using the following options:
+\begin{verbatim}
+lineoneformat % First line format
+linetwoformat % Second line format
+linethreeformat % Third line format
+linefourformat % Fourth line format
+exformat % Example text format (no-interlinear mode)
+extranoteformat % Extra note format
+contextnameformat % Context label format
+\end{verbatim}
+
+These options can control the font family, shape, series, size, and color. To specify multiple formatting options, enclose them in a group. For example, the command \code{lineoneformat=\{$\backslash$itshape$\backslash$bfseries$\backslash$small\}} will set the text on the first interlinear or gloss line to boldface italics in a small size. By default, all formats are set to \code{$\backslash$normalfont}.
+
+\subsection{Other Settings}
+Various other elements can be customized:
+
+\itm{The label indicating the context of the example can be changed using the \code{contextname} option. For instance, to change \code{Context:} to \code{Situation:}, use \code{contextname={Situation:}}.}
+
+\itm{The space between the context and the body of the example can be specified via the \code{contextvoffset} option.}
+
+\itm{By default, marginal notes are enclosed in parentheses \code{()}. To change this behavior, use the \code{extranoteleftpunct} and \code{extranoterightpunct} options. For example, to change the parentheses to square brackets \code{[]}, set \code{extranoteleftpunct={[}} and \code{extranoterightpunct={]}}. If you prefer no punctuation marks around your notes, set \code{extranoteleftpunct={}} and \code{extranoterightpunct={}}.}
+
+\itm{The placement of language information for the linguistic example is controlled by the \code{languageinfopos} option, which accepts two values: \code{head} and \code{margin}. The default value, \code{margin}, places this information in parentheses in the margin of the first line of the example. The \code{head} value places it in a separate line at the very beginning of the example, even before the context. When the no-interlinear mode is enabled, \code{languageinfopos} should be set to \code{head} to avoid positioning conflicts with marginal notes.}
+
+\subsection{Applying Options Outside the Environment}
+Options can also be specified outside the \code{interlinear} environment using the \code{\interlinearstyle} command, which takes one mandatory argument. This argument should contain the list of chosen options, and \code{\interlinearstyle} must be called before the environment.
+
+For example:
+\begin{verbatim}
+\begin{interlinear}[linesnumber=3,linefourformat=\itshape]
+(content)
+\end{interlinear}
+\end{verbatim}
+
+is equivalent to:
+\begin{verbatim}
+\interlinearstyle{linesnumber=3,linefourformat=\itshape}
+\begin{interlinear}
+(content)
+\end{interlinear}
+\end{verbatim}
+
+The \code{$\backslash$interlinearstyle} command redefines the default values for the specified options. Therefore, each time this command is used, it updates the default values for the specified options.
+
+\subsection{Using Predefined and Custom Styles}
+One of the features of the \code{interlinear} package is the ability to define multiple styles and use them throughout the document without having to call \code{$\backslash$interlinearstyle} each time. There are four predefined styles:
+
+\begin{itemize}
+ \item \code{default}: Standard settings.
+ \item \code{gsr}: Sets the first interlinear line in italics.
+ \item \code{nointerlinear}: Configures the no-interlinear mode, changes the \code{$\backslash$ft} marker to \code{$\backslash$ot}, and sets \code{languageinfopos} to \code{head}. This style provides a safe way to configure the no-interlinear mode without worrying about the various parameters.
+ \item \code{gsrnointerlinear}: Similar to \code{nointerlinear}, but the text of the example is italicized.
+\end{itemize}
+
+There are two ways to apply a style:
+\begin{enumerate}
+\item Using the \code{$\backslash$UseInterlinearStyle\{\}} command before the \code{interlinear} environment, at the beginning of the document, or in the preamble.
+\item Using the dedicated \code{style} option in the optional argument of the \code{interlinear} environment.
+\end{enumerate}
+
+Example: \code{$\backslash$begin\{interlinear\}[style=gsr]}.
+
+It is recommended to specify the \code{style} option first when combining it with other options.
+
+You can also specify additional options alongside the style to customize it as needed (e.g., if you want to temporarily modify a style parameter).
+
+For example, the \code{gsr} style was declared using the following code:
+\begin{verbatim}
+\DeclareInterlinearStyle{gsr}{%
+ linesnumber=2,%
+ lineoneformat=\itshape,%
+ linetwoformat=\normalfont%
+}
+\end{verbatim}
+
+\end{document}
diff --git a/macros/latex/contrib/interlinear/interlinear.sty b/macros/latex/contrib/interlinear/interlinear.sty
new file mode 100644
index 0000000000..dd881b83db
--- /dev/null
+++ b/macros/latex/contrib/interlinear/interlinear.sty
@@ -0,0 +1,1176 @@
+% ^package_name="lingwrit-interlinear"_version="1.0"_container="lingwrit"
+% ^markup-language="WRIML"
+% ^purpose
+% This package processes interlinear gloss text, providing tools for handling and formatting glosses in linguistic documents.
+% It is based on the cgloss4e.sty package, but with significant modifications to avoid conflicts with other packages and to extend functionality.
+% As part of the lingwrit package, lingwrit-interlinear should not be loaded alongside it.
+% _purpose
+% ^base-program cgloss4e.sty _base-program
+
+% ^rem General Information
+% ^- lingwrit-interlinear is a modified version of cgloss4e.sty _-
+% ^- It primarily renames commands according to a customized syntax to prevent conflicts with other similar packages. _-
+% ^- Additional modifications include new commands and a new interlinear environment. _-
+% ^- Code added to the original has been marked with % ^added and % _added _-
+% _rem
+
+% ^module_name="interlinear"_container="lingwrit"
+% ^desc
+% This module is a modified version of the cgloss4e.sty.
+%
+% Modifications include:
+% - Command renaming: Commands have been renamed to avoid potential conflicts with other packages using similar names.
+% - Commands for processing four-lines interlinearization
+% - interlinear environment with its options
+% - markup commands and other functionalities
+%
+% Below is the list of new command names and their counterparts in cgloss:
+
+% ^list
+% ^cat Functions _cat
+
+% \more ^_becomes \lw_iln_process:words_queue
+% \lastword ^_becomes \lw_iln_fun_get:last_word
+% \testdone ^_becomes \lw_iln_check:queue_emptyness
+% \getwords ^_becomes \lw_iln_fun_get:line_words
+% \donewords ^_becomes \lw_iln_fun_exit:word_extraction
+% \twosent ^_becomes \lw_iln_fun_align:two_lines_words
+% \threesent ^_becomes \lw_iln_fun_align:three_lines_words
+% \glossglue ^_becomes \lw_iln_glue:inter_word_space
+% \gll ^_becomes \lw_iln_fun_enter:two_lines_interlinearization
+% \glll ^_becomes \lw_iln_fun_enter:three_lines_interlinearization
+% \glt ^_becomes \lw_iln_fun_insert:free_translation
+% \glend ^_becomes \lw_iln_fun_exit:interlinearization
+% \gl@stop ^_becomes \lw_iln_fun_exit:words_alignment
+
+% ^cat Boxes variables _cat
+
+% \lineone ^_becomes \lw_iln_var_box:line_one
+% \linetwo ^_becomes \lw_iln_var_box:line_two
+% \linethree ^_becomes \lw_iln_var_box:line_three
+% \linefour ^_becomes \lw_iln_var_box:line_four
+% \wordone ^_becomes \lw_iln_var_box:word_one
+% \wordtwo ^_becomes \lw_iln_var_box:word_two
+% \wordthree ^_becomes \lw_iln_var_box:word_three
+% \wordfour ^_becomes \lw_iln_var_box:word_four
+% \gline ^_becomes \lw_iln_var_box:iln_text_lines
+
+% ^cat Setting Appearence _cat
+
+% \eachwordone ^_becomes \lw_iln_fun_set:line_one_words_format
+% \eachwordtwo ^_becomes \lw_iln_fun_set:line_two_words_format
+% \eachwordthree ^_becomes \lw_iln_fun_set:line_three_words_format
+% \eachwordfour ^_becomes \lw_iln_fun_set:line_four_words_format
+% _list
+
+% The naming of the commands follows the following schema:
+
+% \<container>_<package>_<type>_<subtype>:<name/description>
+
+% <container> code is: lw (for lingwrit)
+% <package> code is: iln (for interlinear)
+% <type> code includes: "var" (for variables) and "fun" (for functions)
+
+% Variable Subtypes
+% box: for boxes
+
+% Function Subtypes
+% enter: initialize a process
+% exit: terminates a process
+% get: extract information
+% check: test if some condition is met
+% insert: inserts some stuff (i.e. the translation)
+% process: process given elements
+% calc: calculates the value of some variable
+% set: sets (manually) the values of some variable
+% _desc
+
+% ^code
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{lingwrit-interlinear}[2024/08/22 v1.0 (Linguistic Writing) Interlinear gloss text processing]
+
+% todo Required Packages
+\RequirePackage{marginnote} % ^rem for marginnotes _rem
+\RequirePackage{xifthen}
+\RequirePackage{xkeyval} % ^rem For key=val options
+\RequirePackage{xparse,etoolbox,enumitem}
+
+% todo 0. Utilities
+
+% todo a. LW Syntax Related Commands
+% Shortcut for some conditional statements
+\DeclareDocumentCommand{\IfValueArgTF}{mmmm}{\ifthenelse{\equal{#1}{#2}}{#3}{#4}}
+% Enabling the package syntax
+\providecommand{\switchlwsyntaxon}{\makeatletter\catcode `:=11 \catcode `_=11}
+\providecommand{\switchlwsyntaxoff}{\makeatother \catcode `:=12 \catcode `_=8}
+% if you want to modify some internal commands, check if your code is
+% surrounded by \switchlwsyntaxon and \switchlwsyntaxoff (LW Syntax enables "@", ":" and "_" to be used in csnames. So you need not using \makeatletter and \makeatother when you are using lwsyntax))
+
+
+% ^action_name="Enabling LingWrit Syntax"
+\switchlwsyntaxon
+% _action
+
+% todo b. Renaming of some TeX primitives
+\let\enter:group\bgroup\relax
+\let\exit:group\egroup\relax
+
+% todo c. Defining some helpers
+\def\lw_fun_helper:store#1{\expandafter\let\csname call:stored_#1\endcsname\expandafter\csname #1\endcsname}
+\def\lw_fun_helper:call#1{#1}
+\def\lw_fun_helper:clear#1{\RenewDocumentCommand{#1}{}{\relax}}%
+
+% todo d. Usefull Commands That are not used
+% The following commands are not used actually but may be usefull in some contexts
+% Fixing bugs with setspace package
+% If you encounter an error message using \singlespacing, \onehalfspacing or \doublespacing, use either of the following commands, according to your needs.
+
+\def\usedoublespacing{\lw_fun_helper:store{doublespacing}
+ \renewcommand\doublespacing{%
+ \call:stored_doublespacing%
+ \def\baselinestretch{1.69}}%
+}
+%
+\def\useonehalfspacing{%
+ \lw_fun_helper:store{onehalfspacing}
+ \renewcommand\onehalfspacing{%
+ \call:stored_onehalfspacing%
+ \def\baselinestretch{1.24}}%
+ }
+\def\usesinglespacing{%
+ \lw_fun_helper:store{singlespacing}
+ \renewcommand\singlespacing{%
+ \call:stored_singlespacing%
+ \def\baselinestretch{1}}%
+ }
+
+% Line Stretch Size Calculator
+
+% Enable LW Syntax
+%\switchlwsyntaxon
+%\newcounter{currentsize}
+%\setcounter{currentsize}{10}
+%\addtocounter{currentsize}{\@ptsize}
+%\newlength{\lw_iln_length:line_stretch_size}
+%\setlength{\lw_iln_length:line_stretch_size}{\dimexpr\baselinestretch pt * \thecurrentsize}
+%Current size: \thecurrentsize
+%Current interline size:
+%\the\lw_iln_length:line_stretch_size
+% Disable LW Syntax
+% \switchlwsyntaxoff
+
+% todo enter:cgloss4e modifications *
+
+% todo 1. Borrowings from covington
+
+% Forcing and disabling single spacing
+\let\@gsingle=1
+\def\lw_iln_fun_enable:force_single_spacing{\let\@gsingle=1}
+\def\lw_iln_fun_disable:force_single_spacing{\let\@gsingle=0}
+\@ifundefined{new@fontshape}%
+{\def\@selfnt{\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi}}
+{\def\@selfnt{\selectfont}}
+
+% todo a. 2-lines global interlinearization processing commands
+% ^modif_action="\begin{flushleft} removed"
+% ^rem inspired by Alexis Dimitriadis cgloss.sty _rem
+
+\def\lw_iln_fun_enter:two_lines_interlinearization% % Introduces 2-line text-and-gloss.
+{%\begin{flushleft}
+ \ifx\@gsingle1% conditionally force single spacing (hpk/MC)
+ \vskip\baselineskip\def\baselinestretch{1}%
+ \@selfnt\vskip-\baselineskip\fi%
+ \enter:group%
+ \lw_iln_fun_align:two_lines_words%
+ }
+% _modif
+
+% todo b. 3-lines global interlinearization processing commands
+% ^modif_action="\begin{flushleft} removed"
+% ^rem inspired by Alexis Dimitriadis cgloss.sty _rem
+ \def\lw_iln_fun_enter:three_lines_interlinearization% % Introduces 3-line text-and-gloss.
+ {%\begin{flushleft}
+ \ifx\@gsingle1% conditionally force single spacing (hpk/MC)
+ \vskip\baselineskip\def\baselinestretch{1}%
+ \@selfnt\vskip-\baselineskip\fi%
+ \enter:group
+ \lw_iln_fun_align:three_lines_words
+ }
+% _modif
+
+% todo c. 4-lines global interlinearization processing commands
+% ^added_action="\lw_iln_fun_enter:four_lines_interlinearization defined for initiating 4-lines interlinearization"
+ % ^rem inspired by Alexis Dimitriadis cgloss.sty _rem
+ \def\lw_iln_fun_enter:four_lines_interlinearization% % Introduces 3-line text-and-gloss.
+ {%\begin{flushleft}
+ \ifx\@gsingle1% conditionally force single spacing (hpk/MC)
+ \vskip\baselineskip\def\baselinestretch{1}%
+ \@selfnt\vskip-\baselineskip\fi%
+ \enter:group
+ \lw_iln_fun_align:four_lines_words
+ }
+ % _modif
+
+% todo d. Translation and interlinear end
+% ^modif_action="Is now obsolete"
+% \def\lw_iln_fun_insert:free_translation{} ^rem obsolete _rem
+% _modif
+% ^modif_action="Definition modified"
+ % Introduces a translation
+ \let\trans\relax% ^rem obsolete _rem
+% _modif
+
+ \def\lw_iln_fun_exit:interlinearization{%
+ \lw_iln_fun_insert:interlinear_bottom_skip%
+ }
+ % Ends the gloss environment.
+% _modif
+
+% todo 2. Adaptation of gloss.tex
+
+ % The following TeX code is adapted, with permission, from:
+ % gloss.tex: Macros for vertically aligning words in consecutive sentences.
+ % Version: 1.0 release: 26 November 1990
+ % Copyright (c) 1991 Marcel R. van der Goot (marcel@cs.caltech.edu).
+ % Original Midnight/gloss.tex and Midnight/gloss.doc are available from
+ % csvax.cs.caltech.edu [131.215.131.131] in pub/tex
+ % and many other anonymous ftp archives.
+
+% todo a. Box Variables Declaration
+ \newbox\lw_iln_var_box:line_one% boxes with words from first line
+ \newbox\lw_iln_var_box:line_two%
+ \newbox\lw_iln_var_box:line_three%
+ \newbox\lw_iln_var_box:line_four% ^rem ADDED _rem
+ \newbox\lw_iln_var_box:word_one% a word from the first line (hbox)
+ \newbox\lw_iln_var_box:word_two%
+ \newbox\lw_iln_var_box:word_three%
+ \newbox\lw_iln_var_box:word_four% ^rem ADDED _rem
+ \newbox\lw_iln_var_box:iln_text_lines% the constructed double line (hbox)
+
+% todo b. Skip Variable Declaration and setting
+ \newskip\lw_iln_glue:inter_word_space% extra glue between glossed pairs or triples
+ \lw_iln_glue:inter_word_space = 0pt plus 2pt minus 1pt % allow stretch/shrink between words
+ %\lw_iln_glue:inter_word_space = 5pt plus 2pt minus 1pt % allow stretch/shrink between words
+ \newlength{\lw_iln_length:base_line_stretch}
+ \setlength{\lw_iln_length:base_line_stretch}{.61ex}
+
+ \AtBeginDocument{%
+ \def\lw_iln_fun_calc:line_stretch_factor{%
+ \ifdim\baselinestretch\p@=1\p@%
+ \def\lw_iln_multiplier:line_stretch_factor{.5}
+ \else%
+ \ifdim\baselinestretch\p@<1.26\p@%
+ \def\lw_iln_multiplier:line_stretch_factor{.5}
+ \else%
+ \ifdim\baselinestretch\p@<1.6\p@
+ \def\lw_iln_multiplier:line_stretch_factor{1.6}
+ \else%
+ \ifdim\baselinestretch\p@>1.6\p@
+ \def\lw_iln_multiplier:line_stretch_factor{2.23}
+ \else%
+ \ifdim\baselinestretch\p@=1.6\p@
+ \def\lw_iln_multiplier:line_stretch_factor{2.23}
+ \else%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ }
+ \lw_iln_fun_calc:line_stretch_factor%
+ %
+ \newlength{\lw_iln_length:line_spread}
+ \setlength{\lw_iln_length:line_spread}{0ex}
+ \addtolength{\lw_iln_length:line_spread}{\lw_iln_multiplier:line_stretch_factor\lw_iln_length:base_line_stretch}
+ \addtolength{\lw_iln_length:line_spread}{.16\lw_iln_length:base_line_stretch}
+ }
+ %\addtolength{\lw_iln_length:line_spread}{\lw_iln_multiplier:line_stretch_factor\lw_iln_length:base_line_stretch}
+
+
+% todo c. Boolean Declaration
+ \newif\ifnotdone
+
+% todo d. \rmfamily font declaraton (for backward compatibility)
+ % For any REALLY old distributions without \rmfamily
+ \@ifundefined{rmfamily}{\let\rmfamily=\rm}
+
+% todo e. Définition functions controlling the appearance of words in each line of the interlinearized text
+% ^modified_action="Adding low level commands to format different aspects of the appearence of words"
+\@ifundefined{lw_iln_fun_set:line_one_words_format}%
+ {\newcommand\lw_iln_fun_set:line_one_words_format{%
+ \lw_iln_fun_set:line_one_words_font_size%
+ \lw_iln_fun_set:line_one_words_font_series%
+ \lw_iln_fun_set:line_one_words_font_shape%
+ \lw_iln_fun_set:line_one_words_font_color%
+ }
+ }{\relax}
+ % ^added
+ \let\lw_iln_fun_set:line_one_words_font_size=\normalsize
+ \let\lw_iln_fun_set:line_one_words_font_series=\mdseries%
+ \let\lw_iln_fun_set:line_one_words_font_shape=\upshape%
+ \let\lw_iln_fun_set:line_one_words_font_color=\normalcolor%
+ % _added
+ %
+\@ifundefined{lw_iln_fun_set:line_two_words_format}%
+ {\newcommand\lw_iln_fun_set:line_two_words_format{%
+ \lw_iln_fun_set:line_two_words_font_size%
+ \lw_iln_fun_set:line_two_words_font_series%
+ \lw_iln_fun_set:line_two_words_font_shape%
+ \lw_iln_fun_set:line_two_words_font_color}
+ }%
+ {\relax}
+%
+ % ^added
+ \let\lw_iln_fun_set:line_two_words_font_size=\normalsize
+ \let\lw_iln_fun_set:line_two_words_font_series=\mdseries%
+ \let\lw_iln_fun_set:line_two_words_font_shape=\upshape%
+ \let\lw_iln_fun_set:line_two_words_font_color=\normalcolor%
+ % _added
+ %
+\@ifundefined{lw_iln_fun_set:line_three_words_format}{%
+ \newcommand\lw_iln_fun_set:line_three_words_format{%
+ \lw_iln_fun_set:line_three_words_font_size%
+ \lw_iln_fun_set:line_three_words_font_series%
+ \lw_iln_fun_set:line_three_words_font_shape%
+ \lw_iln_fun_set:line_three_words_font_color}
+ }{\relax}
+ % ^added
+ \let\lw_iln_fun_set:line_three_words_font_size=\normalsize
+ \let\lw_iln_fun_set:line_three_words_font_series=\mdseries%
+ \let\lw_iln_fun_set:line_three_words_font_shape=\upshape%
+ \let\lw_iln_fun_set:line_three_words_font_color=\normalcolor%
+ % _added
+ %
+%
+\@ifundefined{lw_iln_fun_set:line_four_words_format}{%
+ \newcommand\lw_iln_fun_set:line_four_words_format{%
+ \lw_iln_fun_set:line_four_words_font_size%
+ \lw_iln_fun_set:line_four_words_font_series%
+ \lw_iln_fun_set:line_four_words_font_shape%
+ \lw_iln_fun_set:line_four_words_font_color}
+ }{\relax}% ^rem ADDED _rem
+ % ^added
+ \let\lw_iln_fun_set:line_four_words_font_size=\normalsize
+ \let\lw_iln_fun_set:line_four_words_font_series=\mdseries%
+ \let\lw_iln_fun_set:line_four_words_font_shape=\upshape%
+ \let\lw_iln_fun_set:line_four_words_font_color=\normalcolor%
+ % _added
+ %
+% _modified
+% todo f. General Interlinearization Functions Definition
+ \def\lw_iln_fun_get:last_word#1#2#3% #1 = \each, #2 = line box, #3 = word box
+ {\setbox#2=\vbox{\unvbox#2%
+ \global\setbox#3=\lastbox%
+ }%
+ \ifvoid#3\global\setbox#3=\hbox{#1\strut{} }\fi
+ % extra space following \strut in case #1 needs a space
+ }
+
+ \def\lw_iln_check:words_queue_emptyness
+ {\ifdim\ht\lw_iln_var_box:line_one=0pt
+ \ifdim\ht\lw_iln_var_box:line_two=0pt \notdonefalse % tricky space after pt
+ \else\notdonetrue
+ \fi
+ \else\notdonetrue
+ \fi
+ }
+
+ \gdef\lw_iln_fun_get:line_words(#1,#2)#3 #4\\% #1=linebox, #2=\each, #3=1st word, #4=remainder
+ {\setbox#1=\vbox{\hbox{#2{\strut#3} }% adds space
+ \unvbox#1%
+ }%
+ \def\lw_iln_process:words_queue{#4}%
+ \ifx\lw_iln_process:words_queue\empty\let\lw_iln_process:words_queue=\lw_iln_fun_exit:word_extraction
+ \else\let\lw_iln_process:words_queue=\lw_iln_fun_get:line_words
+ \fi
+ \lw_iln_process:words_queue(#1,#2)#4\\%
+ }
+
+ \gdef\lw_iln_fun_exit:word_extraction(#1,#2)\\{}%
+
+% todo g. Processing of 2-lines interlinear texts
+% ^modif_action"Rename \twosent into original twosent"
+ \gdef\lw_iln_fun_align:two_lines_words#1\\ #2\\{% #1 = first line, #2 = second line
+ \lw_iln_fun_get:line_words(\lw_iln_var_box:line_one,\lw_iln_fun_set:line_one_words_format)#1 \\%
+ \lw_iln_fun_get:line_words(\lw_iln_var_box:line_two,\lw_iln_fun_set:line_two_words_format)#2 \\%
+ \loop\lw_iln_fun_get:last_word{\lw_iln_fun_set:line_one_words_format}{\lw_iln_var_box:line_one}{\lw_iln_var_box:word_one}%
+ \lw_iln_fun_get:last_word{\lw_iln_fun_set:line_two_words_format}{\lw_iln_var_box:line_two}{\lw_iln_var_box:word_two}%
+ \global\setbox\lw_iln_var_box:iln_text_lines=\hbox{\unhbox\lw_iln_var_box:iln_text_lines
+ \hskip\lw_iln_glue:inter_word_space
+ \vtop{\box\lw_iln_var_box:word_one % vtop was vbox
+ \nointerlineskip
+ \box\lw_iln_var_box:word_two
+ }%
+ }%
+ \lw_iln_check:words_queue_emptyness
+ \ifnotdone
+ \repeat
+ \exit:group % matches \enter:group in \gloss
+ \lw_iln_fun_exit:words_alignment}
+% _modif
+
+
+% todo h. Processing of 3-lines interlinear texts
+ \gdef\lw_iln_fun_align:three_lines_words#1\\ #2\\ #3\\{% #1 = first line, #2 = second line, #3 = third
+ \lw_iln_fun_get:line_words(\lw_iln_var_box:line_one,\lw_iln_fun_set:line_one_words_format)#1 \\%
+ \lw_iln_fun_get:line_words(\lw_iln_var_box:line_two,\lw_iln_fun_set:line_two_words_format)#2 \\%
+ \lw_iln_fun_get:line_words(\lw_iln_var_box:line_three,\lw_iln_fun_set:line_three_words_format)#3 \\%
+ \loop\lw_iln_fun_get:last_word{\lw_iln_fun_set:line_one_words_format}{\lw_iln_var_box:line_one}{\lw_iln_var_box:word_one}%
+ \lw_iln_fun_get:last_word{\lw_iln_fun_set:line_two_words_format}{\lw_iln_var_box:line_two}{\lw_iln_var_box:word_two}%
+ \lw_iln_fun_get:last_word{\lw_iln_fun_set:line_three_words_format}{\lw_iln_var_box:line_three}{\lw_iln_var_box:word_three}%
+ \global\setbox\lw_iln_var_box:iln_text_lines=\hbox{\unhbox\lw_iln_var_box:iln_text_lines
+ \hskip\lw_iln_glue:inter_word_space
+ \vtop{\box\lw_iln_var_box:word_one % vtop was vbox
+ \nointerlineskip
+ \box\lw_iln_var_box:word_two
+ \nointerlineskip
+ \box\lw_iln_var_box:word_three
+ }%
+ }%
+ \lw_iln_check:words_queue_emptyness
+ \ifnotdone
+ \repeat
+ \exit:group % matches \enter:group in \gloss
+ \lw_iln_fun_exit:words_alignment}
+
+
+% todo i. Processing of 4-lines interlinear texts
+% ^added_action"Four lines interlinear processor, equivalent to an hypothetic \foursent for gloss.tex based interlinearization packages"
+\gdef\lw_iln_fun_align:four_lines_words#1\\ #2\\ #3\\ #4\\{% #1 = first line, #2 = second line, #3 = third
+ \lw_iln_fun_get:line_words(\lw_iln_var_box:line_one,\lw_iln_fun_set:line_one_words_format)#1 \\%
+ \lw_iln_fun_get:line_words(\lw_iln_var_box:line_two,\lw_iln_fun_set:line_two_words_format)#2 \\%
+ \lw_iln_fun_get:line_words(\lw_iln_var_box:line_three,\lw_iln_fun_set:line_three_words_format)#3 \\%
+ \lw_iln_fun_get:line_words(\lw_iln_var_box:line_four,\lw_iln_fun_set:line_four_words_format)#4 \\%
+ \loop\lw_iln_fun_get:last_word{\lw_iln_fun_set:line_one_words_format}{\lw_iln_var_box:line_one}{\lw_iln_var_box:word_one}%
+ \lw_iln_fun_get:last_word{\lw_iln_fun_set:line_two_words_format}{\lw_iln_var_box:line_two}{\lw_iln_var_box:word_two}%
+ \lw_iln_fun_get:last_word{\lw_iln_fun_set:line_three_words_format}{\lw_iln_var_box:line_three}{\lw_iln_var_box:word_three}%
+ \lw_iln_fun_get:last_word{\lw_iln_fun_set:line_four_words_format}{\lw_iln_var_box:line_four}{\lw_iln_var_box:word_four}%
+ \global\setbox\lw_iln_var_box:iln_text_lines=\hbox{\unhbox\lw_iln_var_box:iln_text_lines
+ \hskip\lw_iln_glue:inter_word_space
+ \vtop{\box\lw_iln_var_box:word_one % vtop was vbox
+ \nointerlineskip
+ \box\lw_iln_var_box:word_two
+ \nointerlineskip
+ \box\lw_iln_var_box:word_three
+ \nointerlineskip
+ \box\lw_iln_var_box:word_four
+ }%
+ }%
+ \lw_iln_check:words_queue_emptyness
+ \ifnotdone
+ \repeat
+ \exit:group % matches \enter:group in \gloss
+ \lw_iln_fun_exit:words_alignment}
+
+% _added
+
+
+% todo j. Ending interlinearization
+% ^modif_action="\end{flushleft} removed"
+% ^rem inspired by Alexis Dimitriadis cgloss.sty _rem
+ \def\lw_iln_fun_exit:words_alignment{{\hskip -\lw_iln_glue:inter_word_space}\unhbox\lw_iln_var_box:iln_text_lines}
+% _modif
+% todo * exit:cgloss4e modifications
+
+% todo 1. Other added features
+% todo a. Managing line spacing after interlinearization
+\def\baselinestretch{1}
+\def\lw_iln_fun_insert:interlinear_bottom_skip{\vskip \lw_iln_length:line_spread}%
+
+% todo b. Configuring ex-parts boxes
+
+% ^rem Examples will now be placed within boxes, alongside glosses lines (old genericx.tex's \mb and \gl lines), and hanging bracketed language informations (like LangSci jamboxes) _rem
+% todo i. Setting Lengths
+% ===============
+% Setting Lengths
+% ===============
+%
+
+\newlength{\lw_iln_var_dim:ex_box_width}
+\newlength{\lw_iln_var_dim:ex_box_right_margin}
+%\newlength{\lw_iln_var_dim:ex_box_bottom_sep}
+%\newlength{\lw_iln_var_dim:ex_box_top_sep}
+\newlength{\lw_iln_var_dim:iln_box_width}
+\newlength{\lw_iln_var_dim:iln_box_right_margin}
+%\newlength{\lw_iln_var_dim:iln_box_bottom_sep}
+%\newlength{\lw_iln_var_dim:iln_box_top_sep}
+\newlength{\lw_iln_var_dim:trans_box_width}
+\newlength{\lw_iln_var_dim:trans_box_right_margin}
+\newlength{\lw_iln_var_dim:gramjudg_len}
+\newlength{\lw_iln_var_dim:gramjudg_reserved_space}
+\newlength{\lw_iln_var_dim:langinfo_box_width}
+\newlength{\lw_iln_var_dim:langinfo_box_left_sep}
+\newlength{\lw_iln_var_dim:langinfo_box_right_sep}
+\newlength{\lw_iln_var_dim:langinfo_reserved_space}
+%\newlength{\lw_iln_var_dim:langinfo_left_margin}
+\newlength{\lw_iln_var_dim:extranote_box_width}
+\newlength{\lw_iln_var_dim:extranote_box_left_sep}
+\newlength{\lw_iln_var_dim:extranote_box_right_sep}
+\newlength{\lw_iln_var_dim:extranote_reserved_space}
+%\newlength{\lw_iln_var_dim:extranote_left_margin}
+
+% Initializing lengths
+\setlength{\lw_iln_var_dim:ex_box_width}{\linewidth}
+\setlength{\lw_iln_var_dim:ex_box_right_margin}{0ex}
+\setlength{\lw_iln_var_dim:iln_box_width}{\linewidth}
+\setlength{\lw_iln_var_dim:iln_box_right_margin}{0ex}
+\setlength{\lw_iln_var_dim:trans_box_width}{\linewidth}
+\setlength{\lw_iln_var_dim:trans_box_right_margin}{0ex}
+\addtolength{\lw_iln_var_dim:trans_box_width}{-\lw_iln_var_dim:trans_box_right_margin}
+\setlength{\lw_iln_var_dim:gramjudg_len}{0ex}% ^rem default value _rem
+\setlength{\lw_iln_var_dim:langinfo_box_width}{0ex}% ^rem default value _rem
+\setlength{\lw_iln_var_dim:langinfo_reserved_space}{0ex}
+\setlength{\lw_iln_var_dim:langinfo_box_left_sep}{3.4ex}
+\setlength{\lw_iln_var_dim:langinfo_box_right_sep}{3.4ex}
+\setlength{\lw_iln_var_dim:extranote_box_width}{0ex}% ^rem default value _rem
+\setlength{\lw_iln_var_dim:extranote_reserved_space}{0ex}
+\setlength{\lw_iln_var_dim:extranote_box_left_sep}{0pt}
+\setlength{\lw_iln_var_dim:extranote_box_right_sep}{0pt}
+
+% ===========================
+% Defining Booleans for Boxes
+% Opennings
+% ===========================
+\newif\ifnoglosslines%
+\noglosslinestrue
+% todo ii. Defining Opening CS for Boxes
+% =============================
+% Defining Opening CS for Boxes
+% =============================
+\NewDocumentCommand{\lw_iln_fun_open:ex_box}{}{%
+ % ^rem example box opening code _rem
+ % ^rem \lw_iln_fun_open:ex_box should be called after \label{key} to avoid linebreak _rem
+ % ^rem no_op command _rem
+ }
+\NewDocumentCommand{\lw_iln_fun_open:iln_box}{}{%
+ % ^rem interlinear text box opening code _rem
+ \addtolength{\lw_iln_var_dim:iln_box_width}{-1.15\lw_iln_var_dim:langinfo_reserved_space}%
+ \begin{itemize}[%
+ align=left,%
+ labelwidth=\lw_iln_var_dim:gramjudg_len,%
+ leftmargin=\lw_iln_var_dim:gramjudg_reserved_space]%
+ \item[\lw_iln_fun_print:gramjudg]%
+ \begin{minipage}[t]{\lw_iln_var_dim:iln_box_width}%
+}
+\NewDocumentCommand{\lw_iln_fun_open:langinfo_box}{}{%
+ % ^rem language info box opening code _rem
+ \begin{minipage}[t]{\lw_iln_var_dim:langinfo_box_width}
+}
+\NewDocumentCommand{\lw_iln_fun_open:trans_box}{}{%
+ \setlength{\lw_iln_var_dim:trans_box_width}{\linewidth}
+ \addtolength{\lw_iln_var_dim:trans_box_width}{-1.069\lw_iln_var_dim:extranote_reserved_space}%
+ \trans \begin{minipage}[b]{\lw_iln_var_dim:trans_box_width}
+}
+\NewDocumentCommand{\lw_iln_fun_open:extra_note_box}{}{%
+ \begin{minipage}[t]{\lw_iln_var_dim:extranote_box_width}%
+ \raggedright%
+ }
+
+% todo iii. Defining Closing CS for Boxes
+% =============================
+% Defining Closing CS for Boxes
+% =============================
+\def\lw_iln_fun_format:ex_text{\normalfont}%
+\NewDocumentCommand{\lw_iln_fun_close:ex_box}{}{%
+ % ^rem example box closing code _rem
+ \setlength{\lw_iln_var_dim:trans_box_width}{\linewidth}
+ \addtolength{\lw_iln_var_dim:trans_box_width}{-\lw_iln_var_dim:gramjudg_reserved_space}
+ \addtolength{\lw_iln_var_dim:trans_box_width}{-1.0618\lw_iln_var_dim:extranote_reserved_space}%
+ \IfValueArgTF{\lw_iln_var_stored:gramjudg_text}{}{\relax}%
+ {\begin{minipage}[t]{\lw_iln_var_dim:gramjudg_len}
+ \lw_iln_fun_print:gramjudg%
+ \end{minipage}}
+ \begin{minipage}[t]{\lw_iln_var_dim:trans_box_width}
+ \lw_iln_fun_format:ex_text%
+ \lw_iln_var_stored:free_trans_text\space%
+ \normalfont%
+ \IfValueArgTF{\lw_iln_var_stored:reference_text}{}{\relax}{\lw_iln_fun_print:reference}%
+ \end{minipage}
+ \IfValueArgTF{\lw_iln_var_stored:extranote_text}{}{\relax}%
+ {\vskip -2.6ex
+ \hfill%
+ \begin{minipage}[t]{\lw_iln_var_dim:extranote_box_width}
+ (\lw_iln_var_stored:extranote_text)%
+ \end{minipage}}%
+}
+\NewDocumentCommand{\lw_iln_fun_close:iln_box}{}{%
+ % ^rem interlinear text box closing code _rem
+ \lw_iln_fun_exit:interlinearization
+ \end{minipage}\lw_iln_fun_print:langinfo%
+ \end{itemize}
+}
+\NewDocumentCommand{\lw_iln_fun_close:langinfo_box}{}{%
+ % ^rem language info box closing code _rem
+ \end{minipage}%
+}
+\NewDocumentCommand{\lw_iln_fun_close:extranote_box}{}{%
+ \end{minipage}%
+}
+\NewDocumentCommand{\lw_iln_fun_close:trans_box}{}{%
+ \end{minipage}\hfill%
+}
+
+% todo iv. Defining CS for setting or inserting example parts or metadata
+\def\lw_iln_var_stored:langinfo_text{}
+% the * and : versions print the language name as a title.
+% If \lw_iln_fun_set:langinfo if followed by an ex_box, use the * version
+% If there is some text -- e.g. specifying the context for the data -- before the ex_box, use the : version
+% To print the language information as a margin note, use the "bear" version
+\NewDocumentCommand{\langinfo}{s t/ m }{%
+ \IfBooleanTF{#1}%
+ {{\normalfont #3}}%
+ {%
+ \IfBooleanTF{#2}%
+ {{\normalfont #3}\\}%
+ {\def\lw_iln_var_stored:langinfo_text{#3}
+ \settowidth{\lw_iln_var_dim:langinfo_box_width}{#3}
+ \setlength{\lw_iln_var_dim:langinfo_reserved_space}{\lw_iln_var_dim:langinfo_box_width}
+ \addtolength{\lw_iln_var_dim:langinfo_reserved_space}{\lw_iln_var_dim:langinfo_box_left_sep}
+ \addtolength{\lw_iln_var_dim:langinfo_reserved_space}{\lw_iln_var_dim:langinfo_box_right_sep}
+ }%
+ }%
+}%
+
+\NewDocumentCommand{\lw_iln_fun_set:langinfo}{m}{\langinfo{#1}}
+\NewDocumentCommand{\lw_iln_fun_make:langinfo_box}{}{%
+ \ifthenelse{\equal{\lw_iln_var_stored:langinfo_text}{}}{}{%
+ \marginnote{\hskip -\lw_iln_var_dim:langinfo_reserved_space\lw_iln_fun_open:langinfo_box%
+ {\normalfont(\lw_iln_var_stored:langinfo_text)}%
+ \lw_iln_fun_close:langinfo_box}[0cm]%
+ }%
+}
+\NewCommandCopy{\lw_iln_fun_print:langinfo}{\lw_iln_fun_make:langinfo_box}
+
+\def\lw_iln_var_stored:gramjudg_text{}
+\NewDocumentCommand{\lw_iln_fun_set:gramjudg}{m}{%
+ \def\lw_iln_var_stored:gramjudg_text{#1}%
+ \settowidth{\lw_iln_var_dim:gramjudg_len}{#1}%
+ \setlength{\lw_iln_var_dim:gramjudg_reserved_space}{\lw_iln_var_dim:gramjudg_len}%
+ \addtolength{\lw_iln_var_dim:gramjudg_reserved_space}{1ex}%
+}
+\NewDocumentCommand{\lw_iln_fun_print:gramjudg}{}{%
+ \ifthenelse{\equal{\lw_iln_var_stored:gramjudg_text}{}}{}{%
+ {\normalfont\lw_iln_var_stored:gramjudg_text}%
+ }%
+}
+\def\lw_iln_var_stored:extranote_text{}
+\def\lw_iln_var_token:extranote_left_punct{{(}}%
+\def\lw_iln_fun_format:extranote{\normalfont}
+\def\lw_iln_var_token:extranote_right_punct{{)}}%
+\NewDocumentCommand{\lw_iln_fun_add:extranote}{m}{%
+ \def\lw_iln_var_stored:extranote_text{#1}%
+ \settowidth{\lw_iln_var_dim:extranote_box_width}{#1}
+ \ifdimgreater{\lw_iln_var_dim:extranote_box_width}{113.2pt}%
+ {\setlength{\lw_iln_var_dim:extranote_box_width}{113.2pt}}%
+ {\settowidth{\lw_iln_var_dim:extranote_box_width}{#1}}%
+ \setlength{\lw_iln_var_dim:extranote_reserved_space}{\lw_iln_var_dim:extranote_box_width}%
+ \addtolength{\lw_iln_var_dim:extranote_reserved_space}{\lw_iln_var_dim:extranote_box_left_sep}
+ \addtolength{\lw_iln_var_dim:extranote_reserved_space}{\lw_iln_var_dim:extranote_box_right_sep}%
+}
+\NewDocumentCommand{\lw_iln_fun_make:extranote_box}{}{%
+ \IfValueArgTF{\lw_iln_var_stored:extranote_text}{}%
+ {}%
+ {\lw_iln_fun_open:extra_note_box%
+ \lw_iln_var_token:extranote_left_punct%
+ \lw_iln_fun_format:extranote%
+ \lw_iln_var_stored:extranote_text%
+ \normalfont%
+ \lw_iln_var_token:extranote_right_punct%
+ \lw_iln_fun_close:extranote_box}
+}
+
+\def\lw_iln_var_stored:free_trans_text{}
+\NewDocumentCommand{\lw_iln_fun_set:free_translation}{m}{%
+ \def\lw_iln_var_stored:free_trans_text{#1}
+}
+\def\lw_iln_var_stored:literal_trans_text{}
+\NewDocumentCommand{\lw_iln_fun_set:literal_trans_text}{m}{%
+ \def\lw_iln_var_stored:literal_trans_text{#1}
+}
+\def\lw_iln_var_stored:reference_text{}
+\NewDocumentCommand{\lw_iln_fun_set:reference}{m}{%
+ \def\lw_iln_var_stored:reference_text{#1}
+}
+\NewDocumentCommand{\lw_iln_fun_print:free_trans}{}{%
+ \IfValueArgTF{\lw_iln_var_stored:free_trans_text}{}{}%
+ {`\lw_iln_var_stored:free_trans_text'}}
+\NewDocumentCommand{\lw_iln_fun_print:literal_trans}{}{%
+ \IfValueArgTF{\lw_iln_var_stored:literal_trans_text}{}{}%
+ {(Lit.: `\lw_iln_var_stored:literal_trans_text')}}
+\NewDocumentCommand{\lw_iln_fun_print:reference}{}{%
+ \IfValueArgTF{\lw_iln_var_stored:reference_text}{}{}%
+ {{[}\lw_iln_var_stored:reference_text{]}}}
+%
+\NewDocumentCommand{\lw_iln_fun_make:trans_box}{}{%
+ \IfValueArgTF{\lw_iln_var_stored:extranote_text}{}%
+ {\lw_iln_fun_open:trans_box%
+ \lw_iln_fun_print:free_trans\space %
+ \lw_iln_fun_print:literal_trans\space %
+ \lw_iln_fun_print:reference\space %
+ \lw_iln_fun_close:trans_box}%
+ {\lw_iln_fun_open:trans_box%
+ \raggedright
+ \lw_iln_fun_print:free_trans\space %
+ \lw_iln_fun_print:literal_trans\space %
+ \lw_iln_fun_print:reference\space %
+ \lw_iln_fun_close:trans_box}
+}
+
+\def\lw_iln_fun_format:context_label{\normalfont}
+\def\lw_iln_var_name:context{Context:}
+\def\lw_iln_fun_insert:context#1{%
+ \IfValueArgTF{#1}{}{}%
+ {\lw_iln_fun_format:context_label\lw_iln_var_name:context\normalfont~#1\\[-1.3\baselineskip]}
+}
+
+\def\lw_iln_fun_reinitialize:markers_value{%
+ \def\lw_iln_var_stored:extranote_text{}
+ \def\lw_iln_var_stored:free_trans_text{}
+ \def\lw_iln_var_stored:gramjudg_text{}
+ \def\lw_iln_var_stored:langinfo_text{}
+ \def\lw_iln_var_stored:literal_trans_text{}
+ \def\lw_iln_var_stored:reference_text{}
+}
+
+% todo v. Defining long (internal commands)
+\def\lw_iln_var_num:interlinear_lines{2}
+
+\def\lw_iln_tag:line_one_marker{% LEV version
+ \IfValueArgTF{\lw_iln_var_num:interlinear_lines}{2}%
+ {\lw_iln_fun_open:iln_box
+ \lw_iln_fun_enter:two_lines_interlinearization}{}%
+ \IfValueArgTF{\lw_iln_var_num:interlinear_lines}{3}%
+ {\lw_iln_fun_open:iln_box
+ \lw_iln_fun_enter:three_lines_interlinearization}{}%
+ \IfValueArgTF{\lw_iln_var_num:interlinear_lines}{4}%
+ {\lw_iln_fun_open:iln_box
+ \lw_iln_fun_enter:four_lines_interlinearization}{}%
+}%
+
+\let\lw_iln_tag:Text_marker\lw_iln_tag:line_one_marker% ^rem is typeset in italics by default. The starred version introduces a two-line interlinear gloss text. ^caution Do not use it together with \lw_iln_MorphBreak_marker : they mean the same thing. So you will get error messages. _caution _rem
+%
+\def\lw_iln_tag:Morpheme_Break_marker% ^rem typeset in roman -- by default -- (intended to host API translations). Introduces a 2-line interlinear gloss text. _rem
+{\IfValueArgTF{\lw_iln_var_num:interlinear_lines}{2}%
+ {\lw_iln_tag:line_one_marker}%
+ {\relax}%
+}%
+
+\def\lw_iln_tag:Gloss_marker% ^rem \ge is already defined in LaTeX. \lw_iln_tag:Gloss_marker introduces a two-line interlinear gloss text. _rem
+{\relax}%
+%
+\def\lw_iln_tag:Part_of_speech_marker{\relax}
+
+% LEV Syntax sensitive CS
+\def\lw_iln_tag:Free_translation_marker#1\\%
+ {\IfValueArgTF{\lw_iln_var_num:interlinear_lines}{0}
+ {\lw_iln_fun_set:free_translation{#1}}
+ {\lw_iln_fun_close:iln_box%
+ \lw_iln_fun_set:free_translation{#1}}}% ^rem CAUTION: The Free Translation marker should be present even if there is actually no free translation provided. _rem
+%
+\def\lw_iln_tag:Literal_translation_marker#1\\%
+{\lw_iln_fun_set:literal_trans_text{#1}}
+\def\lw_iln_tag:Reference_marker#1\\%
+{\lw_iln_fun_set:reference{#1}}
+\def\lw_iln_tag:Language_information_marker#1\\%
+{\lw_iln_fun_set:langinfo{#1}}
+\def\lw_iln_tag:Grammaticality_Judgment_marker#1\\%
+{\lw_iln_fun_set:gramjudg{#1}}
+\newlength{\lw_iln_var_dim:context_voffset}
+\setlength{\lw_iln_var_dim:context_voffset}{-1em}
+\def\lw_iln_tag:Context_marker#1\\%
+{\lw_iln_fun_insert:context{#1}\\[\lw_iln_var_dim:context_voffset]}
+\def\lw_iln_tag:Extra_note_marker#1\\%
+ {\lw_iln_fun_add:extranote{#1}}
+
+
+% _cs-definitions
+
+% todo vi. Low-level commands
+
+% ^section_title="User Commands and Envs to Typeset Interlinear Gloss Texts"
+% DEFINE: interlinear environment
+% DEFINE: Text tagging cs
+% The cs are named after the standard tags used in Linguist's Field's Toolbox by SIL (see Interlinear macro in ToolboxInterlinearMacroText.docm)
+% ^important Please use the short versions (in brackets). The long versions are internal commands to be use for later eventual modifications _important
+% \lw_iln_tag:Text_marker (\tx) ^rem is typeset in italic either in tri-gloss or in di-gloss envs. In di-gloss env, \tx and \mb mean the same thing. _rem
+%\lw_iln_tag:MorphBreak_marker (\mb) ^rem typeset in roman -- by default -- (intended to host API translations) _rem
+%\lw_iln_tag:Gloss_marker (\gl) % \ge is already defined in LaTeX
+%\lw_iln_tag:FreeTranslation_marker (\ft)
+% \lw_iln_tag:Reference_marker (\rf) ^rem \ref is a primitive _rem
+% --------------------------------
+% Markers not present in Toolbox defaults
+% --------------------------------
+% \lw_iln_tag:Language_information_marker (\li)
+% \lw_iln_tag:Grammaticality_Judgment_marker (\gj)
+% \lw_iln_tag:Context_marker (\ct)
+%
+% \lw_iln_tag:Literal_translation_marker (\lt)
+% \lw_iln_tag:Extra_note_marker (\nt)
+%
+% ^cs-definitions
+%\let\tx\lw_iln_tag:Text_marker% ^rem is typeset in italic either in tri-gloss or in di-gloss envs. In di-gloss env, \tx and \mb mean the same thing. _rem
+\let\mb\lw_iln_tag:Morpheme_Break_marker% ^rem typeset in roman -- by default -- (intended to host API translations) _rem
+\let\gl\lw_iln_tag:Gloss_marker% ^rem \ge is already defined in LaTeX _rem
+%\let\ft\lw_iln_tag:Free_translation_marker%
+\let\ps\lw_iln_tag:Part_of_speech_marker
+%
+\NewCommandCopy{\li}%
+{\lw_iln_tag:Language_information_marker}%
+\NewCommandCopy{\rf}%
+{\lw_iln_tag:Reference_marker}%
+\NewCommandCopy{\gj}%
+{\lw_iln_tag:Grammaticality_Judgment_marker}
+\NewCommandCopy{\ct}%
+{\lw_iln_tag:Context_marker}
+\NewCommandCopy{\lt}%
+{\lw_iln_tag:Literal_translation_marker}%
+\NewCommandCopy{\nt}%
+ {\lw_iln_tag:Extra_note_marker}
+
+% todo c. Defining Interlinear Env. Options
+% ----------------------
+% | Describing options |
+% ----------------------
+
+% # Options:
+
+% - argendchar: (not available for the moment) return, par, lineend
+% return : takes the current line as argument, do not put anything else (e.g. {}, or \\)
+% lineend : idem
+% par : argument is ended by "\\" like e.g. in cgloss4e
+% (NOTE: this option scopes over all the markers, not only interlinear text markers \tx, \mb, \gl, \ps)
+
+% - linesnumber: full, 2, 3
+% full : 4-lines (By default it is disabled in the main text)
+% 2 : Only one gloss line is printed (\gl); \mb and \tx are then treated are incompatible to each other so
+% that only of them should be used. If this option is used, you should specifiy the first-line of the
+% interlinear text via first-line option
+% 3 : only \ps is not printedand all the other lines \tx, \mb and \gl should be non-empty
+
+% * Setting markers *
+
+% Sets the marker used for the different parts. Actually tells lingwrit-interlinear to define the corresponding command so as to fit the definition of the
+% default marker (e.g. text_marker=\ot tells lingwrit-interlinear to add the following: \let\ot\tx)
+% - textmarker=
+% - morphbreakmarker=
+% - glossmarker= (You shouldn't set it to \ge. But if this happens, note that lingwrit-interlinear will redefine \ge to equal to \gl, define a new
+% command \gteq to replace \ge and issue a warning message)
+% - partofspeechmarker=
+% - freetranslationmarker=
+% - literaltranslationmarker=
+% - grammaticalityjudgmentmarker=
+% - contextmarker=
+% - extranotemarker=
+% - languageinfomarker=
+% - referencemarker=
+
+% * Format specifications *
+
+% (May include font size, shape, series and color. If color command is used (e.g. \color{blue}), then make sure to have xcolor loaded)
+% - lineoneformat={}
+% - linetwoformat={}
+% - linethreeformat={}
+% - linefourformat={}
+% - extranoteformat={}
+% - contextnameformat={}
+
+% * Other specifications *
+
+% - contextname={} ^rem The displayed label for context. default value is "Context:" _rem
+% - extranoteleftpunct= ^rem the punctuation preceding the extra note. Default value: ( _rem
+% - extranoterightpunct= ^rem the punctuation following the extra note. Default value: ) _rem
+
+% todo i. Declaring Options
+\NewCommandCopy{\lw_iln_var_opt:textmarker}{\lw_iln_tag:Text_marker}
+\NewCommandCopy{\lw_iln_var_opt:morphbreakmarker}{\lw_iln_tag:Morpheme_Break_marker}
+\NewCommandCopy{\lw_iln_var_opt:glossmarker}{\lw_iln_tag:Gloss_marker}
+\NewCommandCopy{\lw_iln_var_opt:partofspeechmarker}{\lw_iln_tag:Part_of_speech_marker}
+\NewCommandCopy{\lw_iln_var_opt:freetranslationmarker}{\lw_iln_tag:Free_translation_marker}
+\NewCommandCopy{\lw_iln_var_opt:literaltranslationmarker}{\lw_iln_tag:Literal_translation_marker}
+\NewCommandCopy{\lw_iln_var_opt:extranotemarker}{\lw_iln_tag:Extra_note_marker}
+\NewCommandCopy{\lw_iln_var_opt:languageinfomarker}{\lw_iln_tag:Language_information_marker}
+\NewCommandCopy{\lw_iln_var_opt:gramjudgmarker}{\lw_iln_tag:Grammaticality_Judgment_marker}
+\NewCommandCopy{\lw_iln_var_opt:referencemarker}{\lw_iln_tag:Reference_marker}
+\NewCommandCopy{\lw_iln_var_opt:contextmarker}{\lw_iln_tag:Context_marker}
+
+\NewDocumentCommand{\lw_iln_var_opt:languageinfopos}{m}{%
+ \IfValueArgTF{#1}{head}{\RenewDocumentCommand{\lw_iln_fun_set:langinfo}{m}{\langinfo/{##1}}}{}
+ \IfValueArgTF{#1}{margin}{\RenewDocumentCommand{\lw_iln_fun_set:langinfo}{m}{\langinfo{##1}}}{}
+}
+
+\NewDocumentCommand{\lw_iln_var_opt:nointerlinear}{m}{%
+ \IfValueArgTF{#1}{true}%
+ {\def\lw_iln_var_num:interlinear_lines{0}}%
+ {\IfValueArgTF{#1}{false}%
+ {\relax}%
+ {\PackageWarning{interlinear}{nointerlinear option possible values: true, false}}%
+ }
+}
+\NewDocumentCommand{\lw_iln_var_opt:contextvoffset}{m}{\setlength{\lw_iln_var_dim:context_voffset}{#1}}
+
+% todo ii. Defining Default values
+
+%\def\lw_iln_var_opt:endchar{par}% possible values: par, lineend, return
+\def\lw_iln_var_opt:linesnumber{2}% possible values: 2, 3, full
+\def\lw_iln_var_num:interlinear_lines{\lw_iln_var_opt:linesnumber}
+% Setting markers
+\let\li\lw_iln_var_opt:languageinfomarker
+\let\rf\lw_iln_var_opt:referencemarker
+\let\gj\lw_iln_var_opt:gramjudgmarker
+\let\tx\lw_iln_var_opt:textmarker
+\let\mb\lw_iln_var_opt:morphbreakmarker
+\let\gl\lw_iln_var_opt:glossmarker
+\let\ps\lw_iln_var_opt:partofspeechmarker
+\let\ft\lw_iln_var_opt:freetranslationmarker
+\let\lt\lw_iln_var_opt:literaltranslationmarker
+\let\nt\lw_iln_var_opt:extranotemarker
+\def\lw_iln_var_opt:extranoteleftpunct#1{\def\lw_iln_var_token:extranote_left_punct{#1}}
+\def\lw_iln_var_opt:extranoterightpunct#1{\def\lw_iln_var_token:extranote_right_punct{#1}}
+
+% Setting formats (only available for interlinear/gloss lines, context name and extra notes)
+\def\lw_iln_var_opt:lineoneformat#1{\renewcommand{\lw_iln_fun_set:line_one_words_format}{#1}}
+\def\lw_iln_var_opt:linetwoformat#1{\renewcommand{\lw_iln_fun_set:line_two_words_format}{#1}}
+\def\lw_iln_var_opt:linethreeformat#1{\renewcommand{\lw_iln_fun_set:line_three_words_format}{#1}}
+\def\lw_iln_var_opt:linefourformat#1{\renewcommand{\lw_iln_fun_set:line_four_words_format}{#1}}
+\def\lw_iln_var_opt:exformat#1{\renewcommand{\lw_iln_fun_format:ex_text}{#1}}
+\def\lw_iln_var_opt:extranoteformat#1{\def\lw_iln_fun_format:extranote{#1}}
+\def\lw_iln_var_opt:contextnameformat#1{\def\lw_iln_fun_format:context_label{#1}}
+% Context label/name
+\def\lw_iln_var_opt:contextname#1{\def\lw_iln_var_name:context{#1}}
+
+% Defining CS for resetting default options (to be called at the begining of interlinear env)% ^rem the \setinterlinearstyle is meant to set globally the options for interlinear env. So don't use optional argument of interlinear env anymore since it will overwrite the values set up with this commands and the new values be considered the default ones. _rem
+\def\lw_iln_fun_reinitialize:interlinear_options{%
+ %\def\lw_iln_var_opt:endchar{par}% possible values: par, lineend, return
+ \def\lw_iln_var_opt:linesnumber{2}% possible values: 2, 3, full
+ % Setting markers
+ \let\li\lw_iln_var_opt:languageinfomarker%
+ \let\rf\lw_iln_var_opt:referencemarker%
+ \let\gj\lw_iln_var_opt:gramjudgmarker%
+ \let\tx\lw_iln_var_opt:textmarker
+ \let\mb\lw_iln_var_opt:morphbreakmarker%
+ \let\gl\lw_iln_var_opt:glossmarker%
+ \let\ps\lw_iln_var_opt:partofspeechmarker%
+ \let\ft\lw_iln_var_opt:freetranslationmarker%
+ \let\lt\lw_iln_var_opt:literaltranslationmarker%
+ \let\nt\lw_iln_var_opt:extranotemarker%
+ % Setting formats (only available for interlinear/gloss lines, context name and extra notes)
+ \lw_iln_var_opt:lineoneformat{\normalfont}%
+ \lw_iln_var_opt:linetwoformat{\normalfont}%
+ \lw_iln_var_opt:linethreeformat{\normalfont}%
+ \lw_iln_var_opt:linefourformat{\normalfont}%
+ \lw_iln_var_opt:exformat{\normalfont}
+ \lw_iln_var_opt:extranoteformat{\normalfont}%
+ \lw_iln_var_opt:contextnameformat{\normalfont}%
+ % Context label/name
+ \lw_iln_var_opt:contextname{Context:}%
+ \lw_iln_var_opt:extranoteleftpunct{{(}}%
+ \lw_iln_var_opt:extranoterightpunct{{)}}%
+ \lw_iln_var_opt:languageinfopos{margin}%
+ \lw_iln_var_opt:nointerlinear{false}%
+ \lw_iln_var_opt:contextvoffset{-1em}
+}
+
+% todo iii. Setting Options
+
+% Setting Ending Character for arguments (not yet available)
+%\define@key{interlinear}{endchar}{%
+ % ^action_name="Setting the value"
+% \def\lw_iln_var_opt:endchar{#1}
+ % _action
+ % ^action_name="Processing the option"
+ %
+ % _action
+%}
+
+% Setting the numbers of interlinear/gloss lines
+\define@key{interlinear}{linesnumber}{%
+ % ^action_name="Setting the value"
+ \def\lw_iln_var_opt:linesnumber{#1}
+ % _action
+}
+\define@key{interlinear}{nointerlinear}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:nointerlinear{#1}
+ % _action
+}
+
+% Setting the markers
+\define@key{interlinear}{textmarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:textmarker}}
+\define@key{interlinear}{morphbreakmarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:morphbreakmarker}}
+\define@key{interlinear}{glossmarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:glossmarker}}
+
+\define@key{interlinear}{partofspeechmarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:partofspeechmarker}}
+
+\define@key{interlinear}{freetranslationmarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:freetranslationmarker}}
+
+\define@key{interlinear}{literaltranslationmarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:literaltranslationmarker}}
+
+\define@key{interlinear}{extranotemarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:extranotemarker}}
+
+\define@key{interlinear}{languageinfomarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:languageinfomarker}}
+
+\define@key{interlinear}{gramjudgmarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:gramjudgmarker}}
+
+\define@key{interlinear}{referencemarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:referencemarker}}
+
+\define@key{interlinear}{contextmarker}{%
+ \NewCommandCopy{#1}{\lw_iln_var_opt:contextmarker}}
+
+
+% Setting formats
+\define@key{interlinear}{lineoneformat}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:lineoneformat{#1}
+ % _action
+}
+\define@key{interlinear}{linetwoformat}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:linetwoformat{#1}
+ % _action
+}
+\define@key{interlinear}{linethreeformat}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:linethreeformat{#1}
+ % _action
+}
+\define@key{interlinear}{linefourformat}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:linefourformat{#1}
+ % _action
+}
+\define@key{interlinear}{exformat}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:exformat{#1}
+ % _action
+}
+\define@key{interlinear}{extranoteformat}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:extranoteformat{#1}
+ % _action
+}
+\define@key{interlinear}{contextnameformat}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:contextnameformat{#1}
+ % _action
+}
+
+% Other specifications
+\define@key{interlinear}{contextname}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:contextname{#1}
+ % _action
+}
+\define@key{interlinear}{contextvoffset}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:contextvoffset{#1}
+ % _action
+}
+\define@key{interlinear}{extranoteleftpunct}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:extranoteleftpunct{#1}
+ % _action
+}
+\define@key{interlinear}{extranoterightpunct}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:extranoterightpunct{#1}
+ % _action
+}
+\define@key{interlinear}{languageinfopos}{%
+ % ^action_name="Setting the value"
+ \lw_iln_var_opt:languageinfopos{#1}
+ % _action
+}
+
+\newcommand{\interlinearstyle}[1]{%
+ \setkeys{interlinear}{#1}%
+ \lw_fun_helper:clear{\lw_iln_fun_reinitialize:interlinear_options}
+}
+\def\DeclareInterlinearStyle#1#2{%
+ \expandafter\def\csname lw_iln_var_sty:#1\endcsname{\interlinearstyle{#2}}}
+\def\UseInterlinearStyle#1{%
+ \expandafter\csname lw_iln_var_sty:#1\endcsname}
+\DeclareInterlinearStyle{default}{%
+ linesnumber=2,%
+ lineoneformat=\upshape,%
+ linetwoformat=\normalfont,%
+ linethreeformat=\normalfont,%
+ linefourformat=\normalfont,%
+ contextnameformat=\normalfont,%
+ extranoteformat=\normalfont,%
+ contextname={Context:},%
+ extranoteleftpunct={(},%
+ extranoterightpunct={)}%
+}
+\DeclareInterlinearStyle{nointerlinear}{%
+ nointerlinear=true,%
+ languageinfopos=head,%
+ freetranslationmarker=\ot,%
+ contextvoffset=.5em%
+}
+\DeclareInterlinearStyle{gsr}{%
+ linesnumber=2,%
+ lineoneformat=\itshape,%
+ linetwoformat=\normalfont,%
+ linethreeformat=\normalfont%
+}
+\DeclareInterlinearStyle{gsrnointerlinear}{%
+ nointerlinear=true,%
+ exformat=\itshape,%
+ languageinfopos=head,%
+ freetranslationmarker=\ot,%
+ contextvoffset=.5em%
+}
+
+\UseInterlinearStyle{gsr}% ^rem setting the default style to fit the GSR _rem
+
+\define@key{interlinear}{style}{%
+ % ^action_name="Setting the value"
+ \UseInterlinearStyle{#1}
+ % _action
+}
+
+
+% todo d. Defining Interlinear Env.
+\NewDocumentCommand{\lw_iln_fun_enter:interlinear}{}{\relax}% ^rem no_op command _rem
+\NewDocumentCommand{\lw_iln_fun_exit:interlinear}{}{%
+ \IfValueArgTF{\lw_iln_var_num:interlinear_lines}{0}%
+ {\lw_iln_fun_close:ex_box}%
+ {\lw_iln_fun_make:trans_box%
+ \lw_iln_fun_make:extranote_box%
+ \lw_iln_fun_reinitialize:markers_value}%
+ }
+
+\NewDocumentEnvironment{interlinear}{O{}}%
+ {% ^rem Beginning of the internlinear env _rem
+ \lw_iln_fun_enter:interlinear%
+ \lw_iln_fun_reinitialize:interlinear_options%
+ \setkeys{interlinear}{#1}
+ }%
+ {% ^rem End of the interlinear env _rem
+ \lw_iln_fun_exit:interlinear%
+ }
+
+\makeatother%
+
+% ^action_name="Disabling LingWrit Syntax"
+\switchlwsyntaxoff
+% _action
+% ^action_name="Ending the code"
+\endinput%
+% _action
+
+% _code
+
+% ^_*
+
+% _package
diff --git a/macros/latex/contrib/tutodoc/code/tutodoc.sty b/macros/latex/contrib/tutodoc/code/tutodoc.sty
index a27e1a7ac6..a1e0acdd13 100644
--- a/macros/latex/contrib/tutodoc/code/tutodoc.sty
+++ b/macros/latex/contrib/tutodoc/code/tutodoc.sty
@@ -9,8 +9,8 @@
\ProvidesExplPackage
{tutodoc}
- {2024-01-06} % Creation: 2023-11-29
- {1.1.0}
+ {2024-08-23} % Creation: 2023-11-29
+ {1.2.0-a}
{This package proposes tools for writing "human friendly" documentations of LaTeX packages.}
\RequirePackage[
diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf b/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
index 84a98f1e35..506a75b5d2 100644
--- a/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
+++ b/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex b/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
index 371b905d97..a66ebc0ea8 100644
--- a/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
+++ b/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex
@@ -345,7 +345,7 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
\title{The \texttt{tutodoc} package - Tutorial-type documentation}
\author{Christophe BAL}
-\date{23 Aug. 2024 - Version 1.2.0}
+\date{23 Aug. 2024 - Version 1.2.0-a}
\maketitle
@@ -1149,7 +1149,7 @@ Blu, blu, blu...
\end{tdoclatex}
\section{History}
-\tdocversion{1.2.0}[2024-08-23]
+\tdocversion{1.2.0-a}[2024-08-23]
\begin{tdocupdate}
\item \tdocmacro{tdocversion}
diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
index d0a970abec..070a6b3f5a 100644
--- a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
+++ b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
index 8291ce4b4a..011e390f25 100644
--- a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
+++ b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex
@@ -341,7 +341,7 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
\title{Le package \texttt{tutodoc} - Documentation de type tutoriel}
\author{Christophe BAL}
-\date{23 Août 2024 - Version 1.2.0}
+\date{23 Août 2024 - Version 1.2.0-a}
\maketitle
@@ -1170,7 +1170,7 @@ Blu, blu, blu...
\end{tdoclatex}
\section{Historique}
-\tdocversion{1.2.0}[2024-08-23]
+\tdocversion{1.2.0-a}[2024-08-23]
\begin{tdocupdate}
\item \tdocmacro{tdocversion}
diff --git a/support/latexdiff/README b/support/latexdiff/README
index 6f4d1a280a..f0310ce32d 100644
--- a/support/latexdiff/README
+++ b/support/latexdiff/README
@@ -1,4 +1,13 @@
+latexdiff
+=========
+
+Compares two latex files and marks up significant differences between them. Releases on https://ctan.org/pkg/latexdiff and mirrors.
+
+Link to full manual: http://mirrors.ctan.org/support/latexdiff/doc/latexdiff-man.pdf
+
+
INTRODUCTION
+------------
latexdiff is a Perl script, which compares two latex files and marks
up significant differences between them (i.e. a diff for latex files).
@@ -16,11 +25,9 @@ behaviour and accept or reject selected changes only.
The author is F Tilmann.
-Project webpage: https://github.com/ftilmann/latexdiff/
-CTAN page: http://www.ctan.org/pkg/latexdiff
-
REQUIREMENTS
+------------
Perl 5.8 or higher must be installed.
The latexdiff script makes use of the Perl package Algorithm::Diff (available
@@ -38,6 +45,7 @@ UNIX-diff mean that the resulting set of differences will generally not be the s
for the standard latexdiff. In most practical cases, these differences are minor, though.
INSTALLATION UNIX/LINUX
+-----------------------
The basic installation procedure is almost trivial:
@@ -53,34 +61,40 @@ The basic installation procedure is almost trivial:
The attached trivial Makefile contains example commands to carry out above
steps as root for a typical UNIX installation. Type
- make install (for the stand alone version)
+ `make install` (for the stand alone version)
+
or
- make install-ext (for the version using the external Algorithm::Diff)
+
+ `make install-ext` (for the version using the external Algorithm::Diff)
+
or
- make install-fast (for the version using the UNIX 'diff' function for fast differencing)
+
+ `make install-fast` (for the version using the UNIX 'diff' function for fast differencing)
to get it rolling. You can type
- make test
-or
- make test-ext
-or
- make test-fast
+ `make test` or
+
+ `make test-ext` or
+
+ `make test-fast`
to test the respective versions on a brief example before installation. It will often be
as easy to carry out these steps manually instead of using the Makefile.
-DOCUMENTATION:
+DOCUMENTATION
+-------------
Usage instructions are in the manual latexdiff-man.pdf as well as the
man pages.
-CHANGELOGS:
-
+CHANGELOGS
+----------
Check out the comment lines at the beginning of the perl scripts (latexdiff, latexdiff-vc, latexrevise)
CONTRIBUTIONS
+-------------
The directory contrib contains code written by others relating to latexdiff.
Currently this directory contains:
@@ -97,15 +111,19 @@ Contributions by the following authors were incorporated into the latexdiff code
extend latexdiff in a similar way: J. Paisley, N. Becker, K. Huebner
EXTERNAL LATEXDIFF SUPPORT PROGRAMS
+-----------------------------------
+
+LATEXDIDFFR (Author: David Hugh-Jones) is a small library that uses the latexdiff command to create a diff of two Rmarkdown, .Rnw or TeX files.
+https://github.com/hughjonesd/latexdiffr
LATEXDIFFCITE (Author: Christer van der Meeren) is a wrapper around latexdiff to make citations diff properly. It works by expanding \cite type commands using the bbl or bib file, such that citations are treated just like normal text rather than as atomic in the plain latexdiff.
-https://latexdiffcite.readthedocs.org
+https://github.com/twilsonco/latexdiffcite
GIT-LATEXDIFF (lead author: Matthieu Moy) is a wrapper (bash script) around latexdiff that allows using it to diff two revisions of a LaTeX file under git revision control (similar functionality is provided by latexdiff-vc --git with --flatten option included with this distribution but git-latexdiff allows more fine-grained control on (not to be confused with latexdiff-git, which is normally installed as a soft link to latexdiff-vc)
https://gitorious.org/git-latexdiff/
-LICENSE (also see file COPYING)
-
+LICENSE
+-------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3 as published by
the Free Software Foundation.
@@ -116,3 +134,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details (file LICENSE in the
distribution).
+
+
+
diff --git a/support/latexdiff/doc/example-diff.tex b/support/latexdiff/doc/example-diff.tex
index 8eda2a43aa..b68c11aff9 100644
--- a/support/latexdiff/doc/example-diff.tex
+++ b/support/latexdiff/doc/example-diff.tex
@@ -22,7 +22,7 @@
\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
-\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}} %DIF PREAMBLE
+\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}} %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE
@@ -53,6 +53,8 @@
} %DIF PREAMBLE
\lstnewenvironment{DIFverbatim}{\lstset{style=DIFverbatimstyle}}{} %DIF PREAMBLE
\lstnewenvironment{DIFverbatim*}{\lstset{style=DIFverbatimstyle,showspaces=true}}{} %DIF PREAMBLE
+\lstset{extendedchars=\true,inputencoding=utf8}
+
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
\begin{document}
diff --git a/support/latexdiff/doc/latexdiff-man.pdf b/support/latexdiff/doc/latexdiff-man.pdf
index 2ea00571b3..d0e57ad5c9 100644
--- a/support/latexdiff/doc/latexdiff-man.pdf
+++ b/support/latexdiff/doc/latexdiff-man.pdf
Binary files differ
diff --git a/support/latexdiff/latexdiff b/support/latexdiff/latexdiff
index a032ae23b5..5df02b753f 100755
--- a/support/latexdiff/latexdiff
+++ b/support/latexdiff/latexdiff
@@ -25,6 +25,21 @@
#
# Note references to issue numbers are for the github repository of latexdiff: https://github.com/ftilmann/latexdiff
#
+# Version 1.3.4:
+# New features:
+# - Option to use lua-ul instead of ulem (for use with LuaLaTeX) (fix #17, #60, #188, #255, #270)
+# Enhancement
+# - If amsmath is detected as one of the included (based on idea in PR #263 contributed by github user xlucn
+# Bug fix
+# - sometimes the introduction of aux commands to show deleted lists or descriptions leaves in place empty auxiliary
+# list environments, which would cause error messages (though skipping messages would result in a correct output pdf).
+# These are now removed.
+# - add more mboxsafecmd and safecmd commands for SIunitx to stay compatible with newer versionsof SIunitx (PR #283, fixing issue #282, contributed by github user joe6302413)
+# - File added via --preamble option is no longer assumed to be ASCII, but read either with encoding as defined by --encoding option or using the encoding of the LOCALE (fixes issue #285 )
+# - multicolumn argument is now treated as text
+# - when tikz-dependency package is used, \& is no longer a safe command as it has special meaning inside dependency environment. The fix is a little of a hack as really it should only be considered unsafe within dependency environment (fixes (mostly) issue #303 )
+# - listings package had trouble with non-ASCII chars. The encoding is now set (thanks to github user anka-213 for finding this). Fixes #304
+#
# Version 1.3.3:
# New features:
# - Option --no-del to remove all deleted text (merge contributed by github user tdegeus PR #252, fixing issue #66
@@ -33,22 +48,22 @@
# - Abbreviations involving punctuations within them. They need special treatment because otherwise in some
# circumstances the gnoring of white space differences in conjunction with merging according to MINWORDSBLOCK rule
# could turn 'i.e.' into 'i.\PAR e.' (see https://github.com/ftilmann/latexdiff/issues/269). A few abbreviations
-# are now hard-coded and treated as atomic:
+# are now hard-coded and treated as atomic:
# English: i.e., e.g. Deutsch: z.B.
# (fixes issue #269)
# - In WHOLE and COARSE math modes, now properly treat math environments with arguments such as \alignat. Fixes #251
-# - For FINE math mode, multiple improvments to the processing work flow yield more robust outcomes. In particular, changes
-# to the equation type, e.g. \begin{displaymath} -> \begin{equation} without modifications now usually no longer result
-# in errors. (Partially) fixes issues #235 and #244.
-# - When encountering deleted math array environments such as align or eqnarray, rather than replacing them with a
-# fixed replacement environment (e.g. align* or eqnarray*), an asterisk is now added to the original command, which
+# - For FINE math mode, multiple improvments to the processing work flow yield more robust outcomes. In particular, changes
+# to the equation type, e.g. \begin{displaymath} -> \begin{equation} without modifications now usually no longer result
+# in errors. (Partially) fixes issues #235 and #244.
+# - When encountering deleted math array environments such as align or eqnarray, rather than replacing them with a
+# fixed replacement environment (e.g. align* or eqnarray*), an asterisk is now added to the original command, which
# in amsmath (and with eqnarray) will result in the same environment but without line numbers. Config variable MATHARRREPL
# is therefore (nearly) redundant, and a depracation warning is given when it is set. Reference to MATHARRREPL are have
# been removed from the manual (there is one exception, when it's still being used: sometimes latexdiff can figure out
# that there is a deleted array environment, but does not know which one. In this case, MATHARRREPL is still being used
-# to encapsulate these parts of the source, and therefore it is still set internally. But this is a quite rare situation).
+# to encapsulate these parts of the source, and therefore it is still set internally. But this is a quite rare situation).
# Fixes issue #216
-# - Unlike 'array' environment, 'split' (amsmath) does not work in argument of \DIFadd or \DIFdl in UNDERLINE modes; therefore remove it from ARRENV configuration variable.
+# - Unlike 'array' environment, 'split' (amsmath) does not work in argument of \DIFadd or \DIFdl in UNDERLINE modes; therefore remove it from ARRENV configuration variable.
# Exclude \begin and \end in math environments in COARSE and WHOLE modes. Fixes #258. Fixes #109
# - --flatten now works for empty files. Fixes issue #242
# - improved processing of Chinese and Japanese texts in that splitting is done based on characters. Thanks to LuXu (Oliver Lew) in git for working this out. Fixes #229, fixes #145
@@ -65,7 +80,7 @@
# Bug fixes:
# - fix issue #206 affecting proper markup of text commands which are not also safe cmd's and have multiple arguments
# - fix issue #210 by adding \eqref (amsmath package) to the list of safe commands
-# - fix bug reported in issue #168 mangled verbatim line environment
+# - fix bug reported in issue #168 mangled verbatim line environment
# - fix bug reported in issue #218 by replacing \hspace{0pt} after \mbox{..} auxiliary commands with \hskip0pt.
# - more ways to process \frac correctly with atomic arguments (committed by julianuu PR #246
# - fix a bug in biblatex mode, which prevented proper processing of modified \textcite (see: https://tex.stackexchange.com/questions/555157/latexdiff-and-biblatex-citation-commands)
@@ -74,10 +89,10 @@
# Version 1.3.1.1
# - remove spurious \n to fix error: Unknown regexp modifier "/n" at .../latexdiff line 1974, near "=~ " (see github issue #201)
#
-# Version 1.3.1
+# Version 1.3.1
# Bug fixes:
# - remove some uninitialised variable $2 warnings in string substitution in flatten function in case included file is not found
-# - add minimal postprocessing to diff processing of preamble commands (replace \RIGHTBRACE by \} )
+# - add minimal postprocessing to diff processing of preamble commands (replace \RIGHTBRACE by \} )
# - pre-processing: replace (contributed) routine take_comments_and_enter_from_frac() with take_comments_and_newline_from_frac(), which does the same thing
# (remove whitespace characters and comments between the argument of \frac commands) in an easier and more robust way. In addition, it
# will replace commands like \frac12 with \frac{1}{2} as pre-processing step. Fixes issue #184
@@ -95,15 +110,15 @@
# Version 1.3.0 (7 October 2018):
# - treat options to \documentclass as potential package names (some packages allow implicit loading of or imply selected packages
# - improved pattern matching: now allows nested angular brackets, and is no longer confused by escaped curly braces
-# - improved pattern matching in COARSE mode: occasionally, the closing bracket or some other elements would be matched in an 'unnatural' way due to another sequence being more minimal in the computational sense, sometimes even causing errors due to tokens moving in or out of the scope of math environments. This is now discouraged by adding internal \DIFANCHOR commands (which are removed again in post-processing) (fixes issues reported via email by li_ruomeng .
+# - improved pattern matching in COARSE mode: occasionally, the closing bracket or some other elements would be matched in an 'unnatural' way due to another sequence being more minimal in the computational sense, sometimes even causing errors due to tokens moving in or out of the scope of math environments. This is now discouraged by adding internal \DIFANCHOR commands (which are removed again in post-processing) (fixes issues reported via email by li_ruomeng .
# - verbatim and lstlisting environments are marked-up with line-by-line in a similar style to non-verbatim text (requires the listing package to be installed)
# (see new configuration variable VERBATIMLINEENV) (several issues and pull requests by jprotze)
-# - --flatten: now supports \verbatiminput and \lstlistinput
+# - --flatten: now supports \verbatiminput and \lstlistinput
# - --flatten: if file is not found, do not fail, simply warn and leave command unexpanded (inspired by issue #112). Don't warn if file name contains #[0-9] as it is then most likely an argument within a command definition rather than an actual file (applies to \input, \subfile, \include commands)
# - added to textcmds: \intertext
# - new config variable CUSTOMDIFCMD to allow defining special versions of commands in added or deleted blocks (Pull request by github user jprotze)
# - added option -no-links (mostly for use by latexdiff-vc in only-changes modes) (Pull request by github user jprotze)
-# - new option --filter-script to run both input through a pre-processing script (PR jasonmccsmith #167)
+# - new option --filter-script to run both input through a pre-processing script (PR jasonmccsmith #167)
# new option --no-filter-stderr to hide stderr output from filter-script (potentially dangerous, as this might hide malfunctioning of filter scripts)
# - --flatten now can deal with imports made using the import package {PR jasonmccsmith #173)
# Bug fixes:
@@ -122,12 +137,12 @@
# make environments that are treated like verbatim environments configurable (config variable VERBATIMENV)
# treat lstinlne as equivalent to verb command
# partially addresses issue #38
-# - refactoring: set default configuration variables in a hash, and those that correspond to lists
+# - refactoring: set default configuration variables in a hash, and those that correspond to lists
# - feature: option --add-to-config used to amend configuration variables, which are regex pattern lists
# - bug fix: deleted figures when endfloat package is activated
# - bug fix: alignat environment now always processed correctly (fix issues #65)
# - bug fix: avoid processing of commands as potential files in routine init_regex_arr (fix issue #70 )
-# - minimal feature enhancement: treat '@' as allowed character in commands (strictly speaking requires prior \makeatletter statement, but always assuming it to be
+# - minimal feature enhancement: treat '@' as allowed character in commands (strictly speaking requires prior \makeatletter statement, but always assuming it to be
# @ a letter if it is part of a command name will usually lead to the correct behaviour (see http://tex.stackexchange.com/questions/346651/latexdiff-and-let)
# - new feature/bug fix: --flatten option \endinput in included files now respected but only if \endinput stands right at the beginning of the line (issue #77)
# - bug fix: flatten would incorrectly attempt to process commented out \include commands (from discussion in issue #77 )
@@ -165,7 +180,7 @@
# - introduce list UNSAFEMATHCMD, which holds list of commands which cannot be marked up with \DIFadd or \DIFdel commands (only relevant for WHOLE and COARSE math markup modes)
# - new subtype LABEL which gives each change a label. This can later be used to only display pages where changes
# have been made (instructions for that are put as comments into the diff'ed file) inspired by answer on http://tex.stackexchange.com/questions/166049/invisible-markers-in-pdfs-using-pdflatex
-# - Configuration variables take into accout some commands from additional packages:
+# - Configuration variables take into accout some commands from additional packages:
# tikzpicture environment now treated as PICTUREENV, and \smallmatrix in ARRENV (amsmath)
# - --flatten: support for \subfile command (subfiles package) (in response to http://tex.stackexchange.com/questions/167620/latexdiff-with-subfiles )
# - --flatten: \bibliography commands expand if corresponding bbl file present
@@ -179,11 +194,11 @@
# - \% in one-letter sub/Superscripts was not converted correctly
#
# Version 1.0.3
-# - fix bug in add_safe_commands that made latexdiff hang on DeclareMathOperator
+# - fix bug in add_safe_commands that made latexdiff hang on DeclareMathOperator
# command in preamble
# - \(..\) inline math expressions were not parsed correctly, if they contained a linebreak
# - applied patch contributed by tomflannaghan via Berlios: [ Patch #3431 ] Adds correct handling of \left< and \right>
-# - \$ is treated correctly as a literal dollar sign (thanks to Reed Cartwright and Joshua Miller for reporting this bug
+# - \$ is treated correctly as a literal dollar sign (thanks to Reed Cartwright and Joshua Miller for reporting this bug
# and sketching out the solution)
# - \^ and \_ are correctly interpreted as accent and underlined space, respectively, not as superscript of subscript
# (thanks to Wail Yahyaoui for pointing out this bug)
@@ -191,19 +206,19 @@
# Version 1.0.1 - treat \big,\bigg etc. equivalently to \left and
# \right - include starred version in MATHENV - apply
# - flatten recursively and --flatten expansion is now
-# aware of comments (thanks to Tim Connors for patch)
+# aware of comments (thanks to Tim Connors for patch)
# - Change to post-processing for more reliability for
# deleted math environments
-# - On linux systems, recognise and remove DOS style newlines
+# - On linux systems, recognise and remove DOS style newlines
# - Provide markup for some special preamble commands (\title,
-# \author,\date,
-# - configurable by setting context2cmd
+# \author,\date,
+# - configurable by setting context2cmd
# - for styles using ulem package, remove \emph and \text.. from list of
# safe commands in order to allow linebreaks within the
-# highlighted sections.
-# - for ulem style, now show citations by enclosing them in \mbox commands.
-# This unfortunately implies linebreaks within citations no longer function,
-# so this functionality can be turned off (Option --disable-citation-markup).
+# highlighted sections.
+# - for ulem style, now show citations by enclosing them in \mbox commands.
+# This unfortunately implies linebreaks within citations no longer function,
+# so this functionality can be turned off (Option --disable-citation-markup).
# With --enable-citation-markup, the mbox markup is forced for other styles)
# - new substyle COLOR. This is particularly useful for marking up citations
# and some special post-processing is implemented to retain cite
@@ -211,11 +226,11 @@
# - four different levels of math-markup
# - Option --driver for choosing driver for modes employing changebar package
# - accept \\* as valid command (and other commands of form \.*). Also accept
-# \<nl> (backslashed newline)
+# \<nl> (backslashed newline)
# - some typo fixes, include commands defined in preamble as safe commands
-# (Sebastian Gouezel)
+# (Sebastian Gouezel)
# - include compared filenames as comments as line 2 and 3 of
-# the preamble (can be modified with option --label, and suppressed with
+# the preamble (can be modified with option --label, and suppressed with
# --no-label), option --visible-label to show files in generated pdf or dvi
# at the beginning of main document
#
@@ -231,7 +246,7 @@
#
# Version 0.4 March 06 option for fast differencing using UNIX diff command, several minor bug fixes (\par bug, improved highlighting of textcmds)
#
-# Version 0.3 August 05 improved parsing of displayed math, --allow-spaces
+# Version 0.3 August 05 improved parsing of displayed math, --allow-spaces
# option, several minor bug fixes
#
# Version 0.25 October 04 Fix bug with deleted equations, add math mode commands to safecmd, add | to allowed interpunctuation signs
@@ -247,12 +262,13 @@ use utf8 ;
use File::Spec ;
+
my ($algodiffversion)=split(/ /,$Algorithm::Diff::VERSION);
my ($versionstring)=<<EOF ;
-This is LATEXDIFF 1.3.3 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V)
- (c) 2004-2022 F J Tilmann
+This is LATEXDIFF 1.3.4 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V)
+ (c) 2004-2024 F J Tilmann
EOF
# Hash with defaults for configuration variables. These marked undef have default values constructed from list defined in the DATA block
@@ -343,9 +359,9 @@ my $DELCMDOPEN='%DIFDELCMD < '; # To mark begin of deleted commands (must begin
my $DELCMDCLOSE="%%%\n"; # To mark end of deleted commands (must end with a new line)
my $AUXCMD='%DIFAUXCMD' ; # follows auxiliary commands put in by latexdiff to make difference file legal
# auxiliary commands must be on a line of their own
- # Note that for verbatim environment openings the %DIFAUXCMD cannot be placed in
+ # Note that for verbatim environment openings the %DIFAUXCMD cannot be placed in
# the same line as this would mean they are shown
- # so the special form "%DIFAUXCMD NEXT" is used to indicate that the next line
+ # so the special form "%DIFAUXCMD NEXT" is used to indicate that the next line
# is an auxiliary command
# Similarly "%DIFAUXCMD LAST" would indicate the auxiliary command is in previous line (not currently used)
my $DELCOMMENT='DIF < '; # To mark deleted comment line
@@ -356,21 +372,21 @@ my @TEXTCMDLIST=(); # array containing patterns of commands with text arguments
my @TEXTCMDEXCL=(); # array containing patterns of commands without text arguments (if a pattern
# matches both TEXTCMDLIST and TEXTCMDEXCL it is excluded)
my @CONTEXT1CMDLIST=(); # array containing patterns of commands with text arguments (subset of text commands),
- # but which cause confusion if used out of context (e.g. \caption).
+ # but which cause confusion if used out of context (e.g. \caption).
# In deleted passages, the command will be disabled but its argument is marked up
- # Otherwise they behave exactly like TEXTCMD's
+ # Otherwise they behave exactly like TEXTCMD's
my @CONTEXT1CMDEXCL=(); # exclude list for above, but always empty
my @CONTEXT2CMDLIST=(); # array containing patterns of commands with text arguments, but which fail or cause confusion
# if used out of context (e.g. \title). They and their arguments will be disabled in deleted
# passages
my @CONTEXT2CMDEXCL=(); # exclude list for above, but always empty
my @MATHTEXTCMDLIST=(); # treat like textcmd. If a textcmd is in deleted or added block, just wrap the
- # whole content with \DIFadd or \DIFdel irrespective of content. This functionality
+ # whole content with \DIFadd or \DIFdel irrespective of content. This functionality
# is useful for pseudo commands \MATHBLOCK.. into which math environments are being
- # transformed
-my @MATHTEXTCMDEXCL=(); #
+ # transformed
+my @MATHTEXTCMDEXCL=(); #
-# Note I need to declare this with "our" instead of "my" because later in the code I have to "local"ise these
+# Note I need to declare this with "our" instead of "my" because later in the code I have to "local"ise these
our @SAFECMDLIST=(); # array containing patterns of safe commands (which do not break when in the argument of DIFadd or DIFDEL)
our @SAFECMDEXCL=();
my @MBOXCMDLIST=(); # patterns for commands which are in principle safe but which need to be surrounded by an \mbox
@@ -435,7 +451,7 @@ $mathmarkup=COARSE;
$verbose=0;
$onlyadditions=0;
# output debug and intermediate files, set to 0 in final distribution
-$debug=0;
+$debug=0;
# insert preamble directly after documentclass - experimental feature, set to 0 in final distribution
# Note that this failed with mini example (or other files, where packages used in latexdiff preamble
# are called again with incompatible options in preamble of resulting file)
@@ -458,9 +474,9 @@ END
my %verbhash;
Getopt::Long::Configure('bundling');
-GetOptions('type|t=s' => \$type,
- 'subtype|s=s' => \$subtype,
- 'floattype|f=s' => \$floattype,
+GetOptions('type|t=s' => \$type,
+ 'subtype|s=s' => \$subtype,
+ 'floattype|f=s' => \$floattype,
'config|c=s' => \@configlist,
'add-to-config=s' => \@addtoconfiglist,
'preamble|p=s' => \$preamblefile,
@@ -509,11 +525,11 @@ if ( $help ) {
if ( $version ) {
- print STDERR $versionstring ;
+ print STDERR $versionstring ;
exit 0;
}
-print STDERR $versionstring if $verbose;
+print STDERR $versionstring if $verbose;
if (defined($showall)){
$showpreamble=$showsafe=$showtext=$showconfig=1;
@@ -531,7 +547,7 @@ if (defined($mathmarkup)) {
$mathmarkup=~tr/a-z/A-Z/;
if ( $mathmarkup eq 'OFF' ){
$mathmarkup=OFF;
- } elsif ( $mathmarkup eq 'WHOLE' ){
+ } elsif ( $mathmarkup eq 'WHOLE' ){
$mathmarkup=WHOLE;
} elsif ( $mathmarkup eq 'COARSE' ){
$mathmarkup=COARSE;
@@ -634,7 +650,7 @@ foreach $config ( @configlist ) {
}
}
foreach $assign ( @config ) {
- $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
+ $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
exists $CONFIG{$1} or die "Unknown configuration variable $1.";
$CONFIG{$1}=$2;
}
@@ -671,7 +687,7 @@ foreach $key ( keys(%CONFIG) ) {
foreach $assign ( @addtoconfig ) {
###print STDERR "assign:|$assign|\n";
- $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
+ $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
exists $CONFIG{$1} or die "Unknown configuration variable $1.";
$CONFIG{$1}.=";$2";
}
@@ -686,8 +702,8 @@ foreach ( keys(%CONFIG) ) {
elsif ( $_ eq "MATHENV" ) { $MATHENV = liststringtoregex($CONFIG{$_}) ; }
elsif ( $_ eq "MATHREPL" ) { $MATHREPL = $CONFIG{$_} ; }
elsif ( $_ eq "MATHARRENV" ) { $MATHARRENV = liststringtoregex($CONFIG{$_}) ; }
- elsif ( $_ eq "MATHARRREPL" ) { $MATHARRREPL = $CONFIG{$_} ;
- print STDERR "WARNING: Setting MATHARRREPL is depracated. Generally deleted math array environments will be set to their starred varieties and the setting of MATHARREPL is ignored.\n\n" unless $MATHARRREPL =~ /eqnarray\*/ ;
+ elsif ( $_ eq "MATHARRREPL" ) { $MATHARRREPL = $CONFIG{$_} ;
+ print STDERR "WARNING: Setting MATHARRREPL is depracated. Generally deleted math array environments will be set to their starred varieties and the setting of MATHARREPL is ignored.\n\n" unless $MATHARRREPL =~ /eqnarray\*/ ;
}
elsif ( $_ eq "ARRENV" ) { $ARRENV = liststringtoregex($CONFIG{$_}) ; }
elsif ( $_ eq "VERBATIMENV" ) { $VERBATIMENV = liststringtoregex($CONFIG{$_}) ; }
@@ -714,11 +730,11 @@ foreach $pkg ( @packagelist ) {
if ($showconfig || $showtext || $showsafe || $showpreamble) {
show_configuration();
- exit 0;
+ exit 0;
}
-if ( @ARGV != 2 ) {
+if ( @ARGV != 2 ) {
print STDERR "2 and only 2 non-option arguments required. Write latexdiff -h to get help\n";
exit(2);
}
@@ -726,7 +742,7 @@ if ( @ARGV != 2 ) {
# Are extra spaces between command arguments permissible?
my $extraspace;
if ($allowspaces) {
- $extraspace='\s*';
+ $extraspace='\s*';
} else {
$extraspace='';
}
@@ -749,14 +765,14 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
# if you get "undefined control sequence MATHBLOCKmath" error, increase the maximum value in this loop
for (my $i_pat = 0; $i_pat < 20; ++$i_pat){
$pat_n = '(?:[^{}]|\{'.$pat_n.'\}|\\\\\{|\\\\\})*';
- # Actually within the text body, quoted braces are replaced in pre-processing. The only place where
+ # Actually within the text body, quoted braces are replaced in pre-processing. The only place where
# the last part of the pattern matters is when processing the arguments of context2cmds in the preamble
# and these contain a \{ or \} combination, probably rare.
# It should thus be fine to use the simpler version below.
### $pat_n = '(?:[^{}]|\{'.$pat_n.'\})*';
}
- my $brat0 = '(?:[^\[\]]|\\\[|\\\])*';
+ my $brat0 = '(?:[^\[\]]|\\\[|\\\])*';
my $brat_n = $brat0;
for (my $i_pat = 0; $i_pat < 4; ++$i_pat){
$brat_n = '(?:[^\[\]]|\['.$brat_n.'\]|\\\[|\\\])*';
@@ -773,7 +789,7 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
# could turn 'i.e.' into 'i.\PAR e.' (see https://github.com/ftilmann/latexdiff/issues/269)
# English: i.e., e.g. Deutsch: z.B.
my $abbreviation='(?:i\. ?e\.|e\. ?g\.|z\. ?B\.)' ;
- my $number='-?\d*\.\d*';
+ my $number='-?\d*\.\d*';
# word: sequence of letters or accents followed by letter
my $word_cj='\p{Han}|\p{InHiragana}|\p{InKatakana}';
@@ -801,7 +817,7 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
# inline math $....$ or \(..\)
### the commented out version is simpler but for some reason cannot cope with newline (in spite of s option) - need to include \newline explicitly
### my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(].*?\\\\[)]';
- my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(](?:.|\n)*?\\\\[)]';
+ my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(](?:.|\n)*?\\\\[)]';
### test version (this seems to give the same results as version above)
## the current maths command cannot cope with newline within the math expression
### my $math='\$(?:[^$]|\\\$)*?\$|\\[(].*?\\[)]';
@@ -819,7 +835,7 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
-# now we are done setting up and can start working
+# now we are done setting up and can start working
my ($oldfile, $newfile) = @ARGV;
# check for existence of input files
if ( ! -e $oldfile ) {
@@ -847,7 +863,7 @@ my ($oldtime,$newtime,$oldlabel,$newlabel);
if (defined($labels[0])) {
$oldlabel=$labels[0] ;
} else {
- $oldtime=localtime((stat($oldfile))[9]);
+ $oldtime=localtime((stat($oldfile))[9]);
$oldlabel="$oldfile " . " "x($oldlabel_n_spaces) . $oldtime;
}
if (defined($labels[1])) {
@@ -860,6 +876,7 @@ if (defined($labels[1])) {
$encoding=guess_encoding($newfile) unless defined($encoding);
$encoding = "utf8" if $encoding =~ m/^utf8/i ;
+print STDERR "Encoding $encoding\n" if $verbose;
if (lc($encoding) eq "utf8" ) {
binmode(STDOUT, ":utf8");
binmode(STDERR, ":utf8");
@@ -943,7 +960,7 @@ my @auxlines;
my ($ulem)=0;
if ( length $oldpreamble && length $newpreamble ) {
- # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
+ # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
# and marking up content with latexdiff markup
@auxlines=preprocess_preamble($oldpreamble,$newpreamble);
@@ -975,7 +992,7 @@ if (defined($graphicsmarkup)) {
} else {
# Default: no explicit setting in menu
if ( defined $packages{"graphicx"} or defined $packages{"graphics"} ) {
- $graphicsmarkup=NEWONLY;
+ $graphicsmarkup=NEWONLY;
} else {
$graphicsmarkup=NONE;
}
@@ -1008,7 +1025,7 @@ if ($graphicsmarkup != NONE ) {
@matches=( $latexdiffpreamble =~ m/command\{\\DIFaddbeginFL}\{($pat_n)}/sg ) ;
# we look at the last one of the list to take into account possible redefinition but almost always matches should have exactly one element
if ( $matches[$#matches] =~ m/\\DIFaddbegin/ ) {
- die "Cannot combine graphics markup with float styles defining \\DIFaddbeginFL in terms of \\DIFaddbegin. Use --graphics-markup=none option or choose a different float style.";
+ die "Cannot combine graphics markup with float styles defining \\DIFaddbeginFL in terms of \\DIFaddbegin. Use --graphics-markup=none option or choose a different float style.";
exit 10;
}
###}
@@ -1022,6 +1039,11 @@ if ($graphicsmarkup != NONE ) {
$ulem = ($latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{ulem\}/ || defined $packages{"ulem"});
+# If amsmath is defined and $ulem is used for markup, redefine the \sout command to also work (mostly) in math mode
+# See stack exchange https://tex.stackexchange.com/questions/20609/strikeout-in-math-mode/308647#308647 based on comment by Taylor Raine
+if ( defined($packages{'amsmath'}) and $ulem ) {
+ $latexdiffpreamble .= join "\n",(extrapream('AMSMATHULEM'),"");
+}
# If listings is being used or can be found in the latexdiff search path, add to the preamble auxiliary code to enable line-by-line markup
if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
@@ -1031,7 +1053,7 @@ if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
}
my @listingDIFcode=();
my $replaced;
- # note that in case user supplies preamblefile the type might not reflect well the
+ # note that in case user supplies preamblefile the type might not reflect well the actual markup style
@listingDIFcode=extrapream("-nofail","DIFCODE_" . $type) unless defined($preamblefile);
if (!(@listingDIFcode)) {
# if listingDIFcode is empty try to guess a suitable one from the preamble
@@ -1045,13 +1067,17 @@ if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
@listingDIFcode=extrapream("DIFCODE_BOLD");
}
}
- # now splice it in
+ # add configuration so that listings work with utf-8
+ push @listingpreamble, '\lstset{extendedchars=\true,inputencoding='.$encoding."}\n";
+
+
+ # now splice it in
$replaced=0;
###print STDERR "DEBUG: listingDIFcode: ",join("\n",@listingDIFcode),"|||\n" if $debug;
- @listingpreamble=grep {
+ @listingpreamble=grep {
# only replace if this has not been done already (use short-circuit property of and)
- if (!$replaced and $_ =~ s/^.*%DIFCODE TEMPLATE.*$/join("\n",@listingDIFcode)/e ) {
+ if (!$replaced and $_ =~ s/^.*%DIFCODE TEMPLATE.*$/join("\n",@listingDIFcode)/e ) {
###print STDERR "DEBUG: Replaced text $_\n" if $debug;
$replaced=1;
1;
@@ -1081,7 +1107,7 @@ if ( length $oldpreamble && length $newpreamble ) {
unshift @oldpreamble,'';
@diffpreamble = linediff(\@oldpreamble, \@newpreamble);
# remove dummy line again
- shift @diffpreamble;
+ shift @diffpreamble;
# add filenames, modification time and latexdiff mark
defined($nolabel) or splice @diffpreamble,1,0,
"%DIF LATEXDIFF DIFFERENCE FILE",
@@ -1130,8 +1156,8 @@ if (defined $packages{"siunitx"} ) {
# protect SI command by surrounding them with an \mbox
# this is done to get around an incompatibility between the ulem and siunitx package
print STDERR "siunitx package detected.\n" if $verbose ;
- my $mboxcmds='SI,ang,numlist,numrange,SIlist,SIrange';
- init_regex_arr_list(\@SAFECMDLIST,'num,si');
+ my $mboxcmds='SI,ang,numlist,numrange,SIlist,SIrange,qty,qtylist,qtyproduct,qtyrange,complexqty';
+ init_regex_arr_list(\@SAFECMDLIST,'num,si,numproduct,unit,complexnum');
if ( $enablecitmark || ( $ulem && ! $disablecitmark )) {
init_regex_arr_list(\@MBOXCMDLIST,$mboxcmds);
} else {
@@ -1153,7 +1179,7 @@ if (defined $packages{"cleveref"} ) {
if (defined $packages{"glossaries"} ) {
# protect selected command by surrounding them with an \mbox
- # this is done to get around an incompatibility between ulem and glossaries package
+ # this is done to get around an incompatibility between ulem and glossaries package
print STDERR "glossaries package detected.\n" if $verbose ;
my $mboxcmds='[gG][lL][sS](?:|pl|disp|link|first|firstplural|desc|user[iv][iv]?[iv]?),[aA][cC][rR](?:long|longpl|full|fullpl),[aA][cC][lfp]?[lfp]?';
init_regex_arr_list(\@SAFECMDLIST,'[gG][lL][sS](?:(?:entry)?(?:text|plural|name|symbol)|displaynumberlist|entryfirst|entryfirstplural|entrydesc|entrydescplural|entrysymbolplural|entryuser[iv][iv]?[iv]?|entrynumberlist|entrydisplaynumberlist|entrylong|entrylongpl|entryshort|entryshortpl|entryfull|entryfullpl),[gG]lossentry(?:name|desc|symbol),[aA][cC][rR](?:short|shortpl),[aA]csp?');
@@ -1182,6 +1208,10 @@ if (defined $packages{"mhchem"} ) {
# push(@MATHTEXTCMDLIST,'cee');
}
+if ( defined $packages{"tikz-dependency"} ) {
+ init_regex_arr_ext(\@SAFECMDEXCL, 'AMPERSAND');
+}
+
my ( $citpat);
@@ -1269,7 +1299,7 @@ print STDERR "(",exetime()," s)\n","Done.\n" if $verbose;
# liststringtoregex(liststring)
-# expands string with semi-colon separated list into a regular expression corresponding
+# expands string with semi-colon separated list into a regular expression corresponding
# matching any of the elements
sub liststringtoregex {
my ($liststring)=@_;
@@ -1282,7 +1312,7 @@ sub liststringtoregex {
}
# show_configuration
-# note that this is not encapsulated but uses variables from the main program
+# note that this is not encapsulated but uses variables from the main program
# It is provided for convenience because in the future it is planned to allow output
# to be modified based on what packages are read etc - this works only if the input files are actually read
# whether or not additional files are provided
@@ -1309,7 +1339,7 @@ sub show_configuration {
print "\nContext1 commands (last argument textual, command will be disabled in deleted passages, last argument will be shown as plain text):\n";
print_regex_arr(@CONTEXT1CMDLIST);
print "\nContext2 commands (last argument textual, command and its argument will be disabled in deleted passages):\n";
- print_regex_arr(@CONTEXT2CMDLIST);
+ print_regex_arr(@CONTEXT2CMDLIST);
print "\nExclude list of Commands with last argument not textual (overrides patterns above):\n";
print_regex_arr(@TEXTCMDEXCL);
}
@@ -1417,7 +1447,7 @@ sub list_packages {
my %packages=();
my $pkg;
- # remove comments
+ # remove comments
$preamble=~s/(?<!\\)%.*$//mg ;
while ( $preamble =~ m/\\(?:documentclass|usepackage|RequirePackage)(?:\[($brat_n)\])?\{(.*?)\}/gs ) {
@@ -1522,7 +1552,7 @@ sub flatten {
my ($includeonly,$dirname,$fname,$newpage,$fullfile,$filecontent,$replacement,$begline,$inputcmd,$bblfile,$subfile,$command,$verbenv,$verboptions,$ignore,$fileonly);
my ($subpreamble,$subbody,$subpost);
my ($subdir,$subdirfull,$importfilepath);
- require File::Basename ;
+ require File::Basename ;
### require File::Spec ; # now this is needed even if flatten option not given
$filename = File::Spec->rel2abs( $filename ) ;
($ignore, $dirname, $fileonly) = File::Spec->splitpath($filename) ;
@@ -1562,15 +1592,15 @@ sub flatten {
$subdirfull = (defined($3) ? File::Spec->catdir($dirname,$subdir) : $subdir);
$importfilepath = File::Spec->catfile($subdirfull, $fname);
-
+
print STDERR "importing importfilepath:", $importfilepath,"\n" if $verbose;
if ( -f $importfilepath ) {
# If file exists, replace input or include command with expanded input
#TODO: need remove_endinput & newpage similar to other replacements inside flatten
- $replacement=flatten(read_file_with_encoding($importfilepath, $encoding), $preamble,$importfilepath,$encoding);
+ $replacement=flatten(read_file_with_encoding($importfilepath, $encoding), $preamble,$importfilepath,$encoding);
} else {
# if file does not exist, do not expand include or input command (do not warn if fname contains #[0-9] as it is then likely part of a command definition
- # and is not meant to be expanded directly
+ # and is not meant to be expanded directly
print STDERR "WARNING: Could not find included file ",$importfilepath,". I will continue but not expand |$2|\n";
$replacement = $2;
$replacement .= "{$subdir}{$fname} % Processed";
@@ -1579,13 +1609,13 @@ sub flatten {
}/exgm;
# recursively replace \\input and \\include files
- $text =~ s/(^(?:[^%\n]|\\%)*)(\\input\{(.*?)\}|\\include\{(${includeonly}(?:\.tex)?)\})/{
+ $text =~ s/(^(?:[^%\n]|\\%)*)(\\input\{(.*?)\}|\\include\{(${includeonly}(?:\.tex)?)\})/{
$begline=(defined($1)? $1 : "") ;
$inputcmd=$2;
$fname = $3 if defined($3) ;
$fname = $4 if defined($4) ;
$newpage=(defined($4)? " \\newpage " : "") ;
- # # add tex extension unless there is a three or four letter extension already
+ # # add tex extension unless there is a three or four letter extension already
$fname .= ".tex" unless $fname =~ m|\.\w{3,4}$|;
$fullfile = File::Spec->catfile($dirname,$fname);
print STDERR "DEBUG Beg of line match |$1|\n" if defined($1) && $debug ;
@@ -1594,12 +1624,12 @@ sub flatten {
# content of file becomes replacement value (use recursion), add \newpage if the command was include
if ( -f $fullfile ) {
# If file exists, replace input or include command with expanded input
- $replacement=flatten(read_file_with_encoding($fullfile, $encoding), $preamble,$filename,$encoding);
- $replacement = remove_endinput($replacement);
+ $replacement=flatten(read_file_with_encoding($fullfile, $encoding), $preamble,$filename,$encoding);
+ $replacement = remove_endinput($replacement);
# \include always starts a new page; use explicit \newpage command to simulate this
} else {
# if file does not exist, do not expand include or input command (do not warn if fname contains #[0-9] as it is then likely part of a command definition
- # and is not meant to be expanded directly
+ # and is not meant to be expanded directly
print STDERR "WARNING: Could not find included file ",$fullfile,". I will continue but not expand |$inputcmd|\n" unless $fname =~ m(#[0-9]) ;
$replacement = $inputcmd ; # i.e. just the original command again -> make no change file does not exist
$newpage="";
@@ -1608,7 +1638,7 @@ sub flatten {
}/exgm;
# replace bibliography with bbl file if it exists
- $text=~s/(^(?:[^%\n]|\\%)*)\\bibliography\{(.*?)\}/{
+ $text=~s/(^(?:[^%\n]|\\%)*)\\bibliography\{(.*?)\}/{
if ( -f $bblfile ){
$replacement=read_file_with_encoding(File::Spec->catfile($bblfile), $encoding);
} else {
@@ -1620,10 +1650,10 @@ sub flatten {
}/exgm;
# replace subfile with contents (subfile package)
- $text=~s/(^(?:[^%\n]|\\%)*)\\subfile\{(.*?)\}/{
+ $text=~s/(^(?:[^%\n]|\\%)*)\\subfile\{(.*?)\}/{
$begline=(defined($1)? $1 : "") ;
- $fname = $2;
- # # add tex extension unless there is a three or four letter extension already
+ $fname = $2;
+ # # add tex extension unless there is a three or four letter extension already
$fname .= ".tex" unless $fname =~ m|\.\w{3,4}|;
print STDERR "Include file as subfile $fname\n" if $verbose;
# content of file becomes replacement value (use recursion)
@@ -1634,10 +1664,10 @@ sub flatten {
# if file exists, expand \subfile command by contents of file
$subfile=read_file_with_encoding($fullfile,$encoding) or die "Could not open included subfile ",$fullfile,": $!";
($subpreamble,$subbody,$subpost)=splitdoc($subfile,'\\\\begin\{document\}','\\\\end\{document\}');
- ### $subfile=~s|^.*\\begin{document}||s;
+ ### $subfile=~s|^.*\\begin{document}||s;
### $subfile=~s|\\end{document}.*$||s;
$replacement=flatten($subbody, $preamble,$fullfile,$encoding);
- ### $replacement = remove_endinput($replacement);
+ ### $replacement = remove_endinput($replacement);
} else {
# if file does not exist, do not expand subfile
print STDERR "WARNING: Could not find subfile ",$fullfile,". I will continue but not expand |$2|\n" unless $fname =~ m(#[0-9]) ;
@@ -1648,11 +1678,11 @@ sub flatten {
}/exgm;
# replace \verbatiminput and \lstlistinginput
- $text=~s/(^(?:[^%\n]|\\%)*)\\(verbatiminput\*?|lstinputlisting)$extraspace(\[$brat_n\])?$extraspace\{(.*?)\}/{
+ $text=~s/(^(?:[^%\n]|\\%)*)\\(verbatiminput\*?|lstinputlisting)$extraspace(\[$brat_n\])?$extraspace\{(.*?)\}/{
$begline=(defined($1)? $1 : "") ;
$command = $2 ;
$fname = $4 ;
- $verboptions = defined($3)? $3 : "" ;
+ $verboptions = defined($3)? $3 : "" ;
if ($command eq 'verbatiminput' ) {
$verbenv = "verbatim" ;
} elsif ($command eq 'verbatiminput*' ) {
@@ -1661,7 +1691,7 @@ sub flatten {
$verbenv = "lstlisting" ;
} else {
die "Internal errorL Unexpected verbatim input type $command.\n";
- }
+ }
print STDERR "DEBUG Beg of line match |$begline|\n" if $debug ;
print STDERR "Include file $fname verbatim\n" if $verbose;
print STDERR "DEBUG looking for file ",File::Spec->catfile($dirname,$fname), "\n" if $debug;
@@ -1693,8 +1723,8 @@ sub print_regex_arr {
# if $type is a filename, it will read the file instead of reading from the appendix
# otherwise it will screen appendix for line "%DIF $TYPE" and copy everything up to line
# '%DIF END $TYPE' (where $TYPE is upcased version of $type)
-# extrapream('-nofail',$type) will---instead of failing---simply return nothing if
-# it does not find the matching line in a appendix (do not use -nofail option with multiple types!)
+# extrapream('-nofail',$type) will---instead of failing---simply return nothing if
+# it does not find the matching line in appendix (do not use -nofail option with multiple types!)
sub extrapream {
my @types=@_;
my ($type,$arg);
@@ -1711,14 +1741,20 @@ sub extrapream {
$type=$arg;
$copy=0;
if ( -f $type || lc $type eq '/dev/null' ) {
- open (FILE,$type) or die "Cannot open preamble file $type: $!";
print STDERR "Reading preamble file $type\n" if $verbose ;
+ open (FILE,$type) or die "Cannot open preamble file $type: $!";
+ if (defined($encoding)) {
+ binmode(FILE,":encoding($encoding)");
+ } else {
+ require Encode::Locale;
+ binmode(FILE,":encoding(locale)");
+ }
while (<FILE>) {
chomp ;
if ( $_ =~ m/%DIF PREAMBLE/ ) {
- push (@retval,"$_");
+ push (@retval,"$_");
} else {
- push (@retval,"$_ %DIF PREAMBLE");
+ push (@retval,"$_ %DIF PREAMBLE");
}
}
} else { # not (-f $type)
@@ -1730,9 +1766,9 @@ sub extrapream {
my $data_start = tell DATA;
while (<DATA>) {
if ( m/^%DIF $type/ ) {
- $copy=1;
+ $copy=1;
} elsif ( m/^%DIF END $type/ ) {
- last;
+ last;
}
chomp;
push (@retval,"$_ %DIF PREAMBLE") if $copy;
@@ -1772,7 +1808,7 @@ sub splitdoc {
$pos=pos $rest;
$part2=substr($rest,0,$pos-length($2));
$part3=substr($rest,$pos);
- }
+ }
else {
die "$word1 and $word2 not in the correct order or not present as a pair." ;
}
@@ -1844,7 +1880,7 @@ sub splitlatex {
my $leadin=$1;
length($string)>0 or return ($leadin);
- my @retval=($string =~ m/$pat/osg);
+ my @retval=($string =~ m/$pat/osg);
if (length($string) != length(join("",@retval))) {
print STDERR "\nWARNING: Inconsistency in length of input string and parsed string:\n This often indicates faulty or non-standard latex code.\n In many cases you can ignore this and the following warning messages.\n Note that character numbers in the following are counted beginning after \\begin{document} and are only approximate." unless $ignorewarnings;
@@ -1888,17 +1924,17 @@ sub splitlatex {
# pass1( \@seq1,\@seq2)
# Look for differences between seq1 and seq2.
-# Where an common-subsequence block is flanked by deleted or appended blocks,
+# Where an common-subsequence block is flanked by deleted or appended blocks,
# and is shorter than $MINWORDSBLOCK words it is appended
-# to the last deleted or appended word. If the block contains tokens other than words
+# to the last deleted or appended word. If the block contains tokens other than words
# or punctuation it is not merged.
# Deleted or appended block consisting of words and safe commands only are
# also merged, to prevent break-up in pass2 (after previous isolated words have been removed)
-# If there are commands with textual arguments (e.g. \caption) both in corresponding
-# appended and deleted blocks split them such that the command and opening bracket
-# are one token, then the rest is split up following standard rules, and the closing
+# If there are commands with textual arguments (e.g. \caption) both in corresponding
+# appended and deleted blocks split them such that the command and opening bracket
+# are one token, then the rest is split up following standard rules, and the closing
# bracket is a separate token, ie. turn
-# "\caption{This is a textual argument}" into
+# "\caption{This is a textual argument}" into
# ("\caption{","This ","is ","a ","textual ","argument","}")
# No return value. Destructively changes sequences
sub pass1 {
@@ -1927,15 +1963,15 @@ sub pass1 {
my $adddiscard = sub {
if ($cnt > 0 ) {
$matblkcnt++;
- # just after an unchanged block
+ # just after an unchanged block
# print STDERR "Unchanged block $cnt, $last1,$last2 \n";
- if ($cnt < $MINWORDSBLOCK
+ if ($cnt < $MINWORDSBLOCK
&& $cnt==scalar (
- grep { /^$wpat/ || ( /^\\((?:[`'^"~=.]|[\w\d@*]+))((?:\[$brat_n\]|\{$pat_n\})*)/o
- && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
+ grep { /^$wpat/ || ( /^\\((?:[`'^"~=.]|[\w\d@*]+))((?:\[$brat_n\]|\{$pat_n\})*)/o
+ && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
&& scalar(@dummy=split(" ",$2))<3 ) }
@$block) ) {
- # merge identical blocks shorter than $MINWORDSBLOCK
+ # merge identical blocks shorter than $MINWORDSBLOCK
# and only containing ordinary words
# with preceding different word
# We cannot carry out this merging immediately as this
@@ -1943,23 +1979,23 @@ sub pass1 {
# the algorithm, instead we store in @$todo where we have to merge
push(@$todo, [ $last1,$last2,$cnt,@$block ]);
}
- $block = [];
+ $block = [];
$cnt=0; $last1=-1; $last2=-1;
}
};
my $discard=sub { $deltokcnt++;
&$adddiscard; #($_[0],$_[1]);
push(@$delblock,[ $seq1->[$_[0]],$_[0] ]);
- $last1=$_[0] };
+ $last1=$_[0] };
my $add = sub { $addtokcnt++;
&$adddiscard; #($_[0],$_[1]);
push(@$addblock,[ $seq2->[$_[1]],$_[1] ]);
- $last2=$_[1] };
+ $last2=$_[1] };
my $match = sub { $mattokcnt++;
if ($cnt==0) { # first word of matching sequence after changed sequence or at beginning of word sequence
- $deltextblocks = extracttextblocks($delblock);
+ $deltextblocks = extracttextblocks($delblock);
$delblkcnt++ if scalar @$delblock;
$addtextblocks = extracttextblocks($addblock);
$addblkcnt++ if scalar @$addblock;
@@ -1975,7 +2011,7 @@ sub pass1 {
### Algorithm::Diff 1.19
$matchindex=Algorithm::Diff::_longestCommonSubsequence($delcmds,$addcmds, 0, sub { $_[0]->[0] } );
} else {
- ### Algorithm::Diff 1.15
+ ### Algorithm::Diff 1.15
$matchindex=Algorithm::Diff::_longestCommonSubsequence($delcmds,$addcmds, sub { $_[0]->[0] } );
}
@@ -2006,11 +2042,11 @@ sub pass1 {
my ($index,$block,$cnt)=@{ shift(@$addtextblocks) };
push(@$todo, [-1,$index,$cnt,@$block]);
}
-
+
$addblock=[];
$delblock=[];
}
- push(@$block,$seq2->[$_[1]]);
+ push(@$block,$seq2->[$_[1]]);
$cnt++ };
my $keyfunc = sub { join(" ",split(" ",shift())) };
@@ -2018,7 +2054,7 @@ sub pass1 {
traverse_sequences($seq1,$seq2, { MATCH=>$match, DISCARD_A=>$discard, DISCARD_B=>$add }, $keyfunc );
- # now carry out the merging/splitting. Refer to elements relative from
+ # now carry out the merging/splitting. Refer to elements relative from
# the end (with negative indices) as these offsets don't change before the instruction is executed
# cnt>0: merged small unchanged groups with previous changed blocks
# cnt==-1: split textual commands into components
@@ -2033,7 +2069,7 @@ sub pass1 {
}
}
- if ($verbose) {
+ if ($verbose) {
print STDERR "\n";
print STDERR " $mattokcnt matching tokens in $matblkcnt blocks.\n";
print STDERR " $deltokcnt discarded tokens in $delblkcnt blocks.\n";
@@ -2043,10 +2079,10 @@ sub pass1 {
# extracttextblocks(\@blockindex)
-# $blockindex has the following format
-# [ [ token1, index1 ], [token2, index2],.. ]
-# where index refers to the index in the original old or new word sequence
-# Returns: reference to an array of the form
+# $blockindex has the following format
+# [ [ token1, index1 ], [token2, index2],.. ]
+# where index refers to the index in the original old or new word sequence
+# Returns: reference to an array of the form
# [[ $index, $textblock, $cnt ], ..
# where $index index of block to be merged
# $textblock contains all the words to be merged with the word at $index (but does not contain this word)
@@ -2054,7 +2090,7 @@ sub pass1 {
#
# requires: iscmd
#
-sub extracttextblocks {
+sub extracttextblocks {
my $block=shift;
my ($i,$token,$index);
my $textblock=[];
@@ -2064,13 +2100,13 @@ sub extracttextblocks {
# we redefine locally $extraspace (shadowing the global definition) to capture command sequences with intervening spaces no matter what the global setting
# this is done so we can capture those commands with a predefined number of arguments without having to introduce them again explicitly here
- my $extraspace='\s*';
+ my $extraspace='\s*';
for ($i=0;$i< scalar @$block;$i++) {
($token,$index)=@{ $block->[$i] };
# store pure text blocks
- if ($token =~ /$wpat/ || ( $token =~/^\\((?:[`'^"~=.]|[\w\d@\*]+))((?:${extraspace}\[$brat_n\]${extraspace}|${extraspace}\{$pat_n\})*)/
- && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
+ if ($token =~ /$wpat/ || ( $token =~/^\\((?:[`'^"~=.]|[\w\d@\*]+))((?:${extraspace}\[$brat_n\]${extraspace}|${extraspace}\{$pat_n\})*)/
+ && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
&& !iscmd($1,\@TEXTCMDLIST,\@TEXTCMDEXCL))) {
# we have text or a command which can be treated as text
if ($last<0) {
@@ -2078,7 +2114,7 @@ sub extracttextblocks {
$last=$index;
} else {
# add to pure-text block
- push(@$textblock, $token);
+ push(@$textblock, $token);
}
} else {
# it is not text
@@ -2099,29 +2135,29 @@ sub extracttextblocks {
# extractcommands( \@blockindex )
-# $blockindex has the following format
-# [ [ token1, index1 ], [token2, index2],.. ]
-# where index refers to the index in the original old or new word sequence
-# Returns: reference to an array of the form
-# [ [ "\cmd1", index, "\cmd1[optarg]{arg1}{", "arg2" ,"} " ],..
-# where index is just taken from input array
-# command must have a textual argument as last argument
-#
-# requires: iscmd
-#
-sub extractcommands {
+# $blockindex has the following format
+# [ [ token1, index1 ], [token2, index2],.. ]
+# where index refers to the index in the original old or new word sequence
+# Returns: reference to an array of the form
+# [ [ "\cmd1", index, "\cmd1[optarg]{arg1}{", "arg2" ,"} " ],..
+# where index is just taken from input array
+# command must have a textual argument as last argument
+#
+# requires: iscmd
+#
+sub extractcommands {
my $block=shift;
my ($i,$token,$index,$cmd,$open,$mid,$closing);
my $retval=[];
# we redefine locally $extraspace (shadowing the global definition) to capture command sequences with intervening spaces no matter what the global setting
# this is done so we can capture those commands with a predefined number of arguments without having to introduce them again explicitly here
- my $extraspace='\s*';
+ my $extraspace='\s*';
for ($i=0;$i< scalar @$block;$i++) {
($token,$index)=@{ $block->[$i] };
# check if token is an alphanumeric command sequence with at least one non-optional argument
- # \cmd[...]{...}{last argument}
+ # \cmd[...]{...}{last argument}
# Capturing in the following results in these associations
# $1: \cmd[...]{...}{
# $2: \cmd
@@ -2129,7 +2165,7 @@ sub extractcommands {
# $4: } + trailing spaces
if ( ( $token =~ m/^(\\([\w\d\*]+)(?:${extraspace}\[$brat_n\]|${extraspace}\{$pat_n\})*${extraspace}\{)($pat_n)(\}\s*)$/so )
&& iscmd($2,\@TEXTCMDLIST,\@TEXTCMDEXCL) ) {
- print STDERR "DEBUG EXTRACTCOMMANDS Match |$1|$2|$3|$4|$index \n" if $debug;
+ print STDERR "DEBUG EXTRACTCOMMANDS Match |$1|$2|$3|$4|$index \n" if $debug;
# push(@$retval,[ $2,$index,$1,$3,$4 ]);
($cmd,$open,$mid,$closing) = ($2,$1,$3,$4) ;
$closing =~ s/\}/\\RIGHTBRACE/ ;
@@ -2140,7 +2176,7 @@ sub extractcommands {
}
# iscmd($cmd,\@regexarray,\@regexexcl) checks
-# return 1 if $cmd matches any of the patterns in the
+# return 1 if $cmd matches any of the patterns in the
# array $@regexarray, and none of the patterns in \@regexexcl, otherwise return 0
sub iscmd {
my ($cmd,$regexar,$regexexcl)=@_;
@@ -2148,7 +2184,7 @@ sub iscmd {
### print STDERR "DEBUG: iscmd($cmd)=" if $debug;
foreach $pat ( @$regexar ) {
if ( $cmd =~ m/^${pat}$/ ) {
- $ret=1 ;
+ $ret=1 ;
last;
}
}
@@ -2164,13 +2200,13 @@ sub iscmd {
# pass2( \@seq1,\@seq2)
-# Look for differences between seq1 and seq2.
+# Look for differences between seq1 and seq2.
# Mark begin and end of deleted and appended sequences with tags $DELOPEN and $DELCLOSE
# and $ADDOPEN and $ADDCLOSE, respectively, however exclude { } & and all comands, unless
# they match an element of the whitelist (SAFECMD)
# For words in TEXTCMD but not in SAFECMD, enclose interior with $ADDOPEN and $ADDCLOSE brackets
-# Deleted comment lines are marked with %DIF <
-# Added comment lines are marked with %DIF >
+# Deleted comment lines are marked with %DIF <
+# Added comment lines are marked with %DIF >
sub pass2 {
my $seq1 = shift ;
my $seq2 = shift ;
@@ -2202,7 +2238,7 @@ sub pass2 {
$addhunk = [];
}
push(@$retval,$seq2->[$_[1]]) };
-
+
my $keyfunc = sub { join(" ",split(" ",shift())) };
traverse_sequences($seq1,$seq2, { MATCH=>$match, DISCARD_A=>$discard, DISCARD_B=>$add }, $keyfunc );
@@ -2211,7 +2247,7 @@ sub pass2 {
push @$retval,marktags($ADDMARKOPEN,$ADDMARKCLOSE,$ADDOPEN,$ADDCLOSE,"","",$ADDCOMMENT,$addhunk) if scalar @$addhunk;
- if ($verbose) {
+ if ($verbose) {
print STDERR "\n";
print STDERR " $mattokcnt matching tokens. \n";
print STDERR " $deltokcnt discarded tokens in $delblkcnt blocks.\n";
@@ -2233,7 +2269,7 @@ sub marktags {
my (@argtext);
my $retval=[];
my $noncomment=0;
- my $cmd=-1; # -1 at beginning 0: last token written is a ordinary word
+ my $cmd=-1; # -1 at beginning 0: last token written is a ordinary word
# 1: last token written is a command
# for keeping track whether we are just in a command sequence or in a word sequence
my $cmdcomment= ($opencmd =~ m/^%/); # Flag to indicate whether opencmd is a comment (i.e. if we intend to simply comment out changed commands)
@@ -2249,31 +2285,31 @@ sub marktags {
# we redefine locally $extraspace (shadowing the global definition) to capture command sequences with intervening spaces no matter what the global setting
# this is done so we can capture those commands with a predefined number of arguments without having to introduce them again explicitly here
- my $extraspace_mt='\s*';
+ my $extraspace_mt='\s*';
foreach (@$block) {
- $word=$_;
+ $word=$_;
if ( $word =~ s/^%/%$comment/ ) {
# a comment
if ($cmd==1) {
push (@$retval,$closecmd) ;
$cmd=-1;
}
- push (@$retval,$word);
+ push (@$retval,$word);
next;
}
if ( $word =~ m/^\s*$/ ) {
### print STDERR "DEBUG MARKTAGS: whitespace detected |$word| cmdcom |$cmdcomment| |$opencmd|\n" if $debug;
# a sequence of white-space characters - this should only ever happen for the first element of block.
- # in deleted block, omit, otherwise just copy it in
+ # in deleted block, omit, otherwise just copy it in
if ( ! $cmdcomment) { # ignore in deleted blocks
push(@$retval,$word);
}
next;
}
if (! $noncomment) {
- push (@$retval,$openmark);
+ push (@$retval,$openmark);
$noncomment=1;
}
# negative lookahead pattern (?!) in second clause is put in to avoid matching \( .. \) patterns
@@ -2283,7 +2319,7 @@ sub marktags {
# word is a command or other significant token (not in SAFECMDLIST)
## same conditions as in subroutine extractcommand:
# check if token is an alphanumeric command sequence with at least one non-optional argument
- # \cmd[...]{...}{last argument}
+ # \cmd[...]{...}{last argument}
# Capturing in the following results in these associations
# $1: \cmd[...]{...}{
# $2: cmd
@@ -2300,11 +2336,11 @@ sub marktags {
# Condition 3: But if we are in a deleted block ($cmdcomment=1) and
# $2 (the command) is in context2, just treat it as an ordinary command (i.e. comment it open with $opencmd)
# Because we do not want to disable this command
- # here we do not use $opencmd and $closecmd($opencmd is empty)
+ # here we do not use $opencmd and $closecmd($opencmd is empty)
print STDERR "DEBUG: Detected text |$word| but not safe command \$2: $2 \$3: $3\n." if $debug;
if ($cmd==1) {
push (@$retval,$closecmd) ;
- } elsif ($cmd==0) {
+ } elsif ($cmd==0) {
push (@$retval,$close) ;
}
$command=$1; $commandword=$2; $closingbracket=$4;
@@ -2320,16 +2356,16 @@ sub marktags {
# for latexrevise
push (@$retval,$command,"%\n{$AUXCMD\n",marktags("","",$open,$close,$opencmd,$closecmd,$comment,\@argtext),$closingbracket);
} elsif ( iscmd($commandword,,\@MATHTEXTCMDLIST, \@MATHTEXTCMDEXCL) ) {
- # MATHBLOCK pseudo command: consider all commands safe, except & and \\, \begin and \end and a few package sprcific one (look at UNSAFEMATHCMD definition)
- # Keep these commands even in deleted blocks, hence set $opencmd and $closecmd (5th and 6th argument of marktags) to
+ # MATHBLOCK pseudo command: consider all commands safe, except & and \\, \begin and \end and a few package sprcific one (look at UNSAFEMATHCMD definition)
+ # Keep these commands even in deleted blocks, hence set $opencmd and $closecmd (5th and 6th argument of marktags) to
# ""
- local @SAFECMDLIST=(".*");
+ local @SAFECMDLIST=(".*");
local @SAFECMDEXCL=('\\','\\\\',@UNSAFEMATHCMD);
push(@$retval,$command,marktags("","",$open,$close,"","",$comment,\@argtext)#@argtext
,$closingbracket);
} else {
# normal textcmd or context1cmd in an added block
- push (@$retval,$command,marktags("","",$open,$close,$opencmd,$closecmd,$comment,\@argtext),$closingbracket);
+ push (@$retval,$command,marktags("","",$open,$close,$opencmd,$closecmd,$comment,\@argtext),$closingbracket);
}
push (@$retval,$AUXCMD,"\n") if $cmdcomment ;
$cmd=-1 ;
@@ -2415,10 +2451,10 @@ sub take_comments_and_newline_from_frac() {
# names or labels but it does not matter because they are converted back in the postprocessing step
# Returns: leading white space removed in step 1
sub preprocess {
- for (@_) {
+ for (@_) {
- # change in \verb and similar commands - note that I introduce an extra space here so that the
+ # change in \verb and similar commands - note that I introduce an extra space here so that the
# already hashed variants do not trigger again
# transform \lstinline{...}
# s/\\lstinline(\[$brat0\])?(\{(?:.*?)\})/"\\DIFlstinline". $1 ."{". tohash(\%verbhash,"$2") ."}"/esg;
@@ -2448,7 +2484,7 @@ sub preprocess {
1 while s/(?<!\\)_(\s*{($pat_n)})/\\SUBSCRIPT$1/g ;
# Convert ^n into \SUPERSCRIPTNB{n} and ^{nnn} into \SUPERSCRIPT{nn}
1 while s/(?<!\\)\^(\s*([^{\\\s]|\\\w+))/\\SUPERSCRIPTNB{$1}/g ;
- 1 while s/(?<!\\)\^(\s*{($pat_n)})/\\SUPERSCRIPT$1/g ;
+ 1 while s/(?<!\\)\^(\s*{($pat_n)})/\\SUPERSCRIPT$1/g ;
# Convert \sqrt{n} into \SQRT{n} and \sqrt nn into SQRTNB{nn}
1 while s/(?<!\\)\\sqrt(\s*([^{\\\s]|\\\w+))/\\SQRTNB{$1}/g ;
1 while s/(?<!\\)\\sqrt(\s*{($pat_n)})/\\SQRT$1/g ;
@@ -2468,16 +2504,16 @@ sub preprocess {
if ( $mathmarkup != FINE ) {
# DIFANCHORARRB and DIFANCHORARRE, DIFANCHORMATHB and DIFANCHORMATHE markers are inserted here to encourage the matching algorithm
# to always match up the closing brace. Otherwise sometimes one ends up with a situation where
- # the closing brace is deleted and added at another point. The deleted closing brace is then
+ # the closing brace is deleted and added at another point. The deleted closing brace is then
# prevented by a %DIFDELCMD, leading to material leaking in or out of the math environment.
# The anchors are removed in post-processing again. (note that they are simple text to cause least amount of complications
- # Admittedly, this is something of a hack and will not always work. If it does not, then one needs to
+ # Admittedly, this is something of a hack and will not always work. If it does not, then one needs to
# resort to WHOLE or FINE, or NONE math mode processing.
s/\\begin\{($ARRENV)}(.*?)\\end\{\1}/\\ARRAYBLOCK$1\{$2\\DIFANCHORARRB \}\\DIFANCHORARRE /sg;
take_comments_and_newline_from_frac();
- # Convert Math environments with arguments
+ # Convert Math environments with arguments
s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}((?:\[$brat_n\])|(?:\{$pat_n\}))+(.*?)\\end\{\1\}/\\MATHBLOCK$1\[$2\]\{$3\\DIFANCHORMATHB \}\\DIFANCHORMATHE /sg;
# Convert Math environments without arguments
s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}(.*?)\\end\{\1\}/\\MATHBLOCK$1\{$2\\DIFANCHORMATHB \}\\DIFANCHORMATHE /sg;
@@ -2491,7 +2527,7 @@ sub preprocess {
# $expanded=linecomment($string)
#preface all lines with verbatim marker (usually DIFVRB)
-sub linecomment {
+sub linecomment {
my @verbatimlines=split("\n",$_[0]);
# the first line needs special treatment - we do want to retain optional arguments as is but wrap the remainder also with VERBCOMMENT
### print STDERR "DEBUG: before verbatimlines[0] = ",$verbatimlines[0],"\n";
@@ -2501,7 +2537,7 @@ sub linecomment {
}
# $simple=reverselinecomment($env $string)
-# remove DIFVRB comments but leave changed lines marked
+# remove DIFVRB comments but leave changed lines marked
sub reverselinecomment {
my ($environment, $verbatimtext)=@_;
### print STDERR "DEBUG REVERSELINECOMMENT input: $environment,|$verbatimtext|\n" if $debug;
@@ -2516,7 +2552,7 @@ sub reverselinecomment {
$verbatimtext =~ s/\\DIFdelend //g;
$verbatimtext =~ s/$DELCMDOPEN.*//g;
- # remove DIFVRB mark
+ # remove DIFVRB mark
$verbatimtext=~ s/%$VERBCOMMENT//g;
# remove part of the markup in changed lines
@@ -2607,7 +2643,7 @@ sub writedebugfile {
# * Remove STOP token from the end
# * Replace \RIGHTBRACE by }
# * If option --no-del is set delete all deleted blocks
-# 1. Check all deleted blocks:
+# 1. Check all deleted blocks:
# a.where a deleted block contains a matching \begin and
# \end environment (these will be disabled by a %DIFDELCMD statements), for selected environments enable
# these commands again (such that for example displayed math in a deleted equation
@@ -2628,14 +2664,14 @@ sub writedebugfile {
# For added blocks:
# c. If in-line math mode contains array environment, enclose the whole environment in \mbox'es
# d. place \cite commands in mbox'es (for UNDERLINE style)
-#
+#
# 2. If math-mode COARSE,WHOLE or NONE option set: Convert \MATHBLOCKmath{..} commands back to environments
#
# Convert all PICTUREblock{..} commands back to the appropriate environments
# 3. Convert DIFadd, DIFdel, DIFaddbegin , ... into FL varieties
# within floats (currently recognised float environments: plate,table,figure
# plus starred varieties).
-# 4. Remove empty %DIFDELCMD < lines
+# 4. Remove empty %DIFDELCMD < lines
# 4. Convert \begin{SQUAREBRACKET} \end{SQUAREBRACKET} into \[ \]
# Convert \begin{DOLLARDOLLAR} \end{DOLLARDOLLAR} into $$ $$
# 5. Convert \SUPERSCRIPTNB{n} into ^n and \SUPERSCRIPT{nn} into ^{nnn}
@@ -2648,7 +2684,7 @@ sub writedebugfile {
# 4, undo renaming of the \begin, \end,{,} in comments
# Change \QLEFTBRACE, \QRIGHTBRACE,\AMPERSAND to \{,\},\&
#
-# Note have to manually synchronize substitution commands below and
+# Note have to manually synchronize substitution commands below and
# DIF.. command names in the header
sub postprocess {
my ($begin,$len,$float,$delblock,$addblock); ### $cnt
@@ -2660,7 +2696,7 @@ sub postprocess {
my (@itemargs, $itemarg);
- for (@_) {
+ for (@_) {
# change $'s in comments to something harmless
1 while s/(%.*)\$/$1DOLLARDIF/mg ;
@@ -2670,7 +2706,7 @@ sub postprocess {
# the only way to get these is as %DIFDELCMD < \RIGHTBRACE construction
# This essentially marks closing right braces of MATHBLOCK environments, which did not get matched
# up. This case should be rare, so I just leave this in the diff file output. Not really elegant
- # but can still be dealt with later if it results in problems.
+ # but can still be dealt with later if it results in problems.
s/%DIFDELCMD < \\RIGHTBRACE/%DIFDELCMD < \\MBLOCKRIGHTBRACE/g ;
# Replace \RIGHTBRACE by }
s/\\RIGHTBRACE/}/g;
@@ -2698,7 +2734,7 @@ sub postprocess {
$len=length($&);
$begin=pos($_) - $len;
$delblock=$&;
- ### A much simpler method for math replacement might follow this strategy (can recycle part of the commands below for following
+ ### A much simpler method for math replacement might follow this strategy (can recycle part of the commands below for following
### this strategy:
### 1. a Insert aux commands \begin{MATHMODE} or \end{MATHMODE} for all deleted commands opening or closing displayed math mode
### b Insert aux commands \begin{MATHARRMODE} or \end{MATHARRMODE} for all deleted commands opening or closing math array mode
@@ -2724,14 +2760,14 @@ sub postprocess {
###0.5: $delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \s*\\end\{((?:$MATHENV)|SQUAREBRACKET)\}\s*?(?:$DELCMDCLOSE|\n))(.*?[^\n]?)\n?(?<!${AUXCMD}\n)(\%DIFDELCMD < \s*\\begin\{\2\})/\\end{MATHMODE}$AUXCMD\n$1$3\n\\begin{MATHMODE}$AUXCMD\n$4/sg;
$delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{((?:$MATHENV)|SQUAREBRACKET)\}.*?(?:$DELCMDCLOSE|\n))(.*?[^\n]?)\n?(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{\2\})/\\end\{MATHMODE\}$AUXCMD\n$1$3\n\\begin\{MATHMODE\}$AUXCMD\n$4/sg;
- # now look for unpaired %DIFDELCMD < \begin{MATHENV}; if found add \begin{$MATHREPL} and insert \end{$MATHREPL}
+ # now look for unpaired %DIFDELCMD < \begin{MATHENV}; if found add \begin{$MATHREPL} and insert \end{$MATHREPL}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{((?:$MATHENV)|SQUAREBRACKET)\}\s*?(?:$DELCMDCLOSE|\n))/$1\\begin{$MATHREPL}$AUXCMD\n/sg ) {
### print STDERR "BINGO: begin block: \nBefore: |" . substr($_,$begin,$len) . "|\n" if $debug ;
$delblock =~ s/(\\DIFdelend$)/\\end{$MATHREPL}$AUXCMD\n$1/s ;
### print STDERR "After: |" . $delblock . "|\n\n" if $debug ;
}
- # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
+ # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{((?:$MATHENV)|SQUAREBRACKET)\}\s*?(?:$DELCMDCLOSE|\n))/$1\\end\{MATHMODE\}$AUXCMD\n/sg ) {
### print STDERR "BINGO: end block:\nBefore: |" . substr($_,$begin,$len) . "|\n" if $debug;
@@ -2754,15 +2790,15 @@ sub postprocess {
$delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{($MATHARRENV)\}\s*?(?:$DELCMDCLOSE|\n))(.*?[^\n]?)\n?(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{\2\})/\\end{MATHMODE}$AUXCMD\n$1$3\n\\begin{MATHMODE}$AUXCMD\n$4/sg;
### print STDERR "STEP1: |" . $delblock . "|\n\n" if $debug ;
- # now look for unpaired %DIFDELCMD < \begin{MATHARRENV}; if found add \begin{$MATHARRREPL} and insert \end{$MATHARRREPL}
+ # now look for unpaired %DIFDELCMD < \begin{MATHARRENV}; if found add \begin{$MATHARRREPL} and insert \end{$MATHARRREPL}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{($MATHARRENV)\}(.*?)(?:$DELCMDCLOSE|\n))/$1\\begin{$2*}$3$AUXCMD\n/sg ) {
$arrenv=$2;
- $delblock =~ s/(\\DIFdelend$)/\\end{$arrenv*}}$AUXCMD\n$1/s ;
+ $delblock =~ s/(\\DIFdelend$)/\\end{$arrenv*}$AUXCMD\n$1/s ;
}
### print STDERR "STEP2: |" . $delblock . "|\n\n" if $debug ;
- # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
+ # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{($MATHARRENV)\}\s*?(?:$DELCMDCLOSE|\n))/$1\\end{MATHMODE}$AUXCMD\n/sg ) {
$delblock =~ s/(\\DIFdelend$)/\\begin{MATHMODE}$AUXCMD\n$1/s ;
@@ -2780,7 +2816,7 @@ sub postprocess {
### $eqarrayblock=~ s/(\%DIFDELCMD < \s*(\&|\\\\)\s*?(?:$DELCMDCLOSE|\n))/$1$2$AUXCMD\n/sg ;
$eqarrayblock =~ s/(\%DIFDELCMD < (.*?(?:\&|\\\\).*)(?:$DELCMDCLOSE|\n))/
# The pattern captures comments with at least one of & or \\
- @symbols= split(m@((?:&|\\\\)\s*)@,$2); # extract & and \\ and other material from sequence
+ @symbols= split(m@((?:&|\\\\)\s*)@,$2); # extract & and \\ and other material from sequence
@symbols= grep ( m@&|\\\\\s*@, @symbols); # select & and \\ (and subsequent spaces)
"$1@symbols$AUXCMD\n"
/eg ;
@@ -2793,7 +2829,7 @@ sub postprocess {
} elsif ( $mathmarkup == COARSE || $mathmarkup == WHOLE ) {
# Convert MATHBLOCKmath commands to their uncounted numbers (e.g. convert equation -> displaymath
# (environments defined in $MATHENV will be replaced by $MATHREPL, and environments in $MATHARRENV
- # will be replaced by their starred variety
+ # will be replaced by their starred variety
$delblock=~ s/\\MATHBLOCK($MATHENV)((?:\[$brat_n\])?)\{($pat_n)\}/\\MATHBLOCK$MATHREPL$2\{$3\}/sg;
$delblock=~ s/\\MATHBLOCK($MATHARRENV)((?:\[$brat_n\])?)\{($pat_n)\}/\\MATHBLOCK$1\*$2\{$3\}/sg;
}
@@ -2807,10 +2843,10 @@ sub postprocess {
print STDERR "DELBLOCK after maths processing: |" . $delblock . "|\n\n" if $debug ;
- # Reinstate completely deleted list environments. note that items within the
+ # Reinstate completely deleted list environments. note that items within the
# environment will still be commented out. They will be restored later
$delblock=~ s/(\%DIFDELCMD < \s*\\begin\{($LISTENV)\}\s*?(?:\n|$DELCMDCLOSE))(.*?)(\%DIFDELCMD < \s*\\end\{\2\})/{
- ### # block within the search; replacement environment
+ ### # block within the search; replacement environment
### "$1\\begin{$2}$AUXCMD\n". restore_item_commands($3). "\n\\end{$2}$AUXCMD\n$4";
"$1\\begin{$2}$AUXCMD\n$3\n\\end{$2}$AUXCMD\n$4";
}/esg;
@@ -2844,7 +2880,7 @@ sub postprocess {
### if ($CITE2CMD) {
###### ${extraspace}(?:\[$brat0\]${extraspace}){0,2}\{$pat_n\})) .*?%%%\n
### $delblock=~s/($DELCMDOPEN\s*\\($CITE2CMD)(.*)$DELCMDCLOSE)/
- ### # Replacement code
+ ### # Replacement code
### {my ($aux,$all);
### $aux=$all=$1;
### $aux=~s#\n?($DELCMDOPEN|$DELCMDCLOSE)##g;
@@ -2854,7 +2890,7 @@ sub postprocess {
### if ($CITECMD) {
###### $delblock=~s/(\\($CITECMD)${extraspace}(?:\[$brat0\]${extraspace}){0,2}\{$pat_n\})(\s*)/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/msg ;
### $delblock=~s/(\\($CITECMD)${extraspace}(?:<$abrat0>${extraspace})?(?:\[$brat0\]${extraspace}){0,2}\{$pat_n\})(\s*)/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/msg ;
- ### }
+ ### }
# if MBOXINLINEMATH is set, protect inlined math environments with an extra mbox
@@ -2862,7 +2898,7 @@ sub postprocess {
# note additional \newline after command is omitted from output if right at the end of deleted block (otherwise a spurious empty line is generated)
$delblock=~s/($math)(?:[\s\n]*)?/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/sg;
}
- ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/)) {
+ ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/)) {
### # change included verbatim environments
### $delblock =~ s/\\DIFverb\{/\\DIFDIFdelverb\{/g;
### $delblock =~ s/\\DIFlstinline/\\DIFDIFdellstinline/g;
@@ -2904,7 +2940,7 @@ sub postprocess {
##$addblock=~s/($math)/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/sg;
$addblock=~s/($math)(?:[\s\n]*)?/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/sg;
}
- ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat0\])?\{color\}/)) {
+ ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat0\])?\{color\}/)) {
# mark added verbatim commands
$addblock =~ s/\\DIFverb/\\DIFDIFaddverb/g;
$addblock =~ s/\\DIFlstinline/\\DIFDIFaddlstinline/g;
@@ -2922,11 +2958,11 @@ sub postprocess {
pos = $begin + length($addblock);
}
- # Go through whole text, and by counting list environment commands, find out when we are within a list environment.
+ # Go through whole text, and by counting list environment commands, find out when we are within a list environment.
# Within those restore deleted \item commands
- @textparts=split /(?<!$DELCMDOPEN)(\\(?:begin|end)\{$LISTENV\})/ ;
+ @textparts=split /(?<!$DELCMDOPEN)(\\(?:begin|end)\{$LISTENV\})/ ;
@liststack=();
- @newtextparts=map {
+ @newtextparts=map {
### print STDERR ":::::::: $_\n";
if ( ($listtype) = m/^\\begin\{($LISTENV)\}$/ ) {
print STDERR "DEBUG: postprocess \\begin{$listtype}\n" if $debug;
@@ -2942,7 +2978,7 @@ sub postprocess {
} else {
print STDERR "DEBUG: postprocess \@liststack=(",join(",",@liststack),")\n" if $debug;
if (scalar @liststack > 0 ) {
- # we are within a list environment and should replace all item commands
+ # we are within a list environment and should replace all item commands
$_=restore_item_commands($_);
}
# else: we are outside a list environment and do not need to do anything
@@ -2955,17 +2991,17 @@ sub postprocess {
# Replace MATHMODE environments from step 1a above by the correct Math environment and remove unncessary pairings
-
+
if ( $mathmarkup == FINE ) {
# look for AUXCMD math-mode pairs which have only comments (or empty lines between them), and remove the added commands
# \begin{..} ... \end{..} pairs
- s/\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\end\{\1\}$AUXCMD\n/$2/sg;
+ s/\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\end\{\1\}$AUXCMD\n/$2/sg;
# \end{..} .... \begin{..} pairs
- s/\\end\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\begin\{\1\}$AUXCMD\n/$2/sg;
+ s/\\end\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\begin\{\1\}$AUXCMD\n/$2/sg;
writedebugfile($_,'postprocess15');
# The next line is complicated. The negative look-ahead insertion makes sure that no \end{$MATHENV} (or other mathematical
- # environments) are between the \begin{$MATHENV} and \end{MATHMODE} commands. This is necessary as the minimal matching
+ # environments) are between the \begin{$MATHENV} and \end{MATHMODE} commands. This is necessary as the minimal matching
# is not globally minimal but only 'locally' (matching is beginning from the left side of the string)
# [NB: Do not be tempted to prettify the expression with /x modified. It seems this is applied after strings are expanded so will ignore spaces in strings
1 while s/(?<!$DELCMDOPEN)\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}((?:${DELCMDOPEN}[^\n]*|.(?!(?:\\end\{(?:(?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}|\\begin\{MATHMODE})))*?)\\end\{MATHMODE}/\\begin{$1}$2\\end{$1}/s;
@@ -3040,7 +3076,7 @@ sub postprocess {
# remove empty DIFCMD < lines
s/^\Q${DELCMDOPEN}\E\n//msg;
- # Expand hashes of verb and verbatim environments
+ # Expand hashes of verb and verbatim environments
s/${DELCMDOPEN}\\($VERBATIMENV)\{([-\d]*?)\}/"${DELCMDOPEN}\\begin{${1}}".fromhash(\%verbhash,$2,$DELCMDOPEN)."${DELCMDOPEN}\\end{${1}}"/esg;
# revert changes to verbatim environments for line diffs (and add code to mark up changes) (note negative look behind assertions to not leak out of DIFDELCMD comments)
# Example:
@@ -3066,8 +3102,8 @@ sub postprocess {
((?:\%\Q$DELCOMMENT$VERBCOMMENT\E[^\n]*?\n)*)
# Deleted \end command of verbatim environment. Note that the type is forced to match the opening. Captures: $5: Whole deleted environment (previous way this line was written: (\Q$DELCMDOPEN\E\\end\{\2\}(?:\n|\s|\Q$DELCMDOPEN\E)*\Q$DELCMDCLOSE\E)
(\Q$DELCMDOPEN\E\\end\{\2\})
- / # Substitution part
- $1 # Leave expression as is
+ / # Substitution part
+ $1 # Leave expression as is
. "$AUXCMD NEXT\n" # Mark the following line as an auxiliary command
. "" # reinstate the original environment without options
. reverselinecomment($2, "$3$4") # modify the body to change the markup; reverselinecomment parses for options
@@ -3076,7 +3112,7 @@ sub postprocess {
/esgx; # Modifiers of substitution command
writedebugfile($_,'postprocess2');
# where changes have occurred in verbatim environment, change verbatim to DIFverbatim to allow mark-up
- # (I use the presence of optional paramater to verbatim environment as the marker - normal verbatim
+ # (I use the presence of optional paramater to verbatim environment as the marker - normal verbatim
# environment does not take optional arguments)
s/(?<!$DELCMDOPEN)\\begin\{(verbatim[*]?)\}(\[$brat_n\].*?)\\end\{\1\}/\\begin{DIF$1}$2\\end{DIF$1}/sg;
@@ -3090,7 +3126,7 @@ sub postprocess {
# convert remaining PAR commands (which are preceded by non-white space characters, usually "}" ($ADDCLOSE)
s/\\PAR\n/\n\n/sg;
- # package specific processing:
+ # package specific processing:
if ( defined($packages{"endfloat"})) {
#endfloat: make sure \begin{figure} and \end{figure} are always
# on a line by themselves, similarly for table environment
@@ -3103,12 +3139,16 @@ sub postprocess {
s/^((?:[^%]+)\\(?:begin|end)\{(?:figure|table)\}(?:\[[a-zA-Z]+\])?)(.+)((?:%.*)?)$/$1\n$2$3/mg;
}
- # Convert '\PERCENTAGE ' back into '\%' (the final question mark catches a special situation where due to a latter pre-processing step the ' ' becomes separated
+ # Remove empty auxiliary LISTENV (sometmes these are generated if list environment occurs within the argument of a deleted comment)
+ # (slightly hacky but I could not see an easy way to see if in argument of another command when this extra markup is added)
+ s/\\begin\{($LISTENV)\}$AUXCMD\n((?:\s*\%[^\n]*\n)*\n?)\\end\{\1\}$AUXCMD\n/$2\n/msg ;
+
+ # Convert '\PERCENTAGE ' back into '\%' (the final question mark catches a special situation where due to a latter pre-processing step the ' ' becomes separated
s/\\PERCENTAGE ?/\\%/g;
- # Convert '\DOLLAR ' back into '\$'
+ # Convert '\DOLLAR ' back into '\$'
s/\\DOLLAR /\\\$/g;
- # undo renaming of the \begin and \end,{,} and dollars in comments
+ # undo renaming of the \begin and \end,{,} and dollars in comments
# although we only renamed $ in comments to DOLLARDIFF, we might have lost the % in unchanged verbatim blocks, so rename all
s/DOLLARDIF/\$/g;
@@ -3126,7 +3166,7 @@ sub postprocess {
# Convert \SQRT{n} into \sqrt{n} and \SQRTNB{nn} into \sqrt nn
1 while s/\\SQRT(\s*\{($pat_n)\})/\\sqrt$1/g ;
1 while s/\\SQRTNB\{(\s*$pat0)\}/\\sqrt$1/g ;
-
+
1 while s/(%.*)\\CFRAC (.*)$/$1\\frac$2/mg ;
1 while s/(%.*)\\CRIGHTBRACE (.*)$/$1\}$2/mg ;
1 while s/(%.*)\\CLEFTBRACE (.*)$/$1\{$2/mg ;
@@ -3137,7 +3177,7 @@ sub postprocess {
s/\\QRIGHTBRACE /\\\}/sg;
s/\\AMPERSAND /\\&/sg;
# Highlight added inline verbatim commands if possible
- if ( $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/ ) {
+ if ( $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/ ) {
# wrap added verb commands with color commands
s/\\DIFDIFadd((?:verb\*?|lstinline(?:\[$brat_n\])?)\{[-\d]*?\}[\s\n]*)/\{\\color{blue}$AUXCMD\n\\DIF$1%\n\}$AUXCMD\n/sg;
s/\\DIFDIFdel((?:verb\*?|lstinline(?:\[$brat_n\])?)\{[-\d]*?\}[\s\n]*$AUXCMD)/\{\\color{red}${AUXCMD}\n\\DIF$1\n\}${AUXCMD}/sg;
@@ -3152,8 +3192,8 @@ sub postprocess {
# finally add the comment to the ones not having an optional argument before
###s/\\DIFaddlstinline(?!\[)/\\lstinline\n[basicstyle=\\color{blue}]$AUXCMD\n/g;
- return;
}
+ return;
}
# $out = restore_item_commands($listenviron)
@@ -3177,13 +3217,13 @@ sub restore_item_commands {
# @auxlines=preprocess_preamble($oldpreamble,$newpreamble);
- # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
- # the list of commands is defined in CONTEXT2CMD
- # if found then use a bodydiff to mark up content, and replace the corresponding commands
+ # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
+ # the list of commands is defined in CONTEXT2CMD
+ # if found then use a bodydiff to mark up content, and replace the corresponding commands
# in both preambles by marked up version to 'fool' the linediff (such that only body is marked up).
# A special case are e.g. author commands being added (or removed)
# 1. If commands are added, then the entire content is marked up as new, but also the lines are marked as new in the linediff
- # 2. If commands are removed, then the linediff will mark the line as deleted. The program returns
+ # 2. If commands are removed, then the linediff will mark the line as deleted. The program returns
# with $auxlines a text to be appended at the end of the preamble, which shows the respective fields as deleted
sub preprocess_preamble {
my ($oldpreambleref,$newpreambleref)=(\$_[0],\$_[1]) ;
@@ -3205,7 +3245,7 @@ EOF
$titlecmd = "(?:".join("|",@CONTEXT2CMDLIST).")";
# as context2cmdlist is stored as regex, e.g. ((?-xism:^title$), we need to remove ^- fo
# resue in a more complex regex
- $titlecmd =~ s/[\$\^]//g;
+ $titlecmd =~ s/[\$\^]//g;
# make sure to not match on comment lines:
$titlecmdpat=qr/^(?:[^%\n]|\\%)*(\\($titlecmd)$extraspace(?:\[($brat_n)\])?(?:\{($pat_n)\}))/ms;
###print STDERR "DEBUG:",$titlecmdpat,"\n";
@@ -3231,7 +3271,7 @@ EOF
$cmd=shift @newtitlecommands;
$optarg=shift @newtitlecommands;
$arg=shift @newtitlecommands;
-
+
if ( defined($newhash{$cmd})) {
warn "$cmd is used twice in preamble of new file. Reverting to pure line diff mode for preamble.\n";
print STDERR $warnmsgdetail;
@@ -3258,7 +3298,7 @@ EOF
}
$argnew=$newhash{$cmd}->[2];
$argdiff="{" . join("",bodydiff($argold,$argnew)) ."}";
- # Replace \RIGHTBRACE by }
+ # Replace \RIGHTBRACE by }
$argdiff =~ s/\\RIGHTBRACE/}/g;
if ( length $optargnew ) {
@@ -3273,7 +3313,7 @@ EOF
$optargdiff="";
}
### print STDERR "DEBUG s/\\Q$newhash{$cmd}->[0]\\E/\\$cmd$optargdiff$argdiff/s\n";
- # Note: \Q and \E force literal interpretation of what it between them but allow
+ # Note: \Q and \E force literal interpretation of what it between them but allow
# variable interpolation, such that e.g. \title matches just that and not TAB-itle
$$newpreambleref=~s/\Q$newhash{$cmd}->[0]\E/\\$cmd$optargdiff$argdiff/s;
# replace this in old preamble if necessary
@@ -3313,7 +3353,7 @@ EOF
#%< old deleted line(s)
#%DIF -------
#%DIF mmann-nn
-#new appended line %<
+#new appended line %<
#%DIF -------
# Future extension: mark change explicitly
# Assumes: traverse_sequence traverses deletions before insertions in changed sequences
@@ -3325,9 +3365,9 @@ sub linediff {
my $block = [];
my $retseq = [];
my @begin=('','',''); # dummy initialisation
- my $instring ;
+ my $instring ;
- my $discard = sub { @begin=('d',$_[0],$_[1]) unless scalar @$block ;
+ my $discard = sub { @begin=('d',$_[0],$_[1]) unless scalar @$block ;
push(@$block, "%DIF < " . $seq1->[$_[0]]) };
my $add = sub { if (! scalar @$block) {
@begin=('a',$_[0],$_[1]) ;}
@@ -3342,12 +3382,12 @@ sub linediff {
$instring = sprintf "%%DIF %da%d-%d",$begin[1],$begin[2],$_[1]-1; }
elsif ( $begin[0] eq 'c' ) {
$instring = sprintf "%%DIF %sc%s",
- ($begin[1]==$_[0]-1) ? "$begin[1]" : $begin[1]."-".($_[0]-1) ,
+ ($begin[1]==$_[0]-1) ? "$begin[1]" : $begin[1]."-".($_[0]-1) ,
($begin[2]==$_[1]-1) ? "$begin[2]" : $begin[2]."-".($_[1]-1) ; }
else {
$instring = sprintf "%%DIF %d%s%d",$begin[1],$begin[0],$begin[2]; }
- push @$retseq, $instring,@$block, "%DIF -------" ;
- $block = [];
+ push @$retseq, $instring,@$block, "%DIF -------" ;
+ $block = [];
}
push @$retseq, $seq2->[$_[1]]
};
@@ -3355,7 +3395,7 @@ sub linediff {
my $keyfunc = sub { join(" ",split(" ",shift())) };
traverse_sequences($seq1,$seq2, { MATCH=>$match, DISCARD_A=>$discard, DISCARD_B=>$add }, $keyfunc );
- push @$retseq, @$block if scalar @$block;
+ push @$retseq, @$block if scalar @$block;
return wantarray ? @$retseq : $retseq ;
}
@@ -3365,23 +3405,23 @@ sub linediff {
# init_regex_arr_data(\@array,"TOKEN INIT")
# scans DATA file handel for line "%% TOKEN INIT" line
# then appends each line not beginning with % into array (as a quoted regex)
-# This is used for command lists and configuration variables, but the processing is slightly
-# different:
+# This is used for command lists and configuration variables, but the processing is slightly
+# different:
# For lists, the regular expression is extended to include beginning (^) and end ($) markers, to require full-string matching
# For configuration variables (and all others), simply an unadorned list is copied
sub init_regex_arr_data {
my ($arr,$token)=@_;
my $copy=0;
my ($mode);
- if ($token =~ m/COMMANDS/ ) {
- $mode=0; # Reading command list
+ if ($token =~ m/COMMANDS/ ) {
+ $mode=0; # Reading command list
} else {
$mode=1; # Reading configuration variables
}
while (<DATA>) {
if ( m/^%%BEGIN $token\s*$/ ) {
- $copy=1;
+ $copy=1;
next;
} elsif ( m/^%%END $token\s*$/ ) {
last; }
@@ -3462,17 +3502,18 @@ sub exetime {
sub usage {
- print STDERR <<"EOF";
+ print STDERR <<"EOF";
Usage: $0 [options] old.tex new.tex > diff.tex
-Compares two latex files and writes tex code to stdout, which has the same format as new.tex but
+Compares two latex files and writes tex code to stdout, which has the same format as new.tex but
has all changes relative to old.tex marked up or commented. Note that old.tex and new.tex need to
-be real files (not pipes or similar) as they are opened twice.
+be real files (not pipes or similar) as they are opened twice.
--type=markupstyle
-t markupstyle Add code to preamble for selected markup style
- Available styles: UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
+ Available styles: UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT
+ LUAUNDERLINE
[ Default: UNDERLINE ]
--subtype=markstyle
@@ -3483,7 +3524,7 @@ be real files (not pipes or similar) as they are opened twice.
* LABEL subtype is deprecated
--floattype=markstyle
--f markstyle Add code to preamble for selected style which
+-f markstyle Add code to preamble for selected style which
replace standard marking and markup commands within floats
(e.g., marginal remarks cause an error within floats
so marginal marking can be disabled thus)
@@ -3492,11 +3533,11 @@ be real files (not pipes or similar) as they are opened twice.
--encoding=enc
-e enc Specify encoding of old.tex and new.tex. Typical encodings are
- ascii, utf8, latin1, latin9. A list of available encodings can be
- obtained by executing
+ ascii, utf8, latin1, latin9. A list of available encodings can be
+ obtained by executing
perl -MEncode -e 'print join ("\\n",Encode->encodings( ":all" )) ;'
[Default encoding is utf8 unless the first few lines of the preamble contain
- an invocation "\\usepackage[..]{inputenc} in which case the
+ an invocation "\\usepackage[..]{inputenc} in which case the
encoding chosen by this command is asssumed. Note that ASCII (standard
latex) is a subset of utf8]
@@ -3513,22 +3554,22 @@ be real files (not pipes or similar) as they are opened twice.
--exclude-safecmd=exclude-file
--exclude-safecmd="cmd1,cmd2,..."
--A exclude-file
+-A exclude-file
--replace-safecmd=replace-file
--append-safecmd=append-file
--append-safecmd="cmd1,cmd2,..."
-a append-file Exclude from, replace or append to the list of regex
- matching commands which are safe to use within the
+ matching commands which are safe to use within the
scope of a \\DIFadd or \\DIFdel command. The file must contain
one Perl-RegEx per line (Comment lines beginning with # or % are
ignored). A literal comma within the comma-separated list must be
- escaped thus "\\,", Note that the RegEx needs to match the whole of
+ escaped thus "\\,", Note that the RegEx needs to match the whole of
the token, i.e., /^regex\$/ is implied and that the initial
"\\" of the command is not included. The --exclude-safecmd
- and --append-safecmd options can be combined with the --replace-safecmd
+ and --append-safecmd options can be combined with the --replace-safecmd
option and can be used repeatedly to add cumulatively to the lists.
---exclude-textcmd=exclude-file
+--exclude-textcmd=exclude-file
--exclude-textcmd="cmd1,cmd2,..."
-X exclude-file
--replace-textcmd=replace-file
@@ -3544,7 +3585,7 @@ be real files (not pipes or similar) as they are opened twice.
Replace or append to the list of regex matching commands
whose last argument is text but which require a particular
context to work, e.g. \\caption will only work within a figure
- or table. These commands behave like text commands, except when
+ or table. These commands behave like text commands, except when
they occur in a deleted section, when they are disabled, but their
argument is shown as deleted text.
@@ -3554,7 +3595,7 @@ be real files (not pipes or similar) as they are opened twice.
As corresponding commands for context1. The only difference is that
context2 commands are completely disabled in deleted sections, including
their arguments.
- context2 commands are also the only commands in the preamble, whose argument will
+ context2 commands are also the only commands in the preamble, whose argument will
be processed in word-by-word mode (which only works, if they occur no more than
once in the preamble).
@@ -3563,15 +3604,15 @@ be real files (not pipes or similar) as they are opened twice.
--append-mboxsafecmd=append-file
--append-mboxsafecmd="cmd1,cmd2,..."
Define safe commands, which additionally need to be protected by encapsulating
- in an \\mbox{..}. This is sometimes needed to get around incompatibilities
+ in an \\mbox{..}. This is sometimes needed to get around incompatibilities
between external packages and the ulem package, which is used for highlighting
in the default style UNDERLINE as well as CULINECHBAR CFONTSTRIKE
-
+
--config var1=val1,var2=val2,...
-c var1=val1,.. Set configuration variables.
--c configfile Available variables:
+-c configfile Available variables:
ARRENV (RegEx)
COUNTERCMD (RegEx)
FLOATENV (RegEx)
@@ -3590,15 +3631,15 @@ be real files (not pipes or similar) as they are opened twice.
--add-to-config varenv1=pattern1,varenv2=pattern2
For configuration variables containing a regular expression (essentially those ending
- in ENV, and COUNTERCMD) this provides an alternative way to modify the configuration
+ in ENV, and COUNTERCMD) this provides an alternative way to modify the configuration
variables. Instead of setting the complete pattern, with this option it is possible to add an
alternative pattern. varenv must be one of the variables listed above that take a regular
- expression as argument, and pattern is any regular expression (which might need to be
+ expression as argument, and pattern is any regular expression (which might need to be
protected from the shell by quotation). Several patterns can be added at once by using semi-colons
to separate them, e.g. --add-to-config "LISTENV=myitemize;myenumerate,COUNTERCMD=endnote"
--packages=pkg1,pkg2,..
- Tell latexdiff that .tex file is processed with the packages in list
+ Tell latexdiff that .tex file is processed with the packages in list
loaded. This is normally not necessary if the .tex file includes the
preamble, as the preamble is automatically scanned for \\usepackage commands.
Use of the --packages option disables automatic scanning, so if for any
@@ -3619,57 +3660,57 @@ be real files (not pipes or similar) as they are opened twice.
--show-all Show all of the above
- NB For all --show commands, no old.tex or new.tex file needs to be given, and no
+ NB For all --show commands, no old.tex or new.tex file needs to be given, and no
differencing takes place.
Other configuration options:
--allow-spaces Allow spaces between bracketed or braced arguments to commands
- [Default requires arguments to directly follow each other without
+ [Default requires arguments to directly follow each other without
intervening spaces]
--math-markup=level Determine granularity of markup in displayed math environments:
Possible values for level are (both numerical and text labels are acceptable):
- off or 0: suppress markup for math environments. Deleted equations will not
- appear in diff file. This mode can be used if all the other modes
+ off or 0: suppress markup for math environments. Deleted equations will not
+ appear in diff file. This mode can be used if all the other modes
cause invalid latex code.
whole or 1: Differencing on the level of whole equations. Even trivial changes
- to equations cause the whole equation to be marked changed. This
- mode can be used if processing in coarse or fine mode results in
+ to equations cause the whole equation to be marked changed. This
+ mode can be used if processing in coarse or fine mode results in
invalid latex code.
coarse or 2: Detect changes within equations marked up with a coarse
- granularity; changes in equation type (e.g.displaymath to equation)
+ granularity; changes in equation type (e.g.displaymath to equation)
appear as a change to the complete equation. This mode is recommended
for situations where the content and order of some equations are still
being changed. [Default]
fine or 3: Detect small change in equations and mark up and fine granularity.
This mode is most suitable, if only minor changes to equations are
- expected, e.g. correction of typos.
+ expected, e.g. correction of typos.
--graphics-markup=level Change highlight style for graphics embedded with \\includegraphics commands
Possible values for level:
none,off or 0: no highlighting for figures
new-only or 1: surround newly added or changed figures with a blue frame [Default]
- both or 2: highlight new figures with a blue frame and show deleted figures
+ both or 2: highlight new figures with a blue frame and show deleted figures
at reduced scale, and crossed out with a red diagonal cross. Use configuration
variable SCALEDELGRAPHICS to set size of deleted figures.
- Note that changes to the optional parameters will make the figure appear as changed
+ Note that changes to the optional parameters will make the figure appear as changed
to latexdiff, and this figure will thus be highlighted.
In some circumstances "Misplaced \\noalign" errors can occur if there are certain types
- of changes in tables. In this case please use option --graphics-markup=none as a
- work-around.
+ of changes in tables. In this case please use option --graphics-markup=none as a
+ work-around.
---no-del Suppress deleted text from the diff. It is similar in effect to the BOLD style,
+--no-del Suppress deleted text from the diff. It is similar in effect to the BOLD style,
but the deleted text ist not just invisible in the output, it is also not included in the
- diff text file. This can be more robust than just making it invisible.
+ diff text file. This can be more robust than just making it invisible.
---disable-citation-markup
---disable-auto-mbox Suppress citation markup and markup of other vulnerable commands in styles
+--disable-citation-markup
+--disable-auto-mbox Suppress citation markup and markup of other vulnerable commands in styles
using ulem (UNDERLINE,FONTSTRIKE, CULINECHBAR)
(the two options are identical and are simply aliases)
--enable-citation-markup
---enforce-auto-mbox Protect citation commands and other vulnerable commands in changed sections
+--enforce-auto-mbox Protect citation commands and other vulnerable commands in changed sections
with \\mbox command, i.e. use default behaviour for ulem package for other packages
(the two options are identical and are simply aliases)
@@ -3685,14 +3726,14 @@ Miscellaneous options
--no-label Suppress inclusion of old and new file names as comment in output file
---visible-label Include old and new filenames (or labels set with --label option) as
+--visible-label Include old and new filenames (or labels set with --label option) as
visible output
--flatten Replace \\input and \\include commands within body by the content
of the files in their argument. If \\includeonly is present in the
- preamble, only those files are expanded into the document. However,
- no recursion is done, i.e. \\input and \\include commands within
- included sections are not expanded. The included files are assumed to
+ preamble, only those files are expanded into the document. However,
+ no recursion is done, i.e. \\input and \\include commands within
+ included sections are not expanded. The included files are assumed to
be located in the same directories as the old and new master files,
respectively, making it possible to organise files into old and new directories.
--flatten is applied recursively, so inputted files can contain further
@@ -3715,7 +3756,7 @@ Miscellaneous options
-h Show this help text.
--ignore-warnings Suppress warnings about inconsistencies in length between input
- and parsed strings and missing characters.
+ and parsed strings and missing characters.
--verbose
-V Output various status information to stderr during processing.
@@ -3727,10 +3768,10 @@ Internal options:
These options are mostly for automated use by latexdiff-vc. They can be used directly, but
the API should be considered less stable than for the other options.
---no-links Suppress generation of hyperreferences, used for minimal diffs
+--no-links Suppress generation of hyperreferences, used for minimal diffs
(option --only-changes of latexdiff-vc).
EOF
- exit 0;
+ exit 0;
}
=head1 NAME
@@ -3756,8 +3797,8 @@ be real files (not pipes or similar) as they are opened twice (unless C<--encodi
The program treats the preamble differently from the main document.
Differences between the preambles are found using line-based
differencing (similarly to the Unix diff command, but ignoring white
-spaces). A comment, "S<C<%DIF E<gt>>>" is appended to each added line, i.e. a
-line present in C<new.tex> but not in C<old.tex>. Discarded lines
+spaces). A comment, "S<C<%DIF E<gt>>>" is appended to each added line, i.e. a
+line present in C<new.tex> but not in C<old.tex>. Discarded lines
are deactivated by prepending "S<C<%DIF E<lt>>>". Changed blocks are preceded by
comment lines giving information about line numbers in the original files. Where there are insignificant
differences, the resulting file C<diff.tex> will be similar to
@@ -3810,7 +3851,7 @@ curly braces immediately following a command (i.e. a sequence of
letters beginning with a backslash) are arguments for that command.
As a restriction to condition 1 above it is thus necessary to surround
all arguments with curly braces, and to not insert
-extraneous spaces. For example, write
+extraneous spaces. For example, write
\section{\textem{This is an emphasized section title}}
@@ -3842,7 +3883,7 @@ but the choice is yours. Any markup within the environment will be
removed, and generally everything within the environment will just be
taken from the new file.
-It is also possible to difference files which do not have a preamble.
+It is also possible to difference files which do not have a preamble.
In this case, the file is processed in the main document
mode, but the definitions of the markup commands are not inserted.
@@ -3860,7 +3901,7 @@ the scope of C<\DIFadd>. Added comments are marked by prepending
Within deleted blocks text is highlighted with C<\DIFdel>. Deleted
comments are marked by prepending "S<C<%DIF E<lt> >>". Non-safe command
-and curly braces within deleted blocks are commented out with
+and curly braces within deleted blocks are commented out with
"S<C<%DIFDELCMD E<lt> >>".
@@ -3870,7 +3911,7 @@ and curly braces within deleted blocks are commented out with
=head2 Preamble
The following options determine the visual markup style by adding the appropriate
-command definitions to the preamble. See the end of this section for a description of
+command definitions to the preamble. See the end of this section for a description of
available styles.
=over 4
@@ -3880,15 +3921,16 @@ B<-t markupstyle>
Add code to preamble for selected markup style. This option defines
C<\DIFadd> and C<\DIFdel> commands.
-Available styles:
+Available styles:
-C<UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
-CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT>
+C<UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
+CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT
+LUAUNDERLINE>
[ Default: C<UNDERLINE> ]
=item B<--subtype=markstyle> or
-B<-s markstyle>
+B<-s markstyle>
Add code to preamble for selected style for bracketing
commands (e.g. to mark changes in margin). This option defines
@@ -3901,27 +3943,27 @@ Available styles: C<SAFE MARGIN COLOR DVIPSCOL ZLABEL ONLYCHANGEDPAGE (LABEL)*>
=item B<--floattype=markstyle> or
B<-f markstyle>
-Add code to preamble for selected style which
+Add code to preamble for selected style which
replace standard marking and markup commands within floats
(e.g., marginal remarks cause an error within floats
-so marginal marking can be disabled thus). This option defines all
+so marginal marking can be disabled thus). This option defines all
C<\DIF...FL> commands.
Available styles: C<FLOATSAFE TRADITIONALSAFE IDENTICAL>
[ Default: C<FLOATSAFE> ]
-=item B<--encoding=enc> or
+=item B<--encoding=enc> or
B<-e enc>
Specify encoding of old.tex and new.tex. Typical encodings are
-C<ascii>, C<utf8>, C<latin1>, C<latin9>. A list of available encodings can be
-obtained by executing
+C<ascii>, C<utf8>, C<latin1>, C<latin9>. A list of available encodings can be
+obtained by executing
C<perl -MEncode -e 'print join ("\n",Encode->encodings( ":all" )) ;' >
If this option is used, then old.tex, new.tex are only opened once.
[Default encoding is utf8 unless the first few lines of the preamble contain
-an invocation C<\usepackage[..]{inputenc}> in which case the
+an invocation C<\usepackage[..]{inputenc}> in which case the
encoding chosen by this command is asssumed. Note that ASCII (standard
latex) is a subset of utf8]
@@ -3938,7 +3980,7 @@ C<\DIFaddbeginFL, \DIFaddendFL, \DIFaddFL{..},
(If this option is set B<-t>, B<-s>, and B<-f> options
are ignored.)
-=item B<--packages=pkg1,pkg2,..>
+=item B<--packages=pkg1,pkg2,..>
Tell latexdiff that .tex file is processed with the packages in list
loaded. This is normally not necessary if the .tex file includes the
@@ -3949,13 +3991,13 @@ The following packages trigger special behaviour:
=over 8
-=item C<endfloat>
+=item C<endfloat>
Ensure that C<\begin{figure}> and C<\end{figure}> always appear by themselves on a line.
=item C<hyperref>
-Change name of C<\DIFadd> and C<\DIFdel> commands to C<\DIFaddtex> and C<\DIFdeltex> and
+Change name of C<\DIFadd> and C<\DIFdel> commands to C<\DIFaddtex> and C<\DIFdeltex> and
define new C<\DIFadd> and C<\DIFdel> commands, which provide a wrapper for these commands,
using them for the text but not for the link defining command (where any markup would cause
errors).
@@ -4007,17 +4049,17 @@ B<-A exclude-file> or B<--exclude-safecmd="cmd1,cmd2,...">
=item B<--replace-safecmd=replace-file>
-=item B<--append-safecmd=append-file> or
+=item B<--append-safecmd=append-file> or
B<-a append-file> or B<--append-safecmd="cmd1,cmd2,...">
Exclude from, replace or append to the list of regular expressions (RegEx)
-matching commands which are safe to use within the
+matching commands which are safe to use within the
scope of a C<\DIFadd> or C<\DIFdel> command. The file must contain
one Perl-RegEx per line (Comment lines beginning with # or % are
-ignored). Note that the RegEx needs to match the whole of
+ignored). Note that the RegEx needs to match the whole of
the token, i.e., /^regex$/ is implied and that the initial
-"\" of the command is not included.
-The B<--exclude-safecmd> and B<--append-safecmd> options can be combined with the -B<--replace-safecmd>
+"\" of the command is not included.
+The B<--exclude-safecmd> and B<--append-safecmd> options can be combined with the -B<--replace-safecmd>
option and can be used repeatedly to add cumulatively to the lists.
B<--exclude-safecmd>
and B<--append-safecmd> can also take a comma separated list as input. If a
@@ -4030,7 +4072,7 @@ B<-X exclude-file> or B<--exclude-textcmd="cmd1,cmd2,...">
=item B<--replace-textcmd=replace-file>
-=item B<--append-textcmd=append-file> or
+=item B<--append-textcmd=append-file> or
B<-x append-file> or B<--append-textcmd="cmd1,cmd2,...">
Exclude from, replace or append to the list of regular expressions
@@ -4038,7 +4080,7 @@ matching commands whose last argument is text. See
entry for B<--exclude-safecmd> directly above for further details.
-=item B<--replace-context1cmd=replace-file>
+=item B<--replace-context1cmd=replace-file>
=item B<--append-context1cmd=append-file> or
@@ -4047,11 +4089,11 @@ entry for B<--exclude-safecmd> directly above for further details.
Replace or append to the list of regex matching commands
whose last argument is text but which require a particular
context to work, e.g. C<\caption> will only work within a figure
-or table. These commands behave like text commands, except when
+or table. These commands behave like text commands, except when
they occur in a deleted section, when they are disabled, but their
argument is shown as deleted text.
-=item B<--replace-context2cmd=replace-file>
+=item B<--replace-context2cmd=replace-file>
=item B<--append-context2cmd=append-file> or
@@ -4061,9 +4103,9 @@ As corresponding commands for context1. The only difference is that
context2 commands are completely disabled in deleted sections, including
their arguments.
-context2 commands are also the only commands in the preamble, whose argument will be processed in
+context2 commands are also the only commands in the preamble, whose argument will be processed in
word-by-word mode (which only works, if they occur no more than once in the preamble). The algorithm currently cannot cope with repeated context2 commands in the preamble, as they occur e.g. for the C<\author> argument in some journal styles (not in the standard styles, though
-If such a repetition is detected, the whole preamble will be processed in line-by-line mode. In such a case, use C<--replace-context2cmd> option to just select the commands, which should be processed and are not used repeatedly in the preamble.
+If such a repetition is detected, the whole preamble will be processed in line-by-line mode. In such a case, use C<--replace-context2cmd> option to just select the commands, which should be processed and are not used repeatedly in the preamble.
@@ -4072,7 +4114,7 @@ If such a repetition is detected, the whole preamble will be processed in line-b
=item B<--append-mboxsafecmd=append-file> or B<--append-mboxsafecmd="cmd1,cmd2,...">
Define safe commands, which additionally need to be protected by encapsulating
-in an C<\mbox{..}>. This is sometimes needed to get around incompatibilities
+in an C<\mbox{..}>. This is sometimes needed to get around incompatibilities
between external packages and the ulem package, which is used for highlighting
in the default style UNDERLINE as well as CULINECHBAR CFONTSTRIKE
@@ -4086,7 +4128,7 @@ in the default style UNDERLINE as well as CULINECHBAR CFONTSTRIKE
Set configuration variables. The option can be repeated to set different
variables (as an alternative to the comma-separated list).
-Available variables (see below for further explanations):
+Available variables (see below for further explanations):
C<ARRENV> (RegEx)
@@ -4116,10 +4158,10 @@ C<SCALEDELGRAPHICS> (Float)
=item B<--add-to-config varenv1=pattern1,varenv2=pattern2,...>
For configuration variables, which are a regular expression (essentially those ending
-in ENV, COUNTERCMD and CUSTOMDIFCMD, see list above) this option provides an alternative way to modify the configuration
+in ENV, COUNTERCMD and CUSTOMDIFCMD, see list above) this option provides an alternative way to modify the configuration
variables. Instead of setting the complete pattern, with this option it is possible to add an
alternative pattern. C<varenv> must be one of the variables listed above that take a regular
-expression as argument, and pattern is any regular expression (which might need to be
+expression as argument, and pattern is any regular expression (which might need to be
protected from the shell by quotation). Several patterns can be added at once by using semi-colons
to separate them, e.g. C<--add-to-config "LISTENV=myitemize;myenumerate,COUNTERCMD=endnote">
@@ -4139,7 +4181,7 @@ Show values of configuration variables.
Combine all --show commands.
-NB For all --show commands, no C<old.tex> or C<new.tex> file needs to be specified, and no
+NB For all --show commands, no C<old.tex> or C<new.tex> file needs to be specified, and no
differencing takes place.
=back
@@ -4156,29 +4198,29 @@ might get lumpeded with preceding commands) so should only be used if the
default produces erroneous results. (Default requires arguments to
directly follow each other without intervening spaces).
-=item B<--math-markup=level>
+=item B<--math-markup=level>
-Determine granularity of markup in displayed math environments:
+Determine granularity of markup in displayed math environments:
Possible values for level are (both numerical and text labels are acceptable):
-C<off> or C<0>: suppress markup for math environments. Deleted equations will not
-appear in diff file. This mode can be used if all the other modes
+C<off> or C<0>: suppress markup for math environments. Deleted equations will not
+appear in diff file. This mode can be used if all the other modes
cause invalid latex code.
C<whole> or C<1>: Differencing on the level of whole equations. Even trivial changes
-to equations cause the whole equation to be marked changed. This
-mode can be used if processing in coarse or fine mode results in
+to equations cause the whole equation to be marked changed. This
+mode can be used if processing in coarse or fine mode results in
invalid latex code.
C<coarse> or C<2>: Detect changes within equations marked up with a coarse
-granularity; changes in equation type (e.g.displaymath to equation)
+granularity; changes in equation type (e.g.displaymath to equation)
appear as a change to the complete equation. This mode is recommended
for situations where the content and order of some equations are still
being changed. [Default]
C<fine> or C<3>: Detect small change in equations and mark up at fine granularity.
This mode is most suitable, if only minor changes to equations are
-expected, e.g. correction of typos.
+expected, e.g. correction of typos.
=item B<--graphics-markup=level>
@@ -4190,33 +4232,33 @@ C<none>, C<off> or C<0>: no highlighting for figures
C<new-only> or C<1>: surround newly added or changed figures with a blue frame [Default if graphicx package loaded]
-C<both> or C<2>: highlight new figures with a blue frame and show deleted figures at reduced
+C<both> or C<2>: highlight new figures with a blue frame and show deleted figures at reduced
scale, and crossed out with a red diagonal cross. Use configuration
variable SCALEDELGRAPHICS to set size of deleted figures.
-Note that changes to the optional parameters will make the figure appear as changed
+Note that changes to the optional parameters will make the figure appear as changed
to latexdiff, and this figure will thus be highlighted.
In some circumstances "Misplaced \noalign" error can occur if there are certain types
-of changes in tables. In this case please use C<--graphics-markup=none> as a
-work-around.
+of changes in tables. In this case please use C<--graphics-markup=none> as a
+work-around.
-=item B<--no-del>
+=item B<--no-del>
-Suppress deleted text from the diff. It is similar in effect to the BOLD style,
-but the deleted text ist not just invisible in the output, it is also not included in the diff text file.
-This can be more robust than just making it invisible.
+Suppress deleted text from the diff. It is similar in effect to the BOLD style,
+but the deleted text ist not just invisible in the output, it is also not included in the diff text file.
+This can be more robust than just making it invisible.
=item B<--disable-citation-markup> or B<--disable-auto-mbox>
-Suppress citation markup and markup of other vulnerable commands in styles
+Suppress citation markup and markup of other vulnerable commands in styles
using ulem (UNDERLINE,FONTSTRIKE, CULINECHBAR)
(the two options are identical and are simply aliases)
=item B<--enable-citation-markup> or B<--enforce-auto-mbox>
-Protect citation commands and other vulnerable commands in changed sections
+Protect citation commands and other vulnerable commands in changed sections
with C<\mbox> command, i.e. use default behaviour for ulem package for other packages
(the two options are identical and are simply aliases)
@@ -4262,18 +4304,18 @@ Suppress inclusion of old and new file names as comment in output file
=item B<--visible-label>
-Include old and new filenames (or labels set with C<--label> option) as
+Include old and new filenames (or labels set with C<--label> option) as
visible output.
=item B<--flatten>
Replace C<\input> and C<\include> commands within body by the content
of the files in their argument. If C<\includeonly> is present in the
-preamble, only those files are expanded into the document. However,
-no recursion is done, i.e. C<\input> and C<\include> commands within
-included sections are not expanded. The included files are assumed to
+preamble, only those files are expanded into the document. However,
+no recursion is done, i.e. C<\input> and C<\include> commands within
+included sections are not expanded. The included files are assumed to
be located in the same directories as the old and new master files,
-respectively, making it possible to organise files into old and new directories.
+respectively, making it possible to organise files into old and new directories.
--flatten is applied recursively, so inputted files can contain further
C<\input> statements. Also handles files included by the import package
(C<\import> and C<\subimport>), and C<\subfile> command.
@@ -4320,7 +4362,7 @@ Suppress generation of hyperreferences, used for minimal diffs (option --only-ch
=back
-=head2 Predefined styles
+=head2 Predefined styles
=head2 Major types
@@ -4333,9 +4375,14 @@ The major type determine the markup of plain text and some selected latex comman
Added text is wavy-underlined and blue, discarded text is struck out and red
(Requires color and ulem packages). Overstriking does not work in displayed math equations such that deleted parts of equation are underlined, not struck out (this is a shortcoming inherent to the ulem package).
+=item C<LUAUNDERLINE>
+
+Added text is underlined and blue, discarded text is struck out and red
+(Requires lua-ul package + LuaLaTeX).
+
=item C<CTRADITIONAL>
-Added text is blue and set in sans-serif, and a red footnote is created for each discarded
+Added text is blue and set in sans-serif, and a red footnote is created for each discarded
piece of text. (Requires color package)
=item C<TRADITIONAL>
@@ -4376,13 +4423,13 @@ Added text is set in bold face, discarded is not shown. (also see --no-del optio
=item C<PDFCOMMENT>
-The pdfcomment package is used to underline new text, and mark deletions with a PDF comment. Note that this markup might appear differently or not at all based on the pdf viewer used. The viewer with best support for pdf markup is probably acroread. This style is only recommended if the number of differences is small.
+The pdfcomment package is used to underline new text, and mark deletions with a PDF comment. Note that this markup might appear differently or not at all based on the pdf viewer used. The viewer with best support for pdf markup is probably acroread. This style is only recommended if the number of differences is small.
=back
=head2 Subtypes
-The subtype defines the commands that are inserted at the begin and end of added or discarded blocks, irrespectively of whether these blocks contain text or commands (Defined commands: C<\DIFaddbegin, \DIFaddend, \DIFdelbegin, \DIFdelend>)
+The subtype defines the commands that are inserted at the begin and end of added or discarded blocks, irrespectively of whether these blocks contain text or commands (Defined commands: C<\DIFaddbegin, \DIFaddend, \DIFdelbegin, \DIFdelend>)
=over 10
@@ -4400,7 +4447,7 @@ from the intended position.
An alternative way of marking added passages in blue, and deleted ones in red.
(It is recommeneded to use instead the main types to effect colored markup,
-although in some cases coloring with dvipscol can be more complete, for example
+although in some cases coloring with dvipscol can be more complete, for example
with citation commands).
=item C<DVIPSCOL>
@@ -4415,12 +4462,12 @@ although in some cases coloring with dvipscol can be more complete).
can be used to highlight only changed pages, but requires post-processing. It is recommend to not call this option manually but use C<latexdiff-vc> with C<--only-changes> option. Alternatively, use the script given within preamble of diff files made using this style.
-=item C<ONLYCHANGEDPAGE>
+=item C<ONLYCHANGEDPAGE>
also highlights changed pages, without the need for post-processing, but might not work reliably if
there is floating material (figures, tables).
-=item C<LABEL>
+=item C<LABEL>
is similar to C<ZLABEL>, but does not need the zref package and works less reliably (deprecated).
@@ -4428,7 +4475,7 @@ is similar to C<ZLABEL>, but does not need the zref package and works less relia
=head2 Float Types
-Some of the markup used in the main text might cause problems when used within
+Some of the markup used in the main text might cause problems when used within
floats (e.g. figures or tables). For this reason alternative versions of all
markup commands are used within floats. The float type defines these alternative commands.
@@ -4455,7 +4502,7 @@ Make no difference between the main text and floats.
=item C<ARRENV>
-If a match to C<ARRENV> is found within an inline math environment within a deleted or added block, then the inlined math
+If a match to C<ARRENV> is found within an inline math environment within a deleted or added block, then the inlined math
is surrounded by C<\mbox{>...C<}>. This is necessary as underlining does not work within inlined array environments.
[ Default: C<ARRENV>=S<C<(?:array|[pbvBV]matrix)> >
@@ -4475,9 +4522,9 @@ C<|subsubsection|paragraph|subparagraph)> ]
This option is for advanced users and allows definition of special versions of commands, which do not work as safe commands.
Commands in C<CUSTOMDIFCMD> that occur in added or deleted blocks will be given an ADD or DEL prefix.
-The prefixed versions of the command must be defined in the preamble, either by putting them
+The prefixed versions of the command must be defined in the preamble, either by putting them
in the preamble of at least the new file, or by creating a custom preamble file (Option --preamble).
-For example the command C<\blindtext> (from package blindtext) does not interact well with underlining, so that
+For example the command C<\blindtext> (from package blindtext) does not interact well with underlining, so that
for the standard markup type, it is not satisfactory to define it as a safe command. Instead, a customised versions
without underlining can be defined in the preamble:
@@ -4491,7 +4538,7 @@ and then latexdiff should be invoked with the option C<-c CUSTOMDIFCMD=blindtext
=item C<FLOATENV>
-Environments whose name matches the regular expression in C<FLOATENV> are
+Environments whose name matches the regular expression in C<FLOATENV> are
considered floats. Within these environments, the I<latexdiff> markup commands
are replaced by their FL variaties.
@@ -4540,17 +4587,17 @@ If C<--graphics-markup=both> is chosen, C<SCALEDELGRAPHICS> is the factor, by wh
=item C<VERBATIMENV>
-RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of these environments will not be processed in any way:
+RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of these environments will not be processed in any way:
deleted content is commented out, new content is not marked up
[ Default: S<C<comment> > ]
=item C<VERBATIMLINEENV>
-RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of environments described by VERBATIMLINEENV are compared in
+RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of environments described by VERBATIMLINEENV are compared in
line mode, and changes are marked up using the listings package. The markup style is set based on the chosen mains markup type (Option -t), or on an analysis
of the preamble.
-Note that "listings.sty" must be installed. If this file is not found the fallback solution is to
+Note that "listings.sty" must be installed. If this file is not found the fallback solution is to
treat VERBATIMLINEENV environments treated exactly the same way as VERBATIMENV environments.
[ Default: S<C<(?:verbatim[*]?|lstlisting> > ]
@@ -4561,30 +4608,40 @@ treat VERBATIMLINEENV environments treated exactly the same way as VERBATIMENV e
=over 10
-=item Citations result in overfull boxes
+=item Changed citations result in overfull boxes
There is an incompatibility between the C<ulem> package, which C<latexdiff> uses for underlining and striking out in the UNDERLINE style,
-the default style, and the way citations are generated. In order to be able to mark up citations properly, they are enclosed with an C<\mbox>
-command. As mboxes cannot be broken across lines, this procedure frequently results in overfull boxes, possibly obscuring the content as it extends beyond the right margin. The same occurs for some other packages (e.g., siunitx). If this is a problem, you have two possibilities.
+the default style, and the way citations are generated. In order to be able to mark up citations properly, they are enclosed with an C<\mbox>
+command. As mboxes cannot be broken across lines, this procedure frequently results in overfull boxes, possibly obscuring the content as it extends beyond the right margin. The same occurs for some other packages (e.g., siunitx). If this is a problem, you have several possibilities.
1. Use C<CFONT> type markup (option C<-t CFONT>): If this markup is chosen, then changed citations are no longer marked up
-with the wavy line (additions) or struck out (deletions), but are still highlighted in the appropriate color, and deleted text is shown with a different font. Other styles not using the C<ulem> package will also work.
+with the wavy line (additions) or struck out (deletions), but are still highlighted in the appropriate color, and deleted text is shown with a different font. Other styles not using the C<ulem> package will also work.
2. Choose option C<--disable-citation-markup> which turns off the marking up of citations: deleted citations are no longer shown, and
-added citations are shown without markup. (This was the default behaviour of latexdiff at versions 0.6 and older)
-
+added citations are shown without markup. (This was the default behaviour of latexdiff at versions 0.6 and older).
For custom packages you can define the commands which need to be protected by C<\mbox> with C<--append-mboxsafecmd> and C<--excludemboxsafecmd> options
(submit your lists of command as feature request at github page to set the default behaviour of future versions, see section 6)
-=item Changes in complicated mathematical equations result in latex processing errors
+3. If you are using luatex >= 1.12.0 you can use option LUAUNDERLINE that uses lua-ul instead of ulem for underlining, which does not have this problem (experimental feature).
+
+=item Changes in complicated mathematical equations result in latex processing errors.
+
+Try option C<--math-markup=whole>. If even that fails, you can turn off mark up for equations with C<--math-markup=off>.
-Try options C<--math-markup=whole>. If even that fails, you can turn off mark up for equations with C<--math-markup=off>.
+=item Deleted parts in equations are not struck out but underlined.
-=item How can I just show the pages where changes had been made
+This is a limitation of the ulem package that implements the strike-out. If you use the amsmath package, then the strike-out command is redefined in such a way that deleted passages are wrapped with C<\text> command; adding C<\usepackage{amsmath}> to your preamble will trigger this behaviour. (If amsmath is not included directly, but imported by another package, latexdiff will not be able to detect its availability; in this case you can give latexdiff a hint with option C<--packages=amsmath>.
-Use options -C<-s ZLABEL> (some postprocessing required) or C<-s ONLYCHANGEDPAGE>. C<latexdiff-vc --ps|--pdf> with C<--only-changes> option takes care of
+
+=item How can I just show the pages where changes had been made?
+
+Use options C<--s ZLABEL> (some postprocessing required) or C<-s ONLYCHANGEDPAGE>. C<latexdiff-vc --ps|--pdf> with C<--only-changes> option takes care of
the post-processing for you (requires zref package to be installed).
+=item The character encoding breaks when running latexdiff from powershell.
+
+This problem is not limited to C<latexdiff> and has to do with the default settings of C<powershell> in Windows. It is recommended to use C<cmd> instead.
+
=back
=head1 BUGS
@@ -4597,13 +4654,13 @@ different numbers of inter-argument spaces are treated as significant.
=back
-Please submit bug reports using the issue tracker of the github repository page I<https://github.com/ftilmann/latexdiff.git>,
+Please submit bug reports using the issue tracker of the github repository page I<https://github.com/ftilmann/latexdiff.git>,
or send them to I<tilmann -- AT -- gfz-potsdam.de>. Include the version number of I<latexdiff>
(from comments at the top of the source or use B<--version>). If you come across latex
files that are error-free and conform to the specifications set out
above, and whose differencing still does not result in error-free
latex, please send me those files, ideally edited to only contain the
-offending passage as long as that still reproduces the problem. If your
+offending passage as long as that still reproduces the problem. If your
file relies on non-standard class files, you must include those. I will not
look at examples where I have trouble to latex the original files.
@@ -4614,24 +4671,24 @@ L<latexrevise>, L<latexdiff-vc>
=head1 PORTABILITY
I<latexdiff> does not make use of external commands and thus should run
-on any platform supporting Perl 5.6 or higher. If files with encodings
+on any platform supporting Perl 5.6 or higher. If files with encodings
other than ASCII or UTF-8 are processed, Perl 5.8 or higher is required.
The standard version of I<latexdiff> requires installation of the Perl package
-C<Algorithm::Diff> (available from I<www.cpan.org> -
+C<Algorithm::Diff> (available from I<www.cpan.org> -
I<http://search.cpan.org/~nedkonz/Algorithm-Diff-1.15>) but a stand-alone
version, I<latexdiff-so>, which has this package inlined, is available, too.
I<latexdiff-fast> requires the I<diff> command to be present.
=head1 AUTHOR
-Version 1.3.3
-Copyright (C) 2004-2022 Frederik Tilmann
+Version 1.3.4
+Copyright (C) 2004-2024 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
-Contributors of fixes and additions: V. Kuhlmann, J. Paisley, N. Becker, T. Doerges, K. Huebner,
+Contributors of fixes and additions: V. Kuhlmann, J. Paisley, N. Becker, T. Doerges, K. Huebner,
T. Connors, Sebastian Gouezel and many others.
Thanks to the many people who sent in bug reports, feature suggestions, and other feedback.
@@ -4902,13 +4959,14 @@ value
underline
sqrt
(SUPER|SUB)SCRIPT
-%%END TEXT COMMANDS
+%%END TEXT COMMANDS
%%BEGIN CONTEXT1 COMMANDS
% Regex matching commands with a text argument (leave out the \), which will fail out of context. These commands behave like text commands, except when they occur in a deleted section, where they are disabled, but their argument is shown as deleted text.
caption
subcaption
-%%END CONTEXT1 COMMANDS
+multicolumn
+%%END CONTEXT1 COMMANDS
%%BEGIN CONTEXT2 COMMANDS
% Regex matching commands with a text argument (leave out the \), which will fail out of context. As corresponding commands for context1. The only difference is that context2 commands are completely disabled in deleted sections, including their arguments.
@@ -4916,7 +4974,7 @@ title
author
date
institute
-%%END CONTEXT2 COMMANDS
+%%END CONTEXT2 COMMANDS
%% CONFIGURATION variabe defaults
%%BEGIN LISTENV CONFIG
@@ -4994,9 +5052,16 @@ verbatim[*]?
\RequirePackage[normalem]{ulem}
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}}
-\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}
+\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}
%DIF END UNDERLINE PREAMBLE
+%DIF LUAUNDERLINE PREAMBLE
+\RequirePackage{lua-ul}
+\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
+\providecommand{\DIFadd}[1]{{\protect\color{blue}\underLine{#1}}}
+\providecommand{\DIFdel}[1]{{\protect\color{red}\strikeThrough{#1}}}
+%DIF END LUAUNDERLINE PREAMBLE
+
%DIF CTRADITIONAL PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
\RequirePackage[stable]{footmisc}
@@ -5168,7 +5233,7 @@ verbatim[*]?
% To show only pages with changes (dvips/dvipdf)
% latex diff.tex
% latex diff.tex
-% dvips -pp `perl -lne 'if (m/\\newlabel{DIFchg[be]\d*}{{.*}{(.*)}}/) { print $1 }' diff.aux | uniq | tr -s \\n ','` diff.dvi
+% dvips -pp `perl -lne 'if (m/\\newlabel{DIFchg[be]\d*}{{.*}{(.*)}}/) { print $1 }' diff.aux | uniq | tr -s \\n ','` diff.dvi
\typeout{Check comments in preamble of output for instructions how to show only pages where changes have been made}
\usepackage[user,abspage]{zref}
\newcount\DIFcounterb
@@ -5188,10 +5253,10 @@ verbatim[*]?
\RequirePackage{etoolbox}
\RequirePackage{zref}
% redefine label command to write immediately to aux file - page references will be lost
-\makeatletter \let\oldlabel\label% Store \label
-\renewcommand{\label}[1]{% Update \label to write to the .aux immediately
-\zref@wrapper@immediate{\oldlabel{#1}}}
-\makeatother
+\makeatletter \let\oldlabel\label% Store \label
+\renewcommand{\label}[1]{% Update \label to write to the .aux immediately
+\zref@wrapper@immediate{\oldlabel{#1}}}
+\makeatother
\newbool{DIFkeeppage}
\newbool{DIFchange}
\boolfalse{DIFkeeppage}
@@ -5209,7 +5274,7 @@ verbatim[*]?
\providecommand{\DIFmodend}{\global\booltrue{DIFkeeppage}\global\boolfalse{DIFchange}}
%DIF END ONLYCHANGEDPAGE PREAMBLE
-%% FLOAT TYPES
+%% FLOAT TYPES
%DIF FLOATSAFE PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}}
@@ -5241,7 +5306,7 @@ verbatim[*]?
%DIF END TRADITIONALSAFE PREAMBLE
% see:
-% http://tex.stackexchange.com/questions/47351/can-i-redefine-a-command-to-contain-itself
+% http://tex.stackexchange.com/questions/47351/can-i-redefine-a-command-to-contain-itself
%DIF HIGHLIGHTGRAPHICS PREAMBLE
\RequirePackage{settobox}
@@ -5287,6 +5352,15 @@ verbatim[*]?
%% SPECIAL PACKAGE PREAMBLE COMMANDS
+%% Redefine strike out command to wrap in text box if amsmath is used and markup style with ulem is used
+%DIF AMSMATHULEM PREAMBLE
+\makeatletter
+\let\sout@orig\sout
+\renewcommand{\sout}[1]{\ifmmode\text{\sout@orig{\ensuremath{#1}}}\else\sout@orig{#1}\fi}
+\makeatother
+%DIF END AMSMATHULEM PREAMBLE
+
+
% Standard \DIFadd and \DIFdel are redefined as \DIFaddtex and \DIFdeltex
% when hyperref package is included.
%DIF HYPERREF PREAMBLE
@@ -5389,7 +5463,7 @@ verbatim[*]?
%DIF END DIFCODE_BOLD
%DIF DIFCODE_PDFCOMMENT
-
+
moredelim=[il][\color{white}\tiny]{\%DIF\ <\ },
moredelim=[il][\sffamily\bfseries]{\%DIF\ >\ }
%DIF END DIFCODE_PDFCOMMENT
diff --git a/support/latexdiff/latexdiff-fast b/support/latexdiff/latexdiff-fast
index ff9a732bac..44d6005845 100755
--- a/support/latexdiff/latexdiff-fast
+++ b/support/latexdiff/latexdiff-fast
@@ -25,6 +25,21 @@
#
# Note references to issue numbers are for the github repository of latexdiff: https://github.com/ftilmann/latexdiff
#
+# Version 1.3.4:
+# New features:
+# - Option to use lua-ul instead of ulem (for use with LuaLaTeX) (fix #17, #60, #188, #255, #270)
+# Enhancement
+# - If amsmath is detected as one of the included (based on idea in PR #263 contributed by github user xlucn
+# Bug fix
+# - sometimes the introduction of aux commands to show deleted lists or descriptions leaves in place empty auxiliary
+# list environments, which would cause error messages (though skipping messages would result in a correct output pdf).
+# These are now removed.
+# - add more mboxsafecmd and safecmd commands for SIunitx to stay compatible with newer versionsof SIunitx (PR #283, fixing issue #282, contributed by github user joe6302413)
+# - File added via --preamble option is no longer assumed to be ASCII, but read either with encoding as defined by --encoding option or using the encoding of the LOCALE (fixes issue #285 )
+# - multicolumn argument is now treated as text
+# - when tikz-dependency package is used, \& is no longer a safe command as it has special meaning inside dependency environment. The fix is a little of a hack as really it should only be considered unsafe within dependency environment (fixes (mostly) issue #303 )
+# - listings package had trouble with non-ASCII chars. The encoding is now set (thanks to github user anka-213 for finding this). Fixes #304
+#
# Version 1.3.3:
# New features:
# - Option --no-del to remove all deleted text (merge contributed by github user tdegeus PR #252, fixing issue #66
@@ -33,22 +48,22 @@
# - Abbreviations involving punctuations within them. They need special treatment because otherwise in some
# circumstances the gnoring of white space differences in conjunction with merging according to MINWORDSBLOCK rule
# could turn 'i.e.' into 'i.\PAR e.' (see https://github.com/ftilmann/latexdiff/issues/269). A few abbreviations
-# are now hard-coded and treated as atomic:
+# are now hard-coded and treated as atomic:
# English: i.e., e.g. Deutsch: z.B.
# (fixes issue #269)
# - In WHOLE and COARSE math modes, now properly treat math environments with arguments such as \alignat. Fixes #251
-# - For FINE math mode, multiple improvments to the processing work flow yield more robust outcomes. In particular, changes
-# to the equation type, e.g. \begin{displaymath} -> \begin{equation} without modifications now usually no longer result
-# in errors. (Partially) fixes issues #235 and #244.
-# - When encountering deleted math array environments such as align or eqnarray, rather than replacing them with a
-# fixed replacement environment (e.g. align* or eqnarray*), an asterisk is now added to the original command, which
+# - For FINE math mode, multiple improvments to the processing work flow yield more robust outcomes. In particular, changes
+# to the equation type, e.g. \begin{displaymath} -> \begin{equation} without modifications now usually no longer result
+# in errors. (Partially) fixes issues #235 and #244.
+# - When encountering deleted math array environments such as align or eqnarray, rather than replacing them with a
+# fixed replacement environment (e.g. align* or eqnarray*), an asterisk is now added to the original command, which
# in amsmath (and with eqnarray) will result in the same environment but without line numbers. Config variable MATHARRREPL
# is therefore (nearly) redundant, and a depracation warning is given when it is set. Reference to MATHARRREPL are have
# been removed from the manual (there is one exception, when it's still being used: sometimes latexdiff can figure out
# that there is a deleted array environment, but does not know which one. In this case, MATHARRREPL is still being used
-# to encapsulate these parts of the source, and therefore it is still set internally. But this is a quite rare situation).
+# to encapsulate these parts of the source, and therefore it is still set internally. But this is a quite rare situation).
# Fixes issue #216
-# - Unlike 'array' environment, 'split' (amsmath) does not work in argument of \DIFadd or \DIFdl in UNDERLINE modes; therefore remove it from ARRENV configuration variable.
+# - Unlike 'array' environment, 'split' (amsmath) does not work in argument of \DIFadd or \DIFdl in UNDERLINE modes; therefore remove it from ARRENV configuration variable.
# Exclude \begin and \end in math environments in COARSE and WHOLE modes. Fixes #258. Fixes #109
# - --flatten now works for empty files. Fixes issue #242
# - improved processing of Chinese and Japanese texts in that splitting is done based on characters. Thanks to LuXu (Oliver Lew) in git for working this out. Fixes #229, fixes #145
@@ -65,7 +80,7 @@
# Bug fixes:
# - fix issue #206 affecting proper markup of text commands which are not also safe cmd's and have multiple arguments
# - fix issue #210 by adding \eqref (amsmath package) to the list of safe commands
-# - fix bug reported in issue #168 mangled verbatim line environment
+# - fix bug reported in issue #168 mangled verbatim line environment
# - fix bug reported in issue #218 by replacing \hspace{0pt} after \mbox{..} auxiliary commands with \hskip0pt.
# - more ways to process \frac correctly with atomic arguments (committed by julianuu PR #246
# - fix a bug in biblatex mode, which prevented proper processing of modified \textcite (see: https://tex.stackexchange.com/questions/555157/latexdiff-and-biblatex-citation-commands)
@@ -74,10 +89,10 @@
# Version 1.3.1.1
# - remove spurious \n to fix error: Unknown regexp modifier "/n" at .../latexdiff line 1974, near "=~ " (see github issue #201)
#
-# Version 1.3.1
+# Version 1.3.1
# Bug fixes:
# - remove some uninitialised variable $2 warnings in string substitution in flatten function in case included file is not found
-# - add minimal postprocessing to diff processing of preamble commands (replace \RIGHTBRACE by \} )
+# - add minimal postprocessing to diff processing of preamble commands (replace \RIGHTBRACE by \} )
# - pre-processing: replace (contributed) routine take_comments_and_enter_from_frac() with take_comments_and_newline_from_frac(), which does the same thing
# (remove whitespace characters and comments between the argument of \frac commands) in an easier and more robust way. In addition, it
# will replace commands like \frac12 with \frac{1}{2} as pre-processing step. Fixes issue #184
@@ -95,15 +110,15 @@
# Version 1.3.0 (7 October 2018):
# - treat options to \documentclass as potential package names (some packages allow implicit loading of or imply selected packages
# - improved pattern matching: now allows nested angular brackets, and is no longer confused by escaped curly braces
-# - improved pattern matching in COARSE mode: occasionally, the closing bracket or some other elements would be matched in an 'unnatural' way due to another sequence being more minimal in the computational sense, sometimes even causing errors due to tokens moving in or out of the scope of math environments. This is now discouraged by adding internal \DIFANCHOR commands (which are removed again in post-processing) (fixes issues reported via email by li_ruomeng .
+# - improved pattern matching in COARSE mode: occasionally, the closing bracket or some other elements would be matched in an 'unnatural' way due to another sequence being more minimal in the computational sense, sometimes even causing errors due to tokens moving in or out of the scope of math environments. This is now discouraged by adding internal \DIFANCHOR commands (which are removed again in post-processing) (fixes issues reported via email by li_ruomeng .
# - verbatim and lstlisting environments are marked-up with line-by-line in a similar style to non-verbatim text (requires the listing package to be installed)
# (see new configuration variable VERBATIMLINEENV) (several issues and pull requests by jprotze)
-# - --flatten: now supports \verbatiminput and \lstlistinput
+# - --flatten: now supports \verbatiminput and \lstlistinput
# - --flatten: if file is not found, do not fail, simply warn and leave command unexpanded (inspired by issue #112). Don't warn if file name contains #[0-9] as it is then most likely an argument within a command definition rather than an actual file (applies to \input, \subfile, \include commands)
# - added to textcmds: \intertext
# - new config variable CUSTOMDIFCMD to allow defining special versions of commands in added or deleted blocks (Pull request by github user jprotze)
# - added option -no-links (mostly for use by latexdiff-vc in only-changes modes) (Pull request by github user jprotze)
-# - new option --filter-script to run both input through a pre-processing script (PR jasonmccsmith #167)
+# - new option --filter-script to run both input through a pre-processing script (PR jasonmccsmith #167)
# new option --no-filter-stderr to hide stderr output from filter-script (potentially dangerous, as this might hide malfunctioning of filter scripts)
# - --flatten now can deal with imports made using the import package {PR jasonmccsmith #173)
# Bug fixes:
@@ -122,12 +137,12 @@
# make environments that are treated like verbatim environments configurable (config variable VERBATIMENV)
# treat lstinlne as equivalent to verb command
# partially addresses issue #38
-# - refactoring: set default configuration variables in a hash, and those that correspond to lists
+# - refactoring: set default configuration variables in a hash, and those that correspond to lists
# - feature: option --add-to-config used to amend configuration variables, which are regex pattern lists
# - bug fix: deleted figures when endfloat package is activated
# - bug fix: alignat environment now always processed correctly (fix issues #65)
# - bug fix: avoid processing of commands as potential files in routine init_regex_arr (fix issue #70 )
-# - minimal feature enhancement: treat '@' as allowed character in commands (strictly speaking requires prior \makeatletter statement, but always assuming it to be
+# - minimal feature enhancement: treat '@' as allowed character in commands (strictly speaking requires prior \makeatletter statement, but always assuming it to be
# @ a letter if it is part of a command name will usually lead to the correct behaviour (see http://tex.stackexchange.com/questions/346651/latexdiff-and-let)
# - new feature/bug fix: --flatten option \endinput in included files now respected but only if \endinput stands right at the beginning of the line (issue #77)
# - bug fix: flatten would incorrectly attempt to process commented out \include commands (from discussion in issue #77 )
@@ -165,7 +180,7 @@
# - introduce list UNSAFEMATHCMD, which holds list of commands which cannot be marked up with \DIFadd or \DIFdel commands (only relevant for WHOLE and COARSE math markup modes)
# - new subtype LABEL which gives each change a label. This can later be used to only display pages where changes
# have been made (instructions for that are put as comments into the diff'ed file) inspired by answer on http://tex.stackexchange.com/questions/166049/invisible-markers-in-pdfs-using-pdflatex
-# - Configuration variables take into accout some commands from additional packages:
+# - Configuration variables take into accout some commands from additional packages:
# tikzpicture environment now treated as PICTUREENV, and \smallmatrix in ARRENV (amsmath)
# - --flatten: support for \subfile command (subfiles package) (in response to http://tex.stackexchange.com/questions/167620/latexdiff-with-subfiles )
# - --flatten: \bibliography commands expand if corresponding bbl file present
@@ -179,11 +194,11 @@
# - \% in one-letter sub/Superscripts was not converted correctly
#
# Version 1.0.3
-# - fix bug in add_safe_commands that made latexdiff hang on DeclareMathOperator
+# - fix bug in add_safe_commands that made latexdiff hang on DeclareMathOperator
# command in preamble
# - \(..\) inline math expressions were not parsed correctly, if they contained a linebreak
# - applied patch contributed by tomflannaghan via Berlios: [ Patch #3431 ] Adds correct handling of \left< and \right>
-# - \$ is treated correctly as a literal dollar sign (thanks to Reed Cartwright and Joshua Miller for reporting this bug
+# - \$ is treated correctly as a literal dollar sign (thanks to Reed Cartwright and Joshua Miller for reporting this bug
# and sketching out the solution)
# - \^ and \_ are correctly interpreted as accent and underlined space, respectively, not as superscript of subscript
# (thanks to Wail Yahyaoui for pointing out this bug)
@@ -191,19 +206,19 @@
# Version 1.0.1 - treat \big,\bigg etc. equivalently to \left and
# \right - include starred version in MATHENV - apply
# - flatten recursively and --flatten expansion is now
-# aware of comments (thanks to Tim Connors for patch)
+# aware of comments (thanks to Tim Connors for patch)
# - Change to post-processing for more reliability for
# deleted math environments
-# - On linux systems, recognise and remove DOS style newlines
+# - On linux systems, recognise and remove DOS style newlines
# - Provide markup for some special preamble commands (\title,
-# \author,\date,
-# - configurable by setting context2cmd
+# \author,\date,
+# - configurable by setting context2cmd
# - for styles using ulem package, remove \emph and \text.. from list of
# safe commands in order to allow linebreaks within the
-# highlighted sections.
-# - for ulem style, now show citations by enclosing them in \mbox commands.
-# This unfortunately implies linebreaks within citations no longer function,
-# so this functionality can be turned off (Option --disable-citation-markup).
+# highlighted sections.
+# - for ulem style, now show citations by enclosing them in \mbox commands.
+# This unfortunately implies linebreaks within citations no longer function,
+# so this functionality can be turned off (Option --disable-citation-markup).
# With --enable-citation-markup, the mbox markup is forced for other styles)
# - new substyle COLOR. This is particularly useful for marking up citations
# and some special post-processing is implemented to retain cite
@@ -211,11 +226,11 @@
# - four different levels of math-markup
# - Option --driver for choosing driver for modes employing changebar package
# - accept \\* as valid command (and other commands of form \.*). Also accept
-# \<nl> (backslashed newline)
+# \<nl> (backslashed newline)
# - some typo fixes, include commands defined in preamble as safe commands
-# (Sebastian Gouezel)
+# (Sebastian Gouezel)
# - include compared filenames as comments as line 2 and 3 of
-# the preamble (can be modified with option --label, and suppressed with
+# the preamble (can be modified with option --label, and suppressed with
# --no-label), option --visible-label to show files in generated pdf or dvi
# at the beginning of main document
#
@@ -231,7 +246,7 @@
#
# Version 0.4 March 06 option for fast differencing using UNIX diff command, several minor bug fixes (\par bug, improved highlighting of textcmds)
#
-# Version 0.3 August 05 improved parsing of displayed math, --allow-spaces
+# Version 0.3 August 05 improved parsing of displayed math, --allow-spaces
# option, several minor bug fixes
#
# Version 0.25 October 04 Fix bug with deleted equations, add math mode commands to safecmd, add | to allowed interpunctuation signs
@@ -808,12 +823,13 @@ use utf8 ;
use File::Spec ;
+
my ($algodiffversion)=split(/ /,$Algorithm::Diff::VERSION);
my ($versionstring)=<<EOF ;
-This is LATEXDIFF 1.3.3 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V)
- (c) 2004-2022 F J Tilmann
+This is LATEXDIFF 1.3.4 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V)
+ (c) 2004-2024 F J Tilmann
EOF
# Hash with defaults for configuration variables. These marked undef have default values constructed from list defined in the DATA block
@@ -904,9 +920,9 @@ my $DELCMDOPEN='%DIFDELCMD < '; # To mark begin of deleted commands (must begin
my $DELCMDCLOSE="%%%\n"; # To mark end of deleted commands (must end with a new line)
my $AUXCMD='%DIFAUXCMD' ; # follows auxiliary commands put in by latexdiff to make difference file legal
# auxiliary commands must be on a line of their own
- # Note that for verbatim environment openings the %DIFAUXCMD cannot be placed in
+ # Note that for verbatim environment openings the %DIFAUXCMD cannot be placed in
# the same line as this would mean they are shown
- # so the special form "%DIFAUXCMD NEXT" is used to indicate that the next line
+ # so the special form "%DIFAUXCMD NEXT" is used to indicate that the next line
# is an auxiliary command
# Similarly "%DIFAUXCMD LAST" would indicate the auxiliary command is in previous line (not currently used)
my $DELCOMMENT='DIF < '; # To mark deleted comment line
@@ -917,21 +933,21 @@ my @TEXTCMDLIST=(); # array containing patterns of commands with text arguments
my @TEXTCMDEXCL=(); # array containing patterns of commands without text arguments (if a pattern
# matches both TEXTCMDLIST and TEXTCMDEXCL it is excluded)
my @CONTEXT1CMDLIST=(); # array containing patterns of commands with text arguments (subset of text commands),
- # but which cause confusion if used out of context (e.g. \caption).
+ # but which cause confusion if used out of context (e.g. \caption).
# In deleted passages, the command will be disabled but its argument is marked up
- # Otherwise they behave exactly like TEXTCMD's
+ # Otherwise they behave exactly like TEXTCMD's
my @CONTEXT1CMDEXCL=(); # exclude list for above, but always empty
my @CONTEXT2CMDLIST=(); # array containing patterns of commands with text arguments, but which fail or cause confusion
# if used out of context (e.g. \title). They and their arguments will be disabled in deleted
# passages
my @CONTEXT2CMDEXCL=(); # exclude list for above, but always empty
my @MATHTEXTCMDLIST=(); # treat like textcmd. If a textcmd is in deleted or added block, just wrap the
- # whole content with \DIFadd or \DIFdel irrespective of content. This functionality
+ # whole content with \DIFadd or \DIFdel irrespective of content. This functionality
# is useful for pseudo commands \MATHBLOCK.. into which math environments are being
- # transformed
-my @MATHTEXTCMDEXCL=(); #
+ # transformed
+my @MATHTEXTCMDEXCL=(); #
-# Note I need to declare this with "our" instead of "my" because later in the code I have to "local"ise these
+# Note I need to declare this with "our" instead of "my" because later in the code I have to "local"ise these
our @SAFECMDLIST=(); # array containing patterns of safe commands (which do not break when in the argument of DIFadd or DIFDEL)
our @SAFECMDEXCL=();
my @MBOXCMDLIST=(); # patterns for commands which are in principle safe but which need to be surrounded by an \mbox
@@ -996,7 +1012,7 @@ $mathmarkup=COARSE;
$verbose=0;
$onlyadditions=0;
# output debug and intermediate files, set to 0 in final distribution
-$debug=0;
+$debug=0;
# insert preamble directly after documentclass - experimental feature, set to 0 in final distribution
# Note that this failed with mini example (or other files, where packages used in latexdiff preamble
# are called again with incompatible options in preamble of resulting file)
@@ -1019,9 +1035,9 @@ END
my %verbhash;
Getopt::Long::Configure('bundling');
-GetOptions('type|t=s' => \$type,
- 'subtype|s=s' => \$subtype,
- 'floattype|f=s' => \$floattype,
+GetOptions('type|t=s' => \$type,
+ 'subtype|s=s' => \$subtype,
+ 'floattype|f=s' => \$floattype,
'config|c=s' => \@configlist,
'add-to-config=s' => \@addtoconfiglist,
'preamble|p=s' => \$preamblefile,
@@ -1070,11 +1086,11 @@ if ( $help ) {
if ( $version ) {
- print STDERR $versionstring ;
+ print STDERR $versionstring ;
exit 0;
}
-print STDERR $versionstring if $verbose;
+print STDERR $versionstring if $verbose;
if (defined($showall)){
$showpreamble=$showsafe=$showtext=$showconfig=1;
@@ -1092,7 +1108,7 @@ if (defined($mathmarkup)) {
$mathmarkup=~tr/a-z/A-Z/;
if ( $mathmarkup eq 'OFF' ){
$mathmarkup=OFF;
- } elsif ( $mathmarkup eq 'WHOLE' ){
+ } elsif ( $mathmarkup eq 'WHOLE' ){
$mathmarkup=WHOLE;
} elsif ( $mathmarkup eq 'COARSE' ){
$mathmarkup=COARSE;
@@ -1195,7 +1211,7 @@ foreach $config ( @configlist ) {
}
}
foreach $assign ( @config ) {
- $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
+ $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
exists $CONFIG{$1} or die "Unknown configuration variable $1.";
$CONFIG{$1}=$2;
}
@@ -1232,7 +1248,7 @@ foreach $key ( keys(%CONFIG) ) {
foreach $assign ( @addtoconfig ) {
###print STDERR "assign:|$assign|\n";
- $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
+ $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
exists $CONFIG{$1} or die "Unknown configuration variable $1.";
$CONFIG{$1}.=";$2";
}
@@ -1247,8 +1263,8 @@ foreach ( keys(%CONFIG) ) {
elsif ( $_ eq "MATHENV" ) { $MATHENV = liststringtoregex($CONFIG{$_}) ; }
elsif ( $_ eq "MATHREPL" ) { $MATHREPL = $CONFIG{$_} ; }
elsif ( $_ eq "MATHARRENV" ) { $MATHARRENV = liststringtoregex($CONFIG{$_}) ; }
- elsif ( $_ eq "MATHARRREPL" ) { $MATHARRREPL = $CONFIG{$_} ;
- print STDERR "WARNING: Setting MATHARRREPL is depracated. Generally deleted math array environments will be set to their starred varieties and the setting of MATHARREPL is ignored.\n\n" unless $MATHARRREPL =~ /eqnarray\*/ ;
+ elsif ( $_ eq "MATHARRREPL" ) { $MATHARRREPL = $CONFIG{$_} ;
+ print STDERR "WARNING: Setting MATHARRREPL is depracated. Generally deleted math array environments will be set to their starred varieties and the setting of MATHARREPL is ignored.\n\n" unless $MATHARRREPL =~ /eqnarray\*/ ;
}
elsif ( $_ eq "ARRENV" ) { $ARRENV = liststringtoregex($CONFIG{$_}) ; }
elsif ( $_ eq "VERBATIMENV" ) { $VERBATIMENV = liststringtoregex($CONFIG{$_}) ; }
@@ -1275,11 +1291,11 @@ foreach $pkg ( @packagelist ) {
if ($showconfig || $showtext || $showsafe || $showpreamble) {
show_configuration();
- exit 0;
+ exit 0;
}
-if ( @ARGV != 2 ) {
+if ( @ARGV != 2 ) {
print STDERR "2 and only 2 non-option arguments required. Write latexdiff -h to get help\n";
exit(2);
}
@@ -1287,7 +1303,7 @@ if ( @ARGV != 2 ) {
# Are extra spaces between command arguments permissible?
my $extraspace;
if ($allowspaces) {
- $extraspace='\s*';
+ $extraspace='\s*';
} else {
$extraspace='';
}
@@ -1310,14 +1326,14 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
# if you get "undefined control sequence MATHBLOCKmath" error, increase the maximum value in this loop
for (my $i_pat = 0; $i_pat < 20; ++$i_pat){
$pat_n = '(?:[^{}]|\{'.$pat_n.'\}|\\\\\{|\\\\\})*';
- # Actually within the text body, quoted braces are replaced in pre-processing. The only place where
+ # Actually within the text body, quoted braces are replaced in pre-processing. The only place where
# the last part of the pattern matters is when processing the arguments of context2cmds in the preamble
# and these contain a \{ or \} combination, probably rare.
# It should thus be fine to use the simpler version below.
### $pat_n = '(?:[^{}]|\{'.$pat_n.'\})*';
}
- my $brat0 = '(?:[^\[\]]|\\\[|\\\])*';
+ my $brat0 = '(?:[^\[\]]|\\\[|\\\])*';
my $brat_n = $brat0;
for (my $i_pat = 0; $i_pat < 4; ++$i_pat){
$brat_n = '(?:[^\[\]]|\['.$brat_n.'\]|\\\[|\\\])*';
@@ -1334,7 +1350,7 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
# could turn 'i.e.' into 'i.\PAR e.' (see https://github.com/ftilmann/latexdiff/issues/269)
# English: i.e., e.g. Deutsch: z.B.
my $abbreviation='(?:i\. ?e\.|e\. ?g\.|z\. ?B\.)' ;
- my $number='-?\d*\.\d*';
+ my $number='-?\d*\.\d*';
# word: sequence of letters or accents followed by letter
my $word_cj='\p{Han}|\p{InHiragana}|\p{InKatakana}';
@@ -1362,7 +1378,7 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
# inline math $....$ or \(..\)
### the commented out version is simpler but for some reason cannot cope with newline (in spite of s option) - need to include \newline explicitly
### my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(].*?\\\\[)]';
- my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(](?:.|\n)*?\\\\[)]';
+ my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(](?:.|\n)*?\\\\[)]';
### test version (this seems to give the same results as version above)
## the current maths command cannot cope with newline within the math expression
### my $math='\$(?:[^$]|\\\$)*?\$|\\[(].*?\\[)]';
@@ -1380,7 +1396,7 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
-# now we are done setting up and can start working
+# now we are done setting up and can start working
my ($oldfile, $newfile) = @ARGV;
# check for existence of input files
if ( ! -e $oldfile ) {
@@ -1408,7 +1424,7 @@ my ($oldtime,$newtime,$oldlabel,$newlabel);
if (defined($labels[0])) {
$oldlabel=$labels[0] ;
} else {
- $oldtime=localtime((stat($oldfile))[9]);
+ $oldtime=localtime((stat($oldfile))[9]);
$oldlabel="$oldfile " . " "x($oldlabel_n_spaces) . $oldtime;
}
if (defined($labels[1])) {
@@ -1421,6 +1437,7 @@ if (defined($labels[1])) {
$encoding=guess_encoding($newfile) unless defined($encoding);
$encoding = "utf8" if $encoding =~ m/^utf8/i ;
+print STDERR "Encoding $encoding\n" if $verbose;
if (lc($encoding) eq "utf8" ) {
binmode(STDOUT, ":utf8");
binmode(STDERR, ":utf8");
@@ -1504,7 +1521,7 @@ my @auxlines;
my ($ulem)=0;
if ( length $oldpreamble && length $newpreamble ) {
- # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
+ # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
# and marking up content with latexdiff markup
@auxlines=preprocess_preamble($oldpreamble,$newpreamble);
@@ -1536,7 +1553,7 @@ if (defined($graphicsmarkup)) {
} else {
# Default: no explicit setting in menu
if ( defined $packages{"graphicx"} or defined $packages{"graphics"} ) {
- $graphicsmarkup=NEWONLY;
+ $graphicsmarkup=NEWONLY;
} else {
$graphicsmarkup=NONE;
}
@@ -1569,7 +1586,7 @@ if ($graphicsmarkup != NONE ) {
@matches=( $latexdiffpreamble =~ m/command\{\\DIFaddbeginFL}\{($pat_n)}/sg ) ;
# we look at the last one of the list to take into account possible redefinition but almost always matches should have exactly one element
if ( $matches[$#matches] =~ m/\\DIFaddbegin/ ) {
- die "Cannot combine graphics markup with float styles defining \\DIFaddbeginFL in terms of \\DIFaddbegin. Use --graphics-markup=none option or choose a different float style.";
+ die "Cannot combine graphics markup with float styles defining \\DIFaddbeginFL in terms of \\DIFaddbegin. Use --graphics-markup=none option or choose a different float style.";
exit 10;
}
###}
@@ -1583,6 +1600,11 @@ if ($graphicsmarkup != NONE ) {
$ulem = ($latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{ulem\}/ || defined $packages{"ulem"});
+# If amsmath is defined and $ulem is used for markup, redefine the \sout command to also work (mostly) in math mode
+# See stack exchange https://tex.stackexchange.com/questions/20609/strikeout-in-math-mode/308647#308647 based on comment by Taylor Raine
+if ( defined($packages{'amsmath'}) and $ulem ) {
+ $latexdiffpreamble .= join "\n",(extrapream('AMSMATHULEM'),"");
+}
# If listings is being used or can be found in the latexdiff search path, add to the preamble auxiliary code to enable line-by-line markup
if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
@@ -1592,7 +1614,7 @@ if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
}
my @listingDIFcode=();
my $replaced;
- # note that in case user supplies preamblefile the type might not reflect well the
+ # note that in case user supplies preamblefile the type might not reflect well the actual markup style
@listingDIFcode=extrapream("-nofail","DIFCODE_" . $type) unless defined($preamblefile);
if (!(@listingDIFcode)) {
# if listingDIFcode is empty try to guess a suitable one from the preamble
@@ -1606,13 +1628,17 @@ if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
@listingDIFcode=extrapream("DIFCODE_BOLD");
}
}
- # now splice it in
+ # add configuration so that listings work with utf-8
+ push @listingpreamble, '\lstset{extendedchars=\true,inputencoding='.$encoding."}\n";
+
+
+ # now splice it in
$replaced=0;
###print STDERR "DEBUG: listingDIFcode: ",join("\n",@listingDIFcode),"|||\n" if $debug;
- @listingpreamble=grep {
+ @listingpreamble=grep {
# only replace if this has not been done already (use short-circuit property of and)
- if (!$replaced and $_ =~ s/^.*%DIFCODE TEMPLATE.*$/join("\n",@listingDIFcode)/e ) {
+ if (!$replaced and $_ =~ s/^.*%DIFCODE TEMPLATE.*$/join("\n",@listingDIFcode)/e ) {
###print STDERR "DEBUG: Replaced text $_\n" if $debug;
$replaced=1;
1;
@@ -1642,7 +1668,7 @@ if ( length $oldpreamble && length $newpreamble ) {
unshift @oldpreamble,'';
@diffpreamble = linediff(\@oldpreamble, \@newpreamble);
# remove dummy line again
- shift @diffpreamble;
+ shift @diffpreamble;
# add filenames, modification time and latexdiff mark
defined($nolabel) or splice @diffpreamble,1,0,
"%DIF LATEXDIFF DIFFERENCE FILE",
@@ -1691,8 +1717,8 @@ if (defined $packages{"siunitx"} ) {
# protect SI command by surrounding them with an \mbox
# this is done to get around an incompatibility between the ulem and siunitx package
print STDERR "siunitx package detected.\n" if $verbose ;
- my $mboxcmds='SI,ang,numlist,numrange,SIlist,SIrange';
- init_regex_arr_list(\@SAFECMDLIST,'num,si');
+ my $mboxcmds='SI,ang,numlist,numrange,SIlist,SIrange,qty,qtylist,qtyproduct,qtyrange,complexqty';
+ init_regex_arr_list(\@SAFECMDLIST,'num,si,numproduct,unit,complexnum');
if ( $enablecitmark || ( $ulem && ! $disablecitmark )) {
init_regex_arr_list(\@MBOXCMDLIST,$mboxcmds);
} else {
@@ -1714,7 +1740,7 @@ if (defined $packages{"cleveref"} ) {
if (defined $packages{"glossaries"} ) {
# protect selected command by surrounding them with an \mbox
- # this is done to get around an incompatibility between ulem and glossaries package
+ # this is done to get around an incompatibility between ulem and glossaries package
print STDERR "glossaries package detected.\n" if $verbose ;
my $mboxcmds='[gG][lL][sS](?:|pl|disp|link|first|firstplural|desc|user[iv][iv]?[iv]?),[aA][cC][rR](?:long|longpl|full|fullpl),[aA][cC][lfp]?[lfp]?';
init_regex_arr_list(\@SAFECMDLIST,'[gG][lL][sS](?:(?:entry)?(?:text|plural|name|symbol)|displaynumberlist|entryfirst|entryfirstplural|entrydesc|entrydescplural|entrysymbolplural|entryuser[iv][iv]?[iv]?|entrynumberlist|entrydisplaynumberlist|entrylong|entrylongpl|entryshort|entryshortpl|entryfull|entryfullpl),[gG]lossentry(?:name|desc|symbol),[aA][cC][rR](?:short|shortpl),[aA]csp?');
@@ -1743,6 +1769,10 @@ if (defined $packages{"mhchem"} ) {
# push(@MATHTEXTCMDLIST,'cee');
}
+if ( defined $packages{"tikz-dependency"} ) {
+ init_regex_arr_ext(\@SAFECMDEXCL, 'AMPERSAND');
+}
+
my ( $citpat);
@@ -1830,7 +1860,7 @@ print STDERR "(",exetime()," s)\n","Done.\n" if $verbose;
# liststringtoregex(liststring)
-# expands string with semi-colon separated list into a regular expression corresponding
+# expands string with semi-colon separated list into a regular expression corresponding
# matching any of the elements
sub liststringtoregex {
my ($liststring)=@_;
@@ -1843,7 +1873,7 @@ sub liststringtoregex {
}
# show_configuration
-# note that this is not encapsulated but uses variables from the main program
+# note that this is not encapsulated but uses variables from the main program
# It is provided for convenience because in the future it is planned to allow output
# to be modified based on what packages are read etc - this works only if the input files are actually read
# whether or not additional files are provided
@@ -1870,7 +1900,7 @@ sub show_configuration {
print "\nContext1 commands (last argument textual, command will be disabled in deleted passages, last argument will be shown as plain text):\n";
print_regex_arr(@CONTEXT1CMDLIST);
print "\nContext2 commands (last argument textual, command and its argument will be disabled in deleted passages):\n";
- print_regex_arr(@CONTEXT2CMDLIST);
+ print_regex_arr(@CONTEXT2CMDLIST);
print "\nExclude list of Commands with last argument not textual (overrides patterns above):\n";
print_regex_arr(@TEXTCMDEXCL);
}
@@ -1978,7 +2008,7 @@ sub list_packages {
my %packages=();
my $pkg;
- # remove comments
+ # remove comments
$preamble=~s/(?<!\\)%.*$//mg ;
while ( $preamble =~ m/\\(?:documentclass|usepackage|RequirePackage)(?:\[($brat_n)\])?\{(.*?)\}/gs ) {
@@ -2083,7 +2113,7 @@ sub flatten {
my ($includeonly,$dirname,$fname,$newpage,$fullfile,$filecontent,$replacement,$begline,$inputcmd,$bblfile,$subfile,$command,$verbenv,$verboptions,$ignore,$fileonly);
my ($subpreamble,$subbody,$subpost);
my ($subdir,$subdirfull,$importfilepath);
- require File::Basename ;
+ require File::Basename ;
### require File::Spec ; # now this is needed even if flatten option not given
$filename = File::Spec->rel2abs( $filename ) ;
($ignore, $dirname, $fileonly) = File::Spec->splitpath($filename) ;
@@ -2123,15 +2153,15 @@ sub flatten {
$subdirfull = (defined($3) ? File::Spec->catdir($dirname,$subdir) : $subdir);
$importfilepath = File::Spec->catfile($subdirfull, $fname);
-
+
print STDERR "importing importfilepath:", $importfilepath,"\n" if $verbose;
if ( -f $importfilepath ) {
# If file exists, replace input or include command with expanded input
#TODO: need remove_endinput & newpage similar to other replacements inside flatten
- $replacement=flatten(read_file_with_encoding($importfilepath, $encoding), $preamble,$importfilepath,$encoding);
+ $replacement=flatten(read_file_with_encoding($importfilepath, $encoding), $preamble,$importfilepath,$encoding);
} else {
# if file does not exist, do not expand include or input command (do not warn if fname contains #[0-9] as it is then likely part of a command definition
- # and is not meant to be expanded directly
+ # and is not meant to be expanded directly
print STDERR "WARNING: Could not find included file ",$importfilepath,". I will continue but not expand |$2|\n";
$replacement = $2;
$replacement .= "{$subdir}{$fname} % Processed";
@@ -2140,13 +2170,13 @@ sub flatten {
}/exgm;
# recursively replace \\input and \\include files
- $text =~ s/(^(?:[^%\n]|\\%)*)(\\input\{(.*?)\}|\\include\{(${includeonly}(?:\.tex)?)\})/{
+ $text =~ s/(^(?:[^%\n]|\\%)*)(\\input\{(.*?)\}|\\include\{(${includeonly}(?:\.tex)?)\})/{
$begline=(defined($1)? $1 : "") ;
$inputcmd=$2;
$fname = $3 if defined($3) ;
$fname = $4 if defined($4) ;
$newpage=(defined($4)? " \\newpage " : "") ;
- # # add tex extension unless there is a three or four letter extension already
+ # # add tex extension unless there is a three or four letter extension already
$fname .= ".tex" unless $fname =~ m|\.\w{3,4}$|;
$fullfile = File::Spec->catfile($dirname,$fname);
print STDERR "DEBUG Beg of line match |$1|\n" if defined($1) && $debug ;
@@ -2155,12 +2185,12 @@ sub flatten {
# content of file becomes replacement value (use recursion), add \newpage if the command was include
if ( -f $fullfile ) {
# If file exists, replace input or include command with expanded input
- $replacement=flatten(read_file_with_encoding($fullfile, $encoding), $preamble,$filename,$encoding);
- $replacement = remove_endinput($replacement);
+ $replacement=flatten(read_file_with_encoding($fullfile, $encoding), $preamble,$filename,$encoding);
+ $replacement = remove_endinput($replacement);
# \include always starts a new page; use explicit \newpage command to simulate this
} else {
# if file does not exist, do not expand include or input command (do not warn if fname contains #[0-9] as it is then likely part of a command definition
- # and is not meant to be expanded directly
+ # and is not meant to be expanded directly
print STDERR "WARNING: Could not find included file ",$fullfile,". I will continue but not expand |$inputcmd|\n" unless $fname =~ m(#[0-9]) ;
$replacement = $inputcmd ; # i.e. just the original command again -> make no change file does not exist
$newpage="";
@@ -2169,7 +2199,7 @@ sub flatten {
}/exgm;
# replace bibliography with bbl file if it exists
- $text=~s/(^(?:[^%\n]|\\%)*)\\bibliography\{(.*?)\}/{
+ $text=~s/(^(?:[^%\n]|\\%)*)\\bibliography\{(.*?)\}/{
if ( -f $bblfile ){
$replacement=read_file_with_encoding(File::Spec->catfile($bblfile), $encoding);
} else {
@@ -2181,10 +2211,10 @@ sub flatten {
}/exgm;
# replace subfile with contents (subfile package)
- $text=~s/(^(?:[^%\n]|\\%)*)\\subfile\{(.*?)\}/{
+ $text=~s/(^(?:[^%\n]|\\%)*)\\subfile\{(.*?)\}/{
$begline=(defined($1)? $1 : "") ;
- $fname = $2;
- # # add tex extension unless there is a three or four letter extension already
+ $fname = $2;
+ # # add tex extension unless there is a three or four letter extension already
$fname .= ".tex" unless $fname =~ m|\.\w{3,4}|;
print STDERR "Include file as subfile $fname\n" if $verbose;
# content of file becomes replacement value (use recursion)
@@ -2195,10 +2225,10 @@ sub flatten {
# if file exists, expand \subfile command by contents of file
$subfile=read_file_with_encoding($fullfile,$encoding) or die "Could not open included subfile ",$fullfile,": $!";
($subpreamble,$subbody,$subpost)=splitdoc($subfile,'\\\\begin\{document\}','\\\\end\{document\}');
- ### $subfile=~s|^.*\\begin{document}||s;
+ ### $subfile=~s|^.*\\begin{document}||s;
### $subfile=~s|\\end{document}.*$||s;
$replacement=flatten($subbody, $preamble,$fullfile,$encoding);
- ### $replacement = remove_endinput($replacement);
+ ### $replacement = remove_endinput($replacement);
} else {
# if file does not exist, do not expand subfile
print STDERR "WARNING: Could not find subfile ",$fullfile,". I will continue but not expand |$2|\n" unless $fname =~ m(#[0-9]) ;
@@ -2209,11 +2239,11 @@ sub flatten {
}/exgm;
# replace \verbatiminput and \lstlistinginput
- $text=~s/(^(?:[^%\n]|\\%)*)\\(verbatiminput\*?|lstinputlisting)$extraspace(\[$brat_n\])?$extraspace\{(.*?)\}/{
+ $text=~s/(^(?:[^%\n]|\\%)*)\\(verbatiminput\*?|lstinputlisting)$extraspace(\[$brat_n\])?$extraspace\{(.*?)\}/{
$begline=(defined($1)? $1 : "") ;
$command = $2 ;
$fname = $4 ;
- $verboptions = defined($3)? $3 : "" ;
+ $verboptions = defined($3)? $3 : "" ;
if ($command eq 'verbatiminput' ) {
$verbenv = "verbatim" ;
} elsif ($command eq 'verbatiminput*' ) {
@@ -2222,7 +2252,7 @@ sub flatten {
$verbenv = "lstlisting" ;
} else {
die "Internal errorL Unexpected verbatim input type $command.\n";
- }
+ }
print STDERR "DEBUG Beg of line match |$begline|\n" if $debug ;
print STDERR "Include file $fname verbatim\n" if $verbose;
print STDERR "DEBUG looking for file ",File::Spec->catfile($dirname,$fname), "\n" if $debug;
@@ -2254,8 +2284,8 @@ sub print_regex_arr {
# if $type is a filename, it will read the file instead of reading from the appendix
# otherwise it will screen appendix for line "%DIF $TYPE" and copy everything up to line
# '%DIF END $TYPE' (where $TYPE is upcased version of $type)
-# extrapream('-nofail',$type) will---instead of failing---simply return nothing if
-# it does not find the matching line in a appendix (do not use -nofail option with multiple types!)
+# extrapream('-nofail',$type) will---instead of failing---simply return nothing if
+# it does not find the matching line in appendix (do not use -nofail option with multiple types!)
sub extrapream {
my @types=@_;
my ($type,$arg);
@@ -2272,14 +2302,20 @@ sub extrapream {
$type=$arg;
$copy=0;
if ( -f $type || lc $type eq '/dev/null' ) {
- open (FILE,$type) or die "Cannot open preamble file $type: $!";
print STDERR "Reading preamble file $type\n" if $verbose ;
+ open (FILE,$type) or die "Cannot open preamble file $type: $!";
+ if (defined($encoding)) {
+ binmode(FILE,":encoding($encoding)");
+ } else {
+ require Encode::Locale;
+ binmode(FILE,":encoding(locale)");
+ }
while (<FILE>) {
chomp ;
if ( $_ =~ m/%DIF PREAMBLE/ ) {
- push (@retval,"$_");
+ push (@retval,"$_");
} else {
- push (@retval,"$_ %DIF PREAMBLE");
+ push (@retval,"$_ %DIF PREAMBLE");
}
}
} else { # not (-f $type)
@@ -2291,9 +2327,9 @@ sub extrapream {
my $data_start = tell DATA;
while (<DATA>) {
if ( m/^%DIF $type/ ) {
- $copy=1;
+ $copy=1;
} elsif ( m/^%DIF END $type/ ) {
- last;
+ last;
}
chomp;
push (@retval,"$_ %DIF PREAMBLE") if $copy;
@@ -2333,7 +2369,7 @@ sub splitdoc {
$pos=pos $rest;
$part2=substr($rest,0,$pos-length($2));
$part3=substr($rest,$pos);
- }
+ }
else {
die "$word1 and $word2 not in the correct order or not present as a pair." ;
}
@@ -2405,7 +2441,7 @@ sub splitlatex {
my $leadin=$1;
length($string)>0 or return ($leadin);
- my @retval=($string =~ m/$pat/osg);
+ my @retval=($string =~ m/$pat/osg);
if (length($string) != length(join("",@retval))) {
print STDERR "\nWARNING: Inconsistency in length of input string and parsed string:\n This often indicates faulty or non-standard latex code.\n In many cases you can ignore this and the following warning messages.\n Note that character numbers in the following are counted beginning after \\begin{document} and are only approximate." unless $ignorewarnings;
@@ -2449,17 +2485,17 @@ sub splitlatex {
# pass1( \@seq1,\@seq2)
# Look for differences between seq1 and seq2.
-# Where an common-subsequence block is flanked by deleted or appended blocks,
+# Where an common-subsequence block is flanked by deleted or appended blocks,
# and is shorter than $MINWORDSBLOCK words it is appended
-# to the last deleted or appended word. If the block contains tokens other than words
+# to the last deleted or appended word. If the block contains tokens other than words
# or punctuation it is not merged.
# Deleted or appended block consisting of words and safe commands only are
# also merged, to prevent break-up in pass2 (after previous isolated words have been removed)
-# If there are commands with textual arguments (e.g. \caption) both in corresponding
-# appended and deleted blocks split them such that the command and opening bracket
-# are one token, then the rest is split up following standard rules, and the closing
+# If there are commands with textual arguments (e.g. \caption) both in corresponding
+# appended and deleted blocks split them such that the command and opening bracket
+# are one token, then the rest is split up following standard rules, and the closing
# bracket is a separate token, ie. turn
-# "\caption{This is a textual argument}" into
+# "\caption{This is a textual argument}" into
# ("\caption{","This ","is ","a ","textual ","argument","}")
# No return value. Destructively changes sequences
sub pass1 {
@@ -2488,15 +2524,15 @@ sub pass1 {
my $adddiscard = sub {
if ($cnt > 0 ) {
$matblkcnt++;
- # just after an unchanged block
+ # just after an unchanged block
# print STDERR "Unchanged block $cnt, $last1,$last2 \n";
- if ($cnt < $MINWORDSBLOCK
+ if ($cnt < $MINWORDSBLOCK
&& $cnt==scalar (
- grep { /^$wpat/ || ( /^\\((?:[`'^"~=.]|[\w\d@*]+))((?:\[$brat_n\]|\{$pat_n\})*)/o
- && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
+ grep { /^$wpat/ || ( /^\\((?:[`'^"~=.]|[\w\d@*]+))((?:\[$brat_n\]|\{$pat_n\})*)/o
+ && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
&& scalar(@dummy=split(" ",$2))<3 ) }
@$block) ) {
- # merge identical blocks shorter than $MINWORDSBLOCK
+ # merge identical blocks shorter than $MINWORDSBLOCK
# and only containing ordinary words
# with preceding different word
# We cannot carry out this merging immediately as this
@@ -2504,23 +2540,23 @@ sub pass1 {
# the algorithm, instead we store in @$todo where we have to merge
push(@$todo, [ $last1,$last2,$cnt,@$block ]);
}
- $block = [];
+ $block = [];
$cnt=0; $last1=-1; $last2=-1;
}
};
my $discard=sub { $deltokcnt++;
&$adddiscard; #($_[0],$_[1]);
push(@$delblock,[ $seq1->[$_[0]],$_[0] ]);
- $last1=$_[0] };
+ $last1=$_[0] };
my $add = sub { $addtokcnt++;
&$adddiscard; #($_[0],$_[1]);
push(@$addblock,[ $seq2->[$_[1]],$_[1] ]);
- $last2=$_[1] };
+ $last2=$_[1] };
my $match = sub { $mattokcnt++;
if ($cnt==0) { # first word of matching sequence after changed sequence or at beginning of word sequence
- $deltextblocks = extracttextblocks($delblock);
+ $deltextblocks = extracttextblocks($delblock);
$delblkcnt++ if scalar @$delblock;
$addtextblocks = extracttextblocks($addblock);
$addblkcnt++ if scalar @$addblock;
@@ -2536,7 +2572,7 @@ sub pass1 {
### Algorithm::Diff 1.19
$matchindex=Algorithm::Diff::_longestCommonSubsequence($delcmds,$addcmds, 0, sub { $_[0]->[0] } );
} else {
- ### Algorithm::Diff 1.15
+ ### Algorithm::Diff 1.15
$matchindex=Algorithm::Diff::_longestCommonSubsequence($delcmds,$addcmds, sub { $_[0]->[0] } );
}
@@ -2567,11 +2603,11 @@ sub pass1 {
my ($index,$block,$cnt)=@{ shift(@$addtextblocks) };
push(@$todo, [-1,$index,$cnt,@$block]);
}
-
+
$addblock=[];
$delblock=[];
}
- push(@$block,$seq2->[$_[1]]);
+ push(@$block,$seq2->[$_[1]]);
$cnt++ };
my $keyfunc = sub { join(" ",split(" ",shift())) };
@@ -2579,7 +2615,7 @@ sub pass1 {
traverse_sequences($seq1,$seq2, { MATCH=>$match, DISCARD_A=>$discard, DISCARD_B=>$add }, $keyfunc );
- # now carry out the merging/splitting. Refer to elements relative from
+ # now carry out the merging/splitting. Refer to elements relative from
# the end (with negative indices) as these offsets don't change before the instruction is executed
# cnt>0: merged small unchanged groups with previous changed blocks
# cnt==-1: split textual commands into components
@@ -2594,7 +2630,7 @@ sub pass1 {
}
}
- if ($verbose) {
+ if ($verbose) {
print STDERR "\n";
print STDERR " $mattokcnt matching tokens in $matblkcnt blocks.\n";
print STDERR " $deltokcnt discarded tokens in $delblkcnt blocks.\n";
@@ -2604,10 +2640,10 @@ sub pass1 {
# extracttextblocks(\@blockindex)
-# $blockindex has the following format
-# [ [ token1, index1 ], [token2, index2],.. ]
-# where index refers to the index in the original old or new word sequence
-# Returns: reference to an array of the form
+# $blockindex has the following format
+# [ [ token1, index1 ], [token2, index2],.. ]
+# where index refers to the index in the original old or new word sequence
+# Returns: reference to an array of the form
# [[ $index, $textblock, $cnt ], ..
# where $index index of block to be merged
# $textblock contains all the words to be merged with the word at $index (but does not contain this word)
@@ -2615,7 +2651,7 @@ sub pass1 {
#
# requires: iscmd
#
-sub extracttextblocks {
+sub extracttextblocks {
my $block=shift;
my ($i,$token,$index);
my $textblock=[];
@@ -2625,13 +2661,13 @@ sub extracttextblocks {
# we redefine locally $extraspace (shadowing the global definition) to capture command sequences with intervening spaces no matter what the global setting
# this is done so we can capture those commands with a predefined number of arguments without having to introduce them again explicitly here
- my $extraspace='\s*';
+ my $extraspace='\s*';
for ($i=0;$i< scalar @$block;$i++) {
($token,$index)=@{ $block->[$i] };
# store pure text blocks
- if ($token =~ /$wpat/ || ( $token =~/^\\((?:[`'^"~=.]|[\w\d@\*]+))((?:${extraspace}\[$brat_n\]${extraspace}|${extraspace}\{$pat_n\})*)/
- && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
+ if ($token =~ /$wpat/ || ( $token =~/^\\((?:[`'^"~=.]|[\w\d@\*]+))((?:${extraspace}\[$brat_n\]${extraspace}|${extraspace}\{$pat_n\})*)/
+ && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
&& !iscmd($1,\@TEXTCMDLIST,\@TEXTCMDEXCL))) {
# we have text or a command which can be treated as text
if ($last<0) {
@@ -2639,7 +2675,7 @@ sub extracttextblocks {
$last=$index;
} else {
# add to pure-text block
- push(@$textblock, $token);
+ push(@$textblock, $token);
}
} else {
# it is not text
@@ -2660,29 +2696,29 @@ sub extracttextblocks {
# extractcommands( \@blockindex )
-# $blockindex has the following format
-# [ [ token1, index1 ], [token2, index2],.. ]
-# where index refers to the index in the original old or new word sequence
-# Returns: reference to an array of the form
-# [ [ "\cmd1", index, "\cmd1[optarg]{arg1}{", "arg2" ,"} " ],..
-# where index is just taken from input array
-# command must have a textual argument as last argument
-#
-# requires: iscmd
-#
-sub extractcommands {
+# $blockindex has the following format
+# [ [ token1, index1 ], [token2, index2],.. ]
+# where index refers to the index in the original old or new word sequence
+# Returns: reference to an array of the form
+# [ [ "\cmd1", index, "\cmd1[optarg]{arg1}{", "arg2" ,"} " ],..
+# where index is just taken from input array
+# command must have a textual argument as last argument
+#
+# requires: iscmd
+#
+sub extractcommands {
my $block=shift;
my ($i,$token,$index,$cmd,$open,$mid,$closing);
my $retval=[];
# we redefine locally $extraspace (shadowing the global definition) to capture command sequences with intervening spaces no matter what the global setting
# this is done so we can capture those commands with a predefined number of arguments without having to introduce them again explicitly here
- my $extraspace='\s*';
+ my $extraspace='\s*';
for ($i=0;$i< scalar @$block;$i++) {
($token,$index)=@{ $block->[$i] };
# check if token is an alphanumeric command sequence with at least one non-optional argument
- # \cmd[...]{...}{last argument}
+ # \cmd[...]{...}{last argument}
# Capturing in the following results in these associations
# $1: \cmd[...]{...}{
# $2: \cmd
@@ -2690,7 +2726,7 @@ sub extractcommands {
# $4: } + trailing spaces
if ( ( $token =~ m/^(\\([\w\d\*]+)(?:${extraspace}\[$brat_n\]|${extraspace}\{$pat_n\})*${extraspace}\{)($pat_n)(\}\s*)$/so )
&& iscmd($2,\@TEXTCMDLIST,\@TEXTCMDEXCL) ) {
- print STDERR "DEBUG EXTRACTCOMMANDS Match |$1|$2|$3|$4|$index \n" if $debug;
+ print STDERR "DEBUG EXTRACTCOMMANDS Match |$1|$2|$3|$4|$index \n" if $debug;
# push(@$retval,[ $2,$index,$1,$3,$4 ]);
($cmd,$open,$mid,$closing) = ($2,$1,$3,$4) ;
$closing =~ s/\}/\\RIGHTBRACE/ ;
@@ -2701,7 +2737,7 @@ sub extractcommands {
}
# iscmd($cmd,\@regexarray,\@regexexcl) checks
-# return 1 if $cmd matches any of the patterns in the
+# return 1 if $cmd matches any of the patterns in the
# array $@regexarray, and none of the patterns in \@regexexcl, otherwise return 0
sub iscmd {
my ($cmd,$regexar,$regexexcl)=@_;
@@ -2709,7 +2745,7 @@ sub iscmd {
### print STDERR "DEBUG: iscmd($cmd)=" if $debug;
foreach $pat ( @$regexar ) {
if ( $cmd =~ m/^${pat}$/ ) {
- $ret=1 ;
+ $ret=1 ;
last;
}
}
@@ -2725,13 +2761,13 @@ sub iscmd {
# pass2( \@seq1,\@seq2)
-# Look for differences between seq1 and seq2.
+# Look for differences between seq1 and seq2.
# Mark begin and end of deleted and appended sequences with tags $DELOPEN and $DELCLOSE
# and $ADDOPEN and $ADDCLOSE, respectively, however exclude { } & and all comands, unless
# they match an element of the whitelist (SAFECMD)
# For words in TEXTCMD but not in SAFECMD, enclose interior with $ADDOPEN and $ADDCLOSE brackets
-# Deleted comment lines are marked with %DIF <
-# Added comment lines are marked with %DIF >
+# Deleted comment lines are marked with %DIF <
+# Added comment lines are marked with %DIF >
sub pass2 {
my $seq1 = shift ;
my $seq2 = shift ;
@@ -2763,7 +2799,7 @@ sub pass2 {
$addhunk = [];
}
push(@$retval,$seq2->[$_[1]]) };
-
+
my $keyfunc = sub { join(" ",split(" ",shift())) };
traverse_sequences($seq1,$seq2, { MATCH=>$match, DISCARD_A=>$discard, DISCARD_B=>$add }, $keyfunc );
@@ -2772,7 +2808,7 @@ sub pass2 {
push @$retval,marktags($ADDMARKOPEN,$ADDMARKCLOSE,$ADDOPEN,$ADDCLOSE,"","",$ADDCOMMENT,$addhunk) if scalar @$addhunk;
- if ($verbose) {
+ if ($verbose) {
print STDERR "\n";
print STDERR " $mattokcnt matching tokens. \n";
print STDERR " $deltokcnt discarded tokens in $delblkcnt blocks.\n";
@@ -2794,7 +2830,7 @@ sub marktags {
my (@argtext);
my $retval=[];
my $noncomment=0;
- my $cmd=-1; # -1 at beginning 0: last token written is a ordinary word
+ my $cmd=-1; # -1 at beginning 0: last token written is a ordinary word
# 1: last token written is a command
# for keeping track whether we are just in a command sequence or in a word sequence
my $cmdcomment= ($opencmd =~ m/^%/); # Flag to indicate whether opencmd is a comment (i.e. if we intend to simply comment out changed commands)
@@ -2810,31 +2846,31 @@ sub marktags {
# we redefine locally $extraspace (shadowing the global definition) to capture command sequences with intervening spaces no matter what the global setting
# this is done so we can capture those commands with a predefined number of arguments without having to introduce them again explicitly here
- my $extraspace_mt='\s*';
+ my $extraspace_mt='\s*';
foreach (@$block) {
- $word=$_;
+ $word=$_;
if ( $word =~ s/^%/%$comment/ ) {
# a comment
if ($cmd==1) {
push (@$retval,$closecmd) ;
$cmd=-1;
}
- push (@$retval,$word);
+ push (@$retval,$word);
next;
}
if ( $word =~ m/^\s*$/ ) {
### print STDERR "DEBUG MARKTAGS: whitespace detected |$word| cmdcom |$cmdcomment| |$opencmd|\n" if $debug;
# a sequence of white-space characters - this should only ever happen for the first element of block.
- # in deleted block, omit, otherwise just copy it in
+ # in deleted block, omit, otherwise just copy it in
if ( ! $cmdcomment) { # ignore in deleted blocks
push(@$retval,$word);
}
next;
}
if (! $noncomment) {
- push (@$retval,$openmark);
+ push (@$retval,$openmark);
$noncomment=1;
}
# negative lookahead pattern (?!) in second clause is put in to avoid matching \( .. \) patterns
@@ -2844,7 +2880,7 @@ sub marktags {
# word is a command or other significant token (not in SAFECMDLIST)
## same conditions as in subroutine extractcommand:
# check if token is an alphanumeric command sequence with at least one non-optional argument
- # \cmd[...]{...}{last argument}
+ # \cmd[...]{...}{last argument}
# Capturing in the following results in these associations
# $1: \cmd[...]{...}{
# $2: cmd
@@ -2861,11 +2897,11 @@ sub marktags {
# Condition 3: But if we are in a deleted block ($cmdcomment=1) and
# $2 (the command) is in context2, just treat it as an ordinary command (i.e. comment it open with $opencmd)
# Because we do not want to disable this command
- # here we do not use $opencmd and $closecmd($opencmd is empty)
+ # here we do not use $opencmd and $closecmd($opencmd is empty)
print STDERR "DEBUG: Detected text |$word| but not safe command \$2: $2 \$3: $3\n." if $debug;
if ($cmd==1) {
push (@$retval,$closecmd) ;
- } elsif ($cmd==0) {
+ } elsif ($cmd==0) {
push (@$retval,$close) ;
}
$command=$1; $commandword=$2; $closingbracket=$4;
@@ -2881,16 +2917,16 @@ sub marktags {
# for latexrevise
push (@$retval,$command,"%\n{$AUXCMD\n",marktags("","",$open,$close,$opencmd,$closecmd,$comment,\@argtext),$closingbracket);
} elsif ( iscmd($commandword,,\@MATHTEXTCMDLIST, \@MATHTEXTCMDEXCL) ) {
- # MATHBLOCK pseudo command: consider all commands safe, except & and \\, \begin and \end and a few package sprcific one (look at UNSAFEMATHCMD definition)
- # Keep these commands even in deleted blocks, hence set $opencmd and $closecmd (5th and 6th argument of marktags) to
+ # MATHBLOCK pseudo command: consider all commands safe, except & and \\, \begin and \end and a few package sprcific one (look at UNSAFEMATHCMD definition)
+ # Keep these commands even in deleted blocks, hence set $opencmd and $closecmd (5th and 6th argument of marktags) to
# ""
- local @SAFECMDLIST=(".*");
+ local @SAFECMDLIST=(".*");
local @SAFECMDEXCL=('\\','\\\\',@UNSAFEMATHCMD);
push(@$retval,$command,marktags("","",$open,$close,"","",$comment,\@argtext)#@argtext
,$closingbracket);
} else {
# normal textcmd or context1cmd in an added block
- push (@$retval,$command,marktags("","",$open,$close,$opencmd,$closecmd,$comment,\@argtext),$closingbracket);
+ push (@$retval,$command,marktags("","",$open,$close,$opencmd,$closecmd,$comment,\@argtext),$closingbracket);
}
push (@$retval,$AUXCMD,"\n") if $cmdcomment ;
$cmd=-1 ;
@@ -2976,10 +3012,10 @@ sub take_comments_and_newline_from_frac() {
# names or labels but it does not matter because they are converted back in the postprocessing step
# Returns: leading white space removed in step 1
sub preprocess {
- for (@_) {
+ for (@_) {
- # change in \verb and similar commands - note that I introduce an extra space here so that the
+ # change in \verb and similar commands - note that I introduce an extra space here so that the
# already hashed variants do not trigger again
# transform \lstinline{...}
# s/\\lstinline(\[$brat0\])?(\{(?:.*?)\})/"\\DIFlstinline". $1 ."{". tohash(\%verbhash,"$2") ."}"/esg;
@@ -3009,7 +3045,7 @@ sub preprocess {
1 while s/(?<!\\)_(\s*{($pat_n)})/\\SUBSCRIPT$1/g ;
# Convert ^n into \SUPERSCRIPTNB{n} and ^{nnn} into \SUPERSCRIPT{nn}
1 while s/(?<!\\)\^(\s*([^{\\\s]|\\\w+))/\\SUPERSCRIPTNB{$1}/g ;
- 1 while s/(?<!\\)\^(\s*{($pat_n)})/\\SUPERSCRIPT$1/g ;
+ 1 while s/(?<!\\)\^(\s*{($pat_n)})/\\SUPERSCRIPT$1/g ;
# Convert \sqrt{n} into \SQRT{n} and \sqrt nn into SQRTNB{nn}
1 while s/(?<!\\)\\sqrt(\s*([^{\\\s]|\\\w+))/\\SQRTNB{$1}/g ;
1 while s/(?<!\\)\\sqrt(\s*{($pat_n)})/\\SQRT$1/g ;
@@ -3029,16 +3065,16 @@ sub preprocess {
if ( $mathmarkup != FINE ) {
# DIFANCHORARRB and DIFANCHORARRE, DIFANCHORMATHB and DIFANCHORMATHE markers are inserted here to encourage the matching algorithm
# to always match up the closing brace. Otherwise sometimes one ends up with a situation where
- # the closing brace is deleted and added at another point. The deleted closing brace is then
+ # the closing brace is deleted and added at another point. The deleted closing brace is then
# prevented by a %DIFDELCMD, leading to material leaking in or out of the math environment.
# The anchors are removed in post-processing again. (note that they are simple text to cause least amount of complications
- # Admittedly, this is something of a hack and will not always work. If it does not, then one needs to
+ # Admittedly, this is something of a hack and will not always work. If it does not, then one needs to
# resort to WHOLE or FINE, or NONE math mode processing.
s/\\begin\{($ARRENV)}(.*?)\\end\{\1}/\\ARRAYBLOCK$1\{$2\\DIFANCHORARRB \}\\DIFANCHORARRE /sg;
take_comments_and_newline_from_frac();
- # Convert Math environments with arguments
+ # Convert Math environments with arguments
s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}((?:\[$brat_n\])|(?:\{$pat_n\}))+(.*?)\\end\{\1\}/\\MATHBLOCK$1\[$2\]\{$3\\DIFANCHORMATHB \}\\DIFANCHORMATHE /sg;
# Convert Math environments without arguments
s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}(.*?)\\end\{\1\}/\\MATHBLOCK$1\{$2\\DIFANCHORMATHB \}\\DIFANCHORMATHE /sg;
@@ -3052,7 +3088,7 @@ sub preprocess {
# $expanded=linecomment($string)
#preface all lines with verbatim marker (usually DIFVRB)
-sub linecomment {
+sub linecomment {
my @verbatimlines=split("\n",$_[0]);
# the first line needs special treatment - we do want to retain optional arguments as is but wrap the remainder also with VERBCOMMENT
### print STDERR "DEBUG: before verbatimlines[0] = ",$verbatimlines[0],"\n";
@@ -3062,7 +3098,7 @@ sub linecomment {
}
# $simple=reverselinecomment($env $string)
-# remove DIFVRB comments but leave changed lines marked
+# remove DIFVRB comments but leave changed lines marked
sub reverselinecomment {
my ($environment, $verbatimtext)=@_;
### print STDERR "DEBUG REVERSELINECOMMENT input: $environment,|$verbatimtext|\n" if $debug;
@@ -3077,7 +3113,7 @@ sub reverselinecomment {
$verbatimtext =~ s/\\DIFdelend //g;
$verbatimtext =~ s/$DELCMDOPEN.*//g;
- # remove DIFVRB mark
+ # remove DIFVRB mark
$verbatimtext=~ s/%$VERBCOMMENT//g;
# remove part of the markup in changed lines
@@ -3168,7 +3204,7 @@ sub writedebugfile {
# * Remove STOP token from the end
# * Replace \RIGHTBRACE by }
# * If option --no-del is set delete all deleted blocks
-# 1. Check all deleted blocks:
+# 1. Check all deleted blocks:
# a.where a deleted block contains a matching \begin and
# \end environment (these will be disabled by a %DIFDELCMD statements), for selected environments enable
# these commands again (such that for example displayed math in a deleted equation
@@ -3189,14 +3225,14 @@ sub writedebugfile {
# For added blocks:
# c. If in-line math mode contains array environment, enclose the whole environment in \mbox'es
# d. place \cite commands in mbox'es (for UNDERLINE style)
-#
+#
# 2. If math-mode COARSE,WHOLE or NONE option set: Convert \MATHBLOCKmath{..} commands back to environments
#
# Convert all PICTUREblock{..} commands back to the appropriate environments
# 3. Convert DIFadd, DIFdel, DIFaddbegin , ... into FL varieties
# within floats (currently recognised float environments: plate,table,figure
# plus starred varieties).
-# 4. Remove empty %DIFDELCMD < lines
+# 4. Remove empty %DIFDELCMD < lines
# 4. Convert \begin{SQUAREBRACKET} \end{SQUAREBRACKET} into \[ \]
# Convert \begin{DOLLARDOLLAR} \end{DOLLARDOLLAR} into $$ $$
# 5. Convert \SUPERSCRIPTNB{n} into ^n and \SUPERSCRIPT{nn} into ^{nnn}
@@ -3209,7 +3245,7 @@ sub writedebugfile {
# 4, undo renaming of the \begin, \end,{,} in comments
# Change \QLEFTBRACE, \QRIGHTBRACE,\AMPERSAND to \{,\},\&
#
-# Note have to manually synchronize substitution commands below and
+# Note have to manually synchronize substitution commands below and
# DIF.. command names in the header
sub postprocess {
my ($begin,$len,$float,$delblock,$addblock); ### $cnt
@@ -3221,7 +3257,7 @@ sub postprocess {
my (@itemargs, $itemarg);
- for (@_) {
+ for (@_) {
# change $'s in comments to something harmless
1 while s/(%.*)\$/$1DOLLARDIF/mg ;
@@ -3231,7 +3267,7 @@ sub postprocess {
# the only way to get these is as %DIFDELCMD < \RIGHTBRACE construction
# This essentially marks closing right braces of MATHBLOCK environments, which did not get matched
# up. This case should be rare, so I just leave this in the diff file output. Not really elegant
- # but can still be dealt with later if it results in problems.
+ # but can still be dealt with later if it results in problems.
s/%DIFDELCMD < \\RIGHTBRACE/%DIFDELCMD < \\MBLOCKRIGHTBRACE/g ;
# Replace \RIGHTBRACE by }
s/\\RIGHTBRACE/}/g;
@@ -3259,7 +3295,7 @@ sub postprocess {
$len=length($&);
$begin=pos($_) - $len;
$delblock=$&;
- ### A much simpler method for math replacement might follow this strategy (can recycle part of the commands below for following
+ ### A much simpler method for math replacement might follow this strategy (can recycle part of the commands below for following
### this strategy:
### 1. a Insert aux commands \begin{MATHMODE} or \end{MATHMODE} for all deleted commands opening or closing displayed math mode
### b Insert aux commands \begin{MATHARRMODE} or \end{MATHARRMODE} for all deleted commands opening or closing math array mode
@@ -3285,14 +3321,14 @@ sub postprocess {
###0.5: $delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \s*\\end\{((?:$MATHENV)|SQUAREBRACKET)\}\s*?(?:$DELCMDCLOSE|\n))(.*?[^\n]?)\n?(?<!${AUXCMD}\n)(\%DIFDELCMD < \s*\\begin\{\2\})/\\end{MATHMODE}$AUXCMD\n$1$3\n\\begin{MATHMODE}$AUXCMD\n$4/sg;
$delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{((?:$MATHENV)|SQUAREBRACKET)\}.*?(?:$DELCMDCLOSE|\n))(.*?[^\n]?)\n?(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{\2\})/\\end\{MATHMODE\}$AUXCMD\n$1$3\n\\begin\{MATHMODE\}$AUXCMD\n$4/sg;
- # now look for unpaired %DIFDELCMD < \begin{MATHENV}; if found add \begin{$MATHREPL} and insert \end{$MATHREPL}
+ # now look for unpaired %DIFDELCMD < \begin{MATHENV}; if found add \begin{$MATHREPL} and insert \end{$MATHREPL}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{((?:$MATHENV)|SQUAREBRACKET)\}\s*?(?:$DELCMDCLOSE|\n))/$1\\begin{$MATHREPL}$AUXCMD\n/sg ) {
### print STDERR "BINGO: begin block: \nBefore: |" . substr($_,$begin,$len) . "|\n" if $debug ;
$delblock =~ s/(\\DIFdelend$)/\\end{$MATHREPL}$AUXCMD\n$1/s ;
### print STDERR "After: |" . $delblock . "|\n\n" if $debug ;
}
- # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
+ # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{((?:$MATHENV)|SQUAREBRACKET)\}\s*?(?:$DELCMDCLOSE|\n))/$1\\end\{MATHMODE\}$AUXCMD\n/sg ) {
### print STDERR "BINGO: end block:\nBefore: |" . substr($_,$begin,$len) . "|\n" if $debug;
@@ -3315,15 +3351,15 @@ sub postprocess {
$delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{($MATHARRENV)\}\s*?(?:$DELCMDCLOSE|\n))(.*?[^\n]?)\n?(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{\2\})/\\end{MATHMODE}$AUXCMD\n$1$3\n\\begin{MATHMODE}$AUXCMD\n$4/sg;
### print STDERR "STEP1: |" . $delblock . "|\n\n" if $debug ;
- # now look for unpaired %DIFDELCMD < \begin{MATHARRENV}; if found add \begin{$MATHARRREPL} and insert \end{$MATHARRREPL}
+ # now look for unpaired %DIFDELCMD < \begin{MATHARRENV}; if found add \begin{$MATHARRREPL} and insert \end{$MATHARRREPL}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{($MATHARRENV)\}(.*?)(?:$DELCMDCLOSE|\n))/$1\\begin{$2*}$3$AUXCMD\n/sg ) {
$arrenv=$2;
- $delblock =~ s/(\\DIFdelend$)/\\end{$arrenv*}}$AUXCMD\n$1/s ;
+ $delblock =~ s/(\\DIFdelend$)/\\end{$arrenv*}$AUXCMD\n$1/s ;
}
### print STDERR "STEP2: |" . $delblock . "|\n\n" if $debug ;
- # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
+ # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{($MATHARRENV)\}\s*?(?:$DELCMDCLOSE|\n))/$1\\end{MATHMODE}$AUXCMD\n/sg ) {
$delblock =~ s/(\\DIFdelend$)/\\begin{MATHMODE}$AUXCMD\n$1/s ;
@@ -3341,7 +3377,7 @@ sub postprocess {
### $eqarrayblock=~ s/(\%DIFDELCMD < \s*(\&|\\\\)\s*?(?:$DELCMDCLOSE|\n))/$1$2$AUXCMD\n/sg ;
$eqarrayblock =~ s/(\%DIFDELCMD < (.*?(?:\&|\\\\).*)(?:$DELCMDCLOSE|\n))/
# The pattern captures comments with at least one of & or \\
- @symbols= split(m@((?:&|\\\\)\s*)@,$2); # extract & and \\ and other material from sequence
+ @symbols= split(m@((?:&|\\\\)\s*)@,$2); # extract & and \\ and other material from sequence
@symbols= grep ( m@&|\\\\\s*@, @symbols); # select & and \\ (and subsequent spaces)
"$1@symbols$AUXCMD\n"
/eg ;
@@ -3354,7 +3390,7 @@ sub postprocess {
} elsif ( $mathmarkup == COARSE || $mathmarkup == WHOLE ) {
# Convert MATHBLOCKmath commands to their uncounted numbers (e.g. convert equation -> displaymath
# (environments defined in $MATHENV will be replaced by $MATHREPL, and environments in $MATHARRENV
- # will be replaced by their starred variety
+ # will be replaced by their starred variety
$delblock=~ s/\\MATHBLOCK($MATHENV)((?:\[$brat_n\])?)\{($pat_n)\}/\\MATHBLOCK$MATHREPL$2\{$3\}/sg;
$delblock=~ s/\\MATHBLOCK($MATHARRENV)((?:\[$brat_n\])?)\{($pat_n)\}/\\MATHBLOCK$1\*$2\{$3\}/sg;
}
@@ -3368,10 +3404,10 @@ sub postprocess {
print STDERR "DELBLOCK after maths processing: |" . $delblock . "|\n\n" if $debug ;
- # Reinstate completely deleted list environments. note that items within the
+ # Reinstate completely deleted list environments. note that items within the
# environment will still be commented out. They will be restored later
$delblock=~ s/(\%DIFDELCMD < \s*\\begin\{($LISTENV)\}\s*?(?:\n|$DELCMDCLOSE))(.*?)(\%DIFDELCMD < \s*\\end\{\2\})/{
- ### # block within the search; replacement environment
+ ### # block within the search; replacement environment
### "$1\\begin{$2}$AUXCMD\n". restore_item_commands($3). "\n\\end{$2}$AUXCMD\n$4";
"$1\\begin{$2}$AUXCMD\n$3\n\\end{$2}$AUXCMD\n$4";
}/esg;
@@ -3405,7 +3441,7 @@ sub postprocess {
### if ($CITE2CMD) {
###### ${extraspace}(?:\[$brat0\]${extraspace}){0,2}\{$pat_n\})) .*?%%%\n
### $delblock=~s/($DELCMDOPEN\s*\\($CITE2CMD)(.*)$DELCMDCLOSE)/
- ### # Replacement code
+ ### # Replacement code
### {my ($aux,$all);
### $aux=$all=$1;
### $aux=~s#\n?($DELCMDOPEN|$DELCMDCLOSE)##g;
@@ -3415,7 +3451,7 @@ sub postprocess {
### if ($CITECMD) {
###### $delblock=~s/(\\($CITECMD)${extraspace}(?:\[$brat0\]${extraspace}){0,2}\{$pat_n\})(\s*)/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/msg ;
### $delblock=~s/(\\($CITECMD)${extraspace}(?:<$abrat0>${extraspace})?(?:\[$brat0\]${extraspace}){0,2}\{$pat_n\})(\s*)/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/msg ;
- ### }
+ ### }
# if MBOXINLINEMATH is set, protect inlined math environments with an extra mbox
@@ -3423,7 +3459,7 @@ sub postprocess {
# note additional \newline after command is omitted from output if right at the end of deleted block (otherwise a spurious empty line is generated)
$delblock=~s/($math)(?:[\s\n]*)?/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/sg;
}
- ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/)) {
+ ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/)) {
### # change included verbatim environments
### $delblock =~ s/\\DIFverb\{/\\DIFDIFdelverb\{/g;
### $delblock =~ s/\\DIFlstinline/\\DIFDIFdellstinline/g;
@@ -3465,7 +3501,7 @@ sub postprocess {
##$addblock=~s/($math)/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/sg;
$addblock=~s/($math)(?:[\s\n]*)?/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/sg;
}
- ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat0\])?\{color\}/)) {
+ ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat0\])?\{color\}/)) {
# mark added verbatim commands
$addblock =~ s/\\DIFverb/\\DIFDIFaddverb/g;
$addblock =~ s/\\DIFlstinline/\\DIFDIFaddlstinline/g;
@@ -3483,11 +3519,11 @@ sub postprocess {
pos = $begin + length($addblock);
}
- # Go through whole text, and by counting list environment commands, find out when we are within a list environment.
+ # Go through whole text, and by counting list environment commands, find out when we are within a list environment.
# Within those restore deleted \item commands
- @textparts=split /(?<!$DELCMDOPEN)(\\(?:begin|end)\{$LISTENV\})/ ;
+ @textparts=split /(?<!$DELCMDOPEN)(\\(?:begin|end)\{$LISTENV\})/ ;
@liststack=();
- @newtextparts=map {
+ @newtextparts=map {
### print STDERR ":::::::: $_\n";
if ( ($listtype) = m/^\\begin\{($LISTENV)\}$/ ) {
print STDERR "DEBUG: postprocess \\begin{$listtype}\n" if $debug;
@@ -3503,7 +3539,7 @@ sub postprocess {
} else {
print STDERR "DEBUG: postprocess \@liststack=(",join(",",@liststack),")\n" if $debug;
if (scalar @liststack > 0 ) {
- # we are within a list environment and should replace all item commands
+ # we are within a list environment and should replace all item commands
$_=restore_item_commands($_);
}
# else: we are outside a list environment and do not need to do anything
@@ -3516,17 +3552,17 @@ sub postprocess {
# Replace MATHMODE environments from step 1a above by the correct Math environment and remove unncessary pairings
-
+
if ( $mathmarkup == FINE ) {
# look for AUXCMD math-mode pairs which have only comments (or empty lines between them), and remove the added commands
# \begin{..} ... \end{..} pairs
- s/\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\end\{\1\}$AUXCMD\n/$2/sg;
+ s/\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\end\{\1\}$AUXCMD\n/$2/sg;
# \end{..} .... \begin{..} pairs
- s/\\end\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\begin\{\1\}$AUXCMD\n/$2/sg;
+ s/\\end\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\begin\{\1\}$AUXCMD\n/$2/sg;
writedebugfile($_,'postprocess15');
# The next line is complicated. The negative look-ahead insertion makes sure that no \end{$MATHENV} (or other mathematical
- # environments) are between the \begin{$MATHENV} and \end{MATHMODE} commands. This is necessary as the minimal matching
+ # environments) are between the \begin{$MATHENV} and \end{MATHMODE} commands. This is necessary as the minimal matching
# is not globally minimal but only 'locally' (matching is beginning from the left side of the string)
# [NB: Do not be tempted to prettify the expression with /x modified. It seems this is applied after strings are expanded so will ignore spaces in strings
1 while s/(?<!$DELCMDOPEN)\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}((?:${DELCMDOPEN}[^\n]*|.(?!(?:\\end\{(?:(?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}|\\begin\{MATHMODE})))*?)\\end\{MATHMODE}/\\begin{$1}$2\\end{$1}/s;
@@ -3601,7 +3637,7 @@ sub postprocess {
# remove empty DIFCMD < lines
s/^\Q${DELCMDOPEN}\E\n//msg;
- # Expand hashes of verb and verbatim environments
+ # Expand hashes of verb and verbatim environments
s/${DELCMDOPEN}\\($VERBATIMENV)\{([-\d]*?)\}/"${DELCMDOPEN}\\begin{${1}}".fromhash(\%verbhash,$2,$DELCMDOPEN)."${DELCMDOPEN}\\end{${1}}"/esg;
# revert changes to verbatim environments for line diffs (and add code to mark up changes) (note negative look behind assertions to not leak out of DIFDELCMD comments)
# Example:
@@ -3627,8 +3663,8 @@ sub postprocess {
((?:\%\Q$DELCOMMENT$VERBCOMMENT\E[^\n]*?\n)*)
# Deleted \end command of verbatim environment. Note that the type is forced to match the opening. Captures: $5: Whole deleted environment (previous way this line was written: (\Q$DELCMDOPEN\E\\end\{\2\}(?:\n|\s|\Q$DELCMDOPEN\E)*\Q$DELCMDCLOSE\E)
(\Q$DELCMDOPEN\E\\end\{\2\})
- / # Substitution part
- $1 # Leave expression as is
+ / # Substitution part
+ $1 # Leave expression as is
. "$AUXCMD NEXT\n" # Mark the following line as an auxiliary command
. "" # reinstate the original environment without options
. reverselinecomment($2, "$3$4") # modify the body to change the markup; reverselinecomment parses for options
@@ -3637,7 +3673,7 @@ sub postprocess {
/esgx; # Modifiers of substitution command
writedebugfile($_,'postprocess2');
# where changes have occurred in verbatim environment, change verbatim to DIFverbatim to allow mark-up
- # (I use the presence of optional paramater to verbatim environment as the marker - normal verbatim
+ # (I use the presence of optional paramater to verbatim environment as the marker - normal verbatim
# environment does not take optional arguments)
s/(?<!$DELCMDOPEN)\\begin\{(verbatim[*]?)\}(\[$brat_n\].*?)\\end\{\1\}/\\begin{DIF$1}$2\\end{DIF$1}/sg;
@@ -3651,7 +3687,7 @@ sub postprocess {
# convert remaining PAR commands (which are preceded by non-white space characters, usually "}" ($ADDCLOSE)
s/\\PAR\n/\n\n/sg;
- # package specific processing:
+ # package specific processing:
if ( defined($packages{"endfloat"})) {
#endfloat: make sure \begin{figure} and \end{figure} are always
# on a line by themselves, similarly for table environment
@@ -3664,12 +3700,16 @@ sub postprocess {
s/^((?:[^%]+)\\(?:begin|end)\{(?:figure|table)\}(?:\[[a-zA-Z]+\])?)(.+)((?:%.*)?)$/$1\n$2$3/mg;
}
- # Convert '\PERCENTAGE ' back into '\%' (the final question mark catches a special situation where due to a latter pre-processing step the ' ' becomes separated
+ # Remove empty auxiliary LISTENV (sometmes these are generated if list environment occurs within the argument of a deleted comment)
+ # (slightly hacky but I could not see an easy way to see if in argument of another command when this extra markup is added)
+ s/\\begin\{($LISTENV)\}$AUXCMD\n((?:\s*\%[^\n]*\n)*\n?)\\end\{\1\}$AUXCMD\n/$2\n/msg ;
+
+ # Convert '\PERCENTAGE ' back into '\%' (the final question mark catches a special situation where due to a latter pre-processing step the ' ' becomes separated
s/\\PERCENTAGE ?/\\%/g;
- # Convert '\DOLLAR ' back into '\$'
+ # Convert '\DOLLAR ' back into '\$'
s/\\DOLLAR /\\\$/g;
- # undo renaming of the \begin and \end,{,} and dollars in comments
+ # undo renaming of the \begin and \end,{,} and dollars in comments
# although we only renamed $ in comments to DOLLARDIFF, we might have lost the % in unchanged verbatim blocks, so rename all
s/DOLLARDIF/\$/g;
@@ -3687,7 +3727,7 @@ sub postprocess {
# Convert \SQRT{n} into \sqrt{n} and \SQRTNB{nn} into \sqrt nn
1 while s/\\SQRT(\s*\{($pat_n)\})/\\sqrt$1/g ;
1 while s/\\SQRTNB\{(\s*$pat0)\}/\\sqrt$1/g ;
-
+
1 while s/(%.*)\\CFRAC (.*)$/$1\\frac$2/mg ;
1 while s/(%.*)\\CRIGHTBRACE (.*)$/$1\}$2/mg ;
1 while s/(%.*)\\CLEFTBRACE (.*)$/$1\{$2/mg ;
@@ -3698,7 +3738,7 @@ sub postprocess {
s/\\QRIGHTBRACE /\\\}/sg;
s/\\AMPERSAND /\\&/sg;
# Highlight added inline verbatim commands if possible
- if ( $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/ ) {
+ if ( $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/ ) {
# wrap added verb commands with color commands
s/\\DIFDIFadd((?:verb\*?|lstinline(?:\[$brat_n\])?)\{[-\d]*?\}[\s\n]*)/\{\\color{blue}$AUXCMD\n\\DIF$1%\n\}$AUXCMD\n/sg;
s/\\DIFDIFdel((?:verb\*?|lstinline(?:\[$brat_n\])?)\{[-\d]*?\}[\s\n]*$AUXCMD)/\{\\color{red}${AUXCMD}\n\\DIF$1\n\}${AUXCMD}/sg;
@@ -3713,8 +3753,8 @@ sub postprocess {
# finally add the comment to the ones not having an optional argument before
###s/\\DIFaddlstinline(?!\[)/\\lstinline\n[basicstyle=\\color{blue}]$AUXCMD\n/g;
- return;
}
+ return;
}
# $out = restore_item_commands($listenviron)
@@ -3738,13 +3778,13 @@ sub restore_item_commands {
# @auxlines=preprocess_preamble($oldpreamble,$newpreamble);
- # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
- # the list of commands is defined in CONTEXT2CMD
- # if found then use a bodydiff to mark up content, and replace the corresponding commands
+ # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
+ # the list of commands is defined in CONTEXT2CMD
+ # if found then use a bodydiff to mark up content, and replace the corresponding commands
# in both preambles by marked up version to 'fool' the linediff (such that only body is marked up).
# A special case are e.g. author commands being added (or removed)
# 1. If commands are added, then the entire content is marked up as new, but also the lines are marked as new in the linediff
- # 2. If commands are removed, then the linediff will mark the line as deleted. The program returns
+ # 2. If commands are removed, then the linediff will mark the line as deleted. The program returns
# with $auxlines a text to be appended at the end of the preamble, which shows the respective fields as deleted
sub preprocess_preamble {
my ($oldpreambleref,$newpreambleref)=(\$_[0],\$_[1]) ;
@@ -3766,7 +3806,7 @@ EOF
$titlecmd = "(?:".join("|",@CONTEXT2CMDLIST).")";
# as context2cmdlist is stored as regex, e.g. ((?-xism:^title$), we need to remove ^- fo
# resue in a more complex regex
- $titlecmd =~ s/[\$\^]//g;
+ $titlecmd =~ s/[\$\^]//g;
# make sure to not match on comment lines:
$titlecmdpat=qr/^(?:[^%\n]|\\%)*(\\($titlecmd)$extraspace(?:\[($brat_n)\])?(?:\{($pat_n)\}))/ms;
###print STDERR "DEBUG:",$titlecmdpat,"\n";
@@ -3792,7 +3832,7 @@ EOF
$cmd=shift @newtitlecommands;
$optarg=shift @newtitlecommands;
$arg=shift @newtitlecommands;
-
+
if ( defined($newhash{$cmd})) {
warn "$cmd is used twice in preamble of new file. Reverting to pure line diff mode for preamble.\n";
print STDERR $warnmsgdetail;
@@ -3819,7 +3859,7 @@ EOF
}
$argnew=$newhash{$cmd}->[2];
$argdiff="{" . join("",bodydiff($argold,$argnew)) ."}";
- # Replace \RIGHTBRACE by }
+ # Replace \RIGHTBRACE by }
$argdiff =~ s/\\RIGHTBRACE/}/g;
if ( length $optargnew ) {
@@ -3834,7 +3874,7 @@ EOF
$optargdiff="";
}
### print STDERR "DEBUG s/\\Q$newhash{$cmd}->[0]\\E/\\$cmd$optargdiff$argdiff/s\n";
- # Note: \Q and \E force literal interpretation of what it between them but allow
+ # Note: \Q and \E force literal interpretation of what it between them but allow
# variable interpolation, such that e.g. \title matches just that and not TAB-itle
$$newpreambleref=~s/\Q$newhash{$cmd}->[0]\E/\\$cmd$optargdiff$argdiff/s;
# replace this in old preamble if necessary
@@ -3874,7 +3914,7 @@ EOF
#%< old deleted line(s)
#%DIF -------
#%DIF mmann-nn
-#new appended line %<
+#new appended line %<
#%DIF -------
# Future extension: mark change explicitly
# Assumes: traverse_sequence traverses deletions before insertions in changed sequences
@@ -3886,9 +3926,9 @@ sub linediff {
my $block = [];
my $retseq = [];
my @begin=('','',''); # dummy initialisation
- my $instring ;
+ my $instring ;
- my $discard = sub { @begin=('d',$_[0],$_[1]) unless scalar @$block ;
+ my $discard = sub { @begin=('d',$_[0],$_[1]) unless scalar @$block ;
push(@$block, "%DIF < " . $seq1->[$_[0]]) };
my $add = sub { if (! scalar @$block) {
@begin=('a',$_[0],$_[1]) ;}
@@ -3903,12 +3943,12 @@ sub linediff {
$instring = sprintf "%%DIF %da%d-%d",$begin[1],$begin[2],$_[1]-1; }
elsif ( $begin[0] eq 'c' ) {
$instring = sprintf "%%DIF %sc%s",
- ($begin[1]==$_[0]-1) ? "$begin[1]" : $begin[1]."-".($_[0]-1) ,
+ ($begin[1]==$_[0]-1) ? "$begin[1]" : $begin[1]."-".($_[0]-1) ,
($begin[2]==$_[1]-1) ? "$begin[2]" : $begin[2]."-".($_[1]-1) ; }
else {
$instring = sprintf "%%DIF %d%s%d",$begin[1],$begin[0],$begin[2]; }
- push @$retseq, $instring,@$block, "%DIF -------" ;
- $block = [];
+ push @$retseq, $instring,@$block, "%DIF -------" ;
+ $block = [];
}
push @$retseq, $seq2->[$_[1]]
};
@@ -3916,7 +3956,7 @@ sub linediff {
my $keyfunc = sub { join(" ",split(" ",shift())) };
traverse_sequences($seq1,$seq2, { MATCH=>$match, DISCARD_A=>$discard, DISCARD_B=>$add }, $keyfunc );
- push @$retseq, @$block if scalar @$block;
+ push @$retseq, @$block if scalar @$block;
return wantarray ? @$retseq : $retseq ;
}
@@ -3926,23 +3966,23 @@ sub linediff {
# init_regex_arr_data(\@array,"TOKEN INIT")
# scans DATA file handel for line "%% TOKEN INIT" line
# then appends each line not beginning with % into array (as a quoted regex)
-# This is used for command lists and configuration variables, but the processing is slightly
-# different:
+# This is used for command lists and configuration variables, but the processing is slightly
+# different:
# For lists, the regular expression is extended to include beginning (^) and end ($) markers, to require full-string matching
# For configuration variables (and all others), simply an unadorned list is copied
sub init_regex_arr_data {
my ($arr,$token)=@_;
my $copy=0;
my ($mode);
- if ($token =~ m/COMMANDS/ ) {
- $mode=0; # Reading command list
+ if ($token =~ m/COMMANDS/ ) {
+ $mode=0; # Reading command list
} else {
$mode=1; # Reading configuration variables
}
while (<DATA>) {
if ( m/^%%BEGIN $token\s*$/ ) {
- $copy=1;
+ $copy=1;
next;
} elsif ( m/^%%END $token\s*$/ ) {
last; }
@@ -4023,17 +4063,18 @@ sub exetime {
sub usage {
- print STDERR <<"EOF";
+ print STDERR <<"EOF";
Usage: $0 [options] old.tex new.tex > diff.tex
-Compares two latex files and writes tex code to stdout, which has the same format as new.tex but
+Compares two latex files and writes tex code to stdout, which has the same format as new.tex but
has all changes relative to old.tex marked up or commented. Note that old.tex and new.tex need to
-be real files (not pipes or similar) as they are opened twice.
+be real files (not pipes or similar) as they are opened twice.
--type=markupstyle
-t markupstyle Add code to preamble for selected markup style
- Available styles: UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
+ Available styles: UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT
+ LUAUNDERLINE
[ Default: UNDERLINE ]
--subtype=markstyle
@@ -4044,7 +4085,7 @@ be real files (not pipes or similar) as they are opened twice.
* LABEL subtype is deprecated
--floattype=markstyle
--f markstyle Add code to preamble for selected style which
+-f markstyle Add code to preamble for selected style which
replace standard marking and markup commands within floats
(e.g., marginal remarks cause an error within floats
so marginal marking can be disabled thus)
@@ -4053,11 +4094,11 @@ be real files (not pipes or similar) as they are opened twice.
--encoding=enc
-e enc Specify encoding of old.tex and new.tex. Typical encodings are
- ascii, utf8, latin1, latin9. A list of available encodings can be
- obtained by executing
+ ascii, utf8, latin1, latin9. A list of available encodings can be
+ obtained by executing
perl -MEncode -e 'print join ("\\n",Encode->encodings( ":all" )) ;'
[Default encoding is utf8 unless the first few lines of the preamble contain
- an invocation "\\usepackage[..]{inputenc} in which case the
+ an invocation "\\usepackage[..]{inputenc} in which case the
encoding chosen by this command is asssumed. Note that ASCII (standard
latex) is a subset of utf8]
@@ -4074,22 +4115,22 @@ be real files (not pipes or similar) as they are opened twice.
--exclude-safecmd=exclude-file
--exclude-safecmd="cmd1,cmd2,..."
--A exclude-file
+-A exclude-file
--replace-safecmd=replace-file
--append-safecmd=append-file
--append-safecmd="cmd1,cmd2,..."
-a append-file Exclude from, replace or append to the list of regex
- matching commands which are safe to use within the
+ matching commands which are safe to use within the
scope of a \\DIFadd or \\DIFdel command. The file must contain
one Perl-RegEx per line (Comment lines beginning with # or % are
ignored). A literal comma within the comma-separated list must be
- escaped thus "\\,", Note that the RegEx needs to match the whole of
+ escaped thus "\\,", Note that the RegEx needs to match the whole of
the token, i.e., /^regex\$/ is implied and that the initial
"\\" of the command is not included. The --exclude-safecmd
- and --append-safecmd options can be combined with the --replace-safecmd
+ and --append-safecmd options can be combined with the --replace-safecmd
option and can be used repeatedly to add cumulatively to the lists.
---exclude-textcmd=exclude-file
+--exclude-textcmd=exclude-file
--exclude-textcmd="cmd1,cmd2,..."
-X exclude-file
--replace-textcmd=replace-file
@@ -4105,7 +4146,7 @@ be real files (not pipes or similar) as they are opened twice.
Replace or append to the list of regex matching commands
whose last argument is text but which require a particular
context to work, e.g. \\caption will only work within a figure
- or table. These commands behave like text commands, except when
+ or table. These commands behave like text commands, except when
they occur in a deleted section, when they are disabled, but their
argument is shown as deleted text.
@@ -4115,7 +4156,7 @@ be real files (not pipes or similar) as they are opened twice.
As corresponding commands for context1. The only difference is that
context2 commands are completely disabled in deleted sections, including
their arguments.
- context2 commands are also the only commands in the preamble, whose argument will
+ context2 commands are also the only commands in the preamble, whose argument will
be processed in word-by-word mode (which only works, if they occur no more than
once in the preamble).
@@ -4124,15 +4165,15 @@ be real files (not pipes or similar) as they are opened twice.
--append-mboxsafecmd=append-file
--append-mboxsafecmd="cmd1,cmd2,..."
Define safe commands, which additionally need to be protected by encapsulating
- in an \\mbox{..}. This is sometimes needed to get around incompatibilities
+ in an \\mbox{..}. This is sometimes needed to get around incompatibilities
between external packages and the ulem package, which is used for highlighting
in the default style UNDERLINE as well as CULINECHBAR CFONTSTRIKE
-
+
--config var1=val1,var2=val2,...
-c var1=val1,.. Set configuration variables.
--c configfile Available variables:
+-c configfile Available variables:
ARRENV (RegEx)
COUNTERCMD (RegEx)
FLOATENV (RegEx)
@@ -4151,15 +4192,15 @@ be real files (not pipes or similar) as they are opened twice.
--add-to-config varenv1=pattern1,varenv2=pattern2
For configuration variables containing a regular expression (essentially those ending
- in ENV, and COUNTERCMD) this provides an alternative way to modify the configuration
+ in ENV, and COUNTERCMD) this provides an alternative way to modify the configuration
variables. Instead of setting the complete pattern, with this option it is possible to add an
alternative pattern. varenv must be one of the variables listed above that take a regular
- expression as argument, and pattern is any regular expression (which might need to be
+ expression as argument, and pattern is any regular expression (which might need to be
protected from the shell by quotation). Several patterns can be added at once by using semi-colons
to separate them, e.g. --add-to-config "LISTENV=myitemize;myenumerate,COUNTERCMD=endnote"
--packages=pkg1,pkg2,..
- Tell latexdiff that .tex file is processed with the packages in list
+ Tell latexdiff that .tex file is processed with the packages in list
loaded. This is normally not necessary if the .tex file includes the
preamble, as the preamble is automatically scanned for \\usepackage commands.
Use of the --packages option disables automatic scanning, so if for any
@@ -4180,57 +4221,57 @@ be real files (not pipes or similar) as they are opened twice.
--show-all Show all of the above
- NB For all --show commands, no old.tex or new.tex file needs to be given, and no
+ NB For all --show commands, no old.tex or new.tex file needs to be given, and no
differencing takes place.
Other configuration options:
--allow-spaces Allow spaces between bracketed or braced arguments to commands
- [Default requires arguments to directly follow each other without
+ [Default requires arguments to directly follow each other without
intervening spaces]
--math-markup=level Determine granularity of markup in displayed math environments:
Possible values for level are (both numerical and text labels are acceptable):
- off or 0: suppress markup for math environments. Deleted equations will not
- appear in diff file. This mode can be used if all the other modes
+ off or 0: suppress markup for math environments. Deleted equations will not
+ appear in diff file. This mode can be used if all the other modes
cause invalid latex code.
whole or 1: Differencing on the level of whole equations. Even trivial changes
- to equations cause the whole equation to be marked changed. This
- mode can be used if processing in coarse or fine mode results in
+ to equations cause the whole equation to be marked changed. This
+ mode can be used if processing in coarse or fine mode results in
invalid latex code.
coarse or 2: Detect changes within equations marked up with a coarse
- granularity; changes in equation type (e.g.displaymath to equation)
+ granularity; changes in equation type (e.g.displaymath to equation)
appear as a change to the complete equation. This mode is recommended
for situations where the content and order of some equations are still
being changed. [Default]
fine or 3: Detect small change in equations and mark up and fine granularity.
This mode is most suitable, if only minor changes to equations are
- expected, e.g. correction of typos.
+ expected, e.g. correction of typos.
--graphics-markup=level Change highlight style for graphics embedded with \\includegraphics commands
Possible values for level:
none,off or 0: no highlighting for figures
new-only or 1: surround newly added or changed figures with a blue frame [Default]
- both or 2: highlight new figures with a blue frame and show deleted figures
+ both or 2: highlight new figures with a blue frame and show deleted figures
at reduced scale, and crossed out with a red diagonal cross. Use configuration
variable SCALEDELGRAPHICS to set size of deleted figures.
- Note that changes to the optional parameters will make the figure appear as changed
+ Note that changes to the optional parameters will make the figure appear as changed
to latexdiff, and this figure will thus be highlighted.
In some circumstances "Misplaced \\noalign" errors can occur if there are certain types
- of changes in tables. In this case please use option --graphics-markup=none as a
- work-around.
+ of changes in tables. In this case please use option --graphics-markup=none as a
+ work-around.
---no-del Suppress deleted text from the diff. It is similar in effect to the BOLD style,
+--no-del Suppress deleted text from the diff. It is similar in effect to the BOLD style,
but the deleted text ist not just invisible in the output, it is also not included in the
- diff text file. This can be more robust than just making it invisible.
+ diff text file. This can be more robust than just making it invisible.
---disable-citation-markup
---disable-auto-mbox Suppress citation markup and markup of other vulnerable commands in styles
+--disable-citation-markup
+--disable-auto-mbox Suppress citation markup and markup of other vulnerable commands in styles
using ulem (UNDERLINE,FONTSTRIKE, CULINECHBAR)
(the two options are identical and are simply aliases)
--enable-citation-markup
---enforce-auto-mbox Protect citation commands and other vulnerable commands in changed sections
+--enforce-auto-mbox Protect citation commands and other vulnerable commands in changed sections
with \\mbox command, i.e. use default behaviour for ulem package for other packages
(the two options are identical and are simply aliases)
@@ -4246,14 +4287,14 @@ Miscellaneous options
--no-label Suppress inclusion of old and new file names as comment in output file
---visible-label Include old and new filenames (or labels set with --label option) as
+--visible-label Include old and new filenames (or labels set with --label option) as
visible output
--flatten Replace \\input and \\include commands within body by the content
of the files in their argument. If \\includeonly is present in the
- preamble, only those files are expanded into the document. However,
- no recursion is done, i.e. \\input and \\include commands within
- included sections are not expanded. The included files are assumed to
+ preamble, only those files are expanded into the document. However,
+ no recursion is done, i.e. \\input and \\include commands within
+ included sections are not expanded. The included files are assumed to
be located in the same directories as the old and new master files,
respectively, making it possible to organise files into old and new directories.
--flatten is applied recursively, so inputted files can contain further
@@ -4276,7 +4317,7 @@ Miscellaneous options
-h Show this help text.
--ignore-warnings Suppress warnings about inconsistencies in length between input
- and parsed strings and missing characters.
+ and parsed strings and missing characters.
--verbose
-V Output various status information to stderr during processing.
@@ -4288,10 +4329,10 @@ Internal options:
These options are mostly for automated use by latexdiff-vc. They can be used directly, but
the API should be considered less stable than for the other options.
---no-links Suppress generation of hyperreferences, used for minimal diffs
+--no-links Suppress generation of hyperreferences, used for minimal diffs
(option --only-changes of latexdiff-vc).
EOF
- exit 0;
+ exit 0;
}
=head1 NAME
@@ -4317,8 +4358,8 @@ be real files (not pipes or similar) as they are opened twice (unless C<--encodi
The program treats the preamble differently from the main document.
Differences between the preambles are found using line-based
differencing (similarly to the Unix diff command, but ignoring white
-spaces). A comment, "S<C<%DIF E<gt>>>" is appended to each added line, i.e. a
-line present in C<new.tex> but not in C<old.tex>. Discarded lines
+spaces). A comment, "S<C<%DIF E<gt>>>" is appended to each added line, i.e. a
+line present in C<new.tex> but not in C<old.tex>. Discarded lines
are deactivated by prepending "S<C<%DIF E<lt>>>". Changed blocks are preceded by
comment lines giving information about line numbers in the original files. Where there are insignificant
differences, the resulting file C<diff.tex> will be similar to
@@ -4371,7 +4412,7 @@ curly braces immediately following a command (i.e. a sequence of
letters beginning with a backslash) are arguments for that command.
As a restriction to condition 1 above it is thus necessary to surround
all arguments with curly braces, and to not insert
-extraneous spaces. For example, write
+extraneous spaces. For example, write
\section{\textem{This is an emphasized section title}}
@@ -4403,7 +4444,7 @@ but the choice is yours. Any markup within the environment will be
removed, and generally everything within the environment will just be
taken from the new file.
-It is also possible to difference files which do not have a preamble.
+It is also possible to difference files which do not have a preamble.
In this case, the file is processed in the main document
mode, but the definitions of the markup commands are not inserted.
@@ -4421,7 +4462,7 @@ the scope of C<\DIFadd>. Added comments are marked by prepending
Within deleted blocks text is highlighted with C<\DIFdel>. Deleted
comments are marked by prepending "S<C<%DIF E<lt> >>". Non-safe command
-and curly braces within deleted blocks are commented out with
+and curly braces within deleted blocks are commented out with
"S<C<%DIFDELCMD E<lt> >>".
@@ -4431,7 +4472,7 @@ and curly braces within deleted blocks are commented out with
=head2 Preamble
The following options determine the visual markup style by adding the appropriate
-command definitions to the preamble. See the end of this section for a description of
+command definitions to the preamble. See the end of this section for a description of
available styles.
=over 4
@@ -4441,15 +4482,16 @@ B<-t markupstyle>
Add code to preamble for selected markup style. This option defines
C<\DIFadd> and C<\DIFdel> commands.
-Available styles:
+Available styles:
-C<UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
-CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT>
+C<UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
+CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT
+LUAUNDERLINE>
[ Default: C<UNDERLINE> ]
=item B<--subtype=markstyle> or
-B<-s markstyle>
+B<-s markstyle>
Add code to preamble for selected style for bracketing
commands (e.g. to mark changes in margin). This option defines
@@ -4462,27 +4504,27 @@ Available styles: C<SAFE MARGIN COLOR DVIPSCOL ZLABEL ONLYCHANGEDPAGE (LABEL)*>
=item B<--floattype=markstyle> or
B<-f markstyle>
-Add code to preamble for selected style which
+Add code to preamble for selected style which
replace standard marking and markup commands within floats
(e.g., marginal remarks cause an error within floats
-so marginal marking can be disabled thus). This option defines all
+so marginal marking can be disabled thus). This option defines all
C<\DIF...FL> commands.
Available styles: C<FLOATSAFE TRADITIONALSAFE IDENTICAL>
[ Default: C<FLOATSAFE> ]
-=item B<--encoding=enc> or
+=item B<--encoding=enc> or
B<-e enc>
Specify encoding of old.tex and new.tex. Typical encodings are
-C<ascii>, C<utf8>, C<latin1>, C<latin9>. A list of available encodings can be
-obtained by executing
+C<ascii>, C<utf8>, C<latin1>, C<latin9>. A list of available encodings can be
+obtained by executing
C<perl -MEncode -e 'print join ("\n",Encode->encodings( ":all" )) ;' >
If this option is used, then old.tex, new.tex are only opened once.
[Default encoding is utf8 unless the first few lines of the preamble contain
-an invocation C<\usepackage[..]{inputenc}> in which case the
+an invocation C<\usepackage[..]{inputenc}> in which case the
encoding chosen by this command is asssumed. Note that ASCII (standard
latex) is a subset of utf8]
@@ -4499,7 +4541,7 @@ C<\DIFaddbeginFL, \DIFaddendFL, \DIFaddFL{..},
(If this option is set B<-t>, B<-s>, and B<-f> options
are ignored.)
-=item B<--packages=pkg1,pkg2,..>
+=item B<--packages=pkg1,pkg2,..>
Tell latexdiff that .tex file is processed with the packages in list
loaded. This is normally not necessary if the .tex file includes the
@@ -4510,13 +4552,13 @@ The following packages trigger special behaviour:
=over 8
-=item C<endfloat>
+=item C<endfloat>
Ensure that C<\begin{figure}> and C<\end{figure}> always appear by themselves on a line.
=item C<hyperref>
-Change name of C<\DIFadd> and C<\DIFdel> commands to C<\DIFaddtex> and C<\DIFdeltex> and
+Change name of C<\DIFadd> and C<\DIFdel> commands to C<\DIFaddtex> and C<\DIFdeltex> and
define new C<\DIFadd> and C<\DIFdel> commands, which provide a wrapper for these commands,
using them for the text but not for the link defining command (where any markup would cause
errors).
@@ -4568,17 +4610,17 @@ B<-A exclude-file> or B<--exclude-safecmd="cmd1,cmd2,...">
=item B<--replace-safecmd=replace-file>
-=item B<--append-safecmd=append-file> or
+=item B<--append-safecmd=append-file> or
B<-a append-file> or B<--append-safecmd="cmd1,cmd2,...">
Exclude from, replace or append to the list of regular expressions (RegEx)
-matching commands which are safe to use within the
+matching commands which are safe to use within the
scope of a C<\DIFadd> or C<\DIFdel> command. The file must contain
one Perl-RegEx per line (Comment lines beginning with # or % are
-ignored). Note that the RegEx needs to match the whole of
+ignored). Note that the RegEx needs to match the whole of
the token, i.e., /^regex$/ is implied and that the initial
-"\" of the command is not included.
-The B<--exclude-safecmd> and B<--append-safecmd> options can be combined with the -B<--replace-safecmd>
+"\" of the command is not included.
+The B<--exclude-safecmd> and B<--append-safecmd> options can be combined with the -B<--replace-safecmd>
option and can be used repeatedly to add cumulatively to the lists.
B<--exclude-safecmd>
and B<--append-safecmd> can also take a comma separated list as input. If a
@@ -4591,7 +4633,7 @@ B<-X exclude-file> or B<--exclude-textcmd="cmd1,cmd2,...">
=item B<--replace-textcmd=replace-file>
-=item B<--append-textcmd=append-file> or
+=item B<--append-textcmd=append-file> or
B<-x append-file> or B<--append-textcmd="cmd1,cmd2,...">
Exclude from, replace or append to the list of regular expressions
@@ -4599,7 +4641,7 @@ matching commands whose last argument is text. See
entry for B<--exclude-safecmd> directly above for further details.
-=item B<--replace-context1cmd=replace-file>
+=item B<--replace-context1cmd=replace-file>
=item B<--append-context1cmd=append-file> or
@@ -4608,11 +4650,11 @@ entry for B<--exclude-safecmd> directly above for further details.
Replace or append to the list of regex matching commands
whose last argument is text but which require a particular
context to work, e.g. C<\caption> will only work within a figure
-or table. These commands behave like text commands, except when
+or table. These commands behave like text commands, except when
they occur in a deleted section, when they are disabled, but their
argument is shown as deleted text.
-=item B<--replace-context2cmd=replace-file>
+=item B<--replace-context2cmd=replace-file>
=item B<--append-context2cmd=append-file> or
@@ -4622,9 +4664,9 @@ As corresponding commands for context1. The only difference is that
context2 commands are completely disabled in deleted sections, including
their arguments.
-context2 commands are also the only commands in the preamble, whose argument will be processed in
+context2 commands are also the only commands in the preamble, whose argument will be processed in
word-by-word mode (which only works, if they occur no more than once in the preamble). The algorithm currently cannot cope with repeated context2 commands in the preamble, as they occur e.g. for the C<\author> argument in some journal styles (not in the standard styles, though
-If such a repetition is detected, the whole preamble will be processed in line-by-line mode. In such a case, use C<--replace-context2cmd> option to just select the commands, which should be processed and are not used repeatedly in the preamble.
+If such a repetition is detected, the whole preamble will be processed in line-by-line mode. In such a case, use C<--replace-context2cmd> option to just select the commands, which should be processed and are not used repeatedly in the preamble.
@@ -4633,7 +4675,7 @@ If such a repetition is detected, the whole preamble will be processed in line-b
=item B<--append-mboxsafecmd=append-file> or B<--append-mboxsafecmd="cmd1,cmd2,...">
Define safe commands, which additionally need to be protected by encapsulating
-in an C<\mbox{..}>. This is sometimes needed to get around incompatibilities
+in an C<\mbox{..}>. This is sometimes needed to get around incompatibilities
between external packages and the ulem package, which is used for highlighting
in the default style UNDERLINE as well as CULINECHBAR CFONTSTRIKE
@@ -4647,7 +4689,7 @@ in the default style UNDERLINE as well as CULINECHBAR CFONTSTRIKE
Set configuration variables. The option can be repeated to set different
variables (as an alternative to the comma-separated list).
-Available variables (see below for further explanations):
+Available variables (see below for further explanations):
C<ARRENV> (RegEx)
@@ -4677,10 +4719,10 @@ C<SCALEDELGRAPHICS> (Float)
=item B<--add-to-config varenv1=pattern1,varenv2=pattern2,...>
For configuration variables, which are a regular expression (essentially those ending
-in ENV, COUNTERCMD and CUSTOMDIFCMD, see list above) this option provides an alternative way to modify the configuration
+in ENV, COUNTERCMD and CUSTOMDIFCMD, see list above) this option provides an alternative way to modify the configuration
variables. Instead of setting the complete pattern, with this option it is possible to add an
alternative pattern. C<varenv> must be one of the variables listed above that take a regular
-expression as argument, and pattern is any regular expression (which might need to be
+expression as argument, and pattern is any regular expression (which might need to be
protected from the shell by quotation). Several patterns can be added at once by using semi-colons
to separate them, e.g. C<--add-to-config "LISTENV=myitemize;myenumerate,COUNTERCMD=endnote">
@@ -4700,7 +4742,7 @@ Show values of configuration variables.
Combine all --show commands.
-NB For all --show commands, no C<old.tex> or C<new.tex> file needs to be specified, and no
+NB For all --show commands, no C<old.tex> or C<new.tex> file needs to be specified, and no
differencing takes place.
=back
@@ -4717,29 +4759,29 @@ might get lumpeded with preceding commands) so should only be used if the
default produces erroneous results. (Default requires arguments to
directly follow each other without intervening spaces).
-=item B<--math-markup=level>
+=item B<--math-markup=level>
-Determine granularity of markup in displayed math environments:
+Determine granularity of markup in displayed math environments:
Possible values for level are (both numerical and text labels are acceptable):
-C<off> or C<0>: suppress markup for math environments. Deleted equations will not
-appear in diff file. This mode can be used if all the other modes
+C<off> or C<0>: suppress markup for math environments. Deleted equations will not
+appear in diff file. This mode can be used if all the other modes
cause invalid latex code.
C<whole> or C<1>: Differencing on the level of whole equations. Even trivial changes
-to equations cause the whole equation to be marked changed. This
-mode can be used if processing in coarse or fine mode results in
+to equations cause the whole equation to be marked changed. This
+mode can be used if processing in coarse or fine mode results in
invalid latex code.
C<coarse> or C<2>: Detect changes within equations marked up with a coarse
-granularity; changes in equation type (e.g.displaymath to equation)
+granularity; changes in equation type (e.g.displaymath to equation)
appear as a change to the complete equation. This mode is recommended
for situations where the content and order of some equations are still
being changed. [Default]
C<fine> or C<3>: Detect small change in equations and mark up at fine granularity.
This mode is most suitable, if only minor changes to equations are
-expected, e.g. correction of typos.
+expected, e.g. correction of typos.
=item B<--graphics-markup=level>
@@ -4751,33 +4793,33 @@ C<none>, C<off> or C<0>: no highlighting for figures
C<new-only> or C<1>: surround newly added or changed figures with a blue frame [Default if graphicx package loaded]
-C<both> or C<2>: highlight new figures with a blue frame and show deleted figures at reduced
+C<both> or C<2>: highlight new figures with a blue frame and show deleted figures at reduced
scale, and crossed out with a red diagonal cross. Use configuration
variable SCALEDELGRAPHICS to set size of deleted figures.
-Note that changes to the optional parameters will make the figure appear as changed
+Note that changes to the optional parameters will make the figure appear as changed
to latexdiff, and this figure will thus be highlighted.
In some circumstances "Misplaced \noalign" error can occur if there are certain types
-of changes in tables. In this case please use C<--graphics-markup=none> as a
-work-around.
+of changes in tables. In this case please use C<--graphics-markup=none> as a
+work-around.
-=item B<--no-del>
+=item B<--no-del>
-Suppress deleted text from the diff. It is similar in effect to the BOLD style,
-but the deleted text ist not just invisible in the output, it is also not included in the diff text file.
-This can be more robust than just making it invisible.
+Suppress deleted text from the diff. It is similar in effect to the BOLD style,
+but the deleted text ist not just invisible in the output, it is also not included in the diff text file.
+This can be more robust than just making it invisible.
=item B<--disable-citation-markup> or B<--disable-auto-mbox>
-Suppress citation markup and markup of other vulnerable commands in styles
+Suppress citation markup and markup of other vulnerable commands in styles
using ulem (UNDERLINE,FONTSTRIKE, CULINECHBAR)
(the two options are identical and are simply aliases)
=item B<--enable-citation-markup> or B<--enforce-auto-mbox>
-Protect citation commands and other vulnerable commands in changed sections
+Protect citation commands and other vulnerable commands in changed sections
with C<\mbox> command, i.e. use default behaviour for ulem package for other packages
(the two options are identical and are simply aliases)
@@ -4823,18 +4865,18 @@ Suppress inclusion of old and new file names as comment in output file
=item B<--visible-label>
-Include old and new filenames (or labels set with C<--label> option) as
+Include old and new filenames (or labels set with C<--label> option) as
visible output.
=item B<--flatten>
Replace C<\input> and C<\include> commands within body by the content
of the files in their argument. If C<\includeonly> is present in the
-preamble, only those files are expanded into the document. However,
-no recursion is done, i.e. C<\input> and C<\include> commands within
-included sections are not expanded. The included files are assumed to
+preamble, only those files are expanded into the document. However,
+no recursion is done, i.e. C<\input> and C<\include> commands within
+included sections are not expanded. The included files are assumed to
be located in the same directories as the old and new master files,
-respectively, making it possible to organise files into old and new directories.
+respectively, making it possible to organise files into old and new directories.
--flatten is applied recursively, so inputted files can contain further
C<\input> statements. Also handles files included by the import package
(C<\import> and C<\subimport>), and C<\subfile> command.
@@ -4881,7 +4923,7 @@ Suppress generation of hyperreferences, used for minimal diffs (option --only-ch
=back
-=head2 Predefined styles
+=head2 Predefined styles
=head2 Major types
@@ -4894,9 +4936,14 @@ The major type determine the markup of plain text and some selected latex comman
Added text is wavy-underlined and blue, discarded text is struck out and red
(Requires color and ulem packages). Overstriking does not work in displayed math equations such that deleted parts of equation are underlined, not struck out (this is a shortcoming inherent to the ulem package).
+=item C<LUAUNDERLINE>
+
+Added text is underlined and blue, discarded text is struck out and red
+(Requires lua-ul package + LuaLaTeX).
+
=item C<CTRADITIONAL>
-Added text is blue and set in sans-serif, and a red footnote is created for each discarded
+Added text is blue and set in sans-serif, and a red footnote is created for each discarded
piece of text. (Requires color package)
=item C<TRADITIONAL>
@@ -4937,13 +4984,13 @@ Added text is set in bold face, discarded is not shown. (also see --no-del optio
=item C<PDFCOMMENT>
-The pdfcomment package is used to underline new text, and mark deletions with a PDF comment. Note that this markup might appear differently or not at all based on the pdf viewer used. The viewer with best support for pdf markup is probably acroread. This style is only recommended if the number of differences is small.
+The pdfcomment package is used to underline new text, and mark deletions with a PDF comment. Note that this markup might appear differently or not at all based on the pdf viewer used. The viewer with best support for pdf markup is probably acroread. This style is only recommended if the number of differences is small.
=back
=head2 Subtypes
-The subtype defines the commands that are inserted at the begin and end of added or discarded blocks, irrespectively of whether these blocks contain text or commands (Defined commands: C<\DIFaddbegin, \DIFaddend, \DIFdelbegin, \DIFdelend>)
+The subtype defines the commands that are inserted at the begin and end of added or discarded blocks, irrespectively of whether these blocks contain text or commands (Defined commands: C<\DIFaddbegin, \DIFaddend, \DIFdelbegin, \DIFdelend>)
=over 10
@@ -4961,7 +5008,7 @@ from the intended position.
An alternative way of marking added passages in blue, and deleted ones in red.
(It is recommeneded to use instead the main types to effect colored markup,
-although in some cases coloring with dvipscol can be more complete, for example
+although in some cases coloring with dvipscol can be more complete, for example
with citation commands).
=item C<DVIPSCOL>
@@ -4976,12 +5023,12 @@ although in some cases coloring with dvipscol can be more complete).
can be used to highlight only changed pages, but requires post-processing. It is recommend to not call this option manually but use C<latexdiff-vc> with C<--only-changes> option. Alternatively, use the script given within preamble of diff files made using this style.
-=item C<ONLYCHANGEDPAGE>
+=item C<ONLYCHANGEDPAGE>
also highlights changed pages, without the need for post-processing, but might not work reliably if
there is floating material (figures, tables).
-=item C<LABEL>
+=item C<LABEL>
is similar to C<ZLABEL>, but does not need the zref package and works less reliably (deprecated).
@@ -4989,7 +5036,7 @@ is similar to C<ZLABEL>, but does not need the zref package and works less relia
=head2 Float Types
-Some of the markup used in the main text might cause problems when used within
+Some of the markup used in the main text might cause problems when used within
floats (e.g. figures or tables). For this reason alternative versions of all
markup commands are used within floats. The float type defines these alternative commands.
@@ -5016,7 +5063,7 @@ Make no difference between the main text and floats.
=item C<ARRENV>
-If a match to C<ARRENV> is found within an inline math environment within a deleted or added block, then the inlined math
+If a match to C<ARRENV> is found within an inline math environment within a deleted or added block, then the inlined math
is surrounded by C<\mbox{>...C<}>. This is necessary as underlining does not work within inlined array environments.
[ Default: C<ARRENV>=S<C<(?:array|[pbvBV]matrix)> >
@@ -5036,9 +5083,9 @@ C<|subsubsection|paragraph|subparagraph)> ]
This option is for advanced users and allows definition of special versions of commands, which do not work as safe commands.
Commands in C<CUSTOMDIFCMD> that occur in added or deleted blocks will be given an ADD or DEL prefix.
-The prefixed versions of the command must be defined in the preamble, either by putting them
+The prefixed versions of the command must be defined in the preamble, either by putting them
in the preamble of at least the new file, or by creating a custom preamble file (Option --preamble).
-For example the command C<\blindtext> (from package blindtext) does not interact well with underlining, so that
+For example the command C<\blindtext> (from package blindtext) does not interact well with underlining, so that
for the standard markup type, it is not satisfactory to define it as a safe command. Instead, a customised versions
without underlining can be defined in the preamble:
@@ -5052,7 +5099,7 @@ and then latexdiff should be invoked with the option C<-c CUSTOMDIFCMD=blindtext
=item C<FLOATENV>
-Environments whose name matches the regular expression in C<FLOATENV> are
+Environments whose name matches the regular expression in C<FLOATENV> are
considered floats. Within these environments, the I<latexdiff> markup commands
are replaced by their FL variaties.
@@ -5101,17 +5148,17 @@ If C<--graphics-markup=both> is chosen, C<SCALEDELGRAPHICS> is the factor, by wh
=item C<VERBATIMENV>
-RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of these environments will not be processed in any way:
+RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of these environments will not be processed in any way:
deleted content is commented out, new content is not marked up
[ Default: S<C<comment> > ]
=item C<VERBATIMLINEENV>
-RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of environments described by VERBATIMLINEENV are compared in
+RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of environments described by VERBATIMLINEENV are compared in
line mode, and changes are marked up using the listings package. The markup style is set based on the chosen mains markup type (Option -t), or on an analysis
of the preamble.
-Note that "listings.sty" must be installed. If this file is not found the fallback solution is to
+Note that "listings.sty" must be installed. If this file is not found the fallback solution is to
treat VERBATIMLINEENV environments treated exactly the same way as VERBATIMENV environments.
[ Default: S<C<(?:verbatim[*]?|lstlisting> > ]
@@ -5122,30 +5169,40 @@ treat VERBATIMLINEENV environments treated exactly the same way as VERBATIMENV e
=over 10
-=item Citations result in overfull boxes
+=item Changed citations result in overfull boxes
There is an incompatibility between the C<ulem> package, which C<latexdiff> uses for underlining and striking out in the UNDERLINE style,
-the default style, and the way citations are generated. In order to be able to mark up citations properly, they are enclosed with an C<\mbox>
-command. As mboxes cannot be broken across lines, this procedure frequently results in overfull boxes, possibly obscuring the content as it extends beyond the right margin. The same occurs for some other packages (e.g., siunitx). If this is a problem, you have two possibilities.
+the default style, and the way citations are generated. In order to be able to mark up citations properly, they are enclosed with an C<\mbox>
+command. As mboxes cannot be broken across lines, this procedure frequently results in overfull boxes, possibly obscuring the content as it extends beyond the right margin. The same occurs for some other packages (e.g., siunitx). If this is a problem, you have several possibilities.
1. Use C<CFONT> type markup (option C<-t CFONT>): If this markup is chosen, then changed citations are no longer marked up
-with the wavy line (additions) or struck out (deletions), but are still highlighted in the appropriate color, and deleted text is shown with a different font. Other styles not using the C<ulem> package will also work.
+with the wavy line (additions) or struck out (deletions), but are still highlighted in the appropriate color, and deleted text is shown with a different font. Other styles not using the C<ulem> package will also work.
2. Choose option C<--disable-citation-markup> which turns off the marking up of citations: deleted citations are no longer shown, and
-added citations are shown without markup. (This was the default behaviour of latexdiff at versions 0.6 and older)
-
+added citations are shown without markup. (This was the default behaviour of latexdiff at versions 0.6 and older).
For custom packages you can define the commands which need to be protected by C<\mbox> with C<--append-mboxsafecmd> and C<--excludemboxsafecmd> options
(submit your lists of command as feature request at github page to set the default behaviour of future versions, see section 6)
-=item Changes in complicated mathematical equations result in latex processing errors
+3. If you are using luatex >= 1.12.0 you can use option LUAUNDERLINE that uses lua-ul instead of ulem for underlining, which does not have this problem (experimental feature).
+
+=item Changes in complicated mathematical equations result in latex processing errors.
+
+Try option C<--math-markup=whole>. If even that fails, you can turn off mark up for equations with C<--math-markup=off>.
-Try options C<--math-markup=whole>. If even that fails, you can turn off mark up for equations with C<--math-markup=off>.
+=item Deleted parts in equations are not struck out but underlined.
-=item How can I just show the pages where changes had been made
+This is a limitation of the ulem package that implements the strike-out. If you use the amsmath package, then the strike-out command is redefined in such a way that deleted passages are wrapped with C<\text> command; adding C<\usepackage{amsmath}> to your preamble will trigger this behaviour. (If amsmath is not included directly, but imported by another package, latexdiff will not be able to detect its availability; in this case you can give latexdiff a hint with option C<--packages=amsmath>.
-Use options -C<-s ZLABEL> (some postprocessing required) or C<-s ONLYCHANGEDPAGE>. C<latexdiff-vc --ps|--pdf> with C<--only-changes> option takes care of
+
+=item How can I just show the pages where changes had been made?
+
+Use options C<--s ZLABEL> (some postprocessing required) or C<-s ONLYCHANGEDPAGE>. C<latexdiff-vc --ps|--pdf> with C<--only-changes> option takes care of
the post-processing for you (requires zref package to be installed).
+=item The character encoding breaks when running latexdiff from powershell.
+
+This problem is not limited to C<latexdiff> and has to do with the default settings of C<powershell> in Windows. It is recommended to use C<cmd> instead.
+
=back
=head1 BUGS
@@ -5158,13 +5215,13 @@ different numbers of inter-argument spaces are treated as significant.
=back
-Please submit bug reports using the issue tracker of the github repository page I<https://github.com/ftilmann/latexdiff.git>,
+Please submit bug reports using the issue tracker of the github repository page I<https://github.com/ftilmann/latexdiff.git>,
or send them to I<tilmann -- AT -- gfz-potsdam.de>. Include the version number of I<latexdiff>
(from comments at the top of the source or use B<--version>). If you come across latex
files that are error-free and conform to the specifications set out
above, and whose differencing still does not result in error-free
latex, please send me those files, ideally edited to only contain the
-offending passage as long as that still reproduces the problem. If your
+offending passage as long as that still reproduces the problem. If your
file relies on non-standard class files, you must include those. I will not
look at examples where I have trouble to latex the original files.
@@ -5175,24 +5232,24 @@ L<latexrevise>, L<latexdiff-vc>
=head1 PORTABILITY
I<latexdiff> does not make use of external commands and thus should run
-on any platform supporting Perl 5.6 or higher. If files with encodings
+on any platform supporting Perl 5.6 or higher. If files with encodings
other than ASCII or UTF-8 are processed, Perl 5.8 or higher is required.
The standard version of I<latexdiff> requires installation of the Perl package
-C<Algorithm::Diff> (available from I<www.cpan.org> -
+C<Algorithm::Diff> (available from I<www.cpan.org> -
I<http://search.cpan.org/~nedkonz/Algorithm-Diff-1.15>) but a stand-alone
version, I<latexdiff-so>, which has this package inlined, is available, too.
I<latexdiff-fast> requires the I<diff> command to be present.
=head1 AUTHOR
-Version 1.3.3
-Copyright (C) 2004-2022 Frederik Tilmann
+Version 1.3.4
+Copyright (C) 2004-2024 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
-Contributors of fixes and additions: V. Kuhlmann, J. Paisley, N. Becker, T. Doerges, K. Huebner,
+Contributors of fixes and additions: V. Kuhlmann, J. Paisley, N. Becker, T. Doerges, K. Huebner,
T. Connors, Sebastian Gouezel and many others.
Thanks to the many people who sent in bug reports, feature suggestions, and other feedback.
@@ -5463,13 +5520,14 @@ value
underline
sqrt
(SUPER|SUB)SCRIPT
-%%END TEXT COMMANDS
+%%END TEXT COMMANDS
%%BEGIN CONTEXT1 COMMANDS
% Regex matching commands with a text argument (leave out the \), which will fail out of context. These commands behave like text commands, except when they occur in a deleted section, where they are disabled, but their argument is shown as deleted text.
caption
subcaption
-%%END CONTEXT1 COMMANDS
+multicolumn
+%%END CONTEXT1 COMMANDS
%%BEGIN CONTEXT2 COMMANDS
% Regex matching commands with a text argument (leave out the \), which will fail out of context. As corresponding commands for context1. The only difference is that context2 commands are completely disabled in deleted sections, including their arguments.
@@ -5477,7 +5535,7 @@ title
author
date
institute
-%%END CONTEXT2 COMMANDS
+%%END CONTEXT2 COMMANDS
%% CONFIGURATION variabe defaults
%%BEGIN LISTENV CONFIG
@@ -5555,9 +5613,16 @@ verbatim[*]?
\RequirePackage[normalem]{ulem}
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}}
-\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}
+\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}
%DIF END UNDERLINE PREAMBLE
+%DIF LUAUNDERLINE PREAMBLE
+\RequirePackage{lua-ul}
+\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
+\providecommand{\DIFadd}[1]{{\protect\color{blue}\underLine{#1}}}
+\providecommand{\DIFdel}[1]{{\protect\color{red}\strikeThrough{#1}}}
+%DIF END LUAUNDERLINE PREAMBLE
+
%DIF CTRADITIONAL PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
\RequirePackage[stable]{footmisc}
@@ -5729,7 +5794,7 @@ verbatim[*]?
% To show only pages with changes (dvips/dvipdf)
% latex diff.tex
% latex diff.tex
-% dvips -pp `perl -lne 'if (m/\\newlabel{DIFchg[be]\d*}{{.*}{(.*)}}/) { print $1 }' diff.aux | uniq | tr -s \\n ','` diff.dvi
+% dvips -pp `perl -lne 'if (m/\\newlabel{DIFchg[be]\d*}{{.*}{(.*)}}/) { print $1 }' diff.aux | uniq | tr -s \\n ','` diff.dvi
\typeout{Check comments in preamble of output for instructions how to show only pages where changes have been made}
\usepackage[user,abspage]{zref}
\newcount\DIFcounterb
@@ -5749,10 +5814,10 @@ verbatim[*]?
\RequirePackage{etoolbox}
\RequirePackage{zref}
% redefine label command to write immediately to aux file - page references will be lost
-\makeatletter \let\oldlabel\label% Store \label
-\renewcommand{\label}[1]{% Update \label to write to the .aux immediately
-\zref@wrapper@immediate{\oldlabel{#1}}}
-\makeatother
+\makeatletter \let\oldlabel\label% Store \label
+\renewcommand{\label}[1]{% Update \label to write to the .aux immediately
+\zref@wrapper@immediate{\oldlabel{#1}}}
+\makeatother
\newbool{DIFkeeppage}
\newbool{DIFchange}
\boolfalse{DIFkeeppage}
@@ -5770,7 +5835,7 @@ verbatim[*]?
\providecommand{\DIFmodend}{\global\booltrue{DIFkeeppage}\global\boolfalse{DIFchange}}
%DIF END ONLYCHANGEDPAGE PREAMBLE
-%% FLOAT TYPES
+%% FLOAT TYPES
%DIF FLOATSAFE PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}}
@@ -5802,7 +5867,7 @@ verbatim[*]?
%DIF END TRADITIONALSAFE PREAMBLE
% see:
-% http://tex.stackexchange.com/questions/47351/can-i-redefine-a-command-to-contain-itself
+% http://tex.stackexchange.com/questions/47351/can-i-redefine-a-command-to-contain-itself
%DIF HIGHLIGHTGRAPHICS PREAMBLE
\RequirePackage{settobox}
@@ -5848,6 +5913,15 @@ verbatim[*]?
%% SPECIAL PACKAGE PREAMBLE COMMANDS
+%% Redefine strike out command to wrap in text box if amsmath is used and markup style with ulem is used
+%DIF AMSMATHULEM PREAMBLE
+\makeatletter
+\let\sout@orig\sout
+\renewcommand{\sout}[1]{\ifmmode\text{\sout@orig{\ensuremath{#1}}}\else\sout@orig{#1}\fi}
+\makeatother
+%DIF END AMSMATHULEM PREAMBLE
+
+
% Standard \DIFadd and \DIFdel are redefined as \DIFaddtex and \DIFdeltex
% when hyperref package is included.
%DIF HYPERREF PREAMBLE
@@ -5950,7 +6024,7 @@ verbatim[*]?
%DIF END DIFCODE_BOLD
%DIF DIFCODE_PDFCOMMENT
-
+
moredelim=[il][\color{white}\tiny]{\%DIF\ <\ },
moredelim=[il][\sffamily\bfseries]{\%DIF\ >\ }
%DIF END DIFCODE_PDFCOMMENT
diff --git a/support/latexdiff/latexdiff-so b/support/latexdiff/latexdiff-so
index b3571d27b2..9ab8e4169b 100755
--- a/support/latexdiff/latexdiff-so
+++ b/support/latexdiff/latexdiff-so
@@ -25,6 +25,21 @@
#
# Note references to issue numbers are for the github repository of latexdiff: https://github.com/ftilmann/latexdiff
#
+# Version 1.3.4:
+# New features:
+# - Option to use lua-ul instead of ulem (for use with LuaLaTeX) (fix #17, #60, #188, #255, #270)
+# Enhancement
+# - If amsmath is detected as one of the included (based on idea in PR #263 contributed by github user xlucn
+# Bug fix
+# - sometimes the introduction of aux commands to show deleted lists or descriptions leaves in place empty auxiliary
+# list environments, which would cause error messages (though skipping messages would result in a correct output pdf).
+# These are now removed.
+# - add more mboxsafecmd and safecmd commands for SIunitx to stay compatible with newer versionsof SIunitx (PR #283, fixing issue #282, contributed by github user joe6302413)
+# - File added via --preamble option is no longer assumed to be ASCII, but read either with encoding as defined by --encoding option or using the encoding of the LOCALE (fixes issue #285 )
+# - multicolumn argument is now treated as text
+# - when tikz-dependency package is used, \& is no longer a safe command as it has special meaning inside dependency environment. The fix is a little of a hack as really it should only be considered unsafe within dependency environment (fixes (mostly) issue #303 )
+# - listings package had trouble with non-ASCII chars. The encoding is now set (thanks to github user anka-213 for finding this). Fixes #304
+#
# Version 1.3.3:
# New features:
# - Option --no-del to remove all deleted text (merge contributed by github user tdegeus PR #252, fixing issue #66
@@ -33,22 +48,22 @@
# - Abbreviations involving punctuations within them. They need special treatment because otherwise in some
# circumstances the gnoring of white space differences in conjunction with merging according to MINWORDSBLOCK rule
# could turn 'i.e.' into 'i.\PAR e.' (see https://github.com/ftilmann/latexdiff/issues/269). A few abbreviations
-# are now hard-coded and treated as atomic:
+# are now hard-coded and treated as atomic:
# English: i.e., e.g. Deutsch: z.B.
# (fixes issue #269)
# - In WHOLE and COARSE math modes, now properly treat math environments with arguments such as \alignat. Fixes #251
-# - For FINE math mode, multiple improvments to the processing work flow yield more robust outcomes. In particular, changes
-# to the equation type, e.g. \begin{displaymath} -> \begin{equation} without modifications now usually no longer result
-# in errors. (Partially) fixes issues #235 and #244.
-# - When encountering deleted math array environments such as align or eqnarray, rather than replacing them with a
-# fixed replacement environment (e.g. align* or eqnarray*), an asterisk is now added to the original command, which
+# - For FINE math mode, multiple improvments to the processing work flow yield more robust outcomes. In particular, changes
+# to the equation type, e.g. \begin{displaymath} -> \begin{equation} without modifications now usually no longer result
+# in errors. (Partially) fixes issues #235 and #244.
+# - When encountering deleted math array environments such as align or eqnarray, rather than replacing them with a
+# fixed replacement environment (e.g. align* or eqnarray*), an asterisk is now added to the original command, which
# in amsmath (and with eqnarray) will result in the same environment but without line numbers. Config variable MATHARRREPL
# is therefore (nearly) redundant, and a depracation warning is given when it is set. Reference to MATHARRREPL are have
# been removed from the manual (there is one exception, when it's still being used: sometimes latexdiff can figure out
# that there is a deleted array environment, but does not know which one. In this case, MATHARRREPL is still being used
-# to encapsulate these parts of the source, and therefore it is still set internally. But this is a quite rare situation).
+# to encapsulate these parts of the source, and therefore it is still set internally. But this is a quite rare situation).
# Fixes issue #216
-# - Unlike 'array' environment, 'split' (amsmath) does not work in argument of \DIFadd or \DIFdl in UNDERLINE modes; therefore remove it from ARRENV configuration variable.
+# - Unlike 'array' environment, 'split' (amsmath) does not work in argument of \DIFadd or \DIFdl in UNDERLINE modes; therefore remove it from ARRENV configuration variable.
# Exclude \begin and \end in math environments in COARSE and WHOLE modes. Fixes #258. Fixes #109
# - --flatten now works for empty files. Fixes issue #242
# - improved processing of Chinese and Japanese texts in that splitting is done based on characters. Thanks to LuXu (Oliver Lew) in git for working this out. Fixes #229, fixes #145
@@ -65,7 +80,7 @@
# Bug fixes:
# - fix issue #206 affecting proper markup of text commands which are not also safe cmd's and have multiple arguments
# - fix issue #210 by adding \eqref (amsmath package) to the list of safe commands
-# - fix bug reported in issue #168 mangled verbatim line environment
+# - fix bug reported in issue #168 mangled verbatim line environment
# - fix bug reported in issue #218 by replacing \hspace{0pt} after \mbox{..} auxiliary commands with \hskip0pt.
# - more ways to process \frac correctly with atomic arguments (committed by julianuu PR #246
# - fix a bug in biblatex mode, which prevented proper processing of modified \textcite (see: https://tex.stackexchange.com/questions/555157/latexdiff-and-biblatex-citation-commands)
@@ -74,10 +89,10 @@
# Version 1.3.1.1
# - remove spurious \n to fix error: Unknown regexp modifier "/n" at .../latexdiff line 1974, near "=~ " (see github issue #201)
#
-# Version 1.3.1
+# Version 1.3.1
# Bug fixes:
# - remove some uninitialised variable $2 warnings in string substitution in flatten function in case included file is not found
-# - add minimal postprocessing to diff processing of preamble commands (replace \RIGHTBRACE by \} )
+# - add minimal postprocessing to diff processing of preamble commands (replace \RIGHTBRACE by \} )
# - pre-processing: replace (contributed) routine take_comments_and_enter_from_frac() with take_comments_and_newline_from_frac(), which does the same thing
# (remove whitespace characters and comments between the argument of \frac commands) in an easier and more robust way. In addition, it
# will replace commands like \frac12 with \frac{1}{2} as pre-processing step. Fixes issue #184
@@ -95,15 +110,15 @@
# Version 1.3.0 (7 October 2018):
# - treat options to \documentclass as potential package names (some packages allow implicit loading of or imply selected packages
# - improved pattern matching: now allows nested angular brackets, and is no longer confused by escaped curly braces
-# - improved pattern matching in COARSE mode: occasionally, the closing bracket or some other elements would be matched in an 'unnatural' way due to another sequence being more minimal in the computational sense, sometimes even causing errors due to tokens moving in or out of the scope of math environments. This is now discouraged by adding internal \DIFANCHOR commands (which are removed again in post-processing) (fixes issues reported via email by li_ruomeng .
+# - improved pattern matching in COARSE mode: occasionally, the closing bracket or some other elements would be matched in an 'unnatural' way due to another sequence being more minimal in the computational sense, sometimes even causing errors due to tokens moving in or out of the scope of math environments. This is now discouraged by adding internal \DIFANCHOR commands (which are removed again in post-processing) (fixes issues reported via email by li_ruomeng .
# - verbatim and lstlisting environments are marked-up with line-by-line in a similar style to non-verbatim text (requires the listing package to be installed)
# (see new configuration variable VERBATIMLINEENV) (several issues and pull requests by jprotze)
-# - --flatten: now supports \verbatiminput and \lstlistinput
+# - --flatten: now supports \verbatiminput and \lstlistinput
# - --flatten: if file is not found, do not fail, simply warn and leave command unexpanded (inspired by issue #112). Don't warn if file name contains #[0-9] as it is then most likely an argument within a command definition rather than an actual file (applies to \input, \subfile, \include commands)
# - added to textcmds: \intertext
# - new config variable CUSTOMDIFCMD to allow defining special versions of commands in added or deleted blocks (Pull request by github user jprotze)
# - added option -no-links (mostly for use by latexdiff-vc in only-changes modes) (Pull request by github user jprotze)
-# - new option --filter-script to run both input through a pre-processing script (PR jasonmccsmith #167)
+# - new option --filter-script to run both input through a pre-processing script (PR jasonmccsmith #167)
# new option --no-filter-stderr to hide stderr output from filter-script (potentially dangerous, as this might hide malfunctioning of filter scripts)
# - --flatten now can deal with imports made using the import package {PR jasonmccsmith #173)
# Bug fixes:
@@ -122,12 +137,12 @@
# make environments that are treated like verbatim environments configurable (config variable VERBATIMENV)
# treat lstinlne as equivalent to verb command
# partially addresses issue #38
-# - refactoring: set default configuration variables in a hash, and those that correspond to lists
+# - refactoring: set default configuration variables in a hash, and those that correspond to lists
# - feature: option --add-to-config used to amend configuration variables, which are regex pattern lists
# - bug fix: deleted figures when endfloat package is activated
# - bug fix: alignat environment now always processed correctly (fix issues #65)
# - bug fix: avoid processing of commands as potential files in routine init_regex_arr (fix issue #70 )
-# - minimal feature enhancement: treat '@' as allowed character in commands (strictly speaking requires prior \makeatletter statement, but always assuming it to be
+# - minimal feature enhancement: treat '@' as allowed character in commands (strictly speaking requires prior \makeatletter statement, but always assuming it to be
# @ a letter if it is part of a command name will usually lead to the correct behaviour (see http://tex.stackexchange.com/questions/346651/latexdiff-and-let)
# - new feature/bug fix: --flatten option \endinput in included files now respected but only if \endinput stands right at the beginning of the line (issue #77)
# - bug fix: flatten would incorrectly attempt to process commented out \include commands (from discussion in issue #77 )
@@ -165,7 +180,7 @@
# - introduce list UNSAFEMATHCMD, which holds list of commands which cannot be marked up with \DIFadd or \DIFdel commands (only relevant for WHOLE and COARSE math markup modes)
# - new subtype LABEL which gives each change a label. This can later be used to only display pages where changes
# have been made (instructions for that are put as comments into the diff'ed file) inspired by answer on http://tex.stackexchange.com/questions/166049/invisible-markers-in-pdfs-using-pdflatex
-# - Configuration variables take into accout some commands from additional packages:
+# - Configuration variables take into accout some commands from additional packages:
# tikzpicture environment now treated as PICTUREENV, and \smallmatrix in ARRENV (amsmath)
# - --flatten: support for \subfile command (subfiles package) (in response to http://tex.stackexchange.com/questions/167620/latexdiff-with-subfiles )
# - --flatten: \bibliography commands expand if corresponding bbl file present
@@ -179,11 +194,11 @@
# - \% in one-letter sub/Superscripts was not converted correctly
#
# Version 1.0.3
-# - fix bug in add_safe_commands that made latexdiff hang on DeclareMathOperator
+# - fix bug in add_safe_commands that made latexdiff hang on DeclareMathOperator
# command in preamble
# - \(..\) inline math expressions were not parsed correctly, if they contained a linebreak
# - applied patch contributed by tomflannaghan via Berlios: [ Patch #3431 ] Adds correct handling of \left< and \right>
-# - \$ is treated correctly as a literal dollar sign (thanks to Reed Cartwright and Joshua Miller for reporting this bug
+# - \$ is treated correctly as a literal dollar sign (thanks to Reed Cartwright and Joshua Miller for reporting this bug
# and sketching out the solution)
# - \^ and \_ are correctly interpreted as accent and underlined space, respectively, not as superscript of subscript
# (thanks to Wail Yahyaoui for pointing out this bug)
@@ -191,19 +206,19 @@
# Version 1.0.1 - treat \big,\bigg etc. equivalently to \left and
# \right - include starred version in MATHENV - apply
# - flatten recursively and --flatten expansion is now
-# aware of comments (thanks to Tim Connors for patch)
+# aware of comments (thanks to Tim Connors for patch)
# - Change to post-processing for more reliability for
# deleted math environments
-# - On linux systems, recognise and remove DOS style newlines
+# - On linux systems, recognise and remove DOS style newlines
# - Provide markup for some special preamble commands (\title,
-# \author,\date,
-# - configurable by setting context2cmd
+# \author,\date,
+# - configurable by setting context2cmd
# - for styles using ulem package, remove \emph and \text.. from list of
# safe commands in order to allow linebreaks within the
-# highlighted sections.
-# - for ulem style, now show citations by enclosing them in \mbox commands.
-# This unfortunately implies linebreaks within citations no longer function,
-# so this functionality can be turned off (Option --disable-citation-markup).
+# highlighted sections.
+# - for ulem style, now show citations by enclosing them in \mbox commands.
+# This unfortunately implies linebreaks within citations no longer function,
+# so this functionality can be turned off (Option --disable-citation-markup).
# With --enable-citation-markup, the mbox markup is forced for other styles)
# - new substyle COLOR. This is particularly useful for marking up citations
# and some special post-processing is implemented to retain cite
@@ -211,11 +226,11 @@
# - four different levels of math-markup
# - Option --driver for choosing driver for modes employing changebar package
# - accept \\* as valid command (and other commands of form \.*). Also accept
-# \<nl> (backslashed newline)
+# \<nl> (backslashed newline)
# - some typo fixes, include commands defined in preamble as safe commands
-# (Sebastian Gouezel)
+# (Sebastian Gouezel)
# - include compared filenames as comments as line 2 and 3 of
-# the preamble (can be modified with option --label, and suppressed with
+# the preamble (can be modified with option --label, and suppressed with
# --no-label), option --visible-label to show files in generated pdf or dvi
# at the beginning of main document
#
@@ -231,7 +246,7 @@
#
# Version 0.4 March 06 option for fast differencing using UNIX diff command, several minor bug fixes (\par bug, improved highlighting of textcmds)
#
-# Version 0.3 August 05 improved parsing of displayed math, --allow-spaces
+# Version 0.3 August 05 improved parsing of displayed math, --allow-spaces
# option, several minor bug fixes
#
# Version 0.25 October 04 Fix bug with deleted equations, add math mode commands to safecmd, add | to allowed interpunctuation signs
@@ -704,12 +719,13 @@ use utf8 ;
use File::Spec ;
+
my ($algodiffversion)=split(/ /,$Algorithm::Diff::VERSION);
my ($versionstring)=<<EOF ;
-This is LATEXDIFF 1.3.3 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V)
- (c) 2004-2022 F J Tilmann
+This is LATEXDIFF 1.3.4 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V)
+ (c) 2004-2024 F J Tilmann
EOF
# Hash with defaults for configuration variables. These marked undef have default values constructed from list defined in the DATA block
@@ -800,9 +816,9 @@ my $DELCMDOPEN='%DIFDELCMD < '; # To mark begin of deleted commands (must begin
my $DELCMDCLOSE="%%%\n"; # To mark end of deleted commands (must end with a new line)
my $AUXCMD='%DIFAUXCMD' ; # follows auxiliary commands put in by latexdiff to make difference file legal
# auxiliary commands must be on a line of their own
- # Note that for verbatim environment openings the %DIFAUXCMD cannot be placed in
+ # Note that for verbatim environment openings the %DIFAUXCMD cannot be placed in
# the same line as this would mean they are shown
- # so the special form "%DIFAUXCMD NEXT" is used to indicate that the next line
+ # so the special form "%DIFAUXCMD NEXT" is used to indicate that the next line
# is an auxiliary command
# Similarly "%DIFAUXCMD LAST" would indicate the auxiliary command is in previous line (not currently used)
my $DELCOMMENT='DIF < '; # To mark deleted comment line
@@ -813,21 +829,21 @@ my @TEXTCMDLIST=(); # array containing patterns of commands with text arguments
my @TEXTCMDEXCL=(); # array containing patterns of commands without text arguments (if a pattern
# matches both TEXTCMDLIST and TEXTCMDEXCL it is excluded)
my @CONTEXT1CMDLIST=(); # array containing patterns of commands with text arguments (subset of text commands),
- # but which cause confusion if used out of context (e.g. \caption).
+ # but which cause confusion if used out of context (e.g. \caption).
# In deleted passages, the command will be disabled but its argument is marked up
- # Otherwise they behave exactly like TEXTCMD's
+ # Otherwise they behave exactly like TEXTCMD's
my @CONTEXT1CMDEXCL=(); # exclude list for above, but always empty
my @CONTEXT2CMDLIST=(); # array containing patterns of commands with text arguments, but which fail or cause confusion
# if used out of context (e.g. \title). They and their arguments will be disabled in deleted
# passages
my @CONTEXT2CMDEXCL=(); # exclude list for above, but always empty
my @MATHTEXTCMDLIST=(); # treat like textcmd. If a textcmd is in deleted or added block, just wrap the
- # whole content with \DIFadd or \DIFdel irrespective of content. This functionality
+ # whole content with \DIFadd or \DIFdel irrespective of content. This functionality
# is useful for pseudo commands \MATHBLOCK.. into which math environments are being
- # transformed
-my @MATHTEXTCMDEXCL=(); #
+ # transformed
+my @MATHTEXTCMDEXCL=(); #
-# Note I need to declare this with "our" instead of "my" because later in the code I have to "local"ise these
+# Note I need to declare this with "our" instead of "my" because later in the code I have to "local"ise these
our @SAFECMDLIST=(); # array containing patterns of safe commands (which do not break when in the argument of DIFadd or DIFDEL)
our @SAFECMDEXCL=();
my @MBOXCMDLIST=(); # patterns for commands which are in principle safe but which need to be surrounded by an \mbox
@@ -892,7 +908,7 @@ $mathmarkup=COARSE;
$verbose=0;
$onlyadditions=0;
# output debug and intermediate files, set to 0 in final distribution
-$debug=0;
+$debug=0;
# insert preamble directly after documentclass - experimental feature, set to 0 in final distribution
# Note that this failed with mini example (or other files, where packages used in latexdiff preamble
# are called again with incompatible options in preamble of resulting file)
@@ -915,9 +931,9 @@ END
my %verbhash;
Getopt::Long::Configure('bundling');
-GetOptions('type|t=s' => \$type,
- 'subtype|s=s' => \$subtype,
- 'floattype|f=s' => \$floattype,
+GetOptions('type|t=s' => \$type,
+ 'subtype|s=s' => \$subtype,
+ 'floattype|f=s' => \$floattype,
'config|c=s' => \@configlist,
'add-to-config=s' => \@addtoconfiglist,
'preamble|p=s' => \$preamblefile,
@@ -966,11 +982,11 @@ if ( $help ) {
if ( $version ) {
- print STDERR $versionstring ;
+ print STDERR $versionstring ;
exit 0;
}
-print STDERR $versionstring if $verbose;
+print STDERR $versionstring if $verbose;
if (defined($showall)){
$showpreamble=$showsafe=$showtext=$showconfig=1;
@@ -988,7 +1004,7 @@ if (defined($mathmarkup)) {
$mathmarkup=~tr/a-z/A-Z/;
if ( $mathmarkup eq 'OFF' ){
$mathmarkup=OFF;
- } elsif ( $mathmarkup eq 'WHOLE' ){
+ } elsif ( $mathmarkup eq 'WHOLE' ){
$mathmarkup=WHOLE;
} elsif ( $mathmarkup eq 'COARSE' ){
$mathmarkup=COARSE;
@@ -1091,7 +1107,7 @@ foreach $config ( @configlist ) {
}
}
foreach $assign ( @config ) {
- $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
+ $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
exists $CONFIG{$1} or die "Unknown configuration variable $1.";
$CONFIG{$1}=$2;
}
@@ -1128,7 +1144,7 @@ foreach $key ( keys(%CONFIG) ) {
foreach $assign ( @addtoconfig ) {
###print STDERR "assign:|$assign|\n";
- $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
+ $assign=~ m/\s*(\w*)\s*=\s*(\S*)\s*$/ or die "Illegal assignment $assign in configuration list (must be variable=value)";
exists $CONFIG{$1} or die "Unknown configuration variable $1.";
$CONFIG{$1}.=";$2";
}
@@ -1143,8 +1159,8 @@ foreach ( keys(%CONFIG) ) {
elsif ( $_ eq "MATHENV" ) { $MATHENV = liststringtoregex($CONFIG{$_}) ; }
elsif ( $_ eq "MATHREPL" ) { $MATHREPL = $CONFIG{$_} ; }
elsif ( $_ eq "MATHARRENV" ) { $MATHARRENV = liststringtoregex($CONFIG{$_}) ; }
- elsif ( $_ eq "MATHARRREPL" ) { $MATHARRREPL = $CONFIG{$_} ;
- print STDERR "WARNING: Setting MATHARRREPL is depracated. Generally deleted math array environments will be set to their starred varieties and the setting of MATHARREPL is ignored.\n\n" unless $MATHARRREPL =~ /eqnarray\*/ ;
+ elsif ( $_ eq "MATHARRREPL" ) { $MATHARRREPL = $CONFIG{$_} ;
+ print STDERR "WARNING: Setting MATHARRREPL is depracated. Generally deleted math array environments will be set to their starred varieties and the setting of MATHARREPL is ignored.\n\n" unless $MATHARRREPL =~ /eqnarray\*/ ;
}
elsif ( $_ eq "ARRENV" ) { $ARRENV = liststringtoregex($CONFIG{$_}) ; }
elsif ( $_ eq "VERBATIMENV" ) { $VERBATIMENV = liststringtoregex($CONFIG{$_}) ; }
@@ -1171,11 +1187,11 @@ foreach $pkg ( @packagelist ) {
if ($showconfig || $showtext || $showsafe || $showpreamble) {
show_configuration();
- exit 0;
+ exit 0;
}
-if ( @ARGV != 2 ) {
+if ( @ARGV != 2 ) {
print STDERR "2 and only 2 non-option arguments required. Write latexdiff -h to get help\n";
exit(2);
}
@@ -1183,7 +1199,7 @@ if ( @ARGV != 2 ) {
# Are extra spaces between command arguments permissible?
my $extraspace;
if ($allowspaces) {
- $extraspace='\s*';
+ $extraspace='\s*';
} else {
$extraspace='';
}
@@ -1206,14 +1222,14 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
# if you get "undefined control sequence MATHBLOCKmath" error, increase the maximum value in this loop
for (my $i_pat = 0; $i_pat < 20; ++$i_pat){
$pat_n = '(?:[^{}]|\{'.$pat_n.'\}|\\\\\{|\\\\\})*';
- # Actually within the text body, quoted braces are replaced in pre-processing. The only place where
+ # Actually within the text body, quoted braces are replaced in pre-processing. The only place where
# the last part of the pattern matters is when processing the arguments of context2cmds in the preamble
# and these contain a \{ or \} combination, probably rare.
# It should thus be fine to use the simpler version below.
### $pat_n = '(?:[^{}]|\{'.$pat_n.'\})*';
}
- my $brat0 = '(?:[^\[\]]|\\\[|\\\])*';
+ my $brat0 = '(?:[^\[\]]|\\\[|\\\])*';
my $brat_n = $brat0;
for (my $i_pat = 0; $i_pat < 4; ++$i_pat){
$brat_n = '(?:[^\[\]]|\['.$brat_n.'\]|\\\[|\\\])*';
@@ -1230,7 +1246,7 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
# could turn 'i.e.' into 'i.\PAR e.' (see https://github.com/ftilmann/latexdiff/issues/269)
# English: i.e., e.g. Deutsch: z.B.
my $abbreviation='(?:i\. ?e\.|e\. ?g\.|z\. ?B\.)' ;
- my $number='-?\d*\.\d*';
+ my $number='-?\d*\.\d*';
# word: sequence of letters or accents followed by letter
my $word_cj='\p{Han}|\p{InHiragana}|\p{InKatakana}';
@@ -1258,7 +1274,7 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
# inline math $....$ or \(..\)
### the commented out version is simpler but for some reason cannot cope with newline (in spite of s option) - need to include \newline explicitly
### my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(].*?\\\\[)]';
- my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(](?:.|\n)*?\\\\[)]';
+ my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(](?:.|\n)*?\\\\[)]';
### test version (this seems to give the same results as version above)
## the current maths command cannot cope with newline within the math expression
### my $math='\$(?:[^$]|\\\$)*?\$|\\[(].*?\\[)]';
@@ -1276,7 +1292,7 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/);
-# now we are done setting up and can start working
+# now we are done setting up and can start working
my ($oldfile, $newfile) = @ARGV;
# check for existence of input files
if ( ! -e $oldfile ) {
@@ -1304,7 +1320,7 @@ my ($oldtime,$newtime,$oldlabel,$newlabel);
if (defined($labels[0])) {
$oldlabel=$labels[0] ;
} else {
- $oldtime=localtime((stat($oldfile))[9]);
+ $oldtime=localtime((stat($oldfile))[9]);
$oldlabel="$oldfile " . " "x($oldlabel_n_spaces) . $oldtime;
}
if (defined($labels[1])) {
@@ -1317,6 +1333,7 @@ if (defined($labels[1])) {
$encoding=guess_encoding($newfile) unless defined($encoding);
$encoding = "utf8" if $encoding =~ m/^utf8/i ;
+print STDERR "Encoding $encoding\n" if $verbose;
if (lc($encoding) eq "utf8" ) {
binmode(STDOUT, ":utf8");
binmode(STDERR, ":utf8");
@@ -1400,7 +1417,7 @@ my @auxlines;
my ($ulem)=0;
if ( length $oldpreamble && length $newpreamble ) {
- # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
+ # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
# and marking up content with latexdiff markup
@auxlines=preprocess_preamble($oldpreamble,$newpreamble);
@@ -1432,7 +1449,7 @@ if (defined($graphicsmarkup)) {
} else {
# Default: no explicit setting in menu
if ( defined $packages{"graphicx"} or defined $packages{"graphics"} ) {
- $graphicsmarkup=NEWONLY;
+ $graphicsmarkup=NEWONLY;
} else {
$graphicsmarkup=NONE;
}
@@ -1465,7 +1482,7 @@ if ($graphicsmarkup != NONE ) {
@matches=( $latexdiffpreamble =~ m/command\{\\DIFaddbeginFL}\{($pat_n)}/sg ) ;
# we look at the last one of the list to take into account possible redefinition but almost always matches should have exactly one element
if ( $matches[$#matches] =~ m/\\DIFaddbegin/ ) {
- die "Cannot combine graphics markup with float styles defining \\DIFaddbeginFL in terms of \\DIFaddbegin. Use --graphics-markup=none option or choose a different float style.";
+ die "Cannot combine graphics markup with float styles defining \\DIFaddbeginFL in terms of \\DIFaddbegin. Use --graphics-markup=none option or choose a different float style.";
exit 10;
}
###}
@@ -1479,6 +1496,11 @@ if ($graphicsmarkup != NONE ) {
$ulem = ($latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{ulem\}/ || defined $packages{"ulem"});
+# If amsmath is defined and $ulem is used for markup, redefine the \sout command to also work (mostly) in math mode
+# See stack exchange https://tex.stackexchange.com/questions/20609/strikeout-in-math-mode/308647#308647 based on comment by Taylor Raine
+if ( defined($packages{'amsmath'}) and $ulem ) {
+ $latexdiffpreamble .= join "\n",(extrapream('AMSMATHULEM'),"");
+}
# If listings is being used or can be found in the latexdiff search path, add to the preamble auxiliary code to enable line-by-line markup
if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
@@ -1488,7 +1510,7 @@ if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
}
my @listingDIFcode=();
my $replaced;
- # note that in case user supplies preamblefile the type might not reflect well the
+ # note that in case user supplies preamblefile the type might not reflect well the actual markup style
@listingDIFcode=extrapream("-nofail","DIFCODE_" . $type) unless defined($preamblefile);
if (!(@listingDIFcode)) {
# if listingDIFcode is empty try to guess a suitable one from the preamble
@@ -1502,13 +1524,17 @@ if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
@listingDIFcode=extrapream("DIFCODE_BOLD");
}
}
- # now splice it in
+ # add configuration so that listings work with utf-8
+ push @listingpreamble, '\lstset{extendedchars=\true,inputencoding='.$encoding."}\n";
+
+
+ # now splice it in
$replaced=0;
###print STDERR "DEBUG: listingDIFcode: ",join("\n",@listingDIFcode),"|||\n" if $debug;
- @listingpreamble=grep {
+ @listingpreamble=grep {
# only replace if this has not been done already (use short-circuit property of and)
- if (!$replaced and $_ =~ s/^.*%DIFCODE TEMPLATE.*$/join("\n",@listingDIFcode)/e ) {
+ if (!$replaced and $_ =~ s/^.*%DIFCODE TEMPLATE.*$/join("\n",@listingDIFcode)/e ) {
###print STDERR "DEBUG: Replaced text $_\n" if $debug;
$replaced=1;
1;
@@ -1538,7 +1564,7 @@ if ( length $oldpreamble && length $newpreamble ) {
unshift @oldpreamble,'';
@diffpreamble = linediff(\@oldpreamble, \@newpreamble);
# remove dummy line again
- shift @diffpreamble;
+ shift @diffpreamble;
# add filenames, modification time and latexdiff mark
defined($nolabel) or splice @diffpreamble,1,0,
"%DIF LATEXDIFF DIFFERENCE FILE",
@@ -1587,8 +1613,8 @@ if (defined $packages{"siunitx"} ) {
# protect SI command by surrounding them with an \mbox
# this is done to get around an incompatibility between the ulem and siunitx package
print STDERR "siunitx package detected.\n" if $verbose ;
- my $mboxcmds='SI,ang,numlist,numrange,SIlist,SIrange';
- init_regex_arr_list(\@SAFECMDLIST,'num,si');
+ my $mboxcmds='SI,ang,numlist,numrange,SIlist,SIrange,qty,qtylist,qtyproduct,qtyrange,complexqty';
+ init_regex_arr_list(\@SAFECMDLIST,'num,si,numproduct,unit,complexnum');
if ( $enablecitmark || ( $ulem && ! $disablecitmark )) {
init_regex_arr_list(\@MBOXCMDLIST,$mboxcmds);
} else {
@@ -1610,7 +1636,7 @@ if (defined $packages{"cleveref"} ) {
if (defined $packages{"glossaries"} ) {
# protect selected command by surrounding them with an \mbox
- # this is done to get around an incompatibility between ulem and glossaries package
+ # this is done to get around an incompatibility between ulem and glossaries package
print STDERR "glossaries package detected.\n" if $verbose ;
my $mboxcmds='[gG][lL][sS](?:|pl|disp|link|first|firstplural|desc|user[iv][iv]?[iv]?),[aA][cC][rR](?:long|longpl|full|fullpl),[aA][cC][lfp]?[lfp]?';
init_regex_arr_list(\@SAFECMDLIST,'[gG][lL][sS](?:(?:entry)?(?:text|plural|name|symbol)|displaynumberlist|entryfirst|entryfirstplural|entrydesc|entrydescplural|entrysymbolplural|entryuser[iv][iv]?[iv]?|entrynumberlist|entrydisplaynumberlist|entrylong|entrylongpl|entryshort|entryshortpl|entryfull|entryfullpl),[gG]lossentry(?:name|desc|symbol),[aA][cC][rR](?:short|shortpl),[aA]csp?');
@@ -1639,6 +1665,10 @@ if (defined $packages{"mhchem"} ) {
# push(@MATHTEXTCMDLIST,'cee');
}
+if ( defined $packages{"tikz-dependency"} ) {
+ init_regex_arr_ext(\@SAFECMDEXCL, 'AMPERSAND');
+}
+
my ( $citpat);
@@ -1726,7 +1756,7 @@ print STDERR "(",exetime()," s)\n","Done.\n" if $verbose;
# liststringtoregex(liststring)
-# expands string with semi-colon separated list into a regular expression corresponding
+# expands string with semi-colon separated list into a regular expression corresponding
# matching any of the elements
sub liststringtoregex {
my ($liststring)=@_;
@@ -1739,7 +1769,7 @@ sub liststringtoregex {
}
# show_configuration
-# note that this is not encapsulated but uses variables from the main program
+# note that this is not encapsulated but uses variables from the main program
# It is provided for convenience because in the future it is planned to allow output
# to be modified based on what packages are read etc - this works only if the input files are actually read
# whether or not additional files are provided
@@ -1766,7 +1796,7 @@ sub show_configuration {
print "\nContext1 commands (last argument textual, command will be disabled in deleted passages, last argument will be shown as plain text):\n";
print_regex_arr(@CONTEXT1CMDLIST);
print "\nContext2 commands (last argument textual, command and its argument will be disabled in deleted passages):\n";
- print_regex_arr(@CONTEXT2CMDLIST);
+ print_regex_arr(@CONTEXT2CMDLIST);
print "\nExclude list of Commands with last argument not textual (overrides patterns above):\n";
print_regex_arr(@TEXTCMDEXCL);
}
@@ -1874,7 +1904,7 @@ sub list_packages {
my %packages=();
my $pkg;
- # remove comments
+ # remove comments
$preamble=~s/(?<!\\)%.*$//mg ;
while ( $preamble =~ m/\\(?:documentclass|usepackage|RequirePackage)(?:\[($brat_n)\])?\{(.*?)\}/gs ) {
@@ -1979,7 +2009,7 @@ sub flatten {
my ($includeonly,$dirname,$fname,$newpage,$fullfile,$filecontent,$replacement,$begline,$inputcmd,$bblfile,$subfile,$command,$verbenv,$verboptions,$ignore,$fileonly);
my ($subpreamble,$subbody,$subpost);
my ($subdir,$subdirfull,$importfilepath);
- require File::Basename ;
+ require File::Basename ;
### require File::Spec ; # now this is needed even if flatten option not given
$filename = File::Spec->rel2abs( $filename ) ;
($ignore, $dirname, $fileonly) = File::Spec->splitpath($filename) ;
@@ -2019,15 +2049,15 @@ sub flatten {
$subdirfull = (defined($3) ? File::Spec->catdir($dirname,$subdir) : $subdir);
$importfilepath = File::Spec->catfile($subdirfull, $fname);
-
+
print STDERR "importing importfilepath:", $importfilepath,"\n" if $verbose;
if ( -f $importfilepath ) {
# If file exists, replace input or include command with expanded input
#TODO: need remove_endinput & newpage similar to other replacements inside flatten
- $replacement=flatten(read_file_with_encoding($importfilepath, $encoding), $preamble,$importfilepath,$encoding);
+ $replacement=flatten(read_file_with_encoding($importfilepath, $encoding), $preamble,$importfilepath,$encoding);
} else {
# if file does not exist, do not expand include or input command (do not warn if fname contains #[0-9] as it is then likely part of a command definition
- # and is not meant to be expanded directly
+ # and is not meant to be expanded directly
print STDERR "WARNING: Could not find included file ",$importfilepath,". I will continue but not expand |$2|\n";
$replacement = $2;
$replacement .= "{$subdir}{$fname} % Processed";
@@ -2036,13 +2066,13 @@ sub flatten {
}/exgm;
# recursively replace \\input and \\include files
- $text =~ s/(^(?:[^%\n]|\\%)*)(\\input\{(.*?)\}|\\include\{(${includeonly}(?:\.tex)?)\})/{
+ $text =~ s/(^(?:[^%\n]|\\%)*)(\\input\{(.*?)\}|\\include\{(${includeonly}(?:\.tex)?)\})/{
$begline=(defined($1)? $1 : "") ;
$inputcmd=$2;
$fname = $3 if defined($3) ;
$fname = $4 if defined($4) ;
$newpage=(defined($4)? " \\newpage " : "") ;
- # # add tex extension unless there is a three or four letter extension already
+ # # add tex extension unless there is a three or four letter extension already
$fname .= ".tex" unless $fname =~ m|\.\w{3,4}$|;
$fullfile = File::Spec->catfile($dirname,$fname);
print STDERR "DEBUG Beg of line match |$1|\n" if defined($1) && $debug ;
@@ -2051,12 +2081,12 @@ sub flatten {
# content of file becomes replacement value (use recursion), add \newpage if the command was include
if ( -f $fullfile ) {
# If file exists, replace input or include command with expanded input
- $replacement=flatten(read_file_with_encoding($fullfile, $encoding), $preamble,$filename,$encoding);
- $replacement = remove_endinput($replacement);
+ $replacement=flatten(read_file_with_encoding($fullfile, $encoding), $preamble,$filename,$encoding);
+ $replacement = remove_endinput($replacement);
# \include always starts a new page; use explicit \newpage command to simulate this
} else {
# if file does not exist, do not expand include or input command (do not warn if fname contains #[0-9] as it is then likely part of a command definition
- # and is not meant to be expanded directly
+ # and is not meant to be expanded directly
print STDERR "WARNING: Could not find included file ",$fullfile,". I will continue but not expand |$inputcmd|\n" unless $fname =~ m(#[0-9]) ;
$replacement = $inputcmd ; # i.e. just the original command again -> make no change file does not exist
$newpage="";
@@ -2065,7 +2095,7 @@ sub flatten {
}/exgm;
# replace bibliography with bbl file if it exists
- $text=~s/(^(?:[^%\n]|\\%)*)\\bibliography\{(.*?)\}/{
+ $text=~s/(^(?:[^%\n]|\\%)*)\\bibliography\{(.*?)\}/{
if ( -f $bblfile ){
$replacement=read_file_with_encoding(File::Spec->catfile($bblfile), $encoding);
} else {
@@ -2077,10 +2107,10 @@ sub flatten {
}/exgm;
# replace subfile with contents (subfile package)
- $text=~s/(^(?:[^%\n]|\\%)*)\\subfile\{(.*?)\}/{
+ $text=~s/(^(?:[^%\n]|\\%)*)\\subfile\{(.*?)\}/{
$begline=(defined($1)? $1 : "") ;
- $fname = $2;
- # # add tex extension unless there is a three or four letter extension already
+ $fname = $2;
+ # # add tex extension unless there is a three or four letter extension already
$fname .= ".tex" unless $fname =~ m|\.\w{3,4}|;
print STDERR "Include file as subfile $fname\n" if $verbose;
# content of file becomes replacement value (use recursion)
@@ -2091,10 +2121,10 @@ sub flatten {
# if file exists, expand \subfile command by contents of file
$subfile=read_file_with_encoding($fullfile,$encoding) or die "Could not open included subfile ",$fullfile,": $!";
($subpreamble,$subbody,$subpost)=splitdoc($subfile,'\\\\begin\{document\}','\\\\end\{document\}');
- ### $subfile=~s|^.*\\begin{document}||s;
+ ### $subfile=~s|^.*\\begin{document}||s;
### $subfile=~s|\\end{document}.*$||s;
$replacement=flatten($subbody, $preamble,$fullfile,$encoding);
- ### $replacement = remove_endinput($replacement);
+ ### $replacement = remove_endinput($replacement);
} else {
# if file does not exist, do not expand subfile
print STDERR "WARNING: Could not find subfile ",$fullfile,". I will continue but not expand |$2|\n" unless $fname =~ m(#[0-9]) ;
@@ -2105,11 +2135,11 @@ sub flatten {
}/exgm;
# replace \verbatiminput and \lstlistinginput
- $text=~s/(^(?:[^%\n]|\\%)*)\\(verbatiminput\*?|lstinputlisting)$extraspace(\[$brat_n\])?$extraspace\{(.*?)\}/{
+ $text=~s/(^(?:[^%\n]|\\%)*)\\(verbatiminput\*?|lstinputlisting)$extraspace(\[$brat_n\])?$extraspace\{(.*?)\}/{
$begline=(defined($1)? $1 : "") ;
$command = $2 ;
$fname = $4 ;
- $verboptions = defined($3)? $3 : "" ;
+ $verboptions = defined($3)? $3 : "" ;
if ($command eq 'verbatiminput' ) {
$verbenv = "verbatim" ;
} elsif ($command eq 'verbatiminput*' ) {
@@ -2118,7 +2148,7 @@ sub flatten {
$verbenv = "lstlisting" ;
} else {
die "Internal errorL Unexpected verbatim input type $command.\n";
- }
+ }
print STDERR "DEBUG Beg of line match |$begline|\n" if $debug ;
print STDERR "Include file $fname verbatim\n" if $verbose;
print STDERR "DEBUG looking for file ",File::Spec->catfile($dirname,$fname), "\n" if $debug;
@@ -2150,8 +2180,8 @@ sub print_regex_arr {
# if $type is a filename, it will read the file instead of reading from the appendix
# otherwise it will screen appendix for line "%DIF $TYPE" and copy everything up to line
# '%DIF END $TYPE' (where $TYPE is upcased version of $type)
-# extrapream('-nofail',$type) will---instead of failing---simply return nothing if
-# it does not find the matching line in a appendix (do not use -nofail option with multiple types!)
+# extrapream('-nofail',$type) will---instead of failing---simply return nothing if
+# it does not find the matching line in appendix (do not use -nofail option with multiple types!)
sub extrapream {
my @types=@_;
my ($type,$arg);
@@ -2168,14 +2198,20 @@ sub extrapream {
$type=$arg;
$copy=0;
if ( -f $type || lc $type eq '/dev/null' ) {
- open (FILE,$type) or die "Cannot open preamble file $type: $!";
print STDERR "Reading preamble file $type\n" if $verbose ;
+ open (FILE,$type) or die "Cannot open preamble file $type: $!";
+ if (defined($encoding)) {
+ binmode(FILE,":encoding($encoding)");
+ } else {
+ require Encode::Locale;
+ binmode(FILE,":encoding(locale)");
+ }
while (<FILE>) {
chomp ;
if ( $_ =~ m/%DIF PREAMBLE/ ) {
- push (@retval,"$_");
+ push (@retval,"$_");
} else {
- push (@retval,"$_ %DIF PREAMBLE");
+ push (@retval,"$_ %DIF PREAMBLE");
}
}
} else { # not (-f $type)
@@ -2187,9 +2223,9 @@ sub extrapream {
my $data_start = tell DATA;
while (<DATA>) {
if ( m/^%DIF $type/ ) {
- $copy=1;
+ $copy=1;
} elsif ( m/^%DIF END $type/ ) {
- last;
+ last;
}
chomp;
push (@retval,"$_ %DIF PREAMBLE") if $copy;
@@ -2229,7 +2265,7 @@ sub splitdoc {
$pos=pos $rest;
$part2=substr($rest,0,$pos-length($2));
$part3=substr($rest,$pos);
- }
+ }
else {
die "$word1 and $word2 not in the correct order or not present as a pair." ;
}
@@ -2301,7 +2337,7 @@ sub splitlatex {
my $leadin=$1;
length($string)>0 or return ($leadin);
- my @retval=($string =~ m/$pat/osg);
+ my @retval=($string =~ m/$pat/osg);
if (length($string) != length(join("",@retval))) {
print STDERR "\nWARNING: Inconsistency in length of input string and parsed string:\n This often indicates faulty or non-standard latex code.\n In many cases you can ignore this and the following warning messages.\n Note that character numbers in the following are counted beginning after \\begin{document} and are only approximate." unless $ignorewarnings;
@@ -2345,17 +2381,17 @@ sub splitlatex {
# pass1( \@seq1,\@seq2)
# Look for differences between seq1 and seq2.
-# Where an common-subsequence block is flanked by deleted or appended blocks,
+# Where an common-subsequence block is flanked by deleted or appended blocks,
# and is shorter than $MINWORDSBLOCK words it is appended
-# to the last deleted or appended word. If the block contains tokens other than words
+# to the last deleted or appended word. If the block contains tokens other than words
# or punctuation it is not merged.
# Deleted or appended block consisting of words and safe commands only are
# also merged, to prevent break-up in pass2 (after previous isolated words have been removed)
-# If there are commands with textual arguments (e.g. \caption) both in corresponding
-# appended and deleted blocks split them such that the command and opening bracket
-# are one token, then the rest is split up following standard rules, and the closing
+# If there are commands with textual arguments (e.g. \caption) both in corresponding
+# appended and deleted blocks split them such that the command and opening bracket
+# are one token, then the rest is split up following standard rules, and the closing
# bracket is a separate token, ie. turn
-# "\caption{This is a textual argument}" into
+# "\caption{This is a textual argument}" into
# ("\caption{","This ","is ","a ","textual ","argument","}")
# No return value. Destructively changes sequences
sub pass1 {
@@ -2384,15 +2420,15 @@ sub pass1 {
my $adddiscard = sub {
if ($cnt > 0 ) {
$matblkcnt++;
- # just after an unchanged block
+ # just after an unchanged block
# print STDERR "Unchanged block $cnt, $last1,$last2 \n";
- if ($cnt < $MINWORDSBLOCK
+ if ($cnt < $MINWORDSBLOCK
&& $cnt==scalar (
- grep { /^$wpat/ || ( /^\\((?:[`'^"~=.]|[\w\d@*]+))((?:\[$brat_n\]|\{$pat_n\})*)/o
- && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
+ grep { /^$wpat/ || ( /^\\((?:[`'^"~=.]|[\w\d@*]+))((?:\[$brat_n\]|\{$pat_n\})*)/o
+ && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
&& scalar(@dummy=split(" ",$2))<3 ) }
@$block) ) {
- # merge identical blocks shorter than $MINWORDSBLOCK
+ # merge identical blocks shorter than $MINWORDSBLOCK
# and only containing ordinary words
# with preceding different word
# We cannot carry out this merging immediately as this
@@ -2400,23 +2436,23 @@ sub pass1 {
# the algorithm, instead we store in @$todo where we have to merge
push(@$todo, [ $last1,$last2,$cnt,@$block ]);
}
- $block = [];
+ $block = [];
$cnt=0; $last1=-1; $last2=-1;
}
};
my $discard=sub { $deltokcnt++;
&$adddiscard; #($_[0],$_[1]);
push(@$delblock,[ $seq1->[$_[0]],$_[0] ]);
- $last1=$_[0] };
+ $last1=$_[0] };
my $add = sub { $addtokcnt++;
&$adddiscard; #($_[0],$_[1]);
push(@$addblock,[ $seq2->[$_[1]],$_[1] ]);
- $last2=$_[1] };
+ $last2=$_[1] };
my $match = sub { $mattokcnt++;
if ($cnt==0) { # first word of matching sequence after changed sequence or at beginning of word sequence
- $deltextblocks = extracttextblocks($delblock);
+ $deltextblocks = extracttextblocks($delblock);
$delblkcnt++ if scalar @$delblock;
$addtextblocks = extracttextblocks($addblock);
$addblkcnt++ if scalar @$addblock;
@@ -2432,7 +2468,7 @@ sub pass1 {
### Algorithm::Diff 1.19
$matchindex=Algorithm::Diff::_longestCommonSubsequence($delcmds,$addcmds, 0, sub { $_[0]->[0] } );
} else {
- ### Algorithm::Diff 1.15
+ ### Algorithm::Diff 1.15
$matchindex=Algorithm::Diff::_longestCommonSubsequence($delcmds,$addcmds, sub { $_[0]->[0] } );
}
@@ -2463,11 +2499,11 @@ sub pass1 {
my ($index,$block,$cnt)=@{ shift(@$addtextblocks) };
push(@$todo, [-1,$index,$cnt,@$block]);
}
-
+
$addblock=[];
$delblock=[];
}
- push(@$block,$seq2->[$_[1]]);
+ push(@$block,$seq2->[$_[1]]);
$cnt++ };
my $keyfunc = sub { join(" ",split(" ",shift())) };
@@ -2475,7 +2511,7 @@ sub pass1 {
traverse_sequences($seq1,$seq2, { MATCH=>$match, DISCARD_A=>$discard, DISCARD_B=>$add }, $keyfunc );
- # now carry out the merging/splitting. Refer to elements relative from
+ # now carry out the merging/splitting. Refer to elements relative from
# the end (with negative indices) as these offsets don't change before the instruction is executed
# cnt>0: merged small unchanged groups with previous changed blocks
# cnt==-1: split textual commands into components
@@ -2490,7 +2526,7 @@ sub pass1 {
}
}
- if ($verbose) {
+ if ($verbose) {
print STDERR "\n";
print STDERR " $mattokcnt matching tokens in $matblkcnt blocks.\n";
print STDERR " $deltokcnt discarded tokens in $delblkcnt blocks.\n";
@@ -2500,10 +2536,10 @@ sub pass1 {
# extracttextblocks(\@blockindex)
-# $blockindex has the following format
-# [ [ token1, index1 ], [token2, index2],.. ]
-# where index refers to the index in the original old or new word sequence
-# Returns: reference to an array of the form
+# $blockindex has the following format
+# [ [ token1, index1 ], [token2, index2],.. ]
+# where index refers to the index in the original old or new word sequence
+# Returns: reference to an array of the form
# [[ $index, $textblock, $cnt ], ..
# where $index index of block to be merged
# $textblock contains all the words to be merged with the word at $index (but does not contain this word)
@@ -2511,7 +2547,7 @@ sub pass1 {
#
# requires: iscmd
#
-sub extracttextblocks {
+sub extracttextblocks {
my $block=shift;
my ($i,$token,$index);
my $textblock=[];
@@ -2521,13 +2557,13 @@ sub extracttextblocks {
# we redefine locally $extraspace (shadowing the global definition) to capture command sequences with intervening spaces no matter what the global setting
# this is done so we can capture those commands with a predefined number of arguments without having to introduce them again explicitly here
- my $extraspace='\s*';
+ my $extraspace='\s*';
for ($i=0;$i< scalar @$block;$i++) {
($token,$index)=@{ $block->[$i] };
# store pure text blocks
- if ($token =~ /$wpat/ || ( $token =~/^\\((?:[`'^"~=.]|[\w\d@\*]+))((?:${extraspace}\[$brat_n\]${extraspace}|${extraspace}\{$pat_n\})*)/
- && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
+ if ($token =~ /$wpat/ || ( $token =~/^\\((?:[`'^"~=.]|[\w\d@\*]+))((?:${extraspace}\[$brat_n\]${extraspace}|${extraspace}\{$pat_n\})*)/
+ && iscmd($1,\@SAFECMDLIST,\@SAFECMDEXCL)
&& !iscmd($1,\@TEXTCMDLIST,\@TEXTCMDEXCL))) {
# we have text or a command which can be treated as text
if ($last<0) {
@@ -2535,7 +2571,7 @@ sub extracttextblocks {
$last=$index;
} else {
# add to pure-text block
- push(@$textblock, $token);
+ push(@$textblock, $token);
}
} else {
# it is not text
@@ -2556,29 +2592,29 @@ sub extracttextblocks {
# extractcommands( \@blockindex )
-# $blockindex has the following format
-# [ [ token1, index1 ], [token2, index2],.. ]
-# where index refers to the index in the original old or new word sequence
-# Returns: reference to an array of the form
-# [ [ "\cmd1", index, "\cmd1[optarg]{arg1}{", "arg2" ,"} " ],..
-# where index is just taken from input array
-# command must have a textual argument as last argument
-#
-# requires: iscmd
-#
-sub extractcommands {
+# $blockindex has the following format
+# [ [ token1, index1 ], [token2, index2],.. ]
+# where index refers to the index in the original old or new word sequence
+# Returns: reference to an array of the form
+# [ [ "\cmd1", index, "\cmd1[optarg]{arg1}{", "arg2" ,"} " ],..
+# where index is just taken from input array
+# command must have a textual argument as last argument
+#
+# requires: iscmd
+#
+sub extractcommands {
my $block=shift;
my ($i,$token,$index,$cmd,$open,$mid,$closing);
my $retval=[];
# we redefine locally $extraspace (shadowing the global definition) to capture command sequences with intervening spaces no matter what the global setting
# this is done so we can capture those commands with a predefined number of arguments without having to introduce them again explicitly here
- my $extraspace='\s*';
+ my $extraspace='\s*';
for ($i=0;$i< scalar @$block;$i++) {
($token,$index)=@{ $block->[$i] };
# check if token is an alphanumeric command sequence with at least one non-optional argument
- # \cmd[...]{...}{last argument}
+ # \cmd[...]{...}{last argument}
# Capturing in the following results in these associations
# $1: \cmd[...]{...}{
# $2: \cmd
@@ -2586,7 +2622,7 @@ sub extractcommands {
# $4: } + trailing spaces
if ( ( $token =~ m/^(\\([\w\d\*]+)(?:${extraspace}\[$brat_n\]|${extraspace}\{$pat_n\})*${extraspace}\{)($pat_n)(\}\s*)$/so )
&& iscmd($2,\@TEXTCMDLIST,\@TEXTCMDEXCL) ) {
- print STDERR "DEBUG EXTRACTCOMMANDS Match |$1|$2|$3|$4|$index \n" if $debug;
+ print STDERR "DEBUG EXTRACTCOMMANDS Match |$1|$2|$3|$4|$index \n" if $debug;
# push(@$retval,[ $2,$index,$1,$3,$4 ]);
($cmd,$open,$mid,$closing) = ($2,$1,$3,$4) ;
$closing =~ s/\}/\\RIGHTBRACE/ ;
@@ -2597,7 +2633,7 @@ sub extractcommands {
}
# iscmd($cmd,\@regexarray,\@regexexcl) checks
-# return 1 if $cmd matches any of the patterns in the
+# return 1 if $cmd matches any of the patterns in the
# array $@regexarray, and none of the patterns in \@regexexcl, otherwise return 0
sub iscmd {
my ($cmd,$regexar,$regexexcl)=@_;
@@ -2605,7 +2641,7 @@ sub iscmd {
### print STDERR "DEBUG: iscmd($cmd)=" if $debug;
foreach $pat ( @$regexar ) {
if ( $cmd =~ m/^${pat}$/ ) {
- $ret=1 ;
+ $ret=1 ;
last;
}
}
@@ -2621,13 +2657,13 @@ sub iscmd {
# pass2( \@seq1,\@seq2)
-# Look for differences between seq1 and seq2.
+# Look for differences between seq1 and seq2.
# Mark begin and end of deleted and appended sequences with tags $DELOPEN and $DELCLOSE
# and $ADDOPEN and $ADDCLOSE, respectively, however exclude { } & and all comands, unless
# they match an element of the whitelist (SAFECMD)
# For words in TEXTCMD but not in SAFECMD, enclose interior with $ADDOPEN and $ADDCLOSE brackets
-# Deleted comment lines are marked with %DIF <
-# Added comment lines are marked with %DIF >
+# Deleted comment lines are marked with %DIF <
+# Added comment lines are marked with %DIF >
sub pass2 {
my $seq1 = shift ;
my $seq2 = shift ;
@@ -2659,7 +2695,7 @@ sub pass2 {
$addhunk = [];
}
push(@$retval,$seq2->[$_[1]]) };
-
+
my $keyfunc = sub { join(" ",split(" ",shift())) };
traverse_sequences($seq1,$seq2, { MATCH=>$match, DISCARD_A=>$discard, DISCARD_B=>$add }, $keyfunc );
@@ -2668,7 +2704,7 @@ sub pass2 {
push @$retval,marktags($ADDMARKOPEN,$ADDMARKCLOSE,$ADDOPEN,$ADDCLOSE,"","",$ADDCOMMENT,$addhunk) if scalar @$addhunk;
- if ($verbose) {
+ if ($verbose) {
print STDERR "\n";
print STDERR " $mattokcnt matching tokens. \n";
print STDERR " $deltokcnt discarded tokens in $delblkcnt blocks.\n";
@@ -2690,7 +2726,7 @@ sub marktags {
my (@argtext);
my $retval=[];
my $noncomment=0;
- my $cmd=-1; # -1 at beginning 0: last token written is a ordinary word
+ my $cmd=-1; # -1 at beginning 0: last token written is a ordinary word
# 1: last token written is a command
# for keeping track whether we are just in a command sequence or in a word sequence
my $cmdcomment= ($opencmd =~ m/^%/); # Flag to indicate whether opencmd is a comment (i.e. if we intend to simply comment out changed commands)
@@ -2706,31 +2742,31 @@ sub marktags {
# we redefine locally $extraspace (shadowing the global definition) to capture command sequences with intervening spaces no matter what the global setting
# this is done so we can capture those commands with a predefined number of arguments without having to introduce them again explicitly here
- my $extraspace_mt='\s*';
+ my $extraspace_mt='\s*';
foreach (@$block) {
- $word=$_;
+ $word=$_;
if ( $word =~ s/^%/%$comment/ ) {
# a comment
if ($cmd==1) {
push (@$retval,$closecmd) ;
$cmd=-1;
}
- push (@$retval,$word);
+ push (@$retval,$word);
next;
}
if ( $word =~ m/^\s*$/ ) {
### print STDERR "DEBUG MARKTAGS: whitespace detected |$word| cmdcom |$cmdcomment| |$opencmd|\n" if $debug;
# a sequence of white-space characters - this should only ever happen for the first element of block.
- # in deleted block, omit, otherwise just copy it in
+ # in deleted block, omit, otherwise just copy it in
if ( ! $cmdcomment) { # ignore in deleted blocks
push(@$retval,$word);
}
next;
}
if (! $noncomment) {
- push (@$retval,$openmark);
+ push (@$retval,$openmark);
$noncomment=1;
}
# negative lookahead pattern (?!) in second clause is put in to avoid matching \( .. \) patterns
@@ -2740,7 +2776,7 @@ sub marktags {
# word is a command or other significant token (not in SAFECMDLIST)
## same conditions as in subroutine extractcommand:
# check if token is an alphanumeric command sequence with at least one non-optional argument
- # \cmd[...]{...}{last argument}
+ # \cmd[...]{...}{last argument}
# Capturing in the following results in these associations
# $1: \cmd[...]{...}{
# $2: cmd
@@ -2757,11 +2793,11 @@ sub marktags {
# Condition 3: But if we are in a deleted block ($cmdcomment=1) and
# $2 (the command) is in context2, just treat it as an ordinary command (i.e. comment it open with $opencmd)
# Because we do not want to disable this command
- # here we do not use $opencmd and $closecmd($opencmd is empty)
+ # here we do not use $opencmd and $closecmd($opencmd is empty)
print STDERR "DEBUG: Detected text |$word| but not safe command \$2: $2 \$3: $3\n." if $debug;
if ($cmd==1) {
push (@$retval,$closecmd) ;
- } elsif ($cmd==0) {
+ } elsif ($cmd==0) {
push (@$retval,$close) ;
}
$command=$1; $commandword=$2; $closingbracket=$4;
@@ -2777,16 +2813,16 @@ sub marktags {
# for latexrevise
push (@$retval,$command,"%\n{$AUXCMD\n",marktags("","",$open,$close,$opencmd,$closecmd,$comment,\@argtext),$closingbracket);
} elsif ( iscmd($commandword,,\@MATHTEXTCMDLIST, \@MATHTEXTCMDEXCL) ) {
- # MATHBLOCK pseudo command: consider all commands safe, except & and \\, \begin and \end and a few package sprcific one (look at UNSAFEMATHCMD definition)
- # Keep these commands even in deleted blocks, hence set $opencmd and $closecmd (5th and 6th argument of marktags) to
+ # MATHBLOCK pseudo command: consider all commands safe, except & and \\, \begin and \end and a few package sprcific one (look at UNSAFEMATHCMD definition)
+ # Keep these commands even in deleted blocks, hence set $opencmd and $closecmd (5th and 6th argument of marktags) to
# ""
- local @SAFECMDLIST=(".*");
+ local @SAFECMDLIST=(".*");
local @SAFECMDEXCL=('\\','\\\\',@UNSAFEMATHCMD);
push(@$retval,$command,marktags("","",$open,$close,"","",$comment,\@argtext)#@argtext
,$closingbracket);
} else {
# normal textcmd or context1cmd in an added block
- push (@$retval,$command,marktags("","",$open,$close,$opencmd,$closecmd,$comment,\@argtext),$closingbracket);
+ push (@$retval,$command,marktags("","",$open,$close,$opencmd,$closecmd,$comment,\@argtext),$closingbracket);
}
push (@$retval,$AUXCMD,"\n") if $cmdcomment ;
$cmd=-1 ;
@@ -2872,10 +2908,10 @@ sub take_comments_and_newline_from_frac() {
# names or labels but it does not matter because they are converted back in the postprocessing step
# Returns: leading white space removed in step 1
sub preprocess {
- for (@_) {
+ for (@_) {
- # change in \verb and similar commands - note that I introduce an extra space here so that the
+ # change in \verb and similar commands - note that I introduce an extra space here so that the
# already hashed variants do not trigger again
# transform \lstinline{...}
# s/\\lstinline(\[$brat0\])?(\{(?:.*?)\})/"\\DIFlstinline". $1 ."{". tohash(\%verbhash,"$2") ."}"/esg;
@@ -2905,7 +2941,7 @@ sub preprocess {
1 while s/(?<!\\)_(\s*{($pat_n)})/\\SUBSCRIPT$1/g ;
# Convert ^n into \SUPERSCRIPTNB{n} and ^{nnn} into \SUPERSCRIPT{nn}
1 while s/(?<!\\)\^(\s*([^{\\\s]|\\\w+))/\\SUPERSCRIPTNB{$1}/g ;
- 1 while s/(?<!\\)\^(\s*{($pat_n)})/\\SUPERSCRIPT$1/g ;
+ 1 while s/(?<!\\)\^(\s*{($pat_n)})/\\SUPERSCRIPT$1/g ;
# Convert \sqrt{n} into \SQRT{n} and \sqrt nn into SQRTNB{nn}
1 while s/(?<!\\)\\sqrt(\s*([^{\\\s]|\\\w+))/\\SQRTNB{$1}/g ;
1 while s/(?<!\\)\\sqrt(\s*{($pat_n)})/\\SQRT$1/g ;
@@ -2925,16 +2961,16 @@ sub preprocess {
if ( $mathmarkup != FINE ) {
# DIFANCHORARRB and DIFANCHORARRE, DIFANCHORMATHB and DIFANCHORMATHE markers are inserted here to encourage the matching algorithm
# to always match up the closing brace. Otherwise sometimes one ends up with a situation where
- # the closing brace is deleted and added at another point. The deleted closing brace is then
+ # the closing brace is deleted and added at another point. The deleted closing brace is then
# prevented by a %DIFDELCMD, leading to material leaking in or out of the math environment.
# The anchors are removed in post-processing again. (note that they are simple text to cause least amount of complications
- # Admittedly, this is something of a hack and will not always work. If it does not, then one needs to
+ # Admittedly, this is something of a hack and will not always work. If it does not, then one needs to
# resort to WHOLE or FINE, or NONE math mode processing.
s/\\begin\{($ARRENV)}(.*?)\\end\{\1}/\\ARRAYBLOCK$1\{$2\\DIFANCHORARRB \}\\DIFANCHORARRE /sg;
take_comments_and_newline_from_frac();
- # Convert Math environments with arguments
+ # Convert Math environments with arguments
s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}((?:\[$brat_n\])|(?:\{$pat_n\}))+(.*?)\\end\{\1\}/\\MATHBLOCK$1\[$2\]\{$3\\DIFANCHORMATHB \}\\DIFANCHORMATHE /sg;
# Convert Math environments without arguments
s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}(.*?)\\end\{\1\}/\\MATHBLOCK$1\{$2\\DIFANCHORMATHB \}\\DIFANCHORMATHE /sg;
@@ -2948,7 +2984,7 @@ sub preprocess {
# $expanded=linecomment($string)
#preface all lines with verbatim marker (usually DIFVRB)
-sub linecomment {
+sub linecomment {
my @verbatimlines=split("\n",$_[0]);
# the first line needs special treatment - we do want to retain optional arguments as is but wrap the remainder also with VERBCOMMENT
### print STDERR "DEBUG: before verbatimlines[0] = ",$verbatimlines[0],"\n";
@@ -2958,7 +2994,7 @@ sub linecomment {
}
# $simple=reverselinecomment($env $string)
-# remove DIFVRB comments but leave changed lines marked
+# remove DIFVRB comments but leave changed lines marked
sub reverselinecomment {
my ($environment, $verbatimtext)=@_;
### print STDERR "DEBUG REVERSELINECOMMENT input: $environment,|$verbatimtext|\n" if $debug;
@@ -2973,7 +3009,7 @@ sub reverselinecomment {
$verbatimtext =~ s/\\DIFdelend //g;
$verbatimtext =~ s/$DELCMDOPEN.*//g;
- # remove DIFVRB mark
+ # remove DIFVRB mark
$verbatimtext=~ s/%$VERBCOMMENT//g;
# remove part of the markup in changed lines
@@ -3064,7 +3100,7 @@ sub writedebugfile {
# * Remove STOP token from the end
# * Replace \RIGHTBRACE by }
# * If option --no-del is set delete all deleted blocks
-# 1. Check all deleted blocks:
+# 1. Check all deleted blocks:
# a.where a deleted block contains a matching \begin and
# \end environment (these will be disabled by a %DIFDELCMD statements), for selected environments enable
# these commands again (such that for example displayed math in a deleted equation
@@ -3085,14 +3121,14 @@ sub writedebugfile {
# For added blocks:
# c. If in-line math mode contains array environment, enclose the whole environment in \mbox'es
# d. place \cite commands in mbox'es (for UNDERLINE style)
-#
+#
# 2. If math-mode COARSE,WHOLE or NONE option set: Convert \MATHBLOCKmath{..} commands back to environments
#
# Convert all PICTUREblock{..} commands back to the appropriate environments
# 3. Convert DIFadd, DIFdel, DIFaddbegin , ... into FL varieties
# within floats (currently recognised float environments: plate,table,figure
# plus starred varieties).
-# 4. Remove empty %DIFDELCMD < lines
+# 4. Remove empty %DIFDELCMD < lines
# 4. Convert \begin{SQUAREBRACKET} \end{SQUAREBRACKET} into \[ \]
# Convert \begin{DOLLARDOLLAR} \end{DOLLARDOLLAR} into $$ $$
# 5. Convert \SUPERSCRIPTNB{n} into ^n and \SUPERSCRIPT{nn} into ^{nnn}
@@ -3105,7 +3141,7 @@ sub writedebugfile {
# 4, undo renaming of the \begin, \end,{,} in comments
# Change \QLEFTBRACE, \QRIGHTBRACE,\AMPERSAND to \{,\},\&
#
-# Note have to manually synchronize substitution commands below and
+# Note have to manually synchronize substitution commands below and
# DIF.. command names in the header
sub postprocess {
my ($begin,$len,$float,$delblock,$addblock); ### $cnt
@@ -3117,7 +3153,7 @@ sub postprocess {
my (@itemargs, $itemarg);
- for (@_) {
+ for (@_) {
# change $'s in comments to something harmless
1 while s/(%.*)\$/$1DOLLARDIF/mg ;
@@ -3127,7 +3163,7 @@ sub postprocess {
# the only way to get these is as %DIFDELCMD < \RIGHTBRACE construction
# This essentially marks closing right braces of MATHBLOCK environments, which did not get matched
# up. This case should be rare, so I just leave this in the diff file output. Not really elegant
- # but can still be dealt with later if it results in problems.
+ # but can still be dealt with later if it results in problems.
s/%DIFDELCMD < \\RIGHTBRACE/%DIFDELCMD < \\MBLOCKRIGHTBRACE/g ;
# Replace \RIGHTBRACE by }
s/\\RIGHTBRACE/}/g;
@@ -3155,7 +3191,7 @@ sub postprocess {
$len=length($&);
$begin=pos($_) - $len;
$delblock=$&;
- ### A much simpler method for math replacement might follow this strategy (can recycle part of the commands below for following
+ ### A much simpler method for math replacement might follow this strategy (can recycle part of the commands below for following
### this strategy:
### 1. a Insert aux commands \begin{MATHMODE} or \end{MATHMODE} for all deleted commands opening or closing displayed math mode
### b Insert aux commands \begin{MATHARRMODE} or \end{MATHARRMODE} for all deleted commands opening or closing math array mode
@@ -3181,14 +3217,14 @@ sub postprocess {
###0.5: $delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \s*\\end\{((?:$MATHENV)|SQUAREBRACKET)\}\s*?(?:$DELCMDCLOSE|\n))(.*?[^\n]?)\n?(?<!${AUXCMD}\n)(\%DIFDELCMD < \s*\\begin\{\2\})/\\end{MATHMODE}$AUXCMD\n$1$3\n\\begin{MATHMODE}$AUXCMD\n$4/sg;
$delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{((?:$MATHENV)|SQUAREBRACKET)\}.*?(?:$DELCMDCLOSE|\n))(.*?[^\n]?)\n?(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{\2\})/\\end\{MATHMODE\}$AUXCMD\n$1$3\n\\begin\{MATHMODE\}$AUXCMD\n$4/sg;
- # now look for unpaired %DIFDELCMD < \begin{MATHENV}; if found add \begin{$MATHREPL} and insert \end{$MATHREPL}
+ # now look for unpaired %DIFDELCMD < \begin{MATHENV}; if found add \begin{$MATHREPL} and insert \end{$MATHREPL}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{((?:$MATHENV)|SQUAREBRACKET)\}\s*?(?:$DELCMDCLOSE|\n))/$1\\begin{$MATHREPL}$AUXCMD\n/sg ) {
### print STDERR "BINGO: begin block: \nBefore: |" . substr($_,$begin,$len) . "|\n" if $debug ;
$delblock =~ s/(\\DIFdelend$)/\\end{$MATHREPL}$AUXCMD\n$1/s ;
### print STDERR "After: |" . $delblock . "|\n\n" if $debug ;
}
- # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
+ # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{((?:$MATHENV)|SQUAREBRACKET)\}\s*?(?:$DELCMDCLOSE|\n))/$1\\end\{MATHMODE\}$AUXCMD\n/sg ) {
### print STDERR "BINGO: end block:\nBefore: |" . substr($_,$begin,$len) . "|\n" if $debug;
@@ -3211,15 +3247,15 @@ sub postprocess {
$delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{($MATHARRENV)\}\s*?(?:$DELCMDCLOSE|\n))(.*?[^\n]?)\n?(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{\2\})/\\end{MATHMODE}$AUXCMD\n$1$3\n\\begin{MATHMODE}$AUXCMD\n$4/sg;
### print STDERR "STEP1: |" . $delblock . "|\n\n" if $debug ;
- # now look for unpaired %DIFDELCMD < \begin{MATHARRENV}; if found add \begin{$MATHARRREPL} and insert \end{$MATHARRREPL}
+ # now look for unpaired %DIFDELCMD < \begin{MATHARRENV}; if found add \begin{$MATHARRREPL} and insert \end{$MATHARRREPL}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\begin\{($MATHARRENV)\}(.*?)(?:$DELCMDCLOSE|\n))/$1\\begin{$2*}$3$AUXCMD\n/sg ) {
$arrenv=$2;
- $delblock =~ s/(\\DIFdelend$)/\\end{$arrenv*}}$AUXCMD\n$1/s ;
+ $delblock =~ s/(\\DIFdelend$)/\\end{$arrenv*}$AUXCMD\n$1/s ;
}
### print STDERR "STEP2: |" . $delblock . "|\n\n" if $debug ;
- # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
+ # now look for unpaired %DIFDELCMD < \end{MATHENV}; if found add \end{MATHMODE} and insert \begin{MATHMODE}
# just before end of block; again we use look-behind assertion to avoid matching constructions which have already been converted
if ($delblock=~ s/(?<!${AUXCMD}\n)(\%DIFDELCMD < \h*\\end\{($MATHARRENV)\}\s*?(?:$DELCMDCLOSE|\n))/$1\\end{MATHMODE}$AUXCMD\n/sg ) {
$delblock =~ s/(\\DIFdelend$)/\\begin{MATHMODE}$AUXCMD\n$1/s ;
@@ -3237,7 +3273,7 @@ sub postprocess {
### $eqarrayblock=~ s/(\%DIFDELCMD < \s*(\&|\\\\)\s*?(?:$DELCMDCLOSE|\n))/$1$2$AUXCMD\n/sg ;
$eqarrayblock =~ s/(\%DIFDELCMD < (.*?(?:\&|\\\\).*)(?:$DELCMDCLOSE|\n))/
# The pattern captures comments with at least one of & or \\
- @symbols= split(m@((?:&|\\\\)\s*)@,$2); # extract & and \\ and other material from sequence
+ @symbols= split(m@((?:&|\\\\)\s*)@,$2); # extract & and \\ and other material from sequence
@symbols= grep ( m@&|\\\\\s*@, @symbols); # select & and \\ (and subsequent spaces)
"$1@symbols$AUXCMD\n"
/eg ;
@@ -3250,7 +3286,7 @@ sub postprocess {
} elsif ( $mathmarkup == COARSE || $mathmarkup == WHOLE ) {
# Convert MATHBLOCKmath commands to their uncounted numbers (e.g. convert equation -> displaymath
# (environments defined in $MATHENV will be replaced by $MATHREPL, and environments in $MATHARRENV
- # will be replaced by their starred variety
+ # will be replaced by their starred variety
$delblock=~ s/\\MATHBLOCK($MATHENV)((?:\[$brat_n\])?)\{($pat_n)\}/\\MATHBLOCK$MATHREPL$2\{$3\}/sg;
$delblock=~ s/\\MATHBLOCK($MATHARRENV)((?:\[$brat_n\])?)\{($pat_n)\}/\\MATHBLOCK$1\*$2\{$3\}/sg;
}
@@ -3264,10 +3300,10 @@ sub postprocess {
print STDERR "DELBLOCK after maths processing: |" . $delblock . "|\n\n" if $debug ;
- # Reinstate completely deleted list environments. note that items within the
+ # Reinstate completely deleted list environments. note that items within the
# environment will still be commented out. They will be restored later
$delblock=~ s/(\%DIFDELCMD < \s*\\begin\{($LISTENV)\}\s*?(?:\n|$DELCMDCLOSE))(.*?)(\%DIFDELCMD < \s*\\end\{\2\})/{
- ### # block within the search; replacement environment
+ ### # block within the search; replacement environment
### "$1\\begin{$2}$AUXCMD\n". restore_item_commands($3). "\n\\end{$2}$AUXCMD\n$4";
"$1\\begin{$2}$AUXCMD\n$3\n\\end{$2}$AUXCMD\n$4";
}/esg;
@@ -3301,7 +3337,7 @@ sub postprocess {
### if ($CITE2CMD) {
###### ${extraspace}(?:\[$brat0\]${extraspace}){0,2}\{$pat_n\})) .*?%%%\n
### $delblock=~s/($DELCMDOPEN\s*\\($CITE2CMD)(.*)$DELCMDCLOSE)/
- ### # Replacement code
+ ### # Replacement code
### {my ($aux,$all);
### $aux=$all=$1;
### $aux=~s#\n?($DELCMDOPEN|$DELCMDCLOSE)##g;
@@ -3311,7 +3347,7 @@ sub postprocess {
### if ($CITECMD) {
###### $delblock=~s/(\\($CITECMD)${extraspace}(?:\[$brat0\]${extraspace}){0,2}\{$pat_n\})(\s*)/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/msg ;
### $delblock=~s/(\\($CITECMD)${extraspace}(?:<$abrat0>${extraspace})?(?:\[$brat0\]${extraspace}){0,2}\{$pat_n\})(\s*)/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/msg ;
- ### }
+ ### }
# if MBOXINLINEMATH is set, protect inlined math environments with an extra mbox
@@ -3319,7 +3355,7 @@ sub postprocess {
# note additional \newline after command is omitted from output if right at the end of deleted block (otherwise a spurious empty line is generated)
$delblock=~s/($math)(?:[\s\n]*)?/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/sg;
}
- ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/)) {
+ ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/)) {
### # change included verbatim environments
### $delblock =~ s/\\DIFverb\{/\\DIFDIFdelverb\{/g;
### $delblock =~ s/\\DIFlstinline/\\DIFDIFdellstinline/g;
@@ -3361,7 +3397,7 @@ sub postprocess {
##$addblock=~s/($math)/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/sg;
$addblock=~s/($math)(?:[\s\n]*)?/\\mbox{$AUXCMD\n$1\n}$AUXCMD\n/sg;
}
- ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat0\])?\{color\}/)) {
+ ###if ( defined($packages{"listings"} and $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat0\])?\{color\}/)) {
# mark added verbatim commands
$addblock =~ s/\\DIFverb/\\DIFDIFaddverb/g;
$addblock =~ s/\\DIFlstinline/\\DIFDIFaddlstinline/g;
@@ -3379,11 +3415,11 @@ sub postprocess {
pos = $begin + length($addblock);
}
- # Go through whole text, and by counting list environment commands, find out when we are within a list environment.
+ # Go through whole text, and by counting list environment commands, find out when we are within a list environment.
# Within those restore deleted \item commands
- @textparts=split /(?<!$DELCMDOPEN)(\\(?:begin|end)\{$LISTENV\})/ ;
+ @textparts=split /(?<!$DELCMDOPEN)(\\(?:begin|end)\{$LISTENV\})/ ;
@liststack=();
- @newtextparts=map {
+ @newtextparts=map {
### print STDERR ":::::::: $_\n";
if ( ($listtype) = m/^\\begin\{($LISTENV)\}$/ ) {
print STDERR "DEBUG: postprocess \\begin{$listtype}\n" if $debug;
@@ -3399,7 +3435,7 @@ sub postprocess {
} else {
print STDERR "DEBUG: postprocess \@liststack=(",join(",",@liststack),")\n" if $debug;
if (scalar @liststack > 0 ) {
- # we are within a list environment and should replace all item commands
+ # we are within a list environment and should replace all item commands
$_=restore_item_commands($_);
}
# else: we are outside a list environment and do not need to do anything
@@ -3412,17 +3448,17 @@ sub postprocess {
# Replace MATHMODE environments from step 1a above by the correct Math environment and remove unncessary pairings
-
+
if ( $mathmarkup == FINE ) {
# look for AUXCMD math-mode pairs which have only comments (or empty lines between them), and remove the added commands
# \begin{..} ... \end{..} pairs
- s/\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\end\{\1\}$AUXCMD\n/$2/sg;
+ s/\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\end\{\1\}$AUXCMD\n/$2/sg;
# \end{..} .... \begin{..} pairs
- s/\\end\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\begin\{\1\}$AUXCMD\n/$2/sg;
+ s/\\end\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET|MATHMODE)\}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\begin\{\1\}$AUXCMD\n/$2/sg;
writedebugfile($_,'postprocess15');
# The next line is complicated. The negative look-ahead insertion makes sure that no \end{$MATHENV} (or other mathematical
- # environments) are between the \begin{$MATHENV} and \end{MATHMODE} commands. This is necessary as the minimal matching
+ # environments) are between the \begin{$MATHENV} and \end{MATHMODE} commands. This is necessary as the minimal matching
# is not globally minimal but only 'locally' (matching is beginning from the left side of the string)
# [NB: Do not be tempted to prettify the expression with /x modified. It seems this is applied after strings are expanded so will ignore spaces in strings
1 while s/(?<!$DELCMDOPEN)\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}((?:${DELCMDOPEN}[^\n]*|.(?!(?:\\end\{(?:(?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}|\\begin\{MATHMODE})))*?)\\end\{MATHMODE}/\\begin{$1}$2\\end{$1}/s;
@@ -3497,7 +3533,7 @@ sub postprocess {
# remove empty DIFCMD < lines
s/^\Q${DELCMDOPEN}\E\n//msg;
- # Expand hashes of verb and verbatim environments
+ # Expand hashes of verb and verbatim environments
s/${DELCMDOPEN}\\($VERBATIMENV)\{([-\d]*?)\}/"${DELCMDOPEN}\\begin{${1}}".fromhash(\%verbhash,$2,$DELCMDOPEN)."${DELCMDOPEN}\\end{${1}}"/esg;
# revert changes to verbatim environments for line diffs (and add code to mark up changes) (note negative look behind assertions to not leak out of DIFDELCMD comments)
# Example:
@@ -3523,8 +3559,8 @@ sub postprocess {
((?:\%\Q$DELCOMMENT$VERBCOMMENT\E[^\n]*?\n)*)
# Deleted \end command of verbatim environment. Note that the type is forced to match the opening. Captures: $5: Whole deleted environment (previous way this line was written: (\Q$DELCMDOPEN\E\\end\{\2\}(?:\n|\s|\Q$DELCMDOPEN\E)*\Q$DELCMDCLOSE\E)
(\Q$DELCMDOPEN\E\\end\{\2\})
- / # Substitution part
- $1 # Leave expression as is
+ / # Substitution part
+ $1 # Leave expression as is
. "$AUXCMD NEXT\n" # Mark the following line as an auxiliary command
. "" # reinstate the original environment without options
. reverselinecomment($2, "$3$4") # modify the body to change the markup; reverselinecomment parses for options
@@ -3533,7 +3569,7 @@ sub postprocess {
/esgx; # Modifiers of substitution command
writedebugfile($_,'postprocess2');
# where changes have occurred in verbatim environment, change verbatim to DIFverbatim to allow mark-up
- # (I use the presence of optional paramater to verbatim environment as the marker - normal verbatim
+ # (I use the presence of optional paramater to verbatim environment as the marker - normal verbatim
# environment does not take optional arguments)
s/(?<!$DELCMDOPEN)\\begin\{(verbatim[*]?)\}(\[$brat_n\].*?)\\end\{\1\}/\\begin{DIF$1}$2\\end{DIF$1}/sg;
@@ -3547,7 +3583,7 @@ sub postprocess {
# convert remaining PAR commands (which are preceded by non-white space characters, usually "}" ($ADDCLOSE)
s/\\PAR\n/\n\n/sg;
- # package specific processing:
+ # package specific processing:
if ( defined($packages{"endfloat"})) {
#endfloat: make sure \begin{figure} and \end{figure} are always
# on a line by themselves, similarly for table environment
@@ -3560,12 +3596,16 @@ sub postprocess {
s/^((?:[^%]+)\\(?:begin|end)\{(?:figure|table)\}(?:\[[a-zA-Z]+\])?)(.+)((?:%.*)?)$/$1\n$2$3/mg;
}
- # Convert '\PERCENTAGE ' back into '\%' (the final question mark catches a special situation where due to a latter pre-processing step the ' ' becomes separated
+ # Remove empty auxiliary LISTENV (sometmes these are generated if list environment occurs within the argument of a deleted comment)
+ # (slightly hacky but I could not see an easy way to see if in argument of another command when this extra markup is added)
+ s/\\begin\{($LISTENV)\}$AUXCMD\n((?:\s*\%[^\n]*\n)*\n?)\\end\{\1\}$AUXCMD\n/$2\n/msg ;
+
+ # Convert '\PERCENTAGE ' back into '\%' (the final question mark catches a special situation where due to a latter pre-processing step the ' ' becomes separated
s/\\PERCENTAGE ?/\\%/g;
- # Convert '\DOLLAR ' back into '\$'
+ # Convert '\DOLLAR ' back into '\$'
s/\\DOLLAR /\\\$/g;
- # undo renaming of the \begin and \end,{,} and dollars in comments
+ # undo renaming of the \begin and \end,{,} and dollars in comments
# although we only renamed $ in comments to DOLLARDIFF, we might have lost the % in unchanged verbatim blocks, so rename all
s/DOLLARDIF/\$/g;
@@ -3583,7 +3623,7 @@ sub postprocess {
# Convert \SQRT{n} into \sqrt{n} and \SQRTNB{nn} into \sqrt nn
1 while s/\\SQRT(\s*\{($pat_n)\})/\\sqrt$1/g ;
1 while s/\\SQRTNB\{(\s*$pat0)\}/\\sqrt$1/g ;
-
+
1 while s/(%.*)\\CFRAC (.*)$/$1\\frac$2/mg ;
1 while s/(%.*)\\CRIGHTBRACE (.*)$/$1\}$2/mg ;
1 while s/(%.*)\\CLEFTBRACE (.*)$/$1\{$2/mg ;
@@ -3594,7 +3634,7 @@ sub postprocess {
s/\\QRIGHTBRACE /\\\}/sg;
s/\\AMPERSAND /\\&/sg;
# Highlight added inline verbatim commands if possible
- if ( $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/ ) {
+ if ( $latexdiffpreamble =~ /\\RequirePackage(?:\[$brat_n\])?\{color\}/ ) {
# wrap added verb commands with color commands
s/\\DIFDIFadd((?:verb\*?|lstinline(?:\[$brat_n\])?)\{[-\d]*?\}[\s\n]*)/\{\\color{blue}$AUXCMD\n\\DIF$1%\n\}$AUXCMD\n/sg;
s/\\DIFDIFdel((?:verb\*?|lstinline(?:\[$brat_n\])?)\{[-\d]*?\}[\s\n]*$AUXCMD)/\{\\color{red}${AUXCMD}\n\\DIF$1\n\}${AUXCMD}/sg;
@@ -3609,8 +3649,8 @@ sub postprocess {
# finally add the comment to the ones not having an optional argument before
###s/\\DIFaddlstinline(?!\[)/\\lstinline\n[basicstyle=\\color{blue}]$AUXCMD\n/g;
- return;
}
+ return;
}
# $out = restore_item_commands($listenviron)
@@ -3634,13 +3674,13 @@ sub restore_item_commands {
# @auxlines=preprocess_preamble($oldpreamble,$newpreamble);
- # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
- # the list of commands is defined in CONTEXT2CMD
- # if found then use a bodydiff to mark up content, and replace the corresponding commands
+ # pre-process preamble by looking for commands used in \maketitle (title, author, date etc commands)
+ # the list of commands is defined in CONTEXT2CMD
+ # if found then use a bodydiff to mark up content, and replace the corresponding commands
# in both preambles by marked up version to 'fool' the linediff (such that only body is marked up).
# A special case are e.g. author commands being added (or removed)
# 1. If commands are added, then the entire content is marked up as new, but also the lines are marked as new in the linediff
- # 2. If commands are removed, then the linediff will mark the line as deleted. The program returns
+ # 2. If commands are removed, then the linediff will mark the line as deleted. The program returns
# with $auxlines a text to be appended at the end of the preamble, which shows the respective fields as deleted
sub preprocess_preamble {
my ($oldpreambleref,$newpreambleref)=(\$_[0],\$_[1]) ;
@@ -3662,7 +3702,7 @@ EOF
$titlecmd = "(?:".join("|",@CONTEXT2CMDLIST).")";
# as context2cmdlist is stored as regex, e.g. ((?-xism:^title$), we need to remove ^- fo
# resue in a more complex regex
- $titlecmd =~ s/[\$\^]//g;
+ $titlecmd =~ s/[\$\^]//g;
# make sure to not match on comment lines:
$titlecmdpat=qr/^(?:[^%\n]|\\%)*(\\($titlecmd)$extraspace(?:\[($brat_n)\])?(?:\{($pat_n)\}))/ms;
###print STDERR "DEBUG:",$titlecmdpat,"\n";
@@ -3688,7 +3728,7 @@ EOF
$cmd=shift @newtitlecommands;
$optarg=shift @newtitlecommands;
$arg=shift @newtitlecommands;
-
+
if ( defined($newhash{$cmd})) {
warn "$cmd is used twice in preamble of new file. Reverting to pure line diff mode for preamble.\n";
print STDERR $warnmsgdetail;
@@ -3715,7 +3755,7 @@ EOF
}
$argnew=$newhash{$cmd}->[2];
$argdiff="{" . join("",bodydiff($argold,$argnew)) ."}";
- # Replace \RIGHTBRACE by }
+ # Replace \RIGHTBRACE by }
$argdiff =~ s/\\RIGHTBRACE/}/g;
if ( length $optargnew ) {
@@ -3730,7 +3770,7 @@ EOF
$optargdiff="";
}
### print STDERR "DEBUG s/\\Q$newhash{$cmd}->[0]\\E/\\$cmd$optargdiff$argdiff/s\n";
- # Note: \Q and \E force literal interpretation of what it between them but allow
+ # Note: \Q and \E force literal interpretation of what it between them but allow
# variable interpolation, such that e.g. \title matches just that and not TAB-itle
$$newpreambleref=~s/\Q$newhash{$cmd}->[0]\E/\\$cmd$optargdiff$argdiff/s;
# replace this in old preamble if necessary
@@ -3770,7 +3810,7 @@ EOF
#%< old deleted line(s)
#%DIF -------
#%DIF mmann-nn
-#new appended line %<
+#new appended line %<
#%DIF -------
# Future extension: mark change explicitly
# Assumes: traverse_sequence traverses deletions before insertions in changed sequences
@@ -3782,9 +3822,9 @@ sub linediff {
my $block = [];
my $retseq = [];
my @begin=('','',''); # dummy initialisation
- my $instring ;
+ my $instring ;
- my $discard = sub { @begin=('d',$_[0],$_[1]) unless scalar @$block ;
+ my $discard = sub { @begin=('d',$_[0],$_[1]) unless scalar @$block ;
push(@$block, "%DIF < " . $seq1->[$_[0]]) };
my $add = sub { if (! scalar @$block) {
@begin=('a',$_[0],$_[1]) ;}
@@ -3799,12 +3839,12 @@ sub linediff {
$instring = sprintf "%%DIF %da%d-%d",$begin[1],$begin[2],$_[1]-1; }
elsif ( $begin[0] eq 'c' ) {
$instring = sprintf "%%DIF %sc%s",
- ($begin[1]==$_[0]-1) ? "$begin[1]" : $begin[1]."-".($_[0]-1) ,
+ ($begin[1]==$_[0]-1) ? "$begin[1]" : $begin[1]."-".($_[0]-1) ,
($begin[2]==$_[1]-1) ? "$begin[2]" : $begin[2]."-".($_[1]-1) ; }
else {
$instring = sprintf "%%DIF %d%s%d",$begin[1],$begin[0],$begin[2]; }
- push @$retseq, $instring,@$block, "%DIF -------" ;
- $block = [];
+ push @$retseq, $instring,@$block, "%DIF -------" ;
+ $block = [];
}
push @$retseq, $seq2->[$_[1]]
};
@@ -3812,7 +3852,7 @@ sub linediff {
my $keyfunc = sub { join(" ",split(" ",shift())) };
traverse_sequences($seq1,$seq2, { MATCH=>$match, DISCARD_A=>$discard, DISCARD_B=>$add }, $keyfunc );
- push @$retseq, @$block if scalar @$block;
+ push @$retseq, @$block if scalar @$block;
return wantarray ? @$retseq : $retseq ;
}
@@ -3822,23 +3862,23 @@ sub linediff {
# init_regex_arr_data(\@array,"TOKEN INIT")
# scans DATA file handel for line "%% TOKEN INIT" line
# then appends each line not beginning with % into array (as a quoted regex)
-# This is used for command lists and configuration variables, but the processing is slightly
-# different:
+# This is used for command lists and configuration variables, but the processing is slightly
+# different:
# For lists, the regular expression is extended to include beginning (^) and end ($) markers, to require full-string matching
# For configuration variables (and all others), simply an unadorned list is copied
sub init_regex_arr_data {
my ($arr,$token)=@_;
my $copy=0;
my ($mode);
- if ($token =~ m/COMMANDS/ ) {
- $mode=0; # Reading command list
+ if ($token =~ m/COMMANDS/ ) {
+ $mode=0; # Reading command list
} else {
$mode=1; # Reading configuration variables
}
while (<DATA>) {
if ( m/^%%BEGIN $token\s*$/ ) {
- $copy=1;
+ $copy=1;
next;
} elsif ( m/^%%END $token\s*$/ ) {
last; }
@@ -3919,17 +3959,18 @@ sub exetime {
sub usage {
- print STDERR <<"EOF";
+ print STDERR <<"EOF";
Usage: $0 [options] old.tex new.tex > diff.tex
-Compares two latex files and writes tex code to stdout, which has the same format as new.tex but
+Compares two latex files and writes tex code to stdout, which has the same format as new.tex but
has all changes relative to old.tex marked up or commented. Note that old.tex and new.tex need to
-be real files (not pipes or similar) as they are opened twice.
+be real files (not pipes or similar) as they are opened twice.
--type=markupstyle
-t markupstyle Add code to preamble for selected markup style
- Available styles: UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
+ Available styles: UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT
+ LUAUNDERLINE
[ Default: UNDERLINE ]
--subtype=markstyle
@@ -3940,7 +3981,7 @@ be real files (not pipes or similar) as they are opened twice.
* LABEL subtype is deprecated
--floattype=markstyle
--f markstyle Add code to preamble for selected style which
+-f markstyle Add code to preamble for selected style which
replace standard marking and markup commands within floats
(e.g., marginal remarks cause an error within floats
so marginal marking can be disabled thus)
@@ -3949,11 +3990,11 @@ be real files (not pipes or similar) as they are opened twice.
--encoding=enc
-e enc Specify encoding of old.tex and new.tex. Typical encodings are
- ascii, utf8, latin1, latin9. A list of available encodings can be
- obtained by executing
+ ascii, utf8, latin1, latin9. A list of available encodings can be
+ obtained by executing
perl -MEncode -e 'print join ("\\n",Encode->encodings( ":all" )) ;'
[Default encoding is utf8 unless the first few lines of the preamble contain
- an invocation "\\usepackage[..]{inputenc} in which case the
+ an invocation "\\usepackage[..]{inputenc} in which case the
encoding chosen by this command is asssumed. Note that ASCII (standard
latex) is a subset of utf8]
@@ -3970,22 +4011,22 @@ be real files (not pipes or similar) as they are opened twice.
--exclude-safecmd=exclude-file
--exclude-safecmd="cmd1,cmd2,..."
--A exclude-file
+-A exclude-file
--replace-safecmd=replace-file
--append-safecmd=append-file
--append-safecmd="cmd1,cmd2,..."
-a append-file Exclude from, replace or append to the list of regex
- matching commands which are safe to use within the
+ matching commands which are safe to use within the
scope of a \\DIFadd or \\DIFdel command. The file must contain
one Perl-RegEx per line (Comment lines beginning with # or % are
ignored). A literal comma within the comma-separated list must be
- escaped thus "\\,", Note that the RegEx needs to match the whole of
+ escaped thus "\\,", Note that the RegEx needs to match the whole of
the token, i.e., /^regex\$/ is implied and that the initial
"\\" of the command is not included. The --exclude-safecmd
- and --append-safecmd options can be combined with the --replace-safecmd
+ and --append-safecmd options can be combined with the --replace-safecmd
option and can be used repeatedly to add cumulatively to the lists.
---exclude-textcmd=exclude-file
+--exclude-textcmd=exclude-file
--exclude-textcmd="cmd1,cmd2,..."
-X exclude-file
--replace-textcmd=replace-file
@@ -4001,7 +4042,7 @@ be real files (not pipes or similar) as they are opened twice.
Replace or append to the list of regex matching commands
whose last argument is text but which require a particular
context to work, e.g. \\caption will only work within a figure
- or table. These commands behave like text commands, except when
+ or table. These commands behave like text commands, except when
they occur in a deleted section, when they are disabled, but their
argument is shown as deleted text.
@@ -4011,7 +4052,7 @@ be real files (not pipes or similar) as they are opened twice.
As corresponding commands for context1. The only difference is that
context2 commands are completely disabled in deleted sections, including
their arguments.
- context2 commands are also the only commands in the preamble, whose argument will
+ context2 commands are also the only commands in the preamble, whose argument will
be processed in word-by-word mode (which only works, if they occur no more than
once in the preamble).
@@ -4020,15 +4061,15 @@ be real files (not pipes or similar) as they are opened twice.
--append-mboxsafecmd=append-file
--append-mboxsafecmd="cmd1,cmd2,..."
Define safe commands, which additionally need to be protected by encapsulating
- in an \\mbox{..}. This is sometimes needed to get around incompatibilities
+ in an \\mbox{..}. This is sometimes needed to get around incompatibilities
between external packages and the ulem package, which is used for highlighting
in the default style UNDERLINE as well as CULINECHBAR CFONTSTRIKE
-
+
--config var1=val1,var2=val2,...
-c var1=val1,.. Set configuration variables.
--c configfile Available variables:
+-c configfile Available variables:
ARRENV (RegEx)
COUNTERCMD (RegEx)
FLOATENV (RegEx)
@@ -4047,15 +4088,15 @@ be real files (not pipes or similar) as they are opened twice.
--add-to-config varenv1=pattern1,varenv2=pattern2
For configuration variables containing a regular expression (essentially those ending
- in ENV, and COUNTERCMD) this provides an alternative way to modify the configuration
+ in ENV, and COUNTERCMD) this provides an alternative way to modify the configuration
variables. Instead of setting the complete pattern, with this option it is possible to add an
alternative pattern. varenv must be one of the variables listed above that take a regular
- expression as argument, and pattern is any regular expression (which might need to be
+ expression as argument, and pattern is any regular expression (which might need to be
protected from the shell by quotation). Several patterns can be added at once by using semi-colons
to separate them, e.g. --add-to-config "LISTENV=myitemize;myenumerate,COUNTERCMD=endnote"
--packages=pkg1,pkg2,..
- Tell latexdiff that .tex file is processed with the packages in list
+ Tell latexdiff that .tex file is processed with the packages in list
loaded. This is normally not necessary if the .tex file includes the
preamble, as the preamble is automatically scanned for \\usepackage commands.
Use of the --packages option disables automatic scanning, so if for any
@@ -4076,57 +4117,57 @@ be real files (not pipes or similar) as they are opened twice.
--show-all Show all of the above
- NB For all --show commands, no old.tex or new.tex file needs to be given, and no
+ NB For all --show commands, no old.tex or new.tex file needs to be given, and no
differencing takes place.
Other configuration options:
--allow-spaces Allow spaces between bracketed or braced arguments to commands
- [Default requires arguments to directly follow each other without
+ [Default requires arguments to directly follow each other without
intervening spaces]
--math-markup=level Determine granularity of markup in displayed math environments:
Possible values for level are (both numerical and text labels are acceptable):
- off or 0: suppress markup for math environments. Deleted equations will not
- appear in diff file. This mode can be used if all the other modes
+ off or 0: suppress markup for math environments. Deleted equations will not
+ appear in diff file. This mode can be used if all the other modes
cause invalid latex code.
whole or 1: Differencing on the level of whole equations. Even trivial changes
- to equations cause the whole equation to be marked changed. This
- mode can be used if processing in coarse or fine mode results in
+ to equations cause the whole equation to be marked changed. This
+ mode can be used if processing in coarse or fine mode results in
invalid latex code.
coarse or 2: Detect changes within equations marked up with a coarse
- granularity; changes in equation type (e.g.displaymath to equation)
+ granularity; changes in equation type (e.g.displaymath to equation)
appear as a change to the complete equation. This mode is recommended
for situations where the content and order of some equations are still
being changed. [Default]
fine or 3: Detect small change in equations and mark up and fine granularity.
This mode is most suitable, if only minor changes to equations are
- expected, e.g. correction of typos.
+ expected, e.g. correction of typos.
--graphics-markup=level Change highlight style for graphics embedded with \\includegraphics commands
Possible values for level:
none,off or 0: no highlighting for figures
new-only or 1: surround newly added or changed figures with a blue frame [Default]
- both or 2: highlight new figures with a blue frame and show deleted figures
+ both or 2: highlight new figures with a blue frame and show deleted figures
at reduced scale, and crossed out with a red diagonal cross. Use configuration
variable SCALEDELGRAPHICS to set size of deleted figures.
- Note that changes to the optional parameters will make the figure appear as changed
+ Note that changes to the optional parameters will make the figure appear as changed
to latexdiff, and this figure will thus be highlighted.
In some circumstances "Misplaced \\noalign" errors can occur if there are certain types
- of changes in tables. In this case please use option --graphics-markup=none as a
- work-around.
+ of changes in tables. In this case please use option --graphics-markup=none as a
+ work-around.
---no-del Suppress deleted text from the diff. It is similar in effect to the BOLD style,
+--no-del Suppress deleted text from the diff. It is similar in effect to the BOLD style,
but the deleted text ist not just invisible in the output, it is also not included in the
- diff text file. This can be more robust than just making it invisible.
+ diff text file. This can be more robust than just making it invisible.
---disable-citation-markup
---disable-auto-mbox Suppress citation markup and markup of other vulnerable commands in styles
+--disable-citation-markup
+--disable-auto-mbox Suppress citation markup and markup of other vulnerable commands in styles
using ulem (UNDERLINE,FONTSTRIKE, CULINECHBAR)
(the two options are identical and are simply aliases)
--enable-citation-markup
---enforce-auto-mbox Protect citation commands and other vulnerable commands in changed sections
+--enforce-auto-mbox Protect citation commands and other vulnerable commands in changed sections
with \\mbox command, i.e. use default behaviour for ulem package for other packages
(the two options are identical and are simply aliases)
@@ -4142,14 +4183,14 @@ Miscellaneous options
--no-label Suppress inclusion of old and new file names as comment in output file
---visible-label Include old and new filenames (or labels set with --label option) as
+--visible-label Include old and new filenames (or labels set with --label option) as
visible output
--flatten Replace \\input and \\include commands within body by the content
of the files in their argument. If \\includeonly is present in the
- preamble, only those files are expanded into the document. However,
- no recursion is done, i.e. \\input and \\include commands within
- included sections are not expanded. The included files are assumed to
+ preamble, only those files are expanded into the document. However,
+ no recursion is done, i.e. \\input and \\include commands within
+ included sections are not expanded. The included files are assumed to
be located in the same directories as the old and new master files,
respectively, making it possible to organise files into old and new directories.
--flatten is applied recursively, so inputted files can contain further
@@ -4172,7 +4213,7 @@ Miscellaneous options
-h Show this help text.
--ignore-warnings Suppress warnings about inconsistencies in length between input
- and parsed strings and missing characters.
+ and parsed strings and missing characters.
--verbose
-V Output various status information to stderr during processing.
@@ -4184,10 +4225,10 @@ Internal options:
These options are mostly for automated use by latexdiff-vc. They can be used directly, but
the API should be considered less stable than for the other options.
---no-links Suppress generation of hyperreferences, used for minimal diffs
+--no-links Suppress generation of hyperreferences, used for minimal diffs
(option --only-changes of latexdiff-vc).
EOF
- exit 0;
+ exit 0;
}
=head1 NAME
@@ -4213,8 +4254,8 @@ be real files (not pipes or similar) as they are opened twice (unless C<--encodi
The program treats the preamble differently from the main document.
Differences between the preambles are found using line-based
differencing (similarly to the Unix diff command, but ignoring white
-spaces). A comment, "S<C<%DIF E<gt>>>" is appended to each added line, i.e. a
-line present in C<new.tex> but not in C<old.tex>. Discarded lines
+spaces). A comment, "S<C<%DIF E<gt>>>" is appended to each added line, i.e. a
+line present in C<new.tex> but not in C<old.tex>. Discarded lines
are deactivated by prepending "S<C<%DIF E<lt>>>". Changed blocks are preceded by
comment lines giving information about line numbers in the original files. Where there are insignificant
differences, the resulting file C<diff.tex> will be similar to
@@ -4267,7 +4308,7 @@ curly braces immediately following a command (i.e. a sequence of
letters beginning with a backslash) are arguments for that command.
As a restriction to condition 1 above it is thus necessary to surround
all arguments with curly braces, and to not insert
-extraneous spaces. For example, write
+extraneous spaces. For example, write
\section{\textem{This is an emphasized section title}}
@@ -4299,7 +4340,7 @@ but the choice is yours. Any markup within the environment will be
removed, and generally everything within the environment will just be
taken from the new file.
-It is also possible to difference files which do not have a preamble.
+It is also possible to difference files which do not have a preamble.
In this case, the file is processed in the main document
mode, but the definitions of the markup commands are not inserted.
@@ -4317,7 +4358,7 @@ the scope of C<\DIFadd>. Added comments are marked by prepending
Within deleted blocks text is highlighted with C<\DIFdel>. Deleted
comments are marked by prepending "S<C<%DIF E<lt> >>". Non-safe command
-and curly braces within deleted blocks are commented out with
+and curly braces within deleted blocks are commented out with
"S<C<%DIFDELCMD E<lt> >>".
@@ -4327,7 +4368,7 @@ and curly braces within deleted blocks are commented out with
=head2 Preamble
The following options determine the visual markup style by adding the appropriate
-command definitions to the preamble. See the end of this section for a description of
+command definitions to the preamble. See the end of this section for a description of
available styles.
=over 4
@@ -4337,15 +4378,16 @@ B<-t markupstyle>
Add code to preamble for selected markup style. This option defines
C<\DIFadd> and C<\DIFdel> commands.
-Available styles:
+Available styles:
-C<UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
-CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT>
+C<UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
+CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT
+LUAUNDERLINE>
[ Default: C<UNDERLINE> ]
=item B<--subtype=markstyle> or
-B<-s markstyle>
+B<-s markstyle>
Add code to preamble for selected style for bracketing
commands (e.g. to mark changes in margin). This option defines
@@ -4358,27 +4400,27 @@ Available styles: C<SAFE MARGIN COLOR DVIPSCOL ZLABEL ONLYCHANGEDPAGE (LABEL)*>
=item B<--floattype=markstyle> or
B<-f markstyle>
-Add code to preamble for selected style which
+Add code to preamble for selected style which
replace standard marking and markup commands within floats
(e.g., marginal remarks cause an error within floats
-so marginal marking can be disabled thus). This option defines all
+so marginal marking can be disabled thus). This option defines all
C<\DIF...FL> commands.
Available styles: C<FLOATSAFE TRADITIONALSAFE IDENTICAL>
[ Default: C<FLOATSAFE> ]
-=item B<--encoding=enc> or
+=item B<--encoding=enc> or
B<-e enc>
Specify encoding of old.tex and new.tex. Typical encodings are
-C<ascii>, C<utf8>, C<latin1>, C<latin9>. A list of available encodings can be
-obtained by executing
+C<ascii>, C<utf8>, C<latin1>, C<latin9>. A list of available encodings can be
+obtained by executing
C<perl -MEncode -e 'print join ("\n",Encode->encodings( ":all" )) ;' >
If this option is used, then old.tex, new.tex are only opened once.
[Default encoding is utf8 unless the first few lines of the preamble contain
-an invocation C<\usepackage[..]{inputenc}> in which case the
+an invocation C<\usepackage[..]{inputenc}> in which case the
encoding chosen by this command is asssumed. Note that ASCII (standard
latex) is a subset of utf8]
@@ -4395,7 +4437,7 @@ C<\DIFaddbeginFL, \DIFaddendFL, \DIFaddFL{..},
(If this option is set B<-t>, B<-s>, and B<-f> options
are ignored.)
-=item B<--packages=pkg1,pkg2,..>
+=item B<--packages=pkg1,pkg2,..>
Tell latexdiff that .tex file is processed with the packages in list
loaded. This is normally not necessary if the .tex file includes the
@@ -4406,13 +4448,13 @@ The following packages trigger special behaviour:
=over 8
-=item C<endfloat>
+=item C<endfloat>
Ensure that C<\begin{figure}> and C<\end{figure}> always appear by themselves on a line.
=item C<hyperref>
-Change name of C<\DIFadd> and C<\DIFdel> commands to C<\DIFaddtex> and C<\DIFdeltex> and
+Change name of C<\DIFadd> and C<\DIFdel> commands to C<\DIFaddtex> and C<\DIFdeltex> and
define new C<\DIFadd> and C<\DIFdel> commands, which provide a wrapper for these commands,
using them for the text but not for the link defining command (where any markup would cause
errors).
@@ -4464,17 +4506,17 @@ B<-A exclude-file> or B<--exclude-safecmd="cmd1,cmd2,...">
=item B<--replace-safecmd=replace-file>
-=item B<--append-safecmd=append-file> or
+=item B<--append-safecmd=append-file> or
B<-a append-file> or B<--append-safecmd="cmd1,cmd2,...">
Exclude from, replace or append to the list of regular expressions (RegEx)
-matching commands which are safe to use within the
+matching commands which are safe to use within the
scope of a C<\DIFadd> or C<\DIFdel> command. The file must contain
one Perl-RegEx per line (Comment lines beginning with # or % are
-ignored). Note that the RegEx needs to match the whole of
+ignored). Note that the RegEx needs to match the whole of
the token, i.e., /^regex$/ is implied and that the initial
-"\" of the command is not included.
-The B<--exclude-safecmd> and B<--append-safecmd> options can be combined with the -B<--replace-safecmd>
+"\" of the command is not included.
+The B<--exclude-safecmd> and B<--append-safecmd> options can be combined with the -B<--replace-safecmd>
option and can be used repeatedly to add cumulatively to the lists.
B<--exclude-safecmd>
and B<--append-safecmd> can also take a comma separated list as input. If a
@@ -4487,7 +4529,7 @@ B<-X exclude-file> or B<--exclude-textcmd="cmd1,cmd2,...">
=item B<--replace-textcmd=replace-file>
-=item B<--append-textcmd=append-file> or
+=item B<--append-textcmd=append-file> or
B<-x append-file> or B<--append-textcmd="cmd1,cmd2,...">
Exclude from, replace or append to the list of regular expressions
@@ -4495,7 +4537,7 @@ matching commands whose last argument is text. See
entry for B<--exclude-safecmd> directly above for further details.
-=item B<--replace-context1cmd=replace-file>
+=item B<--replace-context1cmd=replace-file>
=item B<--append-context1cmd=append-file> or
@@ -4504,11 +4546,11 @@ entry for B<--exclude-safecmd> directly above for further details.
Replace or append to the list of regex matching commands
whose last argument is text but which require a particular
context to work, e.g. C<\caption> will only work within a figure
-or table. These commands behave like text commands, except when
+or table. These commands behave like text commands, except when
they occur in a deleted section, when they are disabled, but their
argument is shown as deleted text.
-=item B<--replace-context2cmd=replace-file>
+=item B<--replace-context2cmd=replace-file>
=item B<--append-context2cmd=append-file> or
@@ -4518,9 +4560,9 @@ As corresponding commands for context1. The only difference is that
context2 commands are completely disabled in deleted sections, including
their arguments.
-context2 commands are also the only commands in the preamble, whose argument will be processed in
+context2 commands are also the only commands in the preamble, whose argument will be processed in
word-by-word mode (which only works, if they occur no more than once in the preamble). The algorithm currently cannot cope with repeated context2 commands in the preamble, as they occur e.g. for the C<\author> argument in some journal styles (not in the standard styles, though
-If such a repetition is detected, the whole preamble will be processed in line-by-line mode. In such a case, use C<--replace-context2cmd> option to just select the commands, which should be processed and are not used repeatedly in the preamble.
+If such a repetition is detected, the whole preamble will be processed in line-by-line mode. In such a case, use C<--replace-context2cmd> option to just select the commands, which should be processed and are not used repeatedly in the preamble.
@@ -4529,7 +4571,7 @@ If such a repetition is detected, the whole preamble will be processed in line-b
=item B<--append-mboxsafecmd=append-file> or B<--append-mboxsafecmd="cmd1,cmd2,...">
Define safe commands, which additionally need to be protected by encapsulating
-in an C<\mbox{..}>. This is sometimes needed to get around incompatibilities
+in an C<\mbox{..}>. This is sometimes needed to get around incompatibilities
between external packages and the ulem package, which is used for highlighting
in the default style UNDERLINE as well as CULINECHBAR CFONTSTRIKE
@@ -4543,7 +4585,7 @@ in the default style UNDERLINE as well as CULINECHBAR CFONTSTRIKE
Set configuration variables. The option can be repeated to set different
variables (as an alternative to the comma-separated list).
-Available variables (see below for further explanations):
+Available variables (see below for further explanations):
C<ARRENV> (RegEx)
@@ -4573,10 +4615,10 @@ C<SCALEDELGRAPHICS> (Float)
=item B<--add-to-config varenv1=pattern1,varenv2=pattern2,...>
For configuration variables, which are a regular expression (essentially those ending
-in ENV, COUNTERCMD and CUSTOMDIFCMD, see list above) this option provides an alternative way to modify the configuration
+in ENV, COUNTERCMD and CUSTOMDIFCMD, see list above) this option provides an alternative way to modify the configuration
variables. Instead of setting the complete pattern, with this option it is possible to add an
alternative pattern. C<varenv> must be one of the variables listed above that take a regular
-expression as argument, and pattern is any regular expression (which might need to be
+expression as argument, and pattern is any regular expression (which might need to be
protected from the shell by quotation). Several patterns can be added at once by using semi-colons
to separate them, e.g. C<--add-to-config "LISTENV=myitemize;myenumerate,COUNTERCMD=endnote">
@@ -4596,7 +4638,7 @@ Show values of configuration variables.
Combine all --show commands.
-NB For all --show commands, no C<old.tex> or C<new.tex> file needs to be specified, and no
+NB For all --show commands, no C<old.tex> or C<new.tex> file needs to be specified, and no
differencing takes place.
=back
@@ -4613,29 +4655,29 @@ might get lumpeded with preceding commands) so should only be used if the
default produces erroneous results. (Default requires arguments to
directly follow each other without intervening spaces).
-=item B<--math-markup=level>
+=item B<--math-markup=level>
-Determine granularity of markup in displayed math environments:
+Determine granularity of markup in displayed math environments:
Possible values for level are (both numerical and text labels are acceptable):
-C<off> or C<0>: suppress markup for math environments. Deleted equations will not
-appear in diff file. This mode can be used if all the other modes
+C<off> or C<0>: suppress markup for math environments. Deleted equations will not
+appear in diff file. This mode can be used if all the other modes
cause invalid latex code.
C<whole> or C<1>: Differencing on the level of whole equations. Even trivial changes
-to equations cause the whole equation to be marked changed. This
-mode can be used if processing in coarse or fine mode results in
+to equations cause the whole equation to be marked changed. This
+mode can be used if processing in coarse or fine mode results in
invalid latex code.
C<coarse> or C<2>: Detect changes within equations marked up with a coarse
-granularity; changes in equation type (e.g.displaymath to equation)
+granularity; changes in equation type (e.g.displaymath to equation)
appear as a change to the complete equation. This mode is recommended
for situations where the content and order of some equations are still
being changed. [Default]
C<fine> or C<3>: Detect small change in equations and mark up at fine granularity.
This mode is most suitable, if only minor changes to equations are
-expected, e.g. correction of typos.
+expected, e.g. correction of typos.
=item B<--graphics-markup=level>
@@ -4647,33 +4689,33 @@ C<none>, C<off> or C<0>: no highlighting for figures
C<new-only> or C<1>: surround newly added or changed figures with a blue frame [Default if graphicx package loaded]
-C<both> or C<2>: highlight new figures with a blue frame and show deleted figures at reduced
+C<both> or C<2>: highlight new figures with a blue frame and show deleted figures at reduced
scale, and crossed out with a red diagonal cross. Use configuration
variable SCALEDELGRAPHICS to set size of deleted figures.
-Note that changes to the optional parameters will make the figure appear as changed
+Note that changes to the optional parameters will make the figure appear as changed
to latexdiff, and this figure will thus be highlighted.
In some circumstances "Misplaced \noalign" error can occur if there are certain types
-of changes in tables. In this case please use C<--graphics-markup=none> as a
-work-around.
+of changes in tables. In this case please use C<--graphics-markup=none> as a
+work-around.
-=item B<--no-del>
+=item B<--no-del>
-Suppress deleted text from the diff. It is similar in effect to the BOLD style,
-but the deleted text ist not just invisible in the output, it is also not included in the diff text file.
-This can be more robust than just making it invisible.
+Suppress deleted text from the diff. It is similar in effect to the BOLD style,
+but the deleted text ist not just invisible in the output, it is also not included in the diff text file.
+This can be more robust than just making it invisible.
=item B<--disable-citation-markup> or B<--disable-auto-mbox>
-Suppress citation markup and markup of other vulnerable commands in styles
+Suppress citation markup and markup of other vulnerable commands in styles
using ulem (UNDERLINE,FONTSTRIKE, CULINECHBAR)
(the two options are identical and are simply aliases)
=item B<--enable-citation-markup> or B<--enforce-auto-mbox>
-Protect citation commands and other vulnerable commands in changed sections
+Protect citation commands and other vulnerable commands in changed sections
with C<\mbox> command, i.e. use default behaviour for ulem package for other packages
(the two options are identical and are simply aliases)
@@ -4719,18 +4761,18 @@ Suppress inclusion of old and new file names as comment in output file
=item B<--visible-label>
-Include old and new filenames (or labels set with C<--label> option) as
+Include old and new filenames (or labels set with C<--label> option) as
visible output.
=item B<--flatten>
Replace C<\input> and C<\include> commands within body by the content
of the files in their argument. If C<\includeonly> is present in the
-preamble, only those files are expanded into the document. However,
-no recursion is done, i.e. C<\input> and C<\include> commands within
-included sections are not expanded. The included files are assumed to
+preamble, only those files are expanded into the document. However,
+no recursion is done, i.e. C<\input> and C<\include> commands within
+included sections are not expanded. The included files are assumed to
be located in the same directories as the old and new master files,
-respectively, making it possible to organise files into old and new directories.
+respectively, making it possible to organise files into old and new directories.
--flatten is applied recursively, so inputted files can contain further
C<\input> statements. Also handles files included by the import package
(C<\import> and C<\subimport>), and C<\subfile> command.
@@ -4777,7 +4819,7 @@ Suppress generation of hyperreferences, used for minimal diffs (option --only-ch
=back
-=head2 Predefined styles
+=head2 Predefined styles
=head2 Major types
@@ -4790,9 +4832,14 @@ The major type determine the markup of plain text and some selected latex comman
Added text is wavy-underlined and blue, discarded text is struck out and red
(Requires color and ulem packages). Overstriking does not work in displayed math equations such that deleted parts of equation are underlined, not struck out (this is a shortcoming inherent to the ulem package).
+=item C<LUAUNDERLINE>
+
+Added text is underlined and blue, discarded text is struck out and red
+(Requires lua-ul package + LuaLaTeX).
+
=item C<CTRADITIONAL>
-Added text is blue and set in sans-serif, and a red footnote is created for each discarded
+Added text is blue and set in sans-serif, and a red footnote is created for each discarded
piece of text. (Requires color package)
=item C<TRADITIONAL>
@@ -4833,13 +4880,13 @@ Added text is set in bold face, discarded is not shown. (also see --no-del optio
=item C<PDFCOMMENT>
-The pdfcomment package is used to underline new text, and mark deletions with a PDF comment. Note that this markup might appear differently or not at all based on the pdf viewer used. The viewer with best support for pdf markup is probably acroread. This style is only recommended if the number of differences is small.
+The pdfcomment package is used to underline new text, and mark deletions with a PDF comment. Note that this markup might appear differently or not at all based on the pdf viewer used. The viewer with best support for pdf markup is probably acroread. This style is only recommended if the number of differences is small.
=back
=head2 Subtypes
-The subtype defines the commands that are inserted at the begin and end of added or discarded blocks, irrespectively of whether these blocks contain text or commands (Defined commands: C<\DIFaddbegin, \DIFaddend, \DIFdelbegin, \DIFdelend>)
+The subtype defines the commands that are inserted at the begin and end of added or discarded blocks, irrespectively of whether these blocks contain text or commands (Defined commands: C<\DIFaddbegin, \DIFaddend, \DIFdelbegin, \DIFdelend>)
=over 10
@@ -4857,7 +4904,7 @@ from the intended position.
An alternative way of marking added passages in blue, and deleted ones in red.
(It is recommeneded to use instead the main types to effect colored markup,
-although in some cases coloring with dvipscol can be more complete, for example
+although in some cases coloring with dvipscol can be more complete, for example
with citation commands).
=item C<DVIPSCOL>
@@ -4872,12 +4919,12 @@ although in some cases coloring with dvipscol can be more complete).
can be used to highlight only changed pages, but requires post-processing. It is recommend to not call this option manually but use C<latexdiff-vc> with C<--only-changes> option. Alternatively, use the script given within preamble of diff files made using this style.
-=item C<ONLYCHANGEDPAGE>
+=item C<ONLYCHANGEDPAGE>
also highlights changed pages, without the need for post-processing, but might not work reliably if
there is floating material (figures, tables).
-=item C<LABEL>
+=item C<LABEL>
is similar to C<ZLABEL>, but does not need the zref package and works less reliably (deprecated).
@@ -4885,7 +4932,7 @@ is similar to C<ZLABEL>, but does not need the zref package and works less relia
=head2 Float Types
-Some of the markup used in the main text might cause problems when used within
+Some of the markup used in the main text might cause problems when used within
floats (e.g. figures or tables). For this reason alternative versions of all
markup commands are used within floats. The float type defines these alternative commands.
@@ -4912,7 +4959,7 @@ Make no difference between the main text and floats.
=item C<ARRENV>
-If a match to C<ARRENV> is found within an inline math environment within a deleted or added block, then the inlined math
+If a match to C<ARRENV> is found within an inline math environment within a deleted or added block, then the inlined math
is surrounded by C<\mbox{>...C<}>. This is necessary as underlining does not work within inlined array environments.
[ Default: C<ARRENV>=S<C<(?:array|[pbvBV]matrix)> >
@@ -4932,9 +4979,9 @@ C<|subsubsection|paragraph|subparagraph)> ]
This option is for advanced users and allows definition of special versions of commands, which do not work as safe commands.
Commands in C<CUSTOMDIFCMD> that occur in added or deleted blocks will be given an ADD or DEL prefix.
-The prefixed versions of the command must be defined in the preamble, either by putting them
+The prefixed versions of the command must be defined in the preamble, either by putting them
in the preamble of at least the new file, or by creating a custom preamble file (Option --preamble).
-For example the command C<\blindtext> (from package blindtext) does not interact well with underlining, so that
+For example the command C<\blindtext> (from package blindtext) does not interact well with underlining, so that
for the standard markup type, it is not satisfactory to define it as a safe command. Instead, a customised versions
without underlining can be defined in the preamble:
@@ -4948,7 +4995,7 @@ and then latexdiff should be invoked with the option C<-c CUSTOMDIFCMD=blindtext
=item C<FLOATENV>
-Environments whose name matches the regular expression in C<FLOATENV> are
+Environments whose name matches the regular expression in C<FLOATENV> are
considered floats. Within these environments, the I<latexdiff> markup commands
are replaced by their FL variaties.
@@ -4997,17 +5044,17 @@ If C<--graphics-markup=both> is chosen, C<SCALEDELGRAPHICS> is the factor, by wh
=item C<VERBATIMENV>
-RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of these environments will not be processed in any way:
+RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of these environments will not be processed in any way:
deleted content is commented out, new content is not marked up
[ Default: S<C<comment> > ]
=item C<VERBATIMLINEENV>
-RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of environments described by VERBATIMLINEENV are compared in
+RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of environments described by VERBATIMLINEENV are compared in
line mode, and changes are marked up using the listings package. The markup style is set based on the chosen mains markup type (Option -t), or on an analysis
of the preamble.
-Note that "listings.sty" must be installed. If this file is not found the fallback solution is to
+Note that "listings.sty" must be installed. If this file is not found the fallback solution is to
treat VERBATIMLINEENV environments treated exactly the same way as VERBATIMENV environments.
[ Default: S<C<(?:verbatim[*]?|lstlisting> > ]
@@ -5018,30 +5065,40 @@ treat VERBATIMLINEENV environments treated exactly the same way as VERBATIMENV e
=over 10
-=item Citations result in overfull boxes
+=item Changed citations result in overfull boxes
There is an incompatibility between the C<ulem> package, which C<latexdiff> uses for underlining and striking out in the UNDERLINE style,
-the default style, and the way citations are generated. In order to be able to mark up citations properly, they are enclosed with an C<\mbox>
-command. As mboxes cannot be broken across lines, this procedure frequently results in overfull boxes, possibly obscuring the content as it extends beyond the right margin. The same occurs for some other packages (e.g., siunitx). If this is a problem, you have two possibilities.
+the default style, and the way citations are generated. In order to be able to mark up citations properly, they are enclosed with an C<\mbox>
+command. As mboxes cannot be broken across lines, this procedure frequently results in overfull boxes, possibly obscuring the content as it extends beyond the right margin. The same occurs for some other packages (e.g., siunitx). If this is a problem, you have several possibilities.
1. Use C<CFONT> type markup (option C<-t CFONT>): If this markup is chosen, then changed citations are no longer marked up
-with the wavy line (additions) or struck out (deletions), but are still highlighted in the appropriate color, and deleted text is shown with a different font. Other styles not using the C<ulem> package will also work.
+with the wavy line (additions) or struck out (deletions), but are still highlighted in the appropriate color, and deleted text is shown with a different font. Other styles not using the C<ulem> package will also work.
2. Choose option C<--disable-citation-markup> which turns off the marking up of citations: deleted citations are no longer shown, and
-added citations are shown without markup. (This was the default behaviour of latexdiff at versions 0.6 and older)
-
+added citations are shown without markup. (This was the default behaviour of latexdiff at versions 0.6 and older).
For custom packages you can define the commands which need to be protected by C<\mbox> with C<--append-mboxsafecmd> and C<--excludemboxsafecmd> options
(submit your lists of command as feature request at github page to set the default behaviour of future versions, see section 6)
-=item Changes in complicated mathematical equations result in latex processing errors
+3. If you are using luatex >= 1.12.0 you can use option LUAUNDERLINE that uses lua-ul instead of ulem for underlining, which does not have this problem (experimental feature).
+
+=item Changes in complicated mathematical equations result in latex processing errors.
+
+Try option C<--math-markup=whole>. If even that fails, you can turn off mark up for equations with C<--math-markup=off>.
-Try options C<--math-markup=whole>. If even that fails, you can turn off mark up for equations with C<--math-markup=off>.
+=item Deleted parts in equations are not struck out but underlined.
-=item How can I just show the pages where changes had been made
+This is a limitation of the ulem package that implements the strike-out. If you use the amsmath package, then the strike-out command is redefined in such a way that deleted passages are wrapped with C<\text> command; adding C<\usepackage{amsmath}> to your preamble will trigger this behaviour. (If amsmath is not included directly, but imported by another package, latexdiff will not be able to detect its availability; in this case you can give latexdiff a hint with option C<--packages=amsmath>.
-Use options -C<-s ZLABEL> (some postprocessing required) or C<-s ONLYCHANGEDPAGE>. C<latexdiff-vc --ps|--pdf> with C<--only-changes> option takes care of
+
+=item How can I just show the pages where changes had been made?
+
+Use options C<--s ZLABEL> (some postprocessing required) or C<-s ONLYCHANGEDPAGE>. C<latexdiff-vc --ps|--pdf> with C<--only-changes> option takes care of
the post-processing for you (requires zref package to be installed).
+=item The character encoding breaks when running latexdiff from powershell.
+
+This problem is not limited to C<latexdiff> and has to do with the default settings of C<powershell> in Windows. It is recommended to use C<cmd> instead.
+
=back
=head1 BUGS
@@ -5054,13 +5111,13 @@ different numbers of inter-argument spaces are treated as significant.
=back
-Please submit bug reports using the issue tracker of the github repository page I<https://github.com/ftilmann/latexdiff.git>,
+Please submit bug reports using the issue tracker of the github repository page I<https://github.com/ftilmann/latexdiff.git>,
or send them to I<tilmann -- AT -- gfz-potsdam.de>. Include the version number of I<latexdiff>
(from comments at the top of the source or use B<--version>). If you come across latex
files that are error-free and conform to the specifications set out
above, and whose differencing still does not result in error-free
latex, please send me those files, ideally edited to only contain the
-offending passage as long as that still reproduces the problem. If your
+offending passage as long as that still reproduces the problem. If your
file relies on non-standard class files, you must include those. I will not
look at examples where I have trouble to latex the original files.
@@ -5071,24 +5128,24 @@ L<latexrevise>, L<latexdiff-vc>
=head1 PORTABILITY
I<latexdiff> does not make use of external commands and thus should run
-on any platform supporting Perl 5.6 or higher. If files with encodings
+on any platform supporting Perl 5.6 or higher. If files with encodings
other than ASCII or UTF-8 are processed, Perl 5.8 or higher is required.
The standard version of I<latexdiff> requires installation of the Perl package
-C<Algorithm::Diff> (available from I<www.cpan.org> -
+C<Algorithm::Diff> (available from I<www.cpan.org> -
I<http://search.cpan.org/~nedkonz/Algorithm-Diff-1.15>) but a stand-alone
version, I<latexdiff-so>, which has this package inlined, is available, too.
I<latexdiff-fast> requires the I<diff> command to be present.
=head1 AUTHOR
-Version 1.3.3
-Copyright (C) 2004-2022 Frederik Tilmann
+Version 1.3.4
+Copyright (C) 2004-2024 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
-Contributors of fixes and additions: V. Kuhlmann, J. Paisley, N. Becker, T. Doerges, K. Huebner,
+Contributors of fixes and additions: V. Kuhlmann, J. Paisley, N. Becker, T. Doerges, K. Huebner,
T. Connors, Sebastian Gouezel and many others.
Thanks to the many people who sent in bug reports, feature suggestions, and other feedback.
@@ -5359,13 +5416,14 @@ value
underline
sqrt
(SUPER|SUB)SCRIPT
-%%END TEXT COMMANDS
+%%END TEXT COMMANDS
%%BEGIN CONTEXT1 COMMANDS
% Regex matching commands with a text argument (leave out the \), which will fail out of context. These commands behave like text commands, except when they occur in a deleted section, where they are disabled, but their argument is shown as deleted text.
caption
subcaption
-%%END CONTEXT1 COMMANDS
+multicolumn
+%%END CONTEXT1 COMMANDS
%%BEGIN CONTEXT2 COMMANDS
% Regex matching commands with a text argument (leave out the \), which will fail out of context. As corresponding commands for context1. The only difference is that context2 commands are completely disabled in deleted sections, including their arguments.
@@ -5373,7 +5431,7 @@ title
author
date
institute
-%%END CONTEXT2 COMMANDS
+%%END CONTEXT2 COMMANDS
%% CONFIGURATION variabe defaults
%%BEGIN LISTENV CONFIG
@@ -5451,9 +5509,16 @@ verbatim[*]?
\RequirePackage[normalem]{ulem}
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}}
-\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}
+\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}
%DIF END UNDERLINE PREAMBLE
+%DIF LUAUNDERLINE PREAMBLE
+\RequirePackage{lua-ul}
+\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
+\providecommand{\DIFadd}[1]{{\protect\color{blue}\underLine{#1}}}
+\providecommand{\DIFdel}[1]{{\protect\color{red}\strikeThrough{#1}}}
+%DIF END LUAUNDERLINE PREAMBLE
+
%DIF CTRADITIONAL PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
\RequirePackage[stable]{footmisc}
@@ -5625,7 +5690,7 @@ verbatim[*]?
% To show only pages with changes (dvips/dvipdf)
% latex diff.tex
% latex diff.tex
-% dvips -pp `perl -lne 'if (m/\\newlabel{DIFchg[be]\d*}{{.*}{(.*)}}/) { print $1 }' diff.aux | uniq | tr -s \\n ','` diff.dvi
+% dvips -pp `perl -lne 'if (m/\\newlabel{DIFchg[be]\d*}{{.*}{(.*)}}/) { print $1 }' diff.aux | uniq | tr -s \\n ','` diff.dvi
\typeout{Check comments in preamble of output for instructions how to show only pages where changes have been made}
\usepackage[user,abspage]{zref}
\newcount\DIFcounterb
@@ -5645,10 +5710,10 @@ verbatim[*]?
\RequirePackage{etoolbox}
\RequirePackage{zref}
% redefine label command to write immediately to aux file - page references will be lost
-\makeatletter \let\oldlabel\label% Store \label
-\renewcommand{\label}[1]{% Update \label to write to the .aux immediately
-\zref@wrapper@immediate{\oldlabel{#1}}}
-\makeatother
+\makeatletter \let\oldlabel\label% Store \label
+\renewcommand{\label}[1]{% Update \label to write to the .aux immediately
+\zref@wrapper@immediate{\oldlabel{#1}}}
+\makeatother
\newbool{DIFkeeppage}
\newbool{DIFchange}
\boolfalse{DIFkeeppage}
@@ -5666,7 +5731,7 @@ verbatim[*]?
\providecommand{\DIFmodend}{\global\booltrue{DIFkeeppage}\global\boolfalse{DIFchange}}
%DIF END ONLYCHANGEDPAGE PREAMBLE
-%% FLOAT TYPES
+%% FLOAT TYPES
%DIF FLOATSAFE PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}}
@@ -5698,7 +5763,7 @@ verbatim[*]?
%DIF END TRADITIONALSAFE PREAMBLE
% see:
-% http://tex.stackexchange.com/questions/47351/can-i-redefine-a-command-to-contain-itself
+% http://tex.stackexchange.com/questions/47351/can-i-redefine-a-command-to-contain-itself
%DIF HIGHLIGHTGRAPHICS PREAMBLE
\RequirePackage{settobox}
@@ -5744,6 +5809,15 @@ verbatim[*]?
%% SPECIAL PACKAGE PREAMBLE COMMANDS
+%% Redefine strike out command to wrap in text box if amsmath is used and markup style with ulem is used
+%DIF AMSMATHULEM PREAMBLE
+\makeatletter
+\let\sout@orig\sout
+\renewcommand{\sout}[1]{\ifmmode\text{\sout@orig{\ensuremath{#1}}}\else\sout@orig{#1}\fi}
+\makeatother
+%DIF END AMSMATHULEM PREAMBLE
+
+
% Standard \DIFadd and \DIFdel are redefined as \DIFaddtex and \DIFdeltex
% when hyperref package is included.
%DIF HYPERREF PREAMBLE
@@ -5846,7 +5920,7 @@ verbatim[*]?
%DIF END DIFCODE_BOLD
%DIF DIFCODE_PDFCOMMENT
-
+
moredelim=[il][\color{white}\tiny]{\%DIF\ <\ },
moredelim=[il][\sffamily\bfseries]{\%DIF\ >\ }
%DIF END DIFCODE_PDFCOMMENT
diff --git a/support/latexdiff/latexdiff-vc b/support/latexdiff/latexdiff-vc
index 697d1e29b7..31760ca14c 100755
--- a/support/latexdiff/latexdiff-vc
+++ b/support/latexdiff/latexdiff-vc
@@ -26,6 +26,12 @@
# Detailed usage information at the end of the file
#
# TODO/IDEAS: - option to call external pre-processing codes
+#
+# version 1.3.4:
+# - Enhancement: if --flatten option is used, and no bbl file is included in the version management, then latexdiff-vc will try to run bibtex to generate the bbl file. Implements the suggestion of PR #127 (contributed by github user cousteaulecommandant )
+# - Efficiency boost: use -draftmode for non-interactive preliminary runs of latex (idea from #
+# - bug fix: minor fix for --only-changed that makes detection of changed pages more reliable [ PR #297 contributed by user nelijuc ]
+#
# version 1.3.2:
# - bug fix: when setting config variables with the command lines it is now possible to use quotes to includes spaces in the value, e.g. -c LATEX="pdflatex --shell-escape"
# - bug fix: --only-changes is not compatible with graphics markup. --graphics-markup=none is now set automatically
@@ -71,7 +77,7 @@
use Getopt::Long ;
use Pod::Usage qw/pod2usage/ ;
use File::Temp qw/tempdir/ ;
-use File::Basename qw/dirname/;
+use File::Basename qw/dirname fileparse/;
use File::Copy;
use File::Path;
@@ -79,8 +85,8 @@ use strict ;
use warnings ;
my $versionstring=<<EOF ;
-This is LATEXDIFF-VC 1.3.2
- (c) 2005-2021 F J Tilmann
+This is LATEXDIFF-VC 1.3.4
+ (c) 2005-2024 F J Tilmann
EOF
# output debug and intermediate files, set to 0 in final distribution
@@ -98,6 +104,8 @@ my ($configlatexdiff,@config,$config,$assign);
#my $latexcmd="latex"; # latex compiler if not further identified
my $vc="";
my $tempdir=tempdir(CLEANUP => 1); # generate a temp dir, which will automatically be deleted at program exit
+#printf STDERR "DEBUG: tempdir $tempdir\n";
+
# Variables
my ($file1,$file2,$diff,$diffbase,$rootdir,$answer,$options,$infile,$append,$dirname,$cwd);
my (@files,@ldoptions,@tmpfiles,@ptmpfiles,@difffiles,$extracomp); # ,
@@ -419,30 +427,39 @@ while ( $infile=$file2=shift @files ) {
print STDERR "Working on $infile \n";
if ( scalar(@revs) == 1 ) {
if ( defined($flatten) ) {
- my $olddir=$tempdir . "/latexdiff-vc-$revs[0]";
- print STDERR "Checking out old dir into: $olddir (rev: $revs[0])\n";
- checkout_dir($revs[0],$olddir);
- $file1=$olddir ."/".$infile;
- } else {
- ($file1=$infile) =~ s/\.(tex|bbl|flt)/-oldtmp-$$.$1/ ;
- push @tmpfiles,$file1;
- # compare file with previous version ($revs[0]="") or specified version
- ### system("$diffcmd$revs[0] $infile| $patchcmd -o$file1") ;
- if (system("$diffcmd$revs[0] \"$infile\" | $patchcmd -o\"$file1\"")==0 and -z $file1 ) {
- # no differences detected, i.e. file is equal to current version
- copy($infile,$file1) || die "copy($infile,$file1) failed: $!";
- }
- }
+ my $olddir=$tempdir . "/latexdiff-vc-$revs[0]";
+ print STDERR "Checking out old dir into: $olddir (rev: $revs[0])\n";
+ checkout_dir($revs[0],$olddir,$infile);
+ $file1=$olddir ."/".$infile;
+
+ # generate bibliography for new file if
+ if ( greptex('^[^%]*\\\\bibliography\\{',$infile) == 0) {
+ my ($filebase,$filedir)=fileparse($infile,".tex");
+ if ( ! -e "$filedir$filebase.bbl" ) {
+ system("$CFG{LATEX} -draftmode -interaction=batchmode '$infile'; $CFG{BIBTEX} '$filedir$filebase'")
+ or die "Something went wrong in executing: $CFG{LATEX} -draftmode -interaction=batchmode '$infile'; $CFG{BIBTEX} '$filedir$filebase'" ;
+ }
+ }
+ } else {
+ ($file1=$infile) =~ s/\.(tex|bbl|flt)/-oldtmp-$$.$1/ ;
+ push @tmpfiles,$file1;
+ # compare file with previous version ($revs[0]="") or specified version
+ ### system("$diffcmd$revs[0] $infile| $patchcmd -o$file1") ;
+ if (system("$diffcmd$revs[0] \"$infile\" | $patchcmd -o\"$file1\"")==0 and -z $file1 ) {
+ # no differences detected, i.e. file is equal to current version
+ copy($infile,$file1) || die "copy($infile,$file1) failed: $!";
+ }
+ }
} elsif ( scalar(@revs) == 2 ) {
if ( defined($flatten) ) {
my $olddir=$tempdir . "/latexdiff-vc-$revs[0]";
print STDERR "Checking out old dir into: $olddir (rev: $revs[0])\n";
- checkout_dir($revs[0],$olddir);
+ checkout_dir($revs[0],$olddir,$infile);
$file1=$olddir ."/".$infile;
my $newdir=$tempdir . "/latexdiff-vc-$revs[1]";
print STDERR "Checking out new dir into: $newdir\n";
- checkout_dir($revs[1],$newdir);
+ checkout_dir($revs[1],$newdir,$infile);
$file2=$newdir ."/".$infile;
} else {
($file1=$infile) =~ s/\.(tex|bbl|flt)/-oldtmp-$$.$1/ ;
@@ -468,7 +485,7 @@ while ( $infile=$file2=shift @files ) {
} else {
($diff=$infile) =~ s/\.(tex|bbl|flt)$/$append.$1/ ;
}
-
+
# make directories if needed
$dirname=dirname($diff) ;
system("mkdir -p $dirname") unless ( -e $dirname );
@@ -488,13 +505,14 @@ while ( $infile=$file2=shift @files ) {
die "Abort ... " ;
}
}
+
print STDERR "Running: $CFG{LATEXDIFF} $options \"$file1\" \"$file2\" > \"$diff\"\n";
unless ( system("$CFG{LATEXDIFF} $options \"$file1\" \"$file2\" > \"$diff\"") == 0 ) {
print STDERR "Something went wrong in $CFG{LATEXDIFF}. Deleting $diff and abort\n" ; unlink $diff ; exit(5)
};
print "Generated difference file $diff\n";
- if ( $run and !( scalar(@revs) && greptex( qr/\\document(?:class|style)/ , $diff ) ) ) {
+ if ( $run and !( scalar(@revs) && greptex( qr/\\document(?:class|style)/ , $diff,25) ) ) {
# save filename for later processing if postscript or pdf conversion is requested and either two-file mode was used (scalar(@revs)==0) or the diff file contains documentclass statement (ie. is a root document)
push @difffiles, $diff ;
}
@@ -519,19 +537,20 @@ foreach $diff ( @difffiles ) {
if ( $run ) {
print STDERR "PDF: $pdf Postscript: $postscript cwd $cwd\n" if $debug;
- if ( system("grep -q \'^[^%]*\\\\bibliography{\' \"$diff\"") == 0 ) {
- system("$CFG{LATEX} --interaction=batchmode \"$diff\"; $CFG{BIBTEX} \"$diffbase\";");
+# if ( system("grep -q \'^[^%]*\\\\bibliography{\' \"$diff\"") == 0 ) {
+ if ( greptex('^[^%]*\\\\bibliography{',$diff ) == 0 ) {
+ system("$CFG{LATEX} -draftmode -interaction=batchmode \"$diff\"; $CFG{BIBTEX} \"$diffbase\";");
push @ptmpfiles, "$diffbase.bbl","$diffbase.bbl" ;
}
# if special needs, as CHANGEBAR
if ( $extracomp ) {
# print "Extracomp\n";
- system("$CFG{LATEX} --interaction=batchmode \"$diff\";");
+ system("$CFG{LATEX} -draftmode -interaction=batchmode \"$diff\";");
}
# final compilation
- system("$CFG{LATEX} --interaction=batchmode \"$diff\";"); # needed if cross-refs
+ system("$CFG{LATEX} -draftmode -interaction=batchmode \"$diff\";"); # needed if cross-refs
system("$CFG{LATEX} \"$diff\";"); # final, with possible error messages
if ( $rundvi2 ) {
@@ -586,10 +605,10 @@ sub findchangedpages {
my %start;
open(AUX,$auxfile) or die ("Could open aux file $auxfile . System error: $!");
while (<AUX>) {
- if (m/\\zref\@newlabel\{DIFchgb(\d*)\}\{.*\\abspage\{(\d*)\}\}/ ) {
+ if (m/\\zref\@newlabel\{DIFchgb(\d*)\}\{.*\\abspage\{(\d*)\}.*\}/ ) {
$start{$1}=$2; $pages{$2}=1;
}
- if (m/\\zref\@newlabel\{DIFchge(\d*)\}\{.*\\abspage\{(\d*)\}\}/) {
+ if (m/\\zref\@newlabel\{DIFchge(\d*)\}\{.*\\abspage\{(\d*)\}.*\}/) {
if (defined($start{$1})) {
for ($j=$start{$1}; $j<=$2; $j++) {
$pages{$j}=1;
@@ -643,12 +662,14 @@ sub compresspages {
return @res;
}
-# checkout_dir(rev,dirname)
+# checkout_dir(rev,dirname, <file>)
# checks out revision rev and stores it in dirname
-# uses global variables: $vc, $rootdir
+# If argument <file> is provided, check if this file imports a bibliography and generate it if necessary
+# uses global variables: $vc, $rootdir, $CFG
sub checkout_dir {
- my ($rev,$dirname)=@_;
+ my ($rev,$dirname,$file)=@_;
+ my ($filebase,$filedir);
unless (-e $dirname) { mkpath([ $dirname ]) or die "Cannot mkdir $dirname ." ;}
if ( $vc eq "SVN" ) {
system("svn checkout -r $rev $rootdir $dirname")==0 or die "Something went wrong in executing: svn checkout -r $rev $rootdir $dirname";
@@ -660,13 +681,25 @@ sub checkout_dir {
} else {
die "checkout_dir: only works with SVN, HG and GIT VCS system (selected: $vc)";
}
+ # Check if the main file needs a bbl generated
+ if ( defined($file) and greptex('^[^%]*\\\\bibliography\\{',$file) == 0) {
+ ($filebase,$filedir)=fileparse($file,".tex");
+ if ( ! -e "$filedir$filebase.bbl" ){
+ printf STDERR "Running $CFG{BIBTEX} to generate $filedir$filebase.bbl.\n";
+ system("cd '$dirname'; $CFG{LATEX} -draftmode -interaction=batchmode '$file'; $CFG{BIBTEX} '$filedir$filebase'")==0
+ or die "Something went wrong in executing: cd '$dirname'; $CFG{LATEX} -draftmode -interaction=batchmode '$file'; $CFG{BIBTEX} '$filedir$filebase'" ;
+ }
+# else { # DEBUG
+# printf STDERR "DEBUG: Skipping bbl file generation as $filedir$filebase.bbl already exists.\n"
+# } #DEBUG
+ }
}
-# greptex returns 1 if regex is not matched in filename
-# only the 25 first non-comment lines are scanned
+# greptex($regex,$filename, <lines>) returns 1 if regex is not matched in filename
+# only the first <lines> non-comment lines are scanned; by default everythin is scanned
# 0 if there is a match
sub greptex {
- my ($regex,$filename)=@_;
+ my ($regex,$filename,$nlines)=@_;
my ($i)=0;
open (FH, $filename) or die("Couldn't open $filename: $!");
while (<FH>) {
@@ -675,9 +708,9 @@ sub greptex {
close(FH);
return(0);
}
- # only scan 25 lines
+ # only scan <nlines> lines, if optional parameter proviede
$i++;
- last if $i>25 ;
+ last if defined($nlines) and $i>$nlines ;
}
close(FH);
return(1);
@@ -761,7 +794,7 @@ complete directory hierarchy. Optionally, a pathname F<path> can be specified,
=item B<--flatten,--flatten=keep-intermediate>
If combined with C<--git>, C<--svn> or C<--hg> option or the corresponding modes, check out the revisions to compare in a separate temporary directory, and then pass on option C<--flatten> to latexdiff. The directory in which C<latexdiff-vc> is invoked defines the subtree which will be checked out.
-Note that if additional files are needed which are not included in the flatten procedure (package files, included graphics), they need to be accessible in the current directory. If you use bibtex, it is recommended to include the C<.bbl> file in the version management.
+Note that if additional files are needed which are not included in the flatten procedure (package files, included graphics), they need to be accessible in the current directory. If you use bibtex, it is recommended to include the C<.bbl> file in the version management. From latexdiff-vc >=1.3.4 there is an attempt to create the C<.bbl> file by running bibtex in the retrieved subdirectories; note that the bibtex is run in the temporary subdirectories so any .bib or .bst files either need to be under version management, or in the global search paths for bibtex (shell environment variables C<BIBINPUTS> and C<BSTINPUTS>).
The generic usage of this function is : C<latexdiff-vc --flatten -r rev1 [-r rev2] master.tex> where master.tex is the project file containing the highest level of includes etc.
@@ -798,7 +831,7 @@ Available variables for latexdiff-vc:
=over 8
-=item C<LATEXDIFF> latexdiff command (e.g. latexdiff-fast, latexdiff-so). This command should support the option C<--interaction=batchmode>
+=item C<LATEXDIFF> latexdiff command (e.g. latexdiff-fast, latexdiff-so). This command should support the options C<-draftmode> and C<-interaction=batchmode>
=item C<LATEX> latex command (e.g. pdflatex, lualatex)
@@ -847,7 +880,7 @@ Show version number
=back
-All other options are passed on to C<latexdiff>.
+All other options are passed on to C<latexdiff>. Note that it is not always easy for latexdiff to correctly assign arguments to options when short form (single letter) options are used so it is recommended to use long-form options.
=head1 SEE ALSO
@@ -868,7 +901,7 @@ or send them to I<tilmann -- AT -- gfz-potsdam.de>. Include the version number
=head1 AUTHOR
-Version 1.3.2
+Version 1.3.4a
Copyright (C) 2005-2017 Frederik Tilmann
This program is free software; you can redistribute it and/or modify
diff --git a/support/latexdiff/latexdiff-vc.1 b/support/latexdiff/latexdiff-vc.1
index 8b6c6f8db7..8ed1715873 100644
--- a/support/latexdiff/latexdiff-vc.1
+++ b/support/latexdiff/latexdiff-vc.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "LATEXDIFF-VC 1"
-.TH LATEXDIFF-VC 1 "2022-03-05" "perl v5.30.0" " "
+.TH LATEXDIFF-VC 1 "2024-07-20" "perl v5.34.0" " "
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -204,7 +204,7 @@ complete directory hierarchy. Optionally, a pathname \fIpath\fR can be specifie
.IP "\fB\-\-flatten,\-\-flatten=keep\-intermediate\fR" 4
.IX Item "--flatten,--flatten=keep-intermediate"
If combined with \f(CW\*(C`\-\-git\*(C'\fR, \f(CW\*(C`\-\-svn\*(C'\fR or \f(CW\*(C`\-\-hg\*(C'\fR option or the corresponding modes, check out the revisions to compare in a separate temporary directory, and then pass on option \f(CW\*(C`\-\-flatten\*(C'\fR to latexdiff. The directory in which \f(CW\*(C`latexdiff\-vc\*(C'\fR is invoked defines the subtree which will be checked out.
-Note that if additional files are needed which are not included in the flatten procedure (package files, included graphics), they need to be accessible in the current directory. If you use bibtex, it is recommended to include the \f(CW\*(C`.bbl\*(C'\fR file in the version management.
+Note that if additional files are needed which are not included in the flatten procedure (package files, included graphics), they need to be accessible in the current directory. If you use bibtex, it is recommended to include the \f(CW\*(C`.bbl\*(C'\fR file in the version management. From latexdiff-vc >=1.3.4 there is an attempt to create the \f(CW\*(C`.bbl\*(C'\fR file by running bibtex in the retrieved subdirectories; note that the bibtex is run in the temporary subdirectories so any .bib or .bst files either need to be under version management, or in the global search paths for bibtex (shell environment variables \f(CW\*(C`BIBINPUTS\*(C'\fR and \f(CW\*(C`BSTINPUTS\*(C'\fR).
.Sp
The generic usage of this function is : \f(CW\*(C`latexdiff\-vc \-\-flatten \-r rev1 [\-r rev2] master.tex\*(C'\fR where master.tex is the project file containing the highest level of includes etc.
.Sp
@@ -232,9 +232,9 @@ Set configuration variables for latexdiff and latexdiff-vc. The option can be r
variables (as an alternative to the comma-separated list).
Available variables for latexdiff-vc:
.RS 4
-.ie n .IP """LATEXDIFF"" latexdiff command (e.g. latexdiff-fast, latexdiff-so). This command should support the option ""\-\-interaction=batchmode""" 8
-.el .IP "\f(CWLATEXDIFF\fR latexdiff command (e.g. latexdiff-fast, latexdiff-so). This command should support the option \f(CW\-\-interaction=batchmode\fR" 8
-.IX Item "LATEXDIFF latexdiff command (e.g. latexdiff-fast, latexdiff-so). This command should support the option --interaction=batchmode"
+.ie n .IP """LATEXDIFF"" latexdiff command (e.g. latexdiff-fast, latexdiff-so). This command should support the options ""\-draftmode"" and ""\-interaction=batchmode""" 8
+.el .IP "\f(CWLATEXDIFF\fR latexdiff command (e.g. latexdiff-fast, latexdiff-so). This command should support the options \f(CW\-draftmode\fR and \f(CW\-interaction=batchmode\fR" 8
+.IX Item "LATEXDIFF latexdiff command (e.g. latexdiff-fast, latexdiff-so). This command should support the options -draftmode and -interaction=batchmode"
.PD 0
.ie n .IP """LATEX"" latex command (e.g. pdflatex, lualatex)" 8
.el .IP "\f(CWLATEX\fR latex command (e.g. pdflatex, lualatex)" 8
@@ -280,7 +280,7 @@ Show help text
.IX Item "--version"
Show version number
.PP
-All other options are passed on to \f(CW\*(C`latexdiff\*(C'\fR.
+All other options are passed on to \f(CW\*(C`latexdiff\*(C'\fR. Note that it is not always easy for latexdiff to correctly assign arguments to options when short form (single letter) options are used so it is recommended to use long-form options.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
latexdiff
@@ -297,7 +297,7 @@ or send them to \fItilmann \*(-- \s-1AT\s0 \*(-- gfz\-potsdam.de\fR. Include th
(option \f(CW\*(C`\-\-version\*(C'\fR).
.SH "AUTHOR"
.IX Header "AUTHOR"
-Version 1.3.2
+Version 1.3.4a
Copyright (C) 2005\-2017 Frederik Tilmann
.PP
This program is free software; you can redistribute it and/or modify
diff --git a/support/latexdiff/latexdiff.1 b/support/latexdiff/latexdiff.1
index 53644f607e..a52d6f03ac 100644
--- a/support/latexdiff/latexdiff.1
+++ b/support/latexdiff/latexdiff.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "LATEXDIFF 1"
-.TH LATEXDIFF 1 "2022-09-25" "perl v5.30.0" " "
+.TH LATEXDIFF 1 "2024-07-20" "perl v5.34.0" " "
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -158,8 +158,8 @@ be real files (not pipes or similar) as they are opened twice (unless \f(CW\*(C`
The program treats the preamble differently from the main document.
Differences between the preambles are found using line-based
differencing (similarly to the Unix diff command, but ignoring white
-spaces). A comment, "\f(CW\*(C`%DIF\ >\*(C'\fR" is appended to each added line, i.e. a
-line present in \f(CW\*(C`new.tex\*(C'\fR but not in \f(CW\*(C`old.tex\*(C'\fR. Discarded lines
+spaces). A comment, "\f(CW\*(C`%DIF\ >\*(C'\fR" is appended to each added line, i.e. a
+line present in \f(CW\*(C`new.tex\*(C'\fR but not in \f(CW\*(C`old.tex\*(C'\fR. Discarded lines
are deactivated by prepending "\f(CW\*(C`%DIF\ <\*(C'\fR". Changed blocks are preceded by
comment lines giving information about line numbers in the original files. Where there are insignificant
differences, the resulting file \f(CW\*(C`diff.tex\*(C'\fR will be similar to
@@ -238,7 +238,7 @@ but the choice is yours. Any markup within the environment will be
removed, and generally everything within the environment will just be
taken from the new file.
.PP
-It is also possible to difference files which do not have a preamble.
+It is also possible to difference files which do not have a preamble.
In this case, the file is processed in the main document
mode, but the definitions of the markup commands are not inserted.
.PP
@@ -256,14 +256,14 @@ the scope of \f(CW\*(C`\eDIFadd\*(C'\fR. Added comments are marked by prependin
.PP
Within deleted blocks text is highlighted with \f(CW\*(C`\eDIFdel\*(C'\fR. Deleted
comments are marked by prepending "\f(CW\*(C`%DIF\ <\ \*(C'\fR\*(L". Non-safe command
-and curly braces within deleted blocks are commented out with
+and curly braces within deleted blocks are commented out with
\&\*(R"\f(CW\*(C`%DIFDELCMD\ <\ \*(C'\fR".
.SH "OPTIONS"
.IX Header "OPTIONS"
.SS "Preamble"
.IX Subsection "Preamble"
The following options determine the visual markup style by adding the appropriate
-command definitions to the preamble. See the end of this section for a description of
+command definitions to the preamble. See the end of this section for a description of
available styles.
.IP "\fB\-\-type=markupstyle\fR or \fB\-t markupstyle\fR" 4
.IX Item "--type=markupstyle or -t markupstyle"
@@ -271,8 +271,9 @@ Add code to preamble for selected markup style. This option defines
\&\f(CW\*(C`\eDIFadd\*(C'\fR and \f(CW\*(C`\eDIFdel\*(C'\fR commands.
Available styles:
.Sp
-\&\f(CW\*(C`UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
-CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT\*(C'\fR
+\&\f(CW\*(C`UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
+CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT
+LUAUNDERLINE\*(C'\fR
.Sp
[ Default: \f(CW\*(C`UNDERLINE\*(C'\fR ]
.IP "\fB\-\-subtype=markstyle\fR or \fB\-s markstyle\fR" 4
@@ -286,10 +287,10 @@ Available styles: \f(CW\*(C`SAFE MARGIN COLOR DVIPSCOL ZLABEL ONLYCHANGEDPAGE (
* Subtype \f(CW\*(C`LABEL\*(C'\fR is deprecated
.IP "\fB\-\-floattype=markstyle\fR or \fB\-f markstyle\fR" 4
.IX Item "--floattype=markstyle or -f markstyle"
-Add code to preamble for selected style which
+Add code to preamble for selected style which
replace standard marking and markup commands within floats
(e.g., marginal remarks cause an error within floats
-so marginal marking can be disabled thus). This option defines all
+so marginal marking can be disabled thus). This option defines all
\&\f(CW\*(C`\eDIF...FL\*(C'\fR commands.
Available styles: \f(CW\*(C`FLOATSAFE TRADITIONALSAFE IDENTICAL\*(C'\fR
.Sp
@@ -297,14 +298,14 @@ Available styles: \f(CW\*(C`FLOATSAFE TRADITIONALSAFE IDENTICAL\*(C'\fR
.IP "\fB\-\-encoding=enc\fR or \fB\-e enc\fR" 4
.IX Item "--encoding=enc or -e enc"
Specify encoding of old.tex and new.tex. Typical encodings are
-\&\f(CW\*(C`ascii\*(C'\fR, \f(CW\*(C`utf8\*(C'\fR, \f(CW\*(C`latin1\*(C'\fR, \f(CW\*(C`latin9\*(C'\fR. A list of available encodings can be
+\&\f(CW\*(C`ascii\*(C'\fR, \f(CW\*(C`utf8\*(C'\fR, \f(CW\*(C`latin1\*(C'\fR, \f(CW\*(C`latin9\*(C'\fR. A list of available encodings can be
obtained by executing
.Sp
\&\f(CW\*(C`perl \-MEncode \-e \*(Aqprint join ("\en",Encode\-\*(C'\fRencodings( \*(L":all\*(R" )) ;' >
.Sp
If this option is used, then old.tex, new.tex are only opened once.
[Default encoding is utf8 unless the first few lines of the preamble contain
-an invocation \f(CW\*(C`\eusepackage[..]{inputenc}\*(C'\fR in which case the
+an invocation \f(CW\*(C`\eusepackage[..]{inputenc}\*(C'\fR in which case the
encoding chosen by this command is asssumed. Note that \s-1ASCII\s0 (standard
latex) is a subset of utf8]
.IP "\fB\-\-preamble=file\fR or \fB\-p file\fR" 4
@@ -334,7 +335,7 @@ Ensure that \f(CW\*(C`\ebegin{figure}\*(C'\fR and \f(CW\*(C`\eend{figure}\*(C'\f
.ie n .IP """hyperref""" 8
.el .IP "\f(CWhyperref\fR" 8
.IX Item "hyperref"
-Change name of \f(CW\*(C`\eDIFadd\*(C'\fR and \f(CW\*(C`\eDIFdel\*(C'\fR commands to \f(CW\*(C`\eDIFaddtex\*(C'\fR and \f(CW\*(C`\eDIFdeltex\*(C'\fR and
+Change name of \f(CW\*(C`\eDIFadd\*(C'\fR and \f(CW\*(C`\eDIFdel\*(C'\fR commands to \f(CW\*(C`\eDIFaddtex\*(C'\fR and \f(CW\*(C`\eDIFdeltex\*(C'\fR and
define new \f(CW\*(C`\eDIFadd\*(C'\fR and \f(CW\*(C`\eDIFdel\*(C'\fR commands, which provide a wrapper for these commands,
using them for the text but not for the link defining command (where any markup would cause
errors).
@@ -384,13 +385,13 @@ Print generated or included preamble commands to stdout.
.IX Item "--append-safecmd=append-file or -a append-file or --append-safecmd=cmd1,cmd2,..."
.PD
Exclude from, replace or append to the list of regular expressions (RegEx)
-matching commands which are safe to use within the
+matching commands which are safe to use within the
scope of a \f(CW\*(C`\eDIFadd\*(C'\fR or \f(CW\*(C`\eDIFdel\*(C'\fR command. The file must contain
one Perl-RegEx per line (Comment lines beginning with # or % are
-ignored). Note that the RegEx needs to match the whole of
+ignored). Note that the RegEx needs to match the whole of
the token, i.e., /^regex$/ is implied and that the initial
-\&\*(L"\e\*(R" of the command is not included.
-The \fB\-\-exclude\-safecmd\fR and \fB\-\-append\-safecmd\fR options can be combined with the \-\fB\-\-replace\-safecmd\fR
+\&\*(L"\e\*(R" of the command is not included.
+The \fB\-\-exclude\-safecmd\fR and \fB\-\-append\-safecmd\fR options can be combined with the \-\fB\-\-replace\-safecmd\fR
option and can be used repeatedly to add cumulatively to the lists.
\fB\-\-exclude\-safecmd\fR
and \fB\-\-append\-safecmd\fR can also take a comma separated list as input. If a
@@ -422,7 +423,7 @@ entry for \fB\-\-exclude\-safecmd\fR directly above for further details.
Replace or append to the list of regex matching commands
whose last argument is text but which require a particular
context to work, e.g. \f(CW\*(C`\ecaption\*(C'\fR will only work within a figure
-or table. These commands behave like text commands, except when
+or table. These commands behave like text commands, except when
they occur in a deleted section, when they are disabled, but their
argument is shown as deleted text.
.IP "\fB\-\-replace\-context2cmd=replace\-file\fR" 4
@@ -438,7 +439,7 @@ As corresponding commands for context1. The only difference is that
context2 commands are completely disabled in deleted sections, including
their arguments.
.Sp
-context2 commands are also the only commands in the preamble, whose argument will be processed in
+context2 commands are also the only commands in the preamble, whose argument will be processed in
word-by-word mode (which only works, if they occur no more than once in the preamble). The algorithm currently cannot cope with repeated context2 commands in the preamble, as they occur e.g. for the \f(CW\*(C`\eauthor\*(C'\fR argument in some journal styles (not in the standard styles, though
If such a repetition is detected, the whole preamble will be processed in line-by-line mode. In such a case, use \f(CW\*(C`\-\-replace\-context2cmd\*(C'\fR option to just select the commands, which should be processed and are not used repeatedly in the preamble.
.ie n .IP "\fB\-\-exclude\-mboxsafecmd=exclude\-file\fR or \fB\-\-exclude\-mboxsafecmd=""cmd1,cmd2,...""\fR" 4
@@ -450,7 +451,7 @@ If such a repetition is detected, the whole preamble will be processed in line-b
.IX Item "--append-mboxsafecmd=append-file or --append-mboxsafecmd=cmd1,cmd2,..."
.PD
Define safe commands, which additionally need to be protected by encapsulating
-in an \f(CW\*(C`\embox{..}\*(C'\fR. This is sometimes needed to get around incompatibilities
+in an \f(CW\*(C`\embox{..}\*(C'\fR. This is sometimes needed to get around incompatibilities
between external packages and the ulem package, which is used for highlighting
in the default style \s-1UNDERLINE\s0 as well as \s-1CULINECHBAR CFONTSTRIKE\s0
.IP "\fB\-\-config var1=val1,var2=val2,...\fR or \fB\-c var1=val1,..\fR" 4
@@ -489,10 +490,10 @@ Available variables (see below for further explanations):
.IP "\fB\-\-add\-to\-config varenv1=pattern1,varenv2=pattern2,...\fR" 4
.IX Item "--add-to-config varenv1=pattern1,varenv2=pattern2,..."
For configuration variables, which are a regular expression (essentially those ending
-in \s-1ENV, COUNTERCMD\s0 and \s-1CUSTOMDIFCMD,\s0 see list above) this option provides an alternative way to modify the configuration
+in \s-1ENV, COUNTERCMD\s0 and \s-1CUSTOMDIFCMD,\s0 see list above) this option provides an alternative way to modify the configuration
variables. Instead of setting the complete pattern, with this option it is possible to add an
alternative pattern. \f(CW\*(C`varenv\*(C'\fR must be one of the variables listed above that take a regular
-expression as argument, and pattern is any regular expression (which might need to be
+expression as argument, and pattern is any regular expression (which might need to be
protected from the shell by quotation). Several patterns can be added at once by using semi-colons
to separate them, e.g. \f(CW\*(C`\-\-add\-to\-config "LISTENV=myitemize;myenumerate,COUNTERCMD=endnote"\*(C'\fR
.IP "\fB\-\-show\-safecmd\fR" 4
@@ -508,7 +509,7 @@ Show values of configuration variables.
.IX Item "--show-all"
Combine all \-\-show commands.
.Sp
-\&\s-1NB\s0 For all \-\-show commands, no \f(CW\*(C`old.tex\*(C'\fR or \f(CW\*(C`new.tex\*(C'\fR file needs to be specified, and no
+\&\s-1NB\s0 For all \-\-show commands, no \f(CW\*(C`old.tex\*(C'\fR or \f(CW\*(C`new.tex\*(C'\fR file needs to be specified, and no
differencing takes place.
.SS "Other configuration options:"
.IX Subsection "Other configuration options:"
@@ -521,20 +522,20 @@ default produces erroneous results. (Default requires arguments to
directly follow each other without intervening spaces).
.IP "\fB\-\-math\-markup=level\fR" 4
.IX Item "--math-markup=level"
-Determine granularity of markup in displayed math environments:
+Determine granularity of markup in displayed math environments:
Possible values for level are (both numerical and text labels are acceptable):
.Sp
-\&\f(CW\*(C`off\*(C'\fR or \f(CW0\fR: suppress markup for math environments. Deleted equations will not
-appear in diff file. This mode can be used if all the other modes
+\&\f(CW\*(C`off\*(C'\fR or \f(CW0\fR: suppress markup for math environments. Deleted equations will not
+appear in diff file. This mode can be used if all the other modes
cause invalid latex code.
.Sp
\&\f(CW\*(C`whole\*(C'\fR or \f(CW1\fR: Differencing on the level of whole equations. Even trivial changes
-to equations cause the whole equation to be marked changed. This
-mode can be used if processing in coarse or fine mode results in
+to equations cause the whole equation to be marked changed. This
+mode can be used if processing in coarse or fine mode results in
invalid latex code.
.Sp
\&\f(CW\*(C`coarse\*(C'\fR or \f(CW2\fR: Detect changes within equations marked up with a coarse
-granularity; changes in equation type (e.g.displaymath to equation)
+granularity; changes in equation type (e.g.displaymath to equation)
appear as a change to the complete equation. This mode is recommended
for situations where the content and order of some equations are still
being changed. [Default]
@@ -554,29 +555,29 @@ Possible values for level:
.Sp
\&\f(CW\*(C`new\-only\*(C'\fR or \f(CW1\fR: surround newly added or changed figures with a blue frame [Default if graphicx package loaded]
.Sp
-\&\f(CW\*(C`both\*(C'\fR or \f(CW2\fR: highlight new figures with a blue frame and show deleted figures at reduced
+\&\f(CW\*(C`both\*(C'\fR or \f(CW2\fR: highlight new figures with a blue frame and show deleted figures at reduced
scale, and crossed out with a red diagonal cross. Use configuration
variable \s-1SCALEDELGRAPHICS\s0 to set size of deleted figures.
.Sp
-Note that changes to the optional parameters will make the figure appear as changed
+Note that changes to the optional parameters will make the figure appear as changed
to latexdiff, and this figure will thus be highlighted.
.Sp
In some circumstances \*(L"Misplaced \enoalign\*(R" error can occur if there are certain types
-of changes in tables. In this case please use \f(CW\*(C`\-\-graphics\-markup=none\*(C'\fR as a
+of changes in tables. In this case please use \f(CW\*(C`\-\-graphics\-markup=none\*(C'\fR as a
work-around.
.IP "\fB\-\-no\-del\fR" 4
.IX Item "--no-del"
-Suppress deleted text from the diff. It is similar in effect to the \s-1BOLD\s0 style,
-but the deleted text ist not just invisible in the output, it is also not included in the diff text file.
+Suppress deleted text from the diff. It is similar in effect to the \s-1BOLD\s0 style,
+but the deleted text ist not just invisible in the output, it is also not included in the diff text file.
This can be more robust than just making it invisible.
.IP "\fB\-\-disable\-citation\-markup\fR or \fB\-\-disable\-auto\-mbox\fR" 4
.IX Item "--disable-citation-markup or --disable-auto-mbox"
-Suppress citation markup and markup of other vulnerable commands in styles
+Suppress citation markup and markup of other vulnerable commands in styles
using ulem (\s-1UNDERLINE,FONTSTRIKE, CULINECHBAR\s0)
(the two options are identical and are simply aliases)
.IP "\fB\-\-enable\-citation\-markup\fR or \fB\-\-enforce\-auto\-mbox\fR" 4
.IX Item "--enable-citation-markup or --enforce-auto-mbox"
-Protect citation commands and other vulnerable commands in changed sections
+Protect citation commands and other vulnerable commands in changed sections
with \f(CW\*(C`\embox\*(C'\fR command, i.e. use default behaviour for ulem package for other packages
(the two options are identical and are simply aliases)
.SS "Miscellaneous"
@@ -611,17 +612,17 @@ labels like this \f(CW\*(C`\-L labelold \-L labelnew\*(C'\fR.
Suppress inclusion of old and new file names as comment in output file
.IP "\fB\-\-visible\-label\fR" 4
.IX Item "--visible-label"
-Include old and new filenames (or labels set with \f(CW\*(C`\-\-label\*(C'\fR option) as
+Include old and new filenames (or labels set with \f(CW\*(C`\-\-label\*(C'\fR option) as
visible output.
.IP "\fB\-\-flatten\fR" 4
.IX Item "--flatten"
Replace \f(CW\*(C`\einput\*(C'\fR and \f(CW\*(C`\einclude\*(C'\fR commands within body by the content
of the files in their argument. If \f(CW\*(C`\eincludeonly\*(C'\fR is present in the
-preamble, only those files are expanded into the document. However,
-no recursion is done, i.e. \f(CW\*(C`\einput\*(C'\fR and \f(CW\*(C`\einclude\*(C'\fR commands within
-included sections are not expanded. The included files are assumed to
+preamble, only those files are expanded into the document. However,
+no recursion is done, i.e. \f(CW\*(C`\einput\*(C'\fR and \f(CW\*(C`\einclude\*(C'\fR commands within
+included sections are not expanded. The included files are assumed to
be located in the same directories as the old and new master files,
-respectively, making it possible to organise files into old and new directories.
+respectively, making it possible to organise files into old and new directories.
\&\-\-flatten is applied recursively, so inputted files can contain further
\&\f(CW\*(C`\einput\*(C'\fR statements. Also handles files included by the import package
(\f(CW\*(C`\eimport\*(C'\fR and \f(CW\*(C`\esubimport\*(C'\fR), and \f(CW\*(C`\esubfile\*(C'\fR command.
@@ -660,10 +661,15 @@ The major type determine the markup of plain text and some selected latex comman
.IX Item "UNDERLINE"
Added text is wavy-underlined and blue, discarded text is struck out and red
(Requires color and ulem packages). Overstriking does not work in displayed math equations such that deleted parts of equation are underlined, not struck out (this is a shortcoming inherent to the ulem package).
+.ie n .IP """LUAUNDERLINE""" 10
+.el .IP "\f(CWLUAUNDERLINE\fR" 10
+.IX Item "LUAUNDERLINE"
+Added text is underlined and blue, discarded text is struck out and red
+(Requires lua-ul package + LuaLaTeX).
.ie n .IP """CTRADITIONAL""" 10
.el .IP "\f(CWCTRADITIONAL\fR" 10
.IX Item "CTRADITIONAL"
-Added text is blue and set in sans-serif, and a red footnote is created for each discarded
+Added text is blue and set in sans-serif, and a red footnote is created for each discarded
piece of text. (Requires color package)
.ie n .IP """TRADITIONAL""" 10
.el .IP "\f(CWTRADITIONAL\fR" 10
@@ -723,7 +729,7 @@ from the intended position.
.IX Item "COLOR"
An alternative way of marking added passages in blue, and deleted ones in red.
(It is recommeneded to use instead the main types to effect colored markup,
-although in some cases coloring with dvipscol can be more complete, for example
+although in some cases coloring with dvipscol can be more complete, for example
with citation commands).
.ie n .IP """DVIPSCOL""" 10
.el .IP "\f(CWDVIPSCOL\fR" 10
@@ -747,7 +753,7 @@ there is floating material (figures, tables).
is similar to \f(CW\*(C`ZLABEL\*(C'\fR, but does not need the zref package and works less reliably (deprecated).
.SS "Float Types"
.IX Subsection "Float Types"
-Some of the markup used in the main text might cause problems when used within
+Some of the markup used in the main text might cause problems when used within
floats (e.g. figures or tables). For this reason alternative versions of all
markup commands are used within floats. The float type defines these alternative commands.
.ie n .IP """FLOATSAFE""" 10
@@ -767,7 +773,7 @@ Make no difference between the main text and floats.
.ie n .IP """ARRENV""" 10
.el .IP "\f(CWARRENV\fR" 10
.IX Item "ARRENV"
-If a match to \f(CW\*(C`ARRENV\*(C'\fR is found within an inline math environment within a deleted or added block, then the inlined math
+If a match to \f(CW\*(C`ARRENV\*(C'\fR is found within an inline math environment within a deleted or added block, then the inlined math
is surrounded by \f(CW\*(C`\embox{\*(C'\fR...\f(CW\*(C`}\*(C'\fR. This is necessary as underlining does not work within inlined array environments.
.Sp
[ Default: \f(CW\*(C`ARRENV\*(C'\fR=\f(CW\*(C`(?:array|[pbvBV]matrix)\*(C'\fR\
@@ -787,9 +793,9 @@ numbering in the new file.
This option is for advanced users and allows definition of special versions of commands, which do not work as safe commands.
.Sp
Commands in \f(CW\*(C`CUSTOMDIFCMD\*(C'\fR that occur in added or deleted blocks will be given an \s-1ADD\s0 or \s-1DEL\s0 prefix.
-The prefixed versions of the command must be defined in the preamble, either by putting them
+The prefixed versions of the command must be defined in the preamble, either by putting them
in the preamble of at least the new file, or by creating a custom preamble file (Option \-\-preamble).
-For example the command \f(CW\*(C`\eblindtext\*(C'\fR (from package blindtext) does not interact well with underlining, so that
+For example the command \f(CW\*(C`\eblindtext\*(C'\fR (from package blindtext) does not interact well with underlining, so that
for the standard markup type, it is not satisfactory to define it as a safe command. Instead, a customised versions
without underlining can be defined in the preamble:
.Sp
@@ -803,7 +809,7 @@ and then latexdiff should be invoked with the option \f(CW\*(C`\-c CUSTOMDIFCMD=
.ie n .IP """FLOATENV""" 10
.el .IP "\f(CWFLOATENV\fR" 10
.IX Item "FLOATENV"
-Environments whose name matches the regular expression in \f(CW\*(C`FLOATENV\*(C'\fR are
+Environments whose name matches the regular expression in \f(CW\*(C`FLOATENV\*(C'\fR are
considered floats. Within these environments, the \fIlatexdiff\fR markup commands
are replaced by their \s-1FL\s0 variaties.
.Sp
@@ -852,55 +858,62 @@ If \f(CW\*(C`\-\-graphics\-markup=both\*(C'\fR is chosen, \f(CW\*(C`SCALEDELGRAP
.ie n .IP """VERBATIMENV""" 10
.el .IP "\f(CWVERBATIMENV\fR" 10
.IX Item "VERBATIMENV"
-RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of these environments will not be processed in any way:
+RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of these environments will not be processed in any way:
deleted content is commented out, new content is not marked up
.Sp
[ Default: \f(CW\*(C`comment\*(C'\fR\ ]
.ie n .IP """VERBATIMLINEENV""" 10
.el .IP "\f(CWVERBATIMLINEENV\fR" 10
.IX Item "VERBATIMLINEENV"
-RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of environments described by \s-1VERBATIMLINEENV\s0 are compared in
+RegEx describing environments like verbatim, whose contents should be taken verbatim. The content of environments described by \s-1VERBATIMLINEENV\s0 are compared in
line mode, and changes are marked up using the listings package. The markup style is set based on the chosen mains markup type (Option \-t), or on an analysis
of the preamble.
-Note that \*(L"listings.sty\*(R" must be installed. If this file is not found the fallback solution is to
+Note that \*(L"listings.sty\*(R" must be installed. If this file is not found the fallback solution is to
treat \s-1VERBATIMLINEENV\s0 environments treated exactly the same way as \s-1VERBATIMENV\s0 environments.
.Sp
[ Default: \f(CW\*(C`(?:verbatim[*]?|lstlisting\*(C'\fR\ ]
.SH "COMMON PROBLEMS AND FAQ"
.IX Header "COMMON PROBLEMS AND FAQ"
-.IP "Citations result in overfull boxes" 10
-.IX Item "Citations result in overfull boxes"
+.IP "Changed citations result in overfull boxes" 10
+.IX Item "Changed citations result in overfull boxes"
There is an incompatibility between the \f(CW\*(C`ulem\*(C'\fR package, which \f(CW\*(C`latexdiff\*(C'\fR uses for underlining and striking out in the \s-1UNDERLINE\s0 style,
-the default style, and the way citations are generated. In order to be able to mark up citations properly, they are enclosed with an \f(CW\*(C`\embox\*(C'\fR
-command. As mboxes cannot be broken across lines, this procedure frequently results in overfull boxes, possibly obscuring the content as it extends beyond the right margin. The same occurs for some other packages (e.g., siunitx). If this is a problem, you have two possibilities.
+the default style, and the way citations are generated. In order to be able to mark up citations properly, they are enclosed with an \f(CW\*(C`\embox\*(C'\fR
+command. As mboxes cannot be broken across lines, this procedure frequently results in overfull boxes, possibly obscuring the content as it extends beyond the right margin. The same occurs for some other packages (e.g., siunitx). If this is a problem, you have several possibilities.
.Sp
1. Use \f(CW\*(C`CFONT\*(C'\fR type markup (option \f(CW\*(C`\-t CFONT\*(C'\fR): If this markup is chosen, then changed citations are no longer marked up
with the wavy line (additions) or struck out (deletions), but are still highlighted in the appropriate color, and deleted text is shown with a different font. Other styles not using the \f(CW\*(C`ulem\*(C'\fR package will also work.
.Sp
2. Choose option \f(CW\*(C`\-\-disable\-citation\-markup\*(C'\fR which turns off the marking up of citations: deleted citations are no longer shown, and
-added citations are shown without markup. (This was the default behaviour of latexdiff at versions 0.6 and older)
-.Sp
+added citations are shown without markup. (This was the default behaviour of latexdiff at versions 0.6 and older).
For custom packages you can define the commands which need to be protected by \f(CW\*(C`\embox\*(C'\fR with \f(CW\*(C`\-\-append\-mboxsafecmd\*(C'\fR and \f(CW\*(C`\-\-excludemboxsafecmd\*(C'\fR options
(submit your lists of command as feature request at github page to set the default behaviour of future versions, see section 6)
-.IP "Changes in complicated mathematical equations result in latex processing errors" 10
-.IX Item "Changes in complicated mathematical equations result in latex processing errors"
-Try options \f(CW\*(C`\-\-math\-markup=whole\*(C'\fR. If even that fails, you can turn off mark up for equations with \f(CW\*(C`\-\-math\-markup=off\*(C'\fR.
-.IP "How can I just show the pages where changes had been made" 10
-.IX Item "How can I just show the pages where changes had been made"
-Use options \-\f(CW\*(C`\-s ZLABEL\*(C'\fR (some postprocessing required) or \f(CW\*(C`\-s ONLYCHANGEDPAGE\*(C'\fR. \f(CW\*(C`latexdiff\-vc \-\-ps|\-\-pdf\*(C'\fR with \f(CW\*(C`\-\-only\-changes\*(C'\fR option takes care of
+.Sp
+3. If you are using luatex >= 1.12.0 you can use option \s-1LUAUNDERLINE\s0 that uses lua-ul instead of ulem for underlining, which does not have this problem (experimental feature).
+.IP "Changes in complicated mathematical equations result in latex processing errors." 10
+.IX Item "Changes in complicated mathematical equations result in latex processing errors."
+Try option \f(CW\*(C`\-\-math\-markup=whole\*(C'\fR. If even that fails, you can turn off mark up for equations with \f(CW\*(C`\-\-math\-markup=off\*(C'\fR.
+.IP "Deleted parts in equations are not struck out but underlined." 10
+.IX Item "Deleted parts in equations are not struck out but underlined."
+This is a limitation of the ulem package that implements the strike-out. If you use the amsmath package, then the strike-out command is redefined in such a way that deleted passages are wrapped with \f(CW\*(C`\etext\*(C'\fR command; adding \f(CW\*(C`\eusepackage{amsmath}\*(C'\fR to your preamble will trigger this behaviour. (If amsmath is not included directly, but imported by another package, latexdiff will not be able to detect its availability; in this case you can give latexdiff a hint with option \f(CW\*(C`\-\-packages=amsmath\*(C'\fR.
+.IP "How can I just show the pages where changes had been made?" 10
+.IX Item "How can I just show the pages where changes had been made?"
+Use options \f(CW\*(C`\-\-s ZLABEL\*(C'\fR (some postprocessing required) or \f(CW\*(C`\-s ONLYCHANGEDPAGE\*(C'\fR. \f(CW\*(C`latexdiff\-vc \-\-ps|\-\-pdf\*(C'\fR with \f(CW\*(C`\-\-only\-changes\*(C'\fR option takes care of
the post-processing for you (requires zref package to be installed).
+.IP "The character encoding breaks when running latexdiff from powershell." 10
+.IX Item "The character encoding breaks when running latexdiff from powershell."
+This problem is not limited to \f(CW\*(C`latexdiff\*(C'\fR and has to do with the default settings of \f(CW\*(C`powershell\*(C'\fR in Windows. It is recommended to use \f(CW\*(C`cmd\*(C'\fR instead.
.SH "BUGS"
.IX Header "BUGS"
.IP "Option allow-spaces not implemented entirely consistently. It breaks the rules that number and type of white space does not matter, as different numbers of inter-argument spaces are treated as significant." 10
.IX Item "Option allow-spaces not implemented entirely consistently. It breaks the rules that number and type of white space does not matter, as different numbers of inter-argument spaces are treated as significant."
.PP
-Please submit bug reports using the issue tracker of the github repository page \fIhttps://github.com/ftilmann/latexdiff.git\fR,
+Please submit bug reports using the issue tracker of the github repository page \fIhttps://github.com/ftilmann/latexdiff.git\fR,
or send them to \fItilmann \*(-- \s-1AT\s0 \*(-- gfz\-potsdam.de\fR. Include the version number of \fIlatexdiff\fR
(from comments at the top of the source or use \fB\-\-version\fR). If you come across latex
files that are error-free and conform to the specifications set out
above, and whose differencing still does not result in error-free
latex, please send me those files, ideally edited to only contain the
-offending passage as long as that still reproduces the problem. If your
+offending passage as long as that still reproduces the problem. If your
file relies on non-standard class files, you must include those. I will not
look at examples where I have trouble to latex the original files.
.SH "SEE ALSO"
@@ -909,22 +922,22 @@ latexrevise, latexdiff-vc
.SH "PORTABILITY"
.IX Header "PORTABILITY"
\&\fIlatexdiff\fR does not make use of external commands and thus should run
-on any platform supporting Perl 5.6 or higher. If files with encodings
+on any platform supporting Perl 5.6 or higher. If files with encodings
other than \s-1ASCII\s0 or \s-1UTF\-8\s0 are processed, Perl 5.8 or higher is required.
.PP
The standard version of \fIlatexdiff\fR requires installation of the Perl package
-\&\f(CW\*(C`Algorithm::Diff\*(C'\fR (available from \fIwww.cpan.org\fR \-
+\&\f(CW\*(C`Algorithm::Diff\*(C'\fR (available from \fIwww.cpan.org\fR \-
\&\fIhttp://search.cpan.org/~nedkonz/Algorithm\-Diff\-1.15\fR) but a stand-alone
version, \fIlatexdiff-so\fR, which has this package inlined, is available, too.
\&\fIlatexdiff-fast\fR requires the \fIdiff\fR command to be present.
.SH "AUTHOR"
.IX Header "AUTHOR"
-Version 1.3.3
-Copyright (C) 2004\-2022 Frederik Tilmann
+Version 1.3.4
+Copyright (C) 2004\-2024 Frederik Tilmann
.PP
This program is free software; you can redistribute it and/or modify
it under the terms of the \s-1GNU\s0 General Public License Version 3
.PP
-Contributors of fixes and additions: V. Kuhlmann, J. Paisley, N. Becker, T. Doerges, K. Huebner,
+Contributors of fixes and additions: V. Kuhlmann, J. Paisley, N. Becker, T. Doerges, K. Huebner,
T. Connors, Sebastian Gouezel and many others.
Thanks to the many people who sent in bug reports, feature suggestions, and other feedback.
diff --git a/support/latexdiff/latexrevise.1 b/support/latexdiff/latexrevise.1
index a67d09564f..d2d91dbe41 100644
--- a/support/latexdiff/latexrevise.1
+++ b/support/latexdiff/latexrevise.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "LATEXREVISE 1"
-.TH LATEXREVISE 1 "2021-12-27" "perl v5.30.0" " "
+.TH LATEXREVISE 1 "2021-12-27" "perl v5.34.0" " "
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl b/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
index b3b343d41a..8386b76f30 100644
--- a/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
+++ b/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
@@ -51,7 +51,6 @@ $mirrors = {
'http://ftp.ktug.org/tex-archive/' => 1,
'https://ftp.kaist.ac.kr/tex-archive/' => 1,
'https://kr.mirrors.cicku.me/ctan/' => 1,
- 'https://lab.uklee.pe.kr/tex-archive/' => 1,
'https://mirror.kakao.com/CTAN/' => 1,
'https://mirror.navercorp.com/CTAN/' => 1,
},
@@ -157,7 +156,6 @@ $mirrors = {
'https://mirrors.nxthost.com/ctan/' => 1,
},
'Russia' => {
- 'https://ctan.altspu.ru/' => 1,
'https://mirror.macomnet.net/pub/CTAN/' => 1,
'https://mirror.truenetwork.ru/CTAN/' => 1,
},
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
index 50278207cd..2bf072bc30 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
@@ -26,11 +26,11 @@ depend container_split_src_files/1
depend frozen/0
depend minrelease/2016
depend release/2024
-depend revision/72096
+depend revision/72102
name 00texlive.image
category TLCore
-revision 72097
+revision 72101
shortdesc TeX Live files only in the source repository
longdesc The files here are not copied by the installer and containers
longdesc are not built for them; they exist only in the source
@@ -40,7 +40,7 @@ longdesc IgnorePatterns in the check_files routine in tlmgr.pl augment
longdesc this list. Those are not included in the source/ tarball. For
longdesc information on the 00texlive prefix see
longdesc 00texlive.installation(.tlpsrc)
-runfiles size=14521
+runfiles size=14522
.mkisofsrc
autorun.inf
texmf-dist/README
@@ -2403,6 +2403,7 @@ runfiles size=14521
tlpkg/tlpsrc/interactiveworkbook.tlpsrc
tlpkg/tlpsrc/interchar.tlpsrc
tlpkg/tlpsrc/interfaces.tlpsrc
+ tlpkg/tlpsrc/interlinear.tlpsrc
tlpkg/tlpsrc/interpreter.tlpsrc
tlpkg/tlpsrc/interval.tlpsrc
tlpkg/tlpsrc/intopdf.tlpsrc
@@ -4934,7 +4935,7 @@ depend setting_available_architectures:aarch64-linux amd64-freebsd amd64-netbsd
name 00texlive.installer
category TLCore
-revision 72096
+revision 72102
shortdesc TeX Live standalone installer package
longdesc This package defines the files to go into the installer
longdesc archives (install-tl-unx.tar.gz, install-tl.zip) built by the
@@ -71409,7 +71410,7 @@ containerchecksum 43b0893ce80c5fa395348fd319110c3c0e0e47e589d70e63bc0023dc2e2ee9
name collection-humanities
category Collection
-revision 68465
+revision 72101
shortdesc Humanities packages
relocated 1
longdesc Packages for law, linguistics, social sciences, humanities,
@@ -71432,6 +71433,7 @@ depend expex
depend expex-glossonly
depend gb4e
depend gmverse
+depend interlinear
depend jura
depend juraabbrev
depend juramisc
@@ -71469,8 +71471,8 @@ depend theatre
depend tree-dvips
depend verse
depend xyling
-containersize 608
-containerchecksum 33b19b29b31671c148900d207f1f9947be502ab215e901afa9c5fe5264bafd004717dc8f6438d1a4b40abfa63c0b94725738b8c8bc117e293676f3db1e25ba6a
+containersize 620
+containerchecksum 0e3e5d62941c4e01d364a15b6c3d2bce8f1024a40b09a6c347689c50cd68541d1de7c1c2ab4f9d5f1408e8e0a0a1165da40b8fb366f419ed0762216833029a26
name collection-langarabic
category Collection
@@ -158688,6 +158690,43 @@ catalogue-license lppl1.3
catalogue-topics package-supp
catalogue-version 3.1
+name interlinear
+category Package
+revision 72101
+shortdesc A package for creating interlinear glossed texts with customizable formatting
+relocated 1
+longdesc The interlinear package facilitates the creation of interlinear
+longdesc glossed texts, commonly used in linguistic examples. It is
+longdesc based on the gb4e package and builds upon its functionality to
+longdesc provide enhanced features. It offers extensive customization
+longdesc options, allowing users to control font styles, formatting, and
+longdesc layout. With predefined styles and margin note customization,
+longdesc interlinear provides a flexible solution for presenting
+longdesc linguistic data.
+depend enumitem
+depend etoolbox
+depend l3packages
+depend marginnote
+depend xifthen
+depend xkeyval
+containersize 10148
+containerchecksum 536c244e87947ecd4540bc7cffc92996a52bee9bc9533574cbecf18d6c363af1a37ebef82da1b853107b32dda3658bcb8761f63d5be67c794a2fa4a1989beff1
+doccontainersize 127344
+doccontainerchecksum 0fb4f011f9930658c844861724f7a0436d86cde131335ddd95a3d8a0377414f56a344f57e2c4b30dcbdc877dc38aed04e4985fe53b3dcf7bd8ba548386a4d61d
+docfiles size=40
+ RELOC/doc/latex/interlinear/DEPENDS.txt
+ RELOC/doc/latex/interlinear/LICENSE.txt
+ RELOC/doc/latex/interlinear/README.md details="Readme"
+ RELOC/doc/latex/interlinear/VERSION_1_0
+ RELOC/doc/latex/interlinear/interlinear-doc.pdf details="Package documentation"
+ RELOC/doc/latex/interlinear/interlinear-doc.tex
+runfiles size=12
+ RELOC/tex/latex/interlinear/interlinear.sty
+catalogue-ctan /macros/latex/contrib/interlinear
+catalogue-license lppl1.3c
+catalogue-topics linguistic
+catalogue-version 1.0
+
name interpreter
category Package
revision 27232
@@ -186920,7 +186959,7 @@ catalogue-version 0.2
name latexdiff
category Package
-revision 64980
+revision 72099
shortdesc Determine and mark up significant differences between LaTeX files
longdesc Latexdiff is a Perl script for visual mark up and revision of
longdesc significant differences between two LaTeX files. Various
@@ -186933,11 +186972,11 @@ longdesc all changes. Manual editing of the difference file can be used
longdesc to override this default behaviour and accept or reject
longdesc selected changes only.
depend latexdiff.ARCH
-containersize 74664
-containerchecksum ae7179b5a9d410302d750233b6b22d29382406f3222129155c98b1f2ddc23d22ca7abe1683fd013c7302fe8e21e82a376499ae33d83c15a01fa2720696e5b718
-doccontainersize 472668
-doccontainerchecksum 2f484db22ec12886a4d76fabde3a65a982d3e659f524120b377221f91c7ad5973ad6023aa3226dd35baa687c86ec8dd8e736553d1604690d87e68d3cf7be84f8
-docfiles size=266
+containersize 76256
+containerchecksum a2417739560691ed5c523a537503d2ec6e4bdb29471e87072471d0b9a90008a1fd87a3272f9b8b91a0ea957818e2c126f129a3b63cf70162e23fecb8ebed0d23
+doccontainersize 487204
+doccontainerchecksum b3bc3ae2feef1d11618f35a992cb9307878722f466aaabda1a8eaeacfd5632ae7d13260a438bed84eb859fc0ae2109091029b90ef3efd5f53b15a4f47c7cc9a4
+docfiles size=273
texmf-dist/doc/man/man1/latexdiff-vc.1
texmf-dist/doc/man/man1/latexdiff-vc.man1.pdf
texmf-dist/doc/man/man1/latexdiff.1
@@ -186958,7 +186997,7 @@ docfiles size=266
texmf-dist/doc/support/latexdiff/example/example-rev.tex
texmf-dist/doc/support/latexdiff/latexdiff
texmf-dist/doc/support/latexdiff/latexdiff-fast
-runfiles size=76
+runfiles size=78
texmf-dist/scripts/latexdiff/latexdiff-vc.pl
texmf-dist/scripts/latexdiff/latexdiff.pl
texmf-dist/scripts/latexdiff/latexrevise.pl
@@ -186966,7 +187005,7 @@ catalogue-contact-repository https://github.com/ftilmann/latexdiff/
catalogue-ctan /support/latexdiff
catalogue-license gpl3
catalogue-topics doc-mgmt
-catalogue-version 1.3.3
+catalogue-version 1.3.4
name latexdiff.aarch64-linux
category Package
@@ -328969,7 +329008,7 @@ docfiles size=376
name texlive-scripts
category TLCore
-revision 72096
+revision 72102
shortdesc TeX Live infrastructure programs
longdesc Includes install-tl, tl-portable, rungs, etc.; not needed for
longdesc tlmgr to run but still ours. Not included in tlcritical.
@@ -328977,10 +329016,10 @@ depend texlive-scripts.ARCH
depend texlive.infra
execute addMap mathpple.map
postaction shortcut type=menu name="TeX Live command-line" cmd=TEXDIR/tlpkg/installer/tl-cmd.bat
-containersize 114484
-containerchecksum a701e0d21a34b503d1519443dddc46d0061b785f23d2970c85fa8b1ed4511d05600efd98af7dc242be3157d6c7179dde15236a1fb421a5c69c43878705698a82
-doccontainersize 436212
-doccontainerchecksum ee0dd7e56d86b931f763eae48594d98f259383038b47b8f2e535f09087a026b7163f4f1f1c6e2e3f480d914089af8d80669d5ae9c984dbffd4ae78cd0e392579
+containersize 114456
+containerchecksum a7c6c134a43416db21072423851a6ae427ece0b894669f28102e34ce906a97336e73a2fa6e40f583b66d743407db3d73fcf356dc3c40a602e9d1988d14d18323
+doccontainersize 436392
+doccontainerchecksum 3f548714bc20379534a96f00f1ad38c24bee8bef9bbe02c2f68f0ecae8aa002a4c8b60f8e0de6fc85bbb2beafeee04498abcb3a847e68750c20de45811d88049
docfiles size=565
doc.html
texmf-dist/doc/man/man1/fmtutil-sys.1
@@ -347636,16 +347675,16 @@ catalogue-version 1.3a
name tutodoc
category Package
-revision 69343
+revision 72100
shortdesc Typeset tutorial-like documentations
relocated 1
longdesc This package provides some macros to write documentation of
longdesc LaTeX packages in a tutorial style.
-containersize 7456
-containerchecksum acd6fc6114ab1c25259485514b54d848b75cb5f45dc05cdb8324a91b127031c0db8c84c445b0e1b429dc1a5ca0a6a394987465363265c0f830ea60e72c6ab7de
-doccontainersize 1301892
-doccontainerchecksum 8f58c8eaa4db17315d69088b9cb446b90504fe62395fcb07495742695f2c8e8215ab76596d4d98cad3c432f3e6079a2ec3088074345d0ace4d309db3163ce405
-docfiles size=375
+containersize 7500
+containerchecksum a5b5d8fef61a4991a2a41430174369cea4f1e84cc96cd99b6149951465c233ee0869537318a7233d9cd37867589c9dd1571ec7548fb1cca3f1dab4fc3070c194
+doccontainersize 1318860
+doccontainerchecksum 981867bf6f0499eb30a43cc00db48cbcf70d048bb9f7ab9490e40bf1eeab5ef3080e7128fd0680a9b409f985e984ef5c0045940fa93a3327ad6c47fa57cd06e0
+docfiles size=376
RELOC/doc/latex/tutodoc/MANIFEST.md
RELOC/doc/latex/tutodoc/README.md details="Readme"
RELOC/doc/latex/tutodoc/tutodoc-en.pdf details="Package documentation" language="en"
@@ -347660,7 +347699,7 @@ catalogue-contact-repository https://github.com/bc-tools/for-latex
catalogue-ctan /macros/latex/contrib/tutodoc
catalogue-license gpl3
catalogue-topics doc-tool expl3
-catalogue-version 1.1.0
+catalogue-version 1.2.0
name twemoji-colr
category Package
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
index 6ddbb2c7d0..124e731e4f 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
@@ -1 +1 @@
-758200ae06e8b0fc675710762afa8781 texlive.tlpdb
+80795f19e8fcfb3bd9e4fcdac3d8f906 texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
index 0bdbb8a9db..4ff45456bd 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
@@ -1 +1 @@
-9d441c51b547d8a86181a5e7e8737fa6df72550790242884ff0f0931cfd298138510482b3fbb6e84ce14cd62ec28bccff380e94f593c2a61932db96b6576618d texlive.tlpdb
+5b5a97e556ebd5c4b8e7b11c1f2000ab39c1a887dc72a0ebc578f444fa613df42ff57a902f56fc2676221f142fc7686620f96051d898541c7156d5fe240fcecb texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
index 91289a4308..1d4d3c0a78 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
@@ -1,11 +1,11 @@
-----BEGIN PGP SIGNATURE-----
-iQEzBAEBCgAdFiEE2PL4YFeoV+QqiBBqTOGHfhlDjHAFAmbJH/kACgkQTOGHfhlD
-jHC4tAf/f8dcHLHQ33oQe1Gsq3vEiq/4p/5ayPt92o5TReIZ/x6rcLCFO8+HzMfW
-rVplJFxHOm0qrVqerq9Y2J4kbIkpuIN/UkJNBGSpvY3CdQ2SzUL2HFEIzkdvptPC
-X2bRzxxoIa/ys6owwsuHvgzzVgbruBUrlxgS3g+uAF/7x5QOsMx745vntVGfI+pI
-OQxj7AZ8zGkybeIPjU53E8bHROoXThDjcdhb96Q/6mMMavgG9K+ncoDvD6fMQw90
-U2SKdV1nuCi3aRiFTvaeNWwHWSyqy/frH1pVQCPu/gRLH/k2ZDwTfvyosPXCIcCU
-1BlvBrk50wpbxEGGxtiQDl0aFhPOUQ==
-=PEVP
+iQEzBAEBCgAdFiEE2PL4YFeoV+QqiBBqTOGHfhlDjHAFAmbKcxYACgkQTOGHfhlD
+jHB7Agf9Gr+M9SS2pmCeIs0xh9U8Id+Gl0Yrb/vAmsxIIVw6ul0l4ig8ylsoq+Ne
+YILh4Ns0slZ+gr1+BJZS/DA5RxCE2uA8YrXYOaDVNi4C8nIU0gAUW3IwShgTyoOH
+nmO2cYskdJSXV5jtQCmwjl7ckjMc3rx0ljSv6VhLbaIF0m3UGOdm7s4fQNMMFotn
+cKcMkcJp5deGQUqvM3Rffsr3NIZin1DC8nDnXb24QVAXLSY/IN33xgPxoRgtCdra
+dgUbnBTNdqBq2CPzasq5yb3s1tihJ07Grm9LoqwPkxBGZK7yzgOxDzjox2tCGPqD
+do64dJKMn0tr1ANi6R3ymTrwz5A7xg==
+=odTe
-----END PGP SIGNATURE-----
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
index 3695e44318..fe174810c2 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
Binary files differ
diff --git a/timestamp b/timestamp
index 9134bff697..591cb58478 100644
--- a/timestamp
+++ b/timestamp
@@ -2,4 +2,4 @@
# The source CTAN of this site's material:
dante.ctan.org
# The year-month-day-hour-minute of this site's material:
-2024-08-24-02-02
+2024-08-25-02-02