diff options
author | Norbert Preining <norbert@preining.info> | 2023-04-22 03:01:28 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-04-22 03:01:28 +0000 |
commit | a4c76fef0e3121b1a1844e39b7931828f9ec63b8 (patch) | |
tree | bc2cbd40540322282abb498d434a2300481f9b24 /support | |
parent | 00c9f050c86446bb1d460dfe75699189ae1627b3 (diff) |
CTAN sync 202304220301
Diffstat (limited to 'support')
-rw-r--r-- | support/TeX4ht/source/ChangeLog | 11 | ||||
-rw-r--r-- | support/TeX4ht/source/mktex4ht-cnf.tex | 3 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-4ht.tex | 138 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-html4.tex | 25 | ||||
-rwxr-xr-x | support/TeX4ht/source/update-htfonts | 2 |
5 files changed, 170 insertions, 9 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 4f986254f2..3f620fdfcd 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,14 @@ +2023-04-21 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-4ht.tex (piton.4ht) + * tex4ht-html4.tex (html4.4ht): added support for the Piton package. + https://github.com/michal-h21/make4ht/issues/118 + +2023-04-16 Karl Berry <karl@freefriends.org> + + * tex4ht-4ht.tex (JHEP.4ht, memhfixc.4ht): + use |<TeX4ht copywrite|> so .4ht files \write the version. + 2023-04-12 Michal Hoftich <michal.h21@gmail.com> * tex4ht-4ht.tex (enotez.4ht), diff --git a/support/TeX4ht/source/mktex4ht-cnf.tex b/support/TeX4ht/source/mktex4ht-cnf.tex index ec8c527563..baaa811433 100644 --- a/support/TeX4ht/source/mktex4ht-cnf.tex +++ b/support/TeX4ht/source/mktex4ht-cnf.tex @@ -1,4 +1,4 @@ -% $Id: mktex4ht-cnf.tex 1323 2023-04-12 14:01:16Z michal_h21 $ +% $Id: mktex4ht-cnf.tex 1325 2023-04-21 13:23:46Z michal_h21 $ % Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex. % Read by tex4ht-cond4ht. % @@ -177,6 +177,7 @@ \AddFile{7}{moreverb} \AddFile{7}{fancyvrb} \AddFile{9}{minted} +\AddFile{9}{piton} \AddFile{9}{pythontex} \AddFile{9}{prosper} \AddFile{9}{prosper-a} diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index 051b6026df..f42a92ed00 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1323 2023-04-12 14:01:16Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1325 2023-04-21 13:23:46Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2023 TeX Users Group @@ -16464,7 +16464,7 @@ Hfootnote counter, which isn't declared. \<memhfixc.4ht\><<< % memhfixc.4ht (|version), generated from |jobname.tex -|<TeX4ht copyright|> +|<TeX4ht copywrite|> |<memhfixc nameref|> \Hinput{memhfixc} \endinput @@ -19335,10 +19335,9 @@ We need to fix support for titles and authors. \Link[http://jhep.sissa.it/]{}{}http://jhep.sissa.it/\EndLink \<JHEP.4ht\><<< -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% JHEP.4ht |version % -% Copyright (C) |CopyYear.2001. Eitan M. Gurari % -|<TeX4ht copyright|> +% JHEP.4ht (|version), generated from |jobname.tex +% Copyright |CopyYear.2001. Eitan M. Gurari +|<TeX4ht copywrite|> |<config JHEP|> \Hinput{JHEP} \endinput @@ -25905,6 +25904,133 @@ Minted, it turns the breaklines option to false when it is used. \:minted@def@opt@switch{breaklines} >>> +%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{piton} +%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\<piton.4ht\><<< +% piton.4ht (|version), generated from |jobname.tex +% Copyright 2023 TeX Users Group +|<TeX4ht license text|> + +\ExplSyntaxOn +|<piton env|> +|<piton inlines|> +\ExplSyntaxOff +\Hinput{piton} +\endinput +>>> \AddFile{9}{piton} + +\<piton env\><<< + +\NewConfigure{pitonline}{3} +\NewConfigure{pitonnumber}{2} +\protected\def\:tempa #1\__piton_end_line:{ + \:pitonendignorelines\glet\:pitonendignorelines\relax + \group_begin: + % we set line in a box, because otherwise lines are collapsed sometimes + \hbox_set:Nn \l_tmpa_box{ + \a:pitonline + \a:pitonnumber + \bool_if:NT \l__piton_line_numbers_bool + { + \bool_if:NF \l__piton_all_line_numbers_bool + { \tl_if_eq:nnF { #1 } { \PitonStyle {Prompt}{} } } % corrected 2023/04/10 + \__piton_print_number: + } + \b:pitonnumber + \language = -1 + \raggedright + \strut + % \HCode{<code>} + \b:pitonline + \NoFonts + \__piton_replace_spaces:n { #1 } + \EndNoFonts + % + \c:pitonline + } + \box_use_drop:N \l_tmpa_box + \group_end: +} +\HLet\__piton_begin_line:\:tempa + + +\NewConfigure{piton}{2} + +% Piton environments and file input produces extra blank line at the start +% we use TeX4ht specials to remove them +\gdef\:pitonendignorelines{} +\pend:def\__piton_pre_env:{\a:piton + \ht:special{t4ht@[}% ignore next linebreak, to preven spurious blank line at the beginning of listings + \gdef\:pitonendignorelines{\ht:special{t4ht@]}} +} +\append:def\__piton_width_to_aux:{\b:piton} + +>>> + +\<piton inlines\><<< +\NewDocumentCommand { \:__piton_piton_standard } { m } + { + \group_begin: + \ttfamily + \a:pitonline\b:pitonline + \automatichyphenmode = 1 + \cs_set_eq:NN \\ \c_backslash_str + \cs_set_eq:NN \% \c_percent_str + \cs_set_eq:NN \{ \c_left_brace_str + \cs_set_eq:NN \} \c_right_brace_str + \cs_set_eq:NN \$ \c_dollar_str + \cs_set_eq:cN { ~ } \space + \cs_set_protected:Npn \__piton_begin_line: { } + \cs_set_protected:Npn \__piton_end_line: { } + \tl_set:Nx \l_tmpa_tl + { + \lua_now:e + { piton.ParseBis('\l__piton_language_str',token.scan_string()) } + { #1 } + } + \bool_if:NTF \l__piton_show_spaces_bool + { \regex_replace_all:nnN { \x20 } { ^^^^2423 } \l_tmpa_tl } % U+2423 + { + \bool_if:NT \l__piton_break_lines_in_piton_bool + { \regex_replace_all:nnN { \x20 } { \x20 } \l_tmpa_tl } + } + % our extra code to remove the space glyph + \regex_replace_all:nnN { \x20 } { \c { __piton_breakable_space: } } \l_tmpa_tl + \l_tmpa_tl + \c:pitonline + \group_end: + } + +\HLet\__piton_piton_standard\:__piton_piton_standard + +\NewDocumentCommand { \:__piton_piton_verbatim } { v } + { + \group_begin: + \ttfamily + \a:pitonline\b:pitonline + \automatichyphenmode = 1 + \cs_set_protected:Npn \__piton_begin_line: { } + \cs_set_protected:Npn \__piton_end_line: { } + \tl_set:Nx \l_tmpa_tl + { + \lua_now:e + { piton.Parse('\l__piton_language_str',token.scan_string()) } + { #1 } + } + \bool_if:NT \l__piton_show_spaces_bool + { \regex_replace_all:nnN { \x20 } { ^^^^2423 } \l_tmpa_tl } % U+2423 + % our extra code to remove the space glyph + \regex_replace_all:nnN { \x20 } { \c { __piton_breakable_space: } } \l_tmpa_tl + \l_tmpa_tl + \c:pitonline + \group_end: + } + +\HLet\__piton_piton_verbatim\:__piton_piton_verbatim +>>> %%%%%%%%%%%%%%%%%%%%%%%%%%%% \Section{pythontex} diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex index d5e99670d7..8fa3360507 100644 --- a/support/TeX4ht/source/tex4ht-html4.tex +++ b/support/TeX4ht/source/tex4ht-html4.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-html4.tex 1323 2023-04-12 14:01:16Z michal_h21 $ +% $Id: tex4ht-html4.tex 1325 2023-04-21 13:23:46Z michal_h21 $ % Compile 4 times: latex tex4ht-html4 % Copy html4.4ht into the work directory before all but the last compilation. % @@ -15385,6 +15385,29 @@ Configuration for listings with colored backgrounds >>> +%%%%%%%%%%%%%%%%%%%% +\subsection{piton} +%%%%%%%%%%%%%%%%%%%% + +\<configure html4 piton\><<< +% handle \color commands +% piton already uses hexadecimal colors, so we don't need to convert them for use in CSS +\def\:endundeclaredcolor{\HCode{</span>}} +\def\:undeclaredcolor[#1]#2{\o:@undeclaredcolor:[#1]{#2} +\HCode{<span style="color:\##2">}\aftergroup\:endundeclaredcolor +} + +\Configure{piton}{% + \ifvmode\IgnorePar\fi\EndP\HCode{<pre class="piton">}\HtmlParOff\NoFonts% + \Configure{newline}{\HCode{\Hnewline}}% don't insert any special tags for newlines, only newline characters +} +{\EndNoFonts\HCode{</pre>}\HtmlParOn} + +\Configure{pitonline}{\HLet\@undeclaredcolor\:undeclaredcolor}{\HCode{<code style="white-space:pre">}}{\HCode{</code>}} +\Configure{pitonnumber}{\HCode{<span class="linenumber">}}{\HCode{</span>}} +\Css{pre.piton{font-family: monospace,monospace; font-size:1rem; text-align:left; clear:both; }} +\Css{.piton .linenumber{font-size: small; margin-right: 1em;}} +>>> %%%%%%%%%%%%%%%%%%%% \subsection{pythontex} diff --git a/support/TeX4ht/source/update-htfonts b/support/TeX4ht/source/update-htfonts index e07d1e0b07..7791efcf3a 100755 --- a/support/TeX4ht/source/update-htfonts +++ b/support/TeX4ht/source/update-htfonts @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: update-htfonts 1141 2022-06-01 21:43:42Z karl $ +# $Id: update-htfonts 1314 2023-04-02 15:01:40Z karl $ # Update TeX4ht font files (.htf). See ./Makefile for invocations. # Public domain. Originally written by Karl Berry, 2022. |