summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-html4.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht/source/tex4ht-html4.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-html4.tex49
1 files changed, 32 insertions, 17 deletions
diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex
index f9edbd385b..ba40def116 100644
--- a/support/TeX4ht/source/tex4ht-html4.tex
+++ b/support/TeX4ht/source/tex4ht-html4.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1093 2022-03-20 16:15:35Z karl $
+% $Id: tex4ht-html4.tex 1106 2022-04-04 10:06:26Z michal_h21 $
% Compile 4 times: latex tex4ht-html4
% Copy html4.4ht into the work directory before all but the last compilation.
%
@@ -6328,6 +6328,8 @@ thanks author date and>>>
\def\mbox{\hbox}%
\def\gobble:font##1##2{##2}\:TITLE: \no:fonts
\def\footnotemark[##1]{}%
+\def\:hashintitle{\protect\symbol{35}}
+\let\#\:hashintitle
\Tag{TITLE+}{\@title}}
>>>
@@ -6352,6 +6354,8 @@ Old latex files need \verb'\no:fonts', but not new ones.---wrong, as far as writ
\def\mbox{\hbox}%
\def\gobble:font##1##2{##2}\:TITLE: \no:fonts
\def\footnotemark[##1]{}%
+\def\:hashintitle{\protect\symbol{35}}
+\let\#\:hashintitle
\Tag{TITLE+}{\shorttitle}}
>>>
@@ -6378,6 +6382,8 @@ Old latex files need \verb'\no:fonts', but not new ones.---wrong, as far as writ
\let \bf=\empty
\let \centering=\empty
\def \ignorespaces##1\vskip##2//{##1}%
+\def\:hashintitle{\protect\symbol{35}}
+\let\#\:hashintitle
\Tag{TITLE+}{\@title//}%
}%
>>>
@@ -6391,6 +6397,8 @@ Old latex files need \verb'\no:fonts', but not new ones.---wrong, as far as writ
\def\mbox{\hbox}%
\let\\\space \def\TeX{TeX}%
\def\gobble:font##1##2{##2}\:TITLE: \no:fonts
+\def\:hashintitle{\protect\symbol{35}}
+\let\#\:hashintitle
\Tag{TITLE+}{\@title}}%
>>>
@@ -12566,6 +12574,7 @@ y{\ht:special{t4ht@+\string&{35}x00FD{59}}y}%
\<env for titles\><<<
\let\"=\:same \let\~=\:same \let\^=\:same
\let\v=\:same \let\'=\:same \let\r=\:same
+\let\#=\:same
\PictureOff
>>>
@@ -15197,7 +15206,8 @@ listings.dtx.
Configuration for the inline code
\<configure html4 minted\><<<
-\Configure{InlineCode}{\HCode{<code>}}{\HCode{</code>}}
+\Configure{InlineCode}{\HCode{<code class="minted-inline">}\NoFonts}{\EndNoFonts\HCode{</code>}}
+\Css{code.minted-inline{font-family:monospace,monospace;}}
>>>
Configuration for listings with colored backgrounds
@@ -15236,21 +15246,29 @@ Inline listings snippets
fixed size fonts (see listings.dtx)}
>>>
+This configuration is used mainly when user defines new environment using \verb|lstnewenvironment|.
+
\<configure html4 listings\><<<
+\HAssign\listingN=0
\HAssign\listings:Depth = 0
\Configure{listings}
- {\ifvmode \IgnorePar\fi \EndP
+ {\ifvmode \IgnorePar\fi \EndP%
{\everypar{}\leavevmode}\HCode{<!--l. \the\inputlineno-->}%
- \ifnum \listings:Depth=0 \HCode{<pre class="listings">}\else
- \HCode{<span class="listings-nested">}\fi
- \gHAdvance\listings:Depth by 1
+ \ifnum \listings:Depth=0 \HCode{<pre class="listings" id="listing-\listingN">}\else%
+ \HCode{<span class="listings-nested" id="listing-\listingN">}\fi%
+ \gHAdvance\listings:Depth by 1%
+ \gdef\start:LstLn{}%
}
{\gHAdvance\listings:Depth by -1
\ifnum \listings:Depth=0 \HCode{</pre>}\else
\HCode{</span>}\fi
}
- {|<nbsp|>\HCode{<br /><span class="label">}}
+ {\start:LstLn\HCode{<span class="label">}%
+ \gdef\start:LstLn{\HCode{\Hnewline}}}%
{\HCode{</span>}}%
+\Css{pre.listings{font-family: monospace,monospace; white-space: pre-wrap;
+ margin-top:0.5em; margin-bottom:0.5em;
+ }}
>>>
\<configure html4 listings\><<<
@@ -15280,14 +15298,12 @@ Inline listings snippets
\<configure html4 listings\><<<
-\HAssign\listingN=0
\ConfigureEnv{lstlisting}
{\ifvmode \IgnorePar\fi \EndP
- \gHAdvance\listingN by 1
\HCode{<!--l. \the\inputlineno-->}%
\gdef\start:LstLn{%
\HCode{<pre class="lstlisting" id="listing-\listingN">}%
- \gdef\start:LstLn{|<nbsp|>\HCode{<br />\Hnewline}}}
+ \gdef\start:LstLn{\HCode{\Hnewline}}}
\bgroup%
% we put the closing </div> here in order to support floating listings
% https://tex.stackexchange.com/a/615703/2891
@@ -15301,7 +15317,7 @@ Inline listings snippets
{\egroup\par}
{} {}
\Css{.lstlisting .label{margin-right:0.5em; }}
-\Css{pre.lstlisting{font-family: monospace,monospace; white-space: nowrap;
+\Css{pre.lstlisting{font-family: monospace,monospace; white-space: pre-wrap;
margin-top:0.5em; margin-bottom:0.5em;
}}
>>>
@@ -15310,14 +15326,12 @@ Inline listings snippets
\Configure{lstinputlisting}
{\ifvmode \IgnorePar\fi \EndP
\HCode{<!--l. \the\inputlineno-->}%
- \gHAdvance\listingN by 1%
- \HCode{<pre class="lstinputlisting" id="listing-\listingN">}%
+ \gdef\start:LstLn{\HCode{<pre class="lstinputlisting" id="listing-\listingN">}\gdef\start:LstLn{\HCode{\Hnewline}}}% ignore first newline, to prevent spurious line
\bgroup\ttfamily%\special{t4ht@(}%
\Configure{listings}%
{{\everypar{}\leavevmode}}%
{{\everypar{}\leavevmode}}%
- {|<nbsp|>%
- \HCode{<br />\Hnewline<span class="label">}}%
+ {\start:LstLn\HCode{<span class="label">}}%
{\HCode{</span>}}%
}
{%\special{t4ht@)}
@@ -15325,7 +15339,7 @@ Inline listings snippets
\ifvmode \IgnorePar\fi \EndP \HCode{</pre>}\par}%
\Css{pre.lstinputlisting{
font-family: monospace,monospace;
- white-space: nowrap;
+ white-space: pre-wrap;
}}
\Css{.lstinputlisting .label{margin-right:0.5em;}}
>>>
@@ -15362,7 +15376,8 @@ Support for background and border color
\<configure html4 listings\><<<
\lst@AddToHook{Init}{%
-\bgroup%
+ \gHAdvance\listingN by 1% increase the ID before we save colors.
+ \bgroup%
% handle backround color and border in listings
\ifx\lst@fillcolor\@empty\else%
\lst@fillcolor%