summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-4ht.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht/source/tex4ht-4ht.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex13
1 files changed, 12 insertions, 1 deletions
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 5954687a49..56d8de8c5e 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1643 2025-02-18 12:03:37Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1648 2025-02-20 16:59:57Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2025 TeX Users Group
@@ -34139,6 +34139,17 @@ content.
\NewConfigure{listings-init}{2}
>>>
+This configuration should prevent linebreaks and collapsed spaces for escaped LaTeX commands
+inside listings. It assumes that listings-init contains TeX4ht specials that disables and enables spaces,
+and OutputBox and PostOutput hooks provided by Listings should insert markup for the current text color.
+
+See \Link[https://puszcza.gnu.org.ua/bugs/?648]{}{}for example\EndLink.
+
+\<listings sty\><<<
+\pend:def\lst@escapebegin{\csname b:listings-init\endcsname\nobreak\hbox\bgroup\lsthk@OutputBox}
+\append:def\lst@escapeend{\lsthk@PostOutput\egroup\csname a:listings-init\endcsname}
+>>>
+
Use the TextStyle hook to insert markup for inline listings. This hook can
be used also in other contexts, so we need to execute it conditionally,
based on the \Verb|\lst@ifmode| condition.