diff options
Diffstat (limited to 'Master/texmf-dist/source')
4 files changed, 67 insertions, 46 deletions
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 @@ %<compat> \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] %</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 @@ %<package>\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 @@ %<package>\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}% }% % |