diff options
author | Norbert Preining <norbert@preining.info> | 2022-02-18 03:01:44 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-02-18 03:01:44 +0000 |
commit | 41041c6bdcedcc33698491c2caec4cd725a4fe97 (patch) | |
tree | 59aa0f9e0235ceee2474351b4b1a90a1eace6619 /support | |
parent | bd0e05b5b4dba5b38512acb2e7104f180fdb97e6 (diff) |
CTAN sync 202202180301
Diffstat (limited to 'support')
-rw-r--r-- | support/TeX4ht/source/ChangeLog | 11 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-4ht.tex | 16 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-html4.tex | 22 | ||||
-rw-r--r-- | support/texfot/texfot.pdf | bin | 31315 -> 32559 bytes | |||
-rwxr-xr-x | support/texfot/texfot.pl | 34 |
5 files changed, 56 insertions, 27 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 8c0e114eb3..f6ae9d408d 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,14 @@ +2022-02-16 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-html4.tex (html4.4ht): write CSS for table column width + only once. + * tex4ht-4ht.tex (listings.4ht): use normal space instead of \:nbsp, + in order to enable line breaking. + https://tex.stackexchange.com/a/634033/2891 + * tex4ht-4ht.tex (listings.4ht): load Xcolor with Listings to + prevent compilation errors with the syntax color detection. + * tex4ht-html4.tex (html4.4ht): use <pre> for Listings. + 2022-02-10 Michal Hoftich <michal.h21@gmail.com> * tex4ht-4ht.tex (usepackage.4ht, breakurl-hooks.4ht): fixed diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index 72be0a6972..40696a0a64 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1076 2022-02-10 16:55:31Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1079 2022-02-16 21:13:48Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2022 TeX Users Group @@ -30722,6 +30722,14 @@ d|<haddr prefix|>\last:haddr \endinput >>> \AddFile{9}{listings} +We use Xcolor's features to extract color information for syntax highlighting. +We need to load it if it isn't used yet +\<listings sty\><<< +\@ifpackageloaded{xcolor}{}{% +\RequirePackage{xcolor} +} +>>> + For some reason we need the followng version of \`|\@makecaption| in order to get correct cross-references. There were duplicate IDs sometimes. @@ -30833,14 +30841,14 @@ Configure list of listings \setbox\z@\hbox{{\lst@currstyle{\:tempc}}}% \lst@OutputBox\z@} \HLet\lst@Kern\:tempa -\NewConfigure{lst@Kern}{2} -\Configure{lst@Kern}{0.499em}{0.1em} >>> Configure lst@Kern: character width, inter character space size \<listings sty\><<< -\def\lst@outputspace{\:nbsp} +\NewConfigure{lst@Kern}{2} +\Configure{lst@Kern}{0.499em}{0.1em} +\def\lst@outputspace{\HCode{ }} >>> Test cases: diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex index ede8404fff..455078e9df 100644 --- a/support/TeX4ht/source/tex4ht-html4.tex +++ b/support/TeX4ht/source/tex4ht-html4.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-html4.tex 1073 2022-02-06 19:29:41Z michal_h21 $ +% $Id: tex4ht-html4.tex 1080 2022-02-16 21:37:32Z michal_h21 $ % Compile 4 times: latex tex4ht-html4 % Copy html4.4ht into the work directory before all but the last compilation. % @@ -15269,12 +15269,12 @@ Configuration for the inline code \gHAdvance\listingN by 1 \HCode{<!--l. \the\inputlineno-->}% \gdef\start:LstLn{% - \HCode{<div class="lstlisting" id="listing-\listingN">}% + \HCode{<pre class="lstlisting" id="listing-\listingN">}% \gdef\start:LstLn{|<nbsp|>\HCode{<br />\Hnewline}}} \bgroup% % we put the closing </div> here in order to support floating listings % https://tex.stackexchange.com/a/615703/2891 - \pend:def\lst@DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}% + \pend:def\lst@DeInit{\ifvmode\IgnorePar\fi\EndP\HCode{</pre>}}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} @@ -15284,7 +15284,7 @@ Configuration for the inline code {\egroup\par} {} {} \Css{.lstlisting .label{margin-right:0.5em; }} -\Css{div.lstlisting{font-family: monospace,monospace; white-space: nowrap; +\Css{pre.lstlisting{font-family: monospace,monospace; white-space: nowrap; margin-top:0.5em; margin-bottom:0.5em; }} >>> @@ -15293,7 +15293,7 @@ Configuration for the inline code \Configure{lstinputlisting} {\ifvmode \IgnorePar\fi \EndP \HCode{<!--l. \the\inputlineno-->}% - \HCode{<div class="lstinputlisting">}% + \HCode{<pre class="lstinputlisting">}% \bgroup \tt %\special{t4ht@(}% \Configure{listings} {{\everypar{}\leavevmode}} @@ -15304,8 +15304,8 @@ Configuration for the inline code } {%\special{t4ht@)} \egroup - \ifvmode \IgnorePar\fi \EndP \HCode{</div>}\par} -\Css{div.lstinputlisting{ + \ifvmode \IgnorePar\fi \EndP \HCode{</pre>}\par} +\Css{pre.lstinputlisting{ font-family: monospace,monospace; white-space: nowrap; }} @@ -19752,10 +19752,12 @@ changes. \:CheckOption{p-width} \if:Option |<10 em constant|> \Configure{HColWidth} - {\tmp:dim=\HColWidth \divide\tmp:dim by \ten:Em\relax + {\ifnum\HRow=1% output CSS only on the first row, to prevent duplication + \tmp:dim=\HColWidth \divide\tmp:dim by \ten:Em\relax \tmp:dim=10\tmp:dim - \Css{\#TBL-\TableNo-\HRow-\HCol - {width:\expandafter\x:Em \the\tmp:dim em;}}} + \Css{\#TBL-\TableNo-\HCol% CSS selects ID of the current table column + {width:\expandafter\x:Em \the\tmp:dim em;}} + \fi} \else \Log:Note{for width specifications of tabular p entries, use the `p-width' command line option or a configuration similar diff --git a/support/texfot/texfot.pdf b/support/texfot/texfot.pdf Binary files differindex 645f920bc2..163dce0996 100644 --- a/support/texfot/texfot.pdf +++ b/support/texfot/texfot.pdf diff --git a/support/texfot/texfot.pl b/support/texfot/texfot.pl index d0e9ad6804..d7b9d85ce7 100755 --- a/support/texfot/texfot.pl +++ b/support/texfot/texfot.pl @@ -1,14 +1,14 @@ #!/usr/bin/env perl -# $Id: texfot,v 1.43 2021/05/01 15:49:53 karl Exp $ +# $Id: texfot,v 1.45 2022/02/17 18:42:02 karl Exp $ # Invoke a TeX command, filtering all but interesting terminal output; # do not look at the log or check any output files. # Exit status is that of the subprogram. # Tee the complete (unfiltered) standard output and standard error to -# (by default) /tmp/fot. +# (by default) /tmp/fot.$UID. # # Public domain. Originally written 2014 by Karl Berry. -my $ident = '$Id: texfot,v 1.43 2021/05/01 15:49:53 karl Exp $'; +my $ident = '$Id: texfot,v 1.45 2022/02/17 18:42:02 karl Exp $'; (my $prg = $0) =~ s,^.*/,,; select STDERR; $| = 1; # no buffering select STDOUT; $| = 1; @@ -26,7 +26,7 @@ my @opt_ignore = (); my $opt_interactive = 0; my $opt_quiet = 0; my $opt_stderr = 1; -my $opt_tee = ($ENV{"TMPDIR"} || $ENV{"TMP"} || "/tmp") . "/fot"; +my $opt_tee = ($ENV{"TMPDIR"} || $ENV{"TMP"} || "/tmp") . "/fot.$>"; my $opt_version = 0; my $opt_help = 0; @@ -135,6 +135,7 @@ sub process_output { |LaTeX\ Font\ Warning:\ Some\ font\ shapes |LaTeX\ Font\ Warning:\ Size\ substitutions |Package\ auxhook\ Warning:\ Cannot\ patch + |Package\ biditools\ Warning:\ Patching |Package\ caption\ Warning:\ Un(supported|known)\ document\ class |Package\ fixltx2e\ Warning:\ fixltx2e\ is\ not\ required |Package\ frenchb?\.ldf\ Warning:\ (Figures|The\ definition) @@ -230,8 +231,8 @@ value is that of I<texcmd>. Examples: # Sample basic invocation: texfot pdflatex file.tex - # Ordinarily all output is copied to /tmp/fot before filtering, - # but that can be omitted: + # Ordinarily the full output is copied to /tmp/fot.$UID before + # filtering, but that can be omitted, or the filename changed: texfot --tee=/dev/null lualatex file.tex # Example of more complex engine invocation: @@ -367,11 +368,16 @@ the TeX command (on stdout). C<--no-stderr> omits that reporting. =item C<--tee> I<file> By default, the output being filtered is C<tee>-ed, before filtering, to -C<$TMPDIR/fot> (or C<$TMP/fot> if C<TMP> is set, or C</tmp/fot> if -neither environment variable is set), to make it easy to check the full -output when the filtering seems suspect. This option allows specifying a -different file. Use S<C<--tee /dev/null>> if you don't want the original -output at all. +make it easy to check the full output in case of problems. + +The default I<file> is C<$TMPDIR/fot.>I<uid>; if C<TMPDIR> is not set, +C<TMP> is used if set; if neither is set, the default directory is +C</tmp>. For example: C</tmp/fot.1001>. The I<uid> suffix is the +effective userid of the process, appended for basic avoidance of +collisions between different users on the same system. + +This option allows specifying a different file. Use S<C<--tee +/dev/null>> to discard the original output. =item C<--version> @@ -387,7 +393,7 @@ Display this help and exit successfully. I wrote this because, in my work as a TUGboat editor (L<https://tug.org/TUGboat>, journal submissions always welcome!), I run -and rerun many documents, many times each. It was too easy to lose +and rerun many documents, many times each. It was easy to lose warnings I needed to see in the mass of unvarying and uninteresting output from TeX, such as style files being read and fonts being used. I wanted to see all and only those messages which needed some action by @@ -407,7 +413,7 @@ searching for C<log> at L<https://ctan.org/search>. C<texfot> is written in Perl, and runs on Unix. It may work on Windows if Perl and other software is installed, but I don't use Windows and -don't support C,texfot> there. +don't support C<texfot> there. The name comes from the C<trip.fot> and C<trap.fot> files that are part of Knuth's trip and trap torture tests, which record the online output @@ -422,4 +428,6 @@ are released to the public domain. Email C<karl@freefriends.org> with bug reports. It has no home page beyond the package on CTAN: L<https://ctan.org/pkg/texfot>. + $Id: texfot,v 1.45 2022/02/17 18:42:02 karl Exp $ + =cut |