From 86bc2422851681264fcb90ee7b12a8abbb06cb70 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 3 Jan 2021 22:32:40 +0000 Subject: latex-make (3jan21) git-svn-id: svn://tug.org/texlive/trunk@57317 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/support/latex-make/README | 4 +- .../texmf-dist/doc/support/latex-make/figlatex.pdf | Bin 221442 -> 221479 bytes .../doc/support/latex-make/latex-make.pdf | Bin 317455 -> 318156 bytes .../doc/support/latex-make/texdepends.pdf | Bin 230232 -> 230951 bytes .../texmf-dist/scripts/latex-make/latexfilter.py | 68 ++++++++++--------- .../source/support/latex-make/figlatex.dtx | 4 +- .../source/support/latex-make/latex-make.dtx | 72 ++++++++++++--------- .../source/support/latex-make/pdfswitch.dtx | 2 +- .../source/support/latex-make/texdepends.dtx | 35 ++++++---- .../texmf-dist/tex/latex/latex-make/figlatex.cfg | 2 +- .../texmf-dist/tex/latex/latex-make/figlatex.sty | 2 +- .../texmf-dist/tex/latex/latex-make/pdfswitch.sty | 2 +- .../texmf-dist/tex/latex/latex-make/texdepends.sty | 31 +++++---- .../tex/latex/latex-make/texgraphicx.sty | 2 +- 14 files changed, 130 insertions(+), 94 deletions(-) diff --git a/Master/texmf-dist/doc/support/latex-make/README b/Master/texmf-dist/doc/support/latex-make/README index 5c5917b6583..c1df907bb44 100644 --- a/Master/texmf-dist/doc/support/latex-make/README +++ b/Master/texmf-dist/doc/support/latex-make/README @@ -2,7 +2,7 @@ | The LaTeX-Make system | +------------------------------+ -VERSION: 2.4.0 +VERSION: 2.4.2 DESCRIPTION =========== @@ -21,7 +21,7 @@ compilation of LaTeX documents: * And various helper tools for LaTeX.mk -Homepage: http://gforge.inria.fr/projects/latex-utils/ +Homepage: https://gitlab.inria.fr/latex-utils/latex-make License type: gpl INSTALLATION: diff --git a/Master/texmf-dist/doc/support/latex-make/figlatex.pdf b/Master/texmf-dist/doc/support/latex-make/figlatex.pdf index 7af3b520cec..2fd5a2e0cf0 100644 Binary files a/Master/texmf-dist/doc/support/latex-make/figlatex.pdf and b/Master/texmf-dist/doc/support/latex-make/figlatex.pdf differ diff --git a/Master/texmf-dist/doc/support/latex-make/latex-make.pdf b/Master/texmf-dist/doc/support/latex-make/latex-make.pdf index ef7230f98c6..cd5cc6257bc 100644 Binary files a/Master/texmf-dist/doc/support/latex-make/latex-make.pdf and b/Master/texmf-dist/doc/support/latex-make/latex-make.pdf differ diff --git a/Master/texmf-dist/doc/support/latex-make/texdepends.pdf b/Master/texmf-dist/doc/support/latex-make/texdepends.pdf index a419bdfbac3..ae1f1578240 100644 Binary files a/Master/texmf-dist/doc/support/latex-make/texdepends.pdf and b/Master/texmf-dist/doc/support/latex-make/texdepends.pdf differ diff --git a/Master/texmf-dist/scripts/latex-make/latexfilter.py b/Master/texmf-dist/scripts/latex-make/latexfilter.py index 1e94870125d..2fbb14b0248 100755 --- a/Master/texmf-dist/scripts/latex-make/latexfilter.py +++ b/Master/texmf-dist/scripts/latex-make/latexfilter.py @@ -3,9 +3,8 @@ """ -stdin : the original xfig file -stdout : the output xfig file -args : all depths we want to keep +stdin : the original LaTeX log file +stdout : the output filtered log file """ @@ -14,6 +13,7 @@ import optparse import os.path import re import sys +import io def main(): parser = optparse.OptionParser() @@ -25,34 +25,40 @@ def main(): warnerror_re = re.compile(r"^(LaTeX|Package|Class)( (.*))? (Warning:|Error:)") fullbox_re = re.compile(r"^(Underfull|Overfull) \\[hv]box") accu = '' - for line in sys.stdin: - if display > 0: - display -= 1 - if line[0:4].lower() in ('info', 'warn') or line[0:5].lower() == 'error': - display = 0 - line_groups = warnerror_re.match(line) - if line_groups: - start_line = line_groups.group(3) - if not start_line: - start_line = '' - if line_groups.group(2): - start_line = "(" + start_line + ")" - display = 1 - in_display = 1 - elif (start_line != '') and (line[0:len(start_line)] == start_line): - display = 1 - elif line == "\n": - in_display = 0 - elif line[0:4] == 'Chap': - display = 1 - elif fullbox_re.match(line): - display = 2 - if display: - print(accu, end="") - accu = line - elif in_display: - print(accu[0:-1], end="") - accu = line + # PDFLaTeX log file is not really in latin-1 (in T1 more exactly) + # but all bytes are corrects in latin-1, so python won't stop + # while parsing log. + # Without specifying this encoding (ie using default utf-8), we + # can get decode errors (UnicodeDecodeError: 'utf-8' codec can't decode byte...) + with io.open(sys.stdin.fileno(),'r',encoding='latin-1') as sin: + for line in sin: + if display > 0: + display -= 1 + if line[0:4].lower() in ('info', 'warn') or line[0:5].lower() == 'error': + display = 0 + line_groups = warnerror_re.match(line) + if line_groups: + start_line = line_groups.group(3) + if not start_line: + start_line = '' + if line_groups.group(2): + start_line = "(" + start_line + ")" + display = 1 + in_display = 1 + elif (start_line != '') and (line[0:len(start_line)] == start_line): + display = 1 + elif line == "\n": + in_display = 0 + elif line[0:4] == 'Chap': + display = 1 + elif fullbox_re.match(line): + display = 2 + if display: + print(accu, end="") + accu = line + elif in_display: + print(accu[0:-1], end="") + accu = line if __name__ == "__main__": main() diff --git a/Master/texmf-dist/source/support/latex-make/figlatex.dtx b/Master/texmf-dist/source/support/latex-make/figlatex.dtx index 313ef515f54..755f9f17f1e 100644 --- a/Master/texmf-dist/source/support/latex-make/figlatex.dtx +++ b/Master/texmf-dist/source/support/latex-make/figlatex.dtx @@ -28,7 +28,7 @@ % \ProvidesPackage{texgraphicx}% % \fi % \ProvidesFile{figlatex.dtx} -[2020/06/01 v2.4.0 Fix support for new latex] +[2021/01/03 v2.4.2 No changes in figlatex] % \iffalse %<*driver> \documentclass{ltxdoc} @@ -116,6 +116,8 @@ % \changes{v2.2.5}{2018/10/17}{No changes in figlatex.dtx} % \changes{v2.4.0}{2020/06/01}{Fix path handling for subfig and new % core LaTeX} +% \changes{v2.4.1}{2020/07/10}{No changes in figlatex.dtx} +% \changes{v2.4.2}{2021/01/03}{No changes in figlatex.dtx} % % \makeatletter % \def\SpecialOptionIndex#1{\@bsphack diff --git a/Master/texmf-dist/source/support/latex-make/latex-make.dtx b/Master/texmf-dist/source/support/latex-make/latex-make.dtx index 0aae87bd55b..d780dedb39d 100644 --- a/Master/texmf-dist/source/support/latex-make/latex-make.dtx +++ b/Master/texmf-dist/source/support/latex-make/latex-make.dtx @@ -2,7 +2,7 @@ % %<*dtx> \ProvidesFile{latex-make.dtx} -[2020/06/01 v2.4.0 Fix bugs with new LaTeX core] +[2021/01/03 v2.4.2 No changes in latex-make.dtx] % % \fi % \iffalse @@ -116,6 +116,8 @@ % \changes{v2.3.0}{2018/10/17}{Add DEPENDS-EXCLUDE, add doc and % support for local texmf tree} % \changes{v2.4.0}{2020/06/01}{Support inkscape version >= 1.0} +% \changes{v2.4.1}{2020/07/10}{Fix encoding problem with latexfilter.pl} +% \changes{v2.4.2}{2021/01/03}{No changes in latex-make.dtx} % % \makeatletter % \def\SpecialOptionIndex#1{\@bsphack @@ -1975,9 +1977,8 @@ if __name__ == "__main__": """ -stdin : the original xfig file -stdout : the output xfig file -args : all depths we want to keep +stdin : the original LaTeX log file +stdout : the output filtered log file """ @@ -1986,6 +1987,7 @@ import optparse import os.path import re import sys +import io def main(): parser = optparse.OptionParser() @@ -1997,34 +1999,40 @@ def main(): warnerror_re = re.compile(r"^(LaTeX|Package|Class)( (.*))? (Warning:|Error:)") fullbox_re = re.compile(r"^(Underfull|Overfull) \\[hv]box") accu = '' - for line in sys.stdin: - if display > 0: - display -= 1 - if line[0:4].lower() in ('info', 'warn') or line[0:5].lower() == 'error': - display = 0 - line_groups = warnerror_re.match(line) - if line_groups: - start_line = line_groups.group(3) - if not start_line: - start_line = '' - if line_groups.group(2): - start_line = "(" + start_line + ")" - display = 1 - in_display = 1 - elif (start_line != '') and (line[0:len(start_line)] == start_line): - display = 1 - elif line == "\n": - in_display = 0 - elif line[0:4] == 'Chap': - display = 1 - elif fullbox_re.match(line): - display = 2 - if display: - print(accu, end="") - accu = line - elif in_display: - print(accu[0:-1], end="") - accu = line + # PDFLaTeX log file is not really in latin-1 (in T1 more exactly) + # but all bytes are corrects in latin-1, so python won't stop + # while parsing log. + # Without specifying this encoding (ie using default utf-8), we + # can get decode errors (UnicodeDecodeError: 'utf-8' codec can't decode byte...) + with io.open(sys.stdin.fileno(),'r',encoding='latin-1') as sin: + for line in sin: + if display > 0: + display -= 1 + if line[0:4].lower() in ('info', 'warn') or line[0:5].lower() == 'error': + display = 0 + line_groups = warnerror_re.match(line) + if line_groups: + start_line = line_groups.group(3) + if not start_line: + start_line = '' + if line_groups.group(2): + start_line = "(" + start_line + ")" + display = 1 + in_display = 1 + elif (start_line != '') and (line[0:len(start_line)] == start_line): + display = 1 + elif line == "\n": + in_display = 0 + elif line[0:4] == 'Chap': + display = 1 + elif fullbox_re.match(line): + display = 2 + if display: + print(accu, end="") + accu = line + elif in_display: + print(accu[0:-1], end="") + accu = line if __name__ == "__main__": main() diff --git a/Master/texmf-dist/source/support/latex-make/pdfswitch.dtx b/Master/texmf-dist/source/support/latex-make/pdfswitch.dtx index 81e53eb43f1..0d8a17b486d 100644 --- a/Master/texmf-dist/source/support/latex-make/pdfswitch.dtx +++ b/Master/texmf-dist/source/support/latex-make/pdfswitch.dtx @@ -26,7 +26,7 @@ %\ProvidesPackage{pdfswitch}% % \fi % \ProvidesFile{pdfswitch.dtx} -[2020/06/01 v2.4.0 No changes in pdfswitch.dtx] +[2021/01/03 v2.4.2 No changes in pdfswitch.dtx] %<*package> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SWITCH FOR PDFLATEX or LATEX diff --git a/Master/texmf-dist/source/support/latex-make/texdepends.dtx b/Master/texmf-dist/source/support/latex-make/texdepends.dtx index 0b206a2ae60..8c02e23f773 100644 --- a/Master/texmf-dist/source/support/latex-make/texdepends.dtx +++ b/Master/texmf-dist/source/support/latex-make/texdepends.dtx @@ -27,7 +27,7 @@ %\ProvidesPackage{texdepends}% % \fi % \ProvidesFile{texdepends.dtx} -[2020/06/01 v2.4.0 No changes in texdepends.dtx] +[2021/01/03 v2.4.2 Replace // by / in paths] % \iffalse %<*driver> \documentclass{ltxdoc} @@ -100,7 +100,7 @@ % This package allows \LaTeX\space to automatically generate % dependencies while compiling documents. % \end{abstract} -% \CheckSum{793} +% \CheckSum{801} % % \changes{v1.0.1}{2005/03/22}{Version 1.0.1 at last} % \changes{v1.0.2}{2005/10/22}{Add support for package index.sty} @@ -110,6 +110,8 @@ % \changes{v1.3.0}{2011/09/25}{Management of svg files} % \changes{v2.2.5}{2018/09/04}{No changes in texdepends.dtx} % \changes{v2.3.0}{2018/10/17}{ignore comment.cut file from the comment package} +% \changes{v2.4.1}{2020/07/10}{No changes in texdepends.dtx} +% \changes{v2.4.2}{2021/01/03}{Replace // by / in paths} % % \makeatletter % \def\SpecialOptionIndex#1{\@bsphack @@ -267,6 +269,7 @@ % \begin{macro}{\TD@warning} % To write a warning % \begin{macrocode} +\RequirePackage{xstring}% \newcommand{\TD@warning}[1]{% \PackageWarningNoLine{texdepends}{#1}% }% @@ -316,7 +319,13 @@ % We write something in the file % \begin{macrocode} \def\TD@print#1{% - \immediate\write\TD@write{#1}% + {% + % TODO: fix pb when #1 contains '#' + %\noexpandarg% + \StrSubstitute{#1}{//}{/}[\TD@write@text]% + \immediate\write\TD@write{\TD@write@text}% + %\immediate\write\TD@write{#1}% + } }% % \end{macrocode} % \end{macro} @@ -372,7 +381,7 @@ % A file is missing. |texdepend| will try to skip it this time, % but it will be needed at the next compilation % \begin{macrocode} -\def\TD@printRequiredFile#1{% +\def\TD@printRequiredFile#1#2{% \TD@print{TD_\jobname\TD@extention _REQUIRED\space += #1}% }% % \end{macrocode} @@ -380,7 +389,9 @@ % \begin{macro}{\RequireFile} % LaTeX users can directly declare a dependencie % \begin{macrocode} -\let\RequireFile\TD@printRequiredFile +\def\RequireFile#1{% + \TD@printRequiredFile{#1}{User}% +}% % \end{macrocode} % \end{macro} % \begin{macro}{\TD@printOut} @@ -798,7 +809,7 @@ \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{eps}% }% }% \def\TD@Ginclude@pdf#1{% @@ -808,7 +819,7 @@ \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{pdf}% }% }% \def\TD@graphicspath#1{% @@ -862,7 +873,7 @@ \PackageWarning{texdepends}{Figure '#2' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% - \TD@printRequiredFile{#2}% + \TD@printRequiredFile{#2}{rawtexgraphics}% }% }% @@ -873,7 +884,7 @@ \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{rawtex}% }% }% @@ -892,7 +903,7 @@ Skipping it this time (the last one however)\MessageBreak}% } \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{figtex}% }% }% % \@Ginclude@svgtex @@ -910,7 +921,7 @@ Skipping it this time (the last one however)\MessageBreak}% } \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{svgtex}% }% }% @@ -946,7 +957,7 @@ }% % \FL@subfig@check \def\TD@FL@subfig@check#1{% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{subfigcheck}% \TD@printSubfig{#1}% }% % diff --git a/Master/texmf-dist/tex/latex/latex-make/figlatex.cfg b/Master/texmf-dist/tex/latex/latex-make/figlatex.cfg index d3e8a816820..68367aeb697 100644 --- a/Master/texmf-dist/tex/latex/latex-make/figlatex.cfg +++ b/Master/texmf-dist/tex/latex/latex-make/figlatex.cfg @@ -40,7 +40,7 @@ %% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %% \ProvidesFile{figlatex.cfg}% -[2020/06/01 v2.4.0 Fix support for new latex] +[2021/01/03 v2.4.2 No changes in figlatex] %\debug \endinput %% diff --git a/Master/texmf-dist/tex/latex/latex-make/figlatex.sty b/Master/texmf-dist/tex/latex/latex-make/figlatex.sty index 922be37af91..1b41ef9d3e4 100644 --- a/Master/texmf-dist/tex/latex/latex-make/figlatex.sty +++ b/Master/texmf-dist/tex/latex/latex-make/figlatex.sty @@ -41,7 +41,7 @@ %% \NeedsTeXFormat{LaTeX2e}% \ProvidesPackage{figlatex}% -[2020/06/01 v2.4.0 Fix support for new latex] +[2021/01/03 v2.4.2 No changes in figlatex] \newif\ifFL@debug \DeclareOption{debug}{% \global\FL@debugtrue% diff --git a/Master/texmf-dist/tex/latex/latex-make/pdfswitch.sty b/Master/texmf-dist/tex/latex/latex-make/pdfswitch.sty index 6fc7a0a9b45..37726fc614c 100644 --- a/Master/texmf-dist/tex/latex/latex-make/pdfswitch.sty +++ b/Master/texmf-dist/tex/latex/latex-make/pdfswitch.sty @@ -41,7 +41,7 @@ %% \NeedsTeXFormat{LaTeX2e}% \ProvidesPackage{pdfswitch}% -[2020/06/01 v2.4.0 No changes in pdfswitch.dtx] +[2021/01/03 v2.4.2 No changes in pdfswitch.dtx] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% diff --git a/Master/texmf-dist/tex/latex/latex-make/texdepends.sty b/Master/texmf-dist/tex/latex/latex-make/texdepends.sty index fcb08951f10..45b4fbee8bc 100644 --- a/Master/texmf-dist/tex/latex/latex-make/texdepends.sty +++ b/Master/texmf-dist/tex/latex/latex-make/texdepends.sty @@ -42,7 +42,7 @@ %% \NeedsTeXFormat{LaTeX2e}% \ProvidesPackage{texdepends}% -[2020/06/01 v2.4.0 No changes in texdepends.dtx] +[2021/01/03 v2.4.2 Replace // by / in paths] \RequirePackage{ifthen} \newboolean{TD@debug} \newcommand{\TD@option@debug}[1][true]{% @@ -90,6 +90,7 @@ \def\TD@extention{.dvi}% \fi\fi% }{}% +\RequirePackage{xstring}% \newcommand{\TD@warning}[1]{% \PackageWarningNoLine{texdepends}{#1}% }% @@ -113,7 +114,13 @@ \TD@info{Writing info in '\jobname\TD@extention.mk'} \immediate\openout\TD@write\jobname\TD@extention.mk% \def\TD@print#1{% - \immediate\write\TD@write{#1}% + {% + % TODO: fix pb when #1 contains '#' + %\noexpandarg% + \StrSubstitute{#1}{//}{/}[\TD@write@text]% + \immediate\write\TD@write{\TD@write@text}% + %\immediate\write\TD@write{#1}% + } }% \def\TD@printClass#1{% \TD@print{TD_\jobname\TD@extention _INPUTS\space += #1.cls}% @@ -133,10 +140,12 @@ \def\TD@printSubfig#1{% \TD@print{TD_\jobname\TD@extention _SUBFIGS\space += #1}% }% -\def\TD@printRequiredFile#1{% +\def\TD@printRequiredFile#1#2{% \TD@print{TD_\jobname\TD@extention _REQUIRED\space += #1}% }% -\let\RequireFile\TD@printRequiredFile +\def\RequireFile#1{% + \TD@printRequiredFile{#1}{User}% +}% \def\TD@printOut#1{% \TD@print{TD_\jobname\TD@extention _OUTPUTS\space += #1}% }% @@ -369,7 +378,7 @@ \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{eps}% }% }% \def\TD@Ginclude@pdf#1{% @@ -379,7 +388,7 @@ \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{pdf}% }% }% \def\TD@graphicspath#1{% @@ -428,7 +437,7 @@ \PackageWarning{texdepends}{Figure '#2' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% - \TD@printRequiredFile{#2}% + \TD@printRequiredFile{#2}{rawtexgraphics}% }% }% @@ -439,7 +448,7 @@ \PackageWarning{texdepends}{Figure '#1' needed\MessageBreak Skipping it this time (the last one however)\MessageBreak}% \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{rawtex}% }% }% @@ -457,7 +466,7 @@ Skipping it this time (the last one however)\MessageBreak}% } \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{figtex}% }% }% \def\TD@Ginclude@svgtex#1{% @@ -474,7 +483,7 @@ Skipping it this time (the last one however)\MessageBreak}% } \TD@missingDepends% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{svgtex}% }% }% @@ -506,7 +515,7 @@ }% }% \def\TD@FL@subfig@check#1{% - \TD@printRequiredFile{#1}% + \TD@printRequiredFile{#1}{subfigcheck}% \TD@printSubfig{#1}% }% \TD@PackagePostDivert{figlatex}{% diff --git a/Master/texmf-dist/tex/latex/latex-make/texgraphicx.sty b/Master/texmf-dist/tex/latex/latex-make/texgraphicx.sty index af126a5f20d..66cb9d69d51 100644 --- a/Master/texmf-dist/tex/latex/latex-make/texgraphicx.sty +++ b/Master/texmf-dist/tex/latex/latex-make/texgraphicx.sty @@ -40,7 +40,7 @@ %% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %% \ProvidesPackage{texgraphicx}% -[2020/06/01 v2.4.0 Fix support for new latex] +[2021/01/03 v2.4.2 No changes in figlatex] \PackageError{texgraphicx}{'texgraphicx' is now gone\MessageBreak% Please, switching to 'figlatex' -- cgit v1.2.3