diff options
author | Karl Berry <karl@freefriends.org> | 2013-06-26 22:57:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-06-26 22:57:37 +0000 |
commit | 74d78e4c6c1722395be36b5f5db73251a60c8928 (patch) | |
tree | 870fe7efe1324a3cb21ae7672062e9cbac753124 /Master/texmf-dist | |
parent | 054a745be425b167321d2b5de8451ba62e30535c (diff) |
latexdiff (17jun13)
git-svn-id: svn://tug.org/texlive/trunk@30961 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
16 files changed, 108 insertions, 390 deletions
diff --git a/Master/texmf-dist/doc/man/man1/latexdiff-vc.1 b/Master/texmf-dist/doc/man/man1/latexdiff-vc.1 index 497b8fed20b..6b8806d80bd 100644 --- a/Master/texmf-dist/doc/man/man1/latexdiff-vc.1 +++ b/Master/texmf-dist/doc/man/man1/latexdiff-vc.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "LATEXDIFF-VC 1" -.TH LATEXDIFF-VC 1 "2012-12-16" "perl v5.12.4" " " +.TH LATEXDIFF-VC 1 "2013-06-10" "perl v5.14.2" " " .\" 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/Master/texmf-dist/doc/man/man1/latexdiff-vc.man1.pdf b/Master/texmf-dist/doc/man/man1/latexdiff-vc.man1.pdf Binary files differindex 779eaa29e23..684f73277b8 100644 --- a/Master/texmf-dist/doc/man/man1/latexdiff-vc.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/latexdiff-vc.man1.pdf diff --git a/Master/texmf-dist/doc/man/man1/latexdiff.1 b/Master/texmf-dist/doc/man/man1/latexdiff.1 index 2f075daa0a9..03007f9272b 100644 --- a/Master/texmf-dist/doc/man/man1/latexdiff.1 +++ b/Master/texmf-dist/doc/man/man1/latexdiff.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "LATEXDIFF 1" -.TH LATEXDIFF 1 "2012-12-16" "perl v5.12.4" " " +.TH LATEXDIFF 1 "2013-06-09" "perl v5.14.2" " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -679,7 +679,7 @@ as \f(CW\*(C`MATHENV\*(C'\fR,\f(CW\*(C`MATHREPL\*(C'\fR but for equation arrays 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\ +[ Default: \f(CW\*(C`ARRENV\*(C'\fR=\f(CW\*(C`(?:array|[pbvBV]matrix)\*(C'\fR\ .ie n .IP """COUNTERCMD""" 10 .el .IP "\f(CWCOUNTERCMD\fR" 10 .IX Item "COUNTERCMD" @@ -751,8 +751,8 @@ Thanks to the many people who send in bug reports, feature suggestions, and othe .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR -.IP "Around line 2942:" 4 -.IX Item "Around line 2942:" +.IP "Around line 2956:" 4 +.IX Item "Around line 2956:" =over should be: '=over' or '=over positive_number' .Sp -You can't have =items (as at line 2948) unless the first thing after the =over is an =item +You can't have =items (as at line 2962) unless the first thing after the =over is an =item diff --git a/Master/texmf-dist/doc/man/man1/latexdiff.man1.pdf b/Master/texmf-dist/doc/man/man1/latexdiff.man1.pdf Binary files differindex 6e4bc5d5dec..93dd4f8baf1 100644 --- a/Master/texmf-dist/doc/man/man1/latexdiff.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/latexdiff.man1.pdf diff --git a/Master/texmf-dist/doc/man/man1/latexrevise.1 b/Master/texmf-dist/doc/man/man1/latexrevise.1 index b8d0d2da807..8b14197241e 100644 --- a/Master/texmf-dist/doc/man/man1/latexrevise.1 +++ b/Master/texmf-dist/doc/man/man1/latexrevise.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "LATEXREVISE 1" -.TH LATEXREVISE 1 "2012-12-16" "perl v5.12.4" " " +.TH LATEXREVISE 1 "2013-01-27" "perl v5.14.2" " " .\" 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/Master/texmf-dist/doc/man/man1/latexrevise.man1.pdf b/Master/texmf-dist/doc/man/man1/latexrevise.man1.pdf Binary files differindex 623a87d27af..4fe9c927fd9 100644 --- a/Master/texmf-dist/doc/man/man1/latexrevise.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/latexrevise.man1.pdf diff --git a/Master/texmf-dist/doc/support/latexdiff/contrib/README.latexchanges b/Master/texmf-dist/doc/support/latexdiff/contrib/README.latexchanges deleted file mode 100644 index 4a027658444..00000000000 --- a/Master/texmf-dist/doc/support/latexdiff/contrib/README.latexchanges +++ /dev/null @@ -1,13 +0,0 @@ -latexchanges.py (Jan-Ake Larsson): -Here's a wrapper I wrote for latexdiff, intended as a drop-in -replacement for latex, when you have several numbered (or dated) -versions of a manuscript. My coauthors don't as a rule know what CVS or -SVN is, they simply use a number or date for the different versions. - -latexchanges replaces the current DVI with one that includes a -latexdiff to the last version. The last version is selected as the -TEX file in the same directory with the same prefix (up to a number -or a dot), that has an mtime immediately preceding the given TEX -file. - - diff --git a/Master/texmf-dist/doc/support/latexdiff/contrib/latexchanges.py b/Master/texmf-dist/doc/support/latexdiff/contrib/latexchanges.py deleted file mode 100644 index de7acbe8258..00000000000 --- a/Master/texmf-dist/doc/support/latexdiff/contrib/latexchanges.py +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/env python -# latexchanges -# -# Wrapper for latexdiff, intended as a drop-in replacement for latex, -# when you have several numbered (or dated) versions of a manuscript. -# My coauthors don't as a rule know what CVS or SVN is, they simply -# use a number or date for the different versions. -# -# latexchanges replaces the current DVI with one that includes a -# latexdiff to the last version. The last version is selected as the -# TEX file in the same directory with the same prefix (up to a number -# or a dot), that has an mtime immediately preceding the given TEX -# file. -# -# (I should probably add CVS version numbering too, at some point.) -# -# Copyright (C) 2009 by Jan-\AA{}ke Larsson <jan-ake.larsson@liu.se> -# Released under the terms of the GNU General Public License (GPL) -# Version 2. See http://www.gnu.org/ for details. -# -# Please do provide patches and bug reports, but remember: if it -# breaks, you get to keep the pieces. -# -# Jan-\AA{}ke Larsson -# Sept 16 2009 - -from os import listdir,system,stat -from sys import argv -from re import split - -name="" -newarg=[] - -# Find filename argument -for i in range(1,len(argv)): - if argv[i][-4:]==".tex": - basename=split('[0-9.]',argv[i])[0] - name=argv[i][:-4] - newarg.append(name+".changes.tex") - else: - newarg.append(argv[i]) - -if name: - print "Filename",name+".tex" - print "Prefix is",basename - # Find last archived version - mtime=stat(name+".tex").st_mtime - old_mtime=0 - ls=listdir(".") - for j in ls: - if j.startswith(basename) and j.endswith(".tex")\ - and not j.endswith(".changes.tex"): - tmptime=stat(j).st_mtime - if mtime>tmptime and old_mtime<tmptime: - oldname=j - old_mtime=tmptime - - # Archived version found? - if old_mtime>0: - print "Comparing with",oldname - system ("/bin/cp "+name+".aux "+name+".changes.aux") - system ("/bin/cp "+name+".bbl "+name+".changes.bbl") - system ("latexdiff "+oldname+" "+name+".tex > "+name+".changes.tex") - system ("latex "+" ".join(newarg)) - system ("cp "+name+".changes.dvi "+name+".dvi") - else: - system ("latex "+" ".join(argv[1:])) diff --git a/Master/texmf-dist/doc/support/latexdiff/contrib/latexdiff-wrap b/Master/texmf-dist/doc/support/latexdiff/contrib/latexdiff-wrap deleted file mode 100755 index 894b424de36..00000000000 --- a/Master/texmf-dist/doc/support/latexdiff/contrib/latexdiff-wrap +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/bash -# -# latexdiff-wrap -# -# Wrapper for latexdiff, to -# * provide support for documents consiting of more than 1 latex file -# * provide my common arguments -# -# Copyright (C) by Volker Kuhlmann <VolkerKuhlmann@gmx.de> -# Released under the terms of the GNU General Public License (GPL) Version 2. -# See http://www.gnu.org/ for details. -# -# Volker Kuhlmann -# 5, 6, 7, 12, 16, 17 Oct 2005 -# 31 Jan; 5, 7, 13, 15 Feb 2006 -# - -VERSION="0.6, 15 Feb 2006" -AUTHOR="Volker Kuhlmann <VolkerKuhlmann@gmx.de>" -COPYRIGHT="Copyright (C) 2005-2006" - - -#### -#### Constants and initialised variables -# -diffcmd="latexdiff" -diffrc="$HOME/texmf/latexdiff" -#diffargs="-e latin1 --ignore-warnings -p latexdiff-preamble.sty" -diffargs="-e latin1 --ignore-warnings" -diffargs="$diffargs --append-safecmd $diffrc/safe-cmds" -diffargs="$diffargs --append-textcmd $diffrc/text-cmds" -# Note: Can't use multiple --append-safecmd -# show current command lists: -#diffcmd="$diffcmd --show-safecmd --show-textcmd --show-config" - - -#### -#### Version, Usage, Help -# -show_version() { - echo "${0##*/} version $VERSION -$COPYRIGHT by $AUTHOR" -} - -show_usage() { - echo " -Usage: ${0##*/} OLDDIR NEWDIR DIFFDIR [DIFFARGS --] FILE.tex [...] - ${0##*/} --show [DIFFARGS] -Version $VERSION -$COPYRIGHT by $AUTHOR -" -} - -show_help() { - show_usage - echo "\ -For each FILE.tex, build a new file DIFFDIR/FILE.tex with markup of the changes -which were made from OLDDIR/FILE.tex to NEWDIR/FILE.tex. -Any path given with FILE.tex is stripped off. -Any DIFFARGS are added to the latexdiff call, if present (remember to follow -them with a double-hyphen on its own before the FILE arguments). - -With --show, shows the settings latexdiff would be running with, including the -changes applied by the user. -" -} - -# For scripts not using function library only: -Version() { show_version; exitwith ErrVersion; } -Usage() { show_help; exitwith ErrUsage; } -Help() { test "$1" && exitwith ErrHelp show_help; show_help; exitwith ErrOK; } - - -#### -#### Error/Exit codes -# -exitwith() { - exec 1>&2 # write stdout on stderr instead - case "$1" in - ErrOK) - exit 0;; - ErrVersion|ErrUsage|ErrHelp) - # Output generated by function (program) $2, if given - test -n "$2" && "$2" - exit 1;; - # more codes in here - # more codes in here - ErrBadoption) - echo "Bad option '$2'." - echo "Call with -h for help." - exit 9;; - ErrMissingParameter) - echo "A required parameter for option $2 is missing." - echo "Call with -h for help." - exit 9;; - *) - echo "Internal error: exitwith() called with illegal error code '$1'." - exit 19;; - esac -} - - -#### -#### Parse command line parameters -# - -# If the next arg starts with a "-", collect additional argument for latexdiff -# until "--". -scanextraargs() { - addargs=() - case "$1" in -*) - while [ $# -gt 0 -a "$1" != "--" ]; do - addargs=( "${addargs[@]}" "$1" ) - shift - done - test "$1" == "--" && shift - ;; esac - fileargs=( "$@" ) -} - -case "$1" in - --version) Version;; - --usage) Usage;; - --help|-h|-help) Help;; - --show) - shift - scanextraargs "$@" - (set -x - $diffcmd $diffargs "${addargs[@]}" \ - --show-safecmd --show-textcmd --show-config - ) | fmt - exit $? ;; -esac - -olddir="${1%/}" -newdir="${2%/}" -diffdir="${3%/}" - -if ! [ -d "$olddir" -a -d "$newdir" -a -d "$diffdir" ]; then - Help 1>&2 err -fi - -shift 3 - -scanextraargs "$@" -set -- "${fileargs[@]}" - - - -#### -#### Functions -# -#set -x -Log() { echo 1>&2 "+ $@"; "$@"; } - - -#### -#### Main -# - -# Create output directory, just in case. -(set -x -mkdir -p "$diffdir" -) -while [ $# -gt 0 ]; do - file="${1##*/}" - echo Examining: "$file" - # No point running latexdiff if both files are identical, - # but run latexdiff on top-level LaTeX file in any case. - if cmp --quiet "$olddir/$file" "$newdir/$file" \ - && ! grep -lq '\\begin.*{document}' "$newdir/$file"; then - (set -x - cp -p "$olddir/$file" "$diffdir" - ) - else - # Delete file, to make sure it's not clobbered by redirecting stdout - # in case it's a symlink to te original. - test -f "$diffdir/$file" && (set -x - rm "$diffdir/$file" - ) - # Run latexdiff if both input files are present. - run=1 - test -f "$olddir/$file" || { echo 1>&2 "No file: $olddir/$file"; run=; } - test -f "$newdir/$file" || { echo 1>&2 "No file: $newdir/$file"; run=; } - test -n "$run" && \ - (set -x - $diffcmd $diffargs "${addargs[@]}" \ - "$olddir/$file" "$newdir/$file" > "$diffdir/$file" - ) - fi - shift -done diff --git a/Master/texmf-dist/doc/support/latexdiff/contrib/latexdiff.spec b/Master/texmf-dist/doc/support/latexdiff/contrib/latexdiff.spec deleted file mode 100644 index 9255a69fea9..00000000000 --- a/Master/texmf-dist/doc/support/latexdiff/contrib/latexdiff.spec +++ /dev/null @@ -1,58 +0,0 @@ -Summary: Diff for LaTeX files -Name: latexdiff -Version: 0.5 -Release: 1 -License: GPL -Group: Productivity/Publishing/TeX/Utilities -URL: http://www.tug.org/tex-archive/help/Catalogue/entries/latexdiff.html -Source0: %{name}.zip -BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -# only required for 'make install-ext' -# Requires: perl-Algorithm-Diff - - -%description -latexdiff is a Perl script, which compares two latex files and marks -up significant differences between them (i.e. a diff for latex files). - Various options are available for visual markup using standard latex -packages such as "color.sty". Changes not directly affecting visible -text, for example in formatting commands, are still marked in -the latex source. - -(C) 2004 Frederik Tilmann <tilmann@esc.cam.ac.uk> - - -%prep -%setup -n %{name} - - -%build -# quick had to adapt the Makefile -%{__mv} Makefile Makefile.old -%{__sed} \ - -e "s;INSTALLPATH = /usr/local;INSTALLPATH = \${DESTDIR}%{_prefix};" \ - -e "s;INSTALLMANPATH = \$(INSTALLPATH)/man;INSTALLMANPATH = \${DESTDIR}%{_mandir};" \ - Makefile.old > Makefile - - -%install -%{__mkdir_p} $RPM_BUILD_ROOT%{_bindir} -%{__mkdir_p} $RPM_BUILD_ROOT%{_mandir}/man1 - -%makeinstall - - -%clean -[ "${RPM_BUILD_ROOT}" != "/" ] && [ -d "${RPM_BUILD_ROOT}" ] && %{__rm} -rf "${RPM_BUILD_ROOT}" - - -%files -%defattr(-,root,root) -%doc example CHANGES LICENSE README -%{_bindir}/* -%{_mandir}/man*/* - -%changelog -* Thu Jan 4 2007 Till Dörges <till@doerges.net> - 0.5-1 -- Initial build. diff --git a/Master/texmf-dist/doc/support/latexdiff/doc/example-diff.tex b/Master/texmf-dist/doc/support/latexdiff/doc/example-diff.tex index 149588d2110..a4764813b58 100644 --- a/Master/texmf-dist/doc/support/latexdiff/doc/example-diff.tex +++ b/Master/texmf-dist/doc/support/latexdiff/doc/example-diff.tex @@ -1,7 +1,7 @@ \documentclass[12pt,a4paper]{article} %DIF LATEXDIFF DIFFERENCE FILE -%DIF DEL example-draft.tex Sat Nov 17 00:45:22 2012 -%DIF ADD example-rev.tex Sat Nov 17 00:45:22 2012 +%DIF DEL example-draft.tex Sun Jan 27 23:50:07 2013 +%DIF ADD example-rev.tex Sun Jan 27 23:50:07 2013 \setlength{\topmargin}{-0.2in} \setlength{\textheight}{9.5in} diff --git a/Master/texmf-dist/doc/support/latexdiff/doc/latexdiff-man.pdf b/Master/texmf-dist/doc/support/latexdiff/doc/latexdiff-man.pdf Binary files differindex a6b5a33aacd..30242d8b36a 100644 --- a/Master/texmf-dist/doc/support/latexdiff/doc/latexdiff-man.pdf +++ b/Master/texmf-dist/doc/support/latexdiff/doc/latexdiff-man.pdf diff --git a/Master/texmf-dist/doc/support/latexdiff/latexdiff b/Master/texmf-dist/doc/support/latexdiff/latexdiff index 7075561e119..febae2d5be1 100755 --- a/Master/texmf-dist/doc/support/latexdiff/latexdiff +++ b/Master/texmf-dist/doc/support/latexdiff/latexdiff @@ -22,6 +22,15 @@ # # Detailed usage information at the end of the file # +# Version 1.0.3 +# - fix bug in add_safe_commands that made latexdiff hang on DeclareMathOperator +# command in preamble +# - \(..\) inline math expressions were not parsed correctly, if the 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 +# 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) +# # 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 @@ -83,8 +92,8 @@ my ($algodiffversion)=split(/ /,$Algorithm::Diff::VERSION); my ($versionstring)=<<EOF ; -This is LATEXDIFF 1.0.2 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V) - (c) 2004-2012 F J Tilmann +This is LATEXDIFF 1.0.3 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V) + (c) 2004-2013 F J Tilmann EOF # Configuration variables: these have to be visible from the subroutines @@ -484,12 +493,12 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/); my $coords= '[\-.,\s\d]*'; # word: sequence of letters or accents followed by letter my $word='(?:[-\w\d*]|\\\\[\"\'\`~^][A-Za-z\*])+'; - my $cmdleftright='\\\\(?:left|right|[Bb]igg?[lrm]?|middle)\s*(?:[()\[\]|]|\\\\(?:[|{}]|\w+))'; + my $cmdleftright='\\\\(?:left|right|[Bb]igg?[lrm]?|middle)\s*(?:[<>()\[\]|]|\\\\(?:[|{}]|\w+))'; my $cmdoptseq='\\\\[\w\d\*]+'.$extraspace.'(?:(?:\['.$brat0.'\]|\{'. $pat6 . '\}|\(' . $coords .'\))'.$extraspace.')*'; my $backslashnl='\\\\\n'; my $oneletcmd='\\\\.\*?(?:\['.$brat0.'\]|\{'. $pat6 . '\})*'; - my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(].*?\\\\[)]'; + my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(](?:.|\n)*?\\\\[)]'; ## the current maths command cannot cope with newline within the math expression my $comment='%.*?\n'; @@ -723,7 +732,7 @@ sub add_safe_commands { # get rid of comments my $to_test = ""; # test for \DeclareMathOperator{\foo}{myoperator} - while ( $preamble =~ m/\DeclareMathOperator\s*\{\\(\w*?)\}/s) { + while ( $preamble =~ m/\DeclareMathOperator\s*\*?\{\\(\w*?)\}/osg) { $to_test=$1; if ($to_test ne "" and not iscmd($to_test,\@SAFECMDLIST,\@SAFECMDEXCL) and not iscmd($to_test, \@SAFECMDEXCL, [])) { # one should add $to_test to the list of safe commands. @@ -1428,7 +1437,7 @@ sub marktags { # #. change begin and end commands within comments to BEGINDIF, ENDDIF # so they don't disturb the pattern matching (if there are several \begin or \end in one line # 2. mark all first empty line (in block of several) with \PAR tokens -# 3. Convert all '\%' into '\PERCENTAGE ' to make parsing regular expressions easier +# 3. Convert all '\%' into '\PERCENTAGE ' and all '\$' into \DOLLAR to make parsing regular expressions easier # 4. Convert all \verb|some verbatim text| commands (where | can be an arbitrary character) # into \verb{hash} # 5. Convert \begin{verbatim} some verbatim text \end{verbatim} into \verbatim{hash} @@ -1461,14 +1470,15 @@ sub preprocess { s/\n(\s*?)\n((?:\s*\n)*)/\n$1\\PAR\n$2/g ; s/(?<!\\)\\%/\\PERCENTAGE /g ; # (?<! is negative lookbehind assertion to prevent \\% from being converted + s/(?<!\\)\\\$/\\DOLLAR /g ; # (?<! is negative lookbehind assertion to prevent \\$ from being converted s/(\\verb\*?)(\S)(.*?)\2/"${1}{". tohash(\%verbhash,"${2}${3}${2}") ."}"/esg; s/\\begin\{(verbatim\*?)\}(.*?)\\end\{\1\}/"\\${1}{". tohash(\%verbhash,"${2}") . "}"/esg; # Convert _n or _\cmd into \SUBSCRIPTNB{n} or \SUBSCRIPTNB{\cmd} and _{nnn} into \SUBSCRIPT{nn} - 1 while s/_([^{\\]|\\\w+)/\\SUBSCRIPTNB{$1}/g ; - 1 while s/_{($pat6)}/\\SUBSCRIPT{$1}/g ; + 1 while s/(?<!\\)_([^{\\]|\\\w+)/\\SUBSCRIPTNB{$1}/g ; + 1 while s/(?<!\\)_{($pat6)}/\\SUBSCRIPT{$1}/g ; # Convert ^n into \SUPERSCRIPTNB{n} and ^{nnn} into \SUPERSCRIPT{nn} - 1 while s/\^([^{\\]|\\\w+)/\\SUPERSCRIPTNB{$1}/g ; - 1 while s/\^{($pat6)}/\\SUPERSCRIPT{$1}/g ; + 1 while s/(?<!\\)\^([^{\\]|\\\w+)/\\SUPERSCRIPTNB{$1}/g ; + 1 while s/(?<!\\)\^{($pat6)}/\\SUPERSCRIPT{$1}/g ; # Convert $$ $$ into \begin{DOLLARDOLLAR} \end{DOLLARDOLLAR} s/\$\$(.*?)\$\$/\\begin{DOLLARDOLLAR}$1\\end{DOLLARDOLLAR}/sg; # Convert \[ \] into \begin{SQUAREBRACKET} \end{SQUAREBRACKET} @@ -1565,7 +1575,7 @@ sub fromhash { # 5. Convert \SUPERSCRIPTNB{n} into ^n and \SUPERSCRIPT{nn} into ^{nnn} # 6. Convert \SUBSCRIPTNB{n} into _n and \SUBCRIPT{nn} into _{nnn} # 7. Expand hashes of verb and verbatim environments -# 8. Convert '\PERCENTAGE ' back into '\%' +# 8. Convert '\PERCENTAGE ' back into '\%' and '\DOLLAR ' into '\$' # 9.. remove all \PAR tokens # 10. package specific processing: endfloat: make sure \begin{figure} and \end{figure} are always # on a line by themselves, similarly for table environment @@ -1801,6 +1811,8 @@ sub postprocess { s/\\(verbatim\*?)\{([-\d]*?)\}/"\\begin{${1}}".fromhash(\%verbhash,$2)."\\end{${1}}"/esg; # Convert '\PERCENTAGE ' back into '\%' s/\\PERCENTAGE /\\%/g; + # Convert '\DOLLAR ' back into '\$' + s/\\DOLLAR /\\\$/g; # remove all \PAR tokens (taking care to properly keep commented out PAR's # from introducing uncommented newlines - next line) s/(%DIF < )([^\n]*?)\\PAR\n/$1$2\n$1\n/sg; @@ -3205,8 +3217,11 @@ min Pr sec sup +[Hclbdruvt] (SUPER|SUB)SCRIPTNB (SUPER|SUB)SCRIPT +PERCENTAGE +DOLLAR %%END SAFE COMMANDS %%BEGIN TEXT COMMANDS diff --git a/Master/texmf-dist/doc/support/latexdiff/latexdiff-fast b/Master/texmf-dist/doc/support/latexdiff/latexdiff-fast index 310ecc4daef..e53afc12fe6 100755 --- a/Master/texmf-dist/doc/support/latexdiff/latexdiff-fast +++ b/Master/texmf-dist/doc/support/latexdiff/latexdiff-fast @@ -22,6 +22,15 @@ # # Detailed usage information at the end of the file # +# Version 1.0.3 +# - fix bug in add_safe_commands that made latexdiff hang on DeclareMathOperator +# command in preamble +# - \(..\) inline math expressions were not parsed correctly, if the 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 +# 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) +# # 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 @@ -644,8 +653,8 @@ my ($algodiffversion)=split(/ /,$Algorithm::Diff::VERSION); my ($versionstring)=<<EOF ; -This is LATEXDIFF 1.0.2 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V) - (c) 2004-2012 F J Tilmann +This is LATEXDIFF 1.0.3 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V) + (c) 2004-2013 F J Tilmann EOF # Configuration variables: these have to be visible from the subroutines @@ -1045,12 +1054,12 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/); my $coords= '[\-.,\s\d]*'; # word: sequence of letters or accents followed by letter my $word='(?:[-\w\d*]|\\\\[\"\'\`~^][A-Za-z\*])+'; - my $cmdleftright='\\\\(?:left|right|[Bb]igg?[lrm]?|middle)\s*(?:[()\[\]|]|\\\\(?:[|{}]|\w+))'; + my $cmdleftright='\\\\(?:left|right|[Bb]igg?[lrm]?|middle)\s*(?:[<>()\[\]|]|\\\\(?:[|{}]|\w+))'; my $cmdoptseq='\\\\[\w\d\*]+'.$extraspace.'(?:(?:\['.$brat0.'\]|\{'. $pat6 . '\}|\(' . $coords .'\))'.$extraspace.')*'; my $backslashnl='\\\\\n'; my $oneletcmd='\\\\.\*?(?:\['.$brat0.'\]|\{'. $pat6 . '\})*'; - my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(].*?\\\\[)]'; + my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(](?:.|\n)*?\\\\[)]'; ## the current maths command cannot cope with newline within the math expression my $comment='%.*?\n'; @@ -1284,7 +1293,7 @@ sub add_safe_commands { # get rid of comments my $to_test = ""; # test for \DeclareMathOperator{\foo}{myoperator} - while ( $preamble =~ m/\DeclareMathOperator\s*\{\\(\w*?)\}/s) { + while ( $preamble =~ m/\DeclareMathOperator\s*\*?\{\\(\w*?)\}/osg) { $to_test=$1; if ($to_test ne "" and not iscmd($to_test,\@SAFECMDLIST,\@SAFECMDEXCL) and not iscmd($to_test, \@SAFECMDEXCL, [])) { # one should add $to_test to the list of safe commands. @@ -1989,7 +1998,7 @@ sub marktags { # #. change begin and end commands within comments to BEGINDIF, ENDDIF # so they don't disturb the pattern matching (if there are several \begin or \end in one line # 2. mark all first empty line (in block of several) with \PAR tokens -# 3. Convert all '\%' into '\PERCENTAGE ' to make parsing regular expressions easier +# 3. Convert all '\%' into '\PERCENTAGE ' and all '\$' into \DOLLAR to make parsing regular expressions easier # 4. Convert all \verb|some verbatim text| commands (where | can be an arbitrary character) # into \verb{hash} # 5. Convert \begin{verbatim} some verbatim text \end{verbatim} into \verbatim{hash} @@ -2022,14 +2031,15 @@ sub preprocess { s/\n(\s*?)\n((?:\s*\n)*)/\n$1\\PAR\n$2/g ; s/(?<!\\)\\%/\\PERCENTAGE /g ; # (?<! is negative lookbehind assertion to prevent \\% from being converted + s/(?<!\\)\\\$/\\DOLLAR /g ; # (?<! is negative lookbehind assertion to prevent \\$ from being converted s/(\\verb\*?)(\S)(.*?)\2/"${1}{". tohash(\%verbhash,"${2}${3}${2}") ."}"/esg; s/\\begin\{(verbatim\*?)\}(.*?)\\end\{\1\}/"\\${1}{". tohash(\%verbhash,"${2}") . "}"/esg; # Convert _n or _\cmd into \SUBSCRIPTNB{n} or \SUBSCRIPTNB{\cmd} and _{nnn} into \SUBSCRIPT{nn} - 1 while s/_([^{\\]|\\\w+)/\\SUBSCRIPTNB{$1}/g ; - 1 while s/_{($pat6)}/\\SUBSCRIPT{$1}/g ; + 1 while s/(?<!\\)_([^{\\]|\\\w+)/\\SUBSCRIPTNB{$1}/g ; + 1 while s/(?<!\\)_{($pat6)}/\\SUBSCRIPT{$1}/g ; # Convert ^n into \SUPERSCRIPTNB{n} and ^{nnn} into \SUPERSCRIPT{nn} - 1 while s/\^([^{\\]|\\\w+)/\\SUPERSCRIPTNB{$1}/g ; - 1 while s/\^{($pat6)}/\\SUPERSCRIPT{$1}/g ; + 1 while s/(?<!\\)\^([^{\\]|\\\w+)/\\SUPERSCRIPTNB{$1}/g ; + 1 while s/(?<!\\)\^{($pat6)}/\\SUPERSCRIPT{$1}/g ; # Convert $$ $$ into \begin{DOLLARDOLLAR} \end{DOLLARDOLLAR} s/\$\$(.*?)\$\$/\\begin{DOLLARDOLLAR}$1\\end{DOLLARDOLLAR}/sg; # Convert \[ \] into \begin{SQUAREBRACKET} \end{SQUAREBRACKET} @@ -2126,7 +2136,7 @@ sub fromhash { # 5. Convert \SUPERSCRIPTNB{n} into ^n and \SUPERSCRIPT{nn} into ^{nnn} # 6. Convert \SUBSCRIPTNB{n} into _n and \SUBCRIPT{nn} into _{nnn} # 7. Expand hashes of verb and verbatim environments -# 8. Convert '\PERCENTAGE ' back into '\%' +# 8. Convert '\PERCENTAGE ' back into '\%' and '\DOLLAR ' into '\$' # 9.. remove all \PAR tokens # 10. package specific processing: endfloat: make sure \begin{figure} and \end{figure} are always # on a line by themselves, similarly for table environment @@ -2362,6 +2372,8 @@ sub postprocess { s/\\(verbatim\*?)\{([-\d]*?)\}/"\\begin{${1}}".fromhash(\%verbhash,$2)."\\end{${1}}"/esg; # Convert '\PERCENTAGE ' back into '\%' s/\\PERCENTAGE /\\%/g; + # Convert '\DOLLAR ' back into '\$' + s/\\DOLLAR /\\\$/g; # remove all \PAR tokens (taking care to properly keep commented out PAR's # from introducing uncommented newlines - next line) s/(%DIF < )([^\n]*?)\\PAR\n/$1$2\n$1\n/sg; @@ -3766,8 +3778,11 @@ min Pr sec sup +[Hclbdruvt] (SUPER|SUB)SCRIPTNB (SUPER|SUB)SCRIPT +PERCENTAGE +DOLLAR %%END SAFE COMMANDS %%BEGIN TEXT COMMANDS diff --git a/Master/texmf-dist/scripts/latexdiff/latexdiff-vc.pl b/Master/texmf-dist/scripts/latexdiff/latexdiff-vc.pl index 16b0dea5e7d..56696daada7 100755 --- a/Master/texmf-dist/scripts/latexdiff/latexdiff-vc.pl +++ b/Master/texmf-dist/scripts/latexdiff/latexdiff-vc.pl @@ -3,7 +3,7 @@ # latexdiff-vc - wrapper script for applying latexdiff to rcs managed files # and for automatised creation of postscript or pdf from difference file # -# Copyright (C) 2005-12 F J Tilmann (tilmann@gfz-potsdam.de, ftilmann@users.berlios.de) +# Copyright (C) 2005-13 F J Tilmann (tilmann@gfz-potsdam.de, ftilmann@users.berlios.de) # # Project webpages: http://latexdiff.berlios.de/ # CTAN page: http://www.ctan.org/tex-archive/support/latexdiff @@ -25,10 +25,12 @@ # # Detailed usage information at the end of the file # +# version 1.0.3: Bug fix: replace use of system('cp...') with File::Copy::copy (Patch contributed by D. Bremner) +# Quotes around system call file arguments to allow filenames with spaces (Patch contributed by ssteve) # version 1.0.2: - option --so to use latexdiff-so # version 1.0.1 (change version numbering to match that of latexdiff) # - Option --fast to use latexdiff-fast, -# - git support (thanks to Bjørn Magnus Mathisen, Santi Béjar, Pietro Battiston and Stefan Alfredson for patches) - UNTESTED +# - git support (thanks to Bjorn Magnus Mathisen, Santi Béjar, Pietro Battiston and Stefan Alfredson for patches) - UNTESTED # version 0.25: # - bbl is allowed as alternative extension (instead of .tex) # version 0.26a @@ -38,11 +40,13 @@ use Getopt::Long ; use Pod::Usage qw/pod2usage/ ; use File::Temp qw/tempdir/ ; use File::Basename qw/dirname/; +use File::Copy; + use strict ; use warnings ; my $versionstring=<<EOF ; -This is LATEXDIFF-VC 1.0.2 +This is LATEXDIFF-VC 1.0.3 (c) 2005-2012 F J Tilmann EOF @@ -231,20 +235,19 @@ while ( $infile=$file2=shift @files ) { 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 ) { + if (system("$diffcmd$revs[0] \"$infile\" | $patchcmd -o\"$file1\"")==0 and -z $file1 ) { # no differences detected, i.e. file is equal to current version - system("\cp $infile $file1"); + copy($infile,$file1) || die "copy($infile,$file1) failed: $!"; } } elsif ( scalar(@revs) == 2 ) { ($file1=$infile) =~ s/\.(tex|bbl)/-oldtmp-$$.$1/ ; $file2 =~ s/\.(tex|bbl)/-newtmp-$$.$1/ ; push @tmpfiles,$file2; - ; if (system("$diffcmd$revs[1] $infile | $patchcmd -o$file2")==0 and -z $file2 ) { - system("\cp $infile $file2"); + copy($infile,$file2) || die "copy($infile,$file2) failed: $!"; } if (system("$diffcmd$revs[0] $infile | $patchcmd -o$file1")==0 and -z $file1 ) { - system("\cp $infile $file1"); + copy($infile,$file1) || die "copy($infile,$file1) failed: $!"; }; } @@ -275,7 +278,7 @@ while ( $infile=$file2=shift @files ) { } } print "Running $latexdiff\n"; - unless ( system("$latexdiff $options $file1 $file2 > $diff") == 0 ) { + unless ( system("$latexdiff $options \"$file1\" \"$file2\" > \"$diff\"") == 0 ) { print STDERR "Something went wrong in $latexdiff. Deleting $diff and abort\n" ; unlink $diff ; exit(5) }; print "Generated difference file $diff\n"; @@ -299,16 +302,16 @@ foreach $diff ( @difffiles ) { # adapt magically changebar styles to [pdftex] display driver if pdf output was selected if ( $pdf ) { - system("sed \"s/Package\\[dvips\\]/Package[pdftex]/\" $diff > $diff.tmp$$ ; \\mv $diff.tmp$$ $diff"); + system("sed \"s/Package\\[dvips\\]/Package[pdftex]/\" \"$diff\" > \"$diff.tmp$$\" ; \\mv \"$diff.tmp$$\" \"$diff\""); } print STDERR "PDF: $pdf Postscript: $postscript cwd $cwd\n"; - if ( system("grep -q \'^[^%]*\\\\bibliography\' $diff") == 0 ) { + if ( system("grep -q \'^[^%]*\\\\bibliography\' \"$diff\"") == 0 ) { if ( $postscript) { - system("latex --interaction=batchmode $diff; bibtex $diffbase"); + system("latex --interaction=batchmode \"$diff\"; bibtex \"$diffbase\""); push @ptmpfiles, "$diffbase.bbl","$diffbase.bbl" ; } elsif ( $pdf ) { - system("pdflatex --interaction=batchmode $diff; bibtex $diffbase"); + system("pdflatex --interaction=batchmode \"$diff\"; bibtex \"$diffbase\""); push @ptmpfiles, "$diffbase.bbl","$diffbase.bbl" ; } } @@ -317,12 +320,12 @@ foreach $diff ( @difffiles ) { my $dvi="$diffbase.dvi"; my $ps="$diffbase.ps"; - system("latex --interaction=batchmode $diff; latex $diff; dvips -o $ps $dvi"); + system("latex --interaction=batchmode \"$diff\"; latex \"$diff\"; dvips -o $ps $dvi"); push @ptmpfiles, "$diffbase.aux","$diffbase.log",$dvi ; print "Generated postscript file $ps\n"; } elsif ( $pdf ) { - system("pdflatex --interaction=batchmode $diff; pdflatex $diff"); + system("pdflatex --interaction=batchmode \"$diff\"; pdflatex \"$diff\""); push @ptmpfiles, "$diffbase.aux","$diffbase.log"; } unlink @ptmpfiles; diff --git a/Master/texmf-dist/scripts/latexdiff/latexdiff.pl b/Master/texmf-dist/scripts/latexdiff/latexdiff.pl index 865fc4853b1..e1f1d9b1b29 100755 --- a/Master/texmf-dist/scripts/latexdiff/latexdiff.pl +++ b/Master/texmf-dist/scripts/latexdiff/latexdiff.pl @@ -22,6 +22,15 @@ # # Detailed usage information at the end of the file # +# Version 1.0.3 +# - fix bug in add_safe_commands that made latexdiff hang on DeclareMathOperator +# command in preamble +# - \(..\) inline math expressions were not parsed correctly, if the 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 +# 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) +# # 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 @@ -540,8 +549,8 @@ my ($algodiffversion)=split(/ /,$Algorithm::Diff::VERSION); my ($versionstring)=<<EOF ; -This is LATEXDIFF 1.0.2 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V) - (c) 2004-2012 F J Tilmann +This is LATEXDIFF 1.0.3 (Algorithm::Diff $Algorithm::Diff::VERSION, Perl $^V) + (c) 2004-2013 F J Tilmann EOF # Configuration variables: these have to be visible from the subroutines @@ -941,12 +950,12 @@ push(@SAFECMDLIST, qr/^QLEFTBRACE$/, qr/^QRIGHTBRACE$/); my $coords= '[\-.,\s\d]*'; # word: sequence of letters or accents followed by letter my $word='(?:[-\w\d*]|\\\\[\"\'\`~^][A-Za-z\*])+'; - my $cmdleftright='\\\\(?:left|right|[Bb]igg?[lrm]?|middle)\s*(?:[()\[\]|]|\\\\(?:[|{}]|\w+))'; + my $cmdleftright='\\\\(?:left|right|[Bb]igg?[lrm]?|middle)\s*(?:[<>()\[\]|]|\\\\(?:[|{}]|\w+))'; my $cmdoptseq='\\\\[\w\d\*]+'.$extraspace.'(?:(?:\['.$brat0.'\]|\{'. $pat6 . '\}|\(' . $coords .'\))'.$extraspace.')*'; my $backslashnl='\\\\\n'; my $oneletcmd='\\\\.\*?(?:\['.$brat0.'\]|\{'. $pat6 . '\})*'; - my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(].*?\\\\[)]'; + my $math='\$(?:[^$]|\\\$)*?\$|\\\\[(](?:.|\n)*?\\\\[)]'; ## the current maths command cannot cope with newline within the math expression my $comment='%.*?\n'; @@ -1180,7 +1189,7 @@ sub add_safe_commands { # get rid of comments my $to_test = ""; # test for \DeclareMathOperator{\foo}{myoperator} - while ( $preamble =~ m/\DeclareMathOperator\s*\{\\(\w*?)\}/s) { + while ( $preamble =~ m/\DeclareMathOperator\s*\*?\{\\(\w*?)\}/osg) { $to_test=$1; if ($to_test ne "" and not iscmd($to_test,\@SAFECMDLIST,\@SAFECMDEXCL) and not iscmd($to_test, \@SAFECMDEXCL, [])) { # one should add $to_test to the list of safe commands. @@ -1885,7 +1894,7 @@ sub marktags { # #. change begin and end commands within comments to BEGINDIF, ENDDIF # so they don't disturb the pattern matching (if there are several \begin or \end in one line # 2. mark all first empty line (in block of several) with \PAR tokens -# 3. Convert all '\%' into '\PERCENTAGE ' to make parsing regular expressions easier +# 3. Convert all '\%' into '\PERCENTAGE ' and all '\$' into \DOLLAR to make parsing regular expressions easier # 4. Convert all \verb|some verbatim text| commands (where | can be an arbitrary character) # into \verb{hash} # 5. Convert \begin{verbatim} some verbatim text \end{verbatim} into \verbatim{hash} @@ -1918,14 +1927,15 @@ sub preprocess { s/\n(\s*?)\n((?:\s*\n)*)/\n$1\\PAR\n$2/g ; s/(?<!\\)\\%/\\PERCENTAGE /g ; # (?<! is negative lookbehind assertion to prevent \\% from being converted + s/(?<!\\)\\\$/\\DOLLAR /g ; # (?<! is negative lookbehind assertion to prevent \\$ from being converted s/(\\verb\*?)(\S)(.*?)\2/"${1}{". tohash(\%verbhash,"${2}${3}${2}") ."}"/esg; s/\\begin\{(verbatim\*?)\}(.*?)\\end\{\1\}/"\\${1}{". tohash(\%verbhash,"${2}") . "}"/esg; # Convert _n or _\cmd into \SUBSCRIPTNB{n} or \SUBSCRIPTNB{\cmd} and _{nnn} into \SUBSCRIPT{nn} - 1 while s/_([^{\\]|\\\w+)/\\SUBSCRIPTNB{$1}/g ; - 1 while s/_{($pat6)}/\\SUBSCRIPT{$1}/g ; + 1 while s/(?<!\\)_([^{\\]|\\\w+)/\\SUBSCRIPTNB{$1}/g ; + 1 while s/(?<!\\)_{($pat6)}/\\SUBSCRIPT{$1}/g ; # Convert ^n into \SUPERSCRIPTNB{n} and ^{nnn} into \SUPERSCRIPT{nn} - 1 while s/\^([^{\\]|\\\w+)/\\SUPERSCRIPTNB{$1}/g ; - 1 while s/\^{($pat6)}/\\SUPERSCRIPT{$1}/g ; + 1 while s/(?<!\\)\^([^{\\]|\\\w+)/\\SUPERSCRIPTNB{$1}/g ; + 1 while s/(?<!\\)\^{($pat6)}/\\SUPERSCRIPT{$1}/g ; # Convert $$ $$ into \begin{DOLLARDOLLAR} \end{DOLLARDOLLAR} s/\$\$(.*?)\$\$/\\begin{DOLLARDOLLAR}$1\\end{DOLLARDOLLAR}/sg; # Convert \[ \] into \begin{SQUAREBRACKET} \end{SQUAREBRACKET} @@ -2022,7 +2032,7 @@ sub fromhash { # 5. Convert \SUPERSCRIPTNB{n} into ^n and \SUPERSCRIPT{nn} into ^{nnn} # 6. Convert \SUBSCRIPTNB{n} into _n and \SUBCRIPT{nn} into _{nnn} # 7. Expand hashes of verb and verbatim environments -# 8. Convert '\PERCENTAGE ' back into '\%' +# 8. Convert '\PERCENTAGE ' back into '\%' and '\DOLLAR ' into '\$' # 9.. remove all \PAR tokens # 10. package specific processing: endfloat: make sure \begin{figure} and \end{figure} are always # on a line by themselves, similarly for table environment @@ -2258,6 +2268,8 @@ sub postprocess { s/\\(verbatim\*?)\{([-\d]*?)\}/"\\begin{${1}}".fromhash(\%verbhash,$2)."\\end{${1}}"/esg; # Convert '\PERCENTAGE ' back into '\%' s/\\PERCENTAGE /\\%/g; + # Convert '\DOLLAR ' back into '\$' + s/\\DOLLAR /\\\$/g; # remove all \PAR tokens (taking care to properly keep commented out PAR's # from introducing uncommented newlines - next line) s/(%DIF < )([^\n]*?)\\PAR\n/$1$2\n$1\n/sg; @@ -3662,8 +3674,11 @@ min Pr sec sup +[Hclbdruvt] (SUPER|SUB)SCRIPTNB (SUPER|SUB)SCRIPT +PERCENTAGE +DOLLAR %%END SAFE COMMANDS %%BEGIN TEXT COMMANDS |