[tex4ht] [bug #576] \HCode alternative that copies verbatim?

Michal Hoftich puszcza-hackers at gnu.org.ua
Fri Aug 26 21:32:11 CEST 2022


Follow-up Comment #4, bug #576 (project tex4ht):

Ideally, you can define the \FooCmd and \EndFooCmd in the preamble, or in a
custom package, and then redefine it in TeX4ht configuration file:

%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\NewDocumentEnvironment{foo}{+b}{}{}
\long\def\FooCmd #1\EndFooCmd{}

\begin{document}

normal text

\begin{foo}
<p dir="auto">The following code shows the concept:</p>

<p dir="auto">This is another paragraph</p>
\end{foo}

normal text

\FooCmd
<p dir="auto">The following code shows the concept:</p>

<p dir="auto">This is another paragraph</p>
\EndFooCmd
\end{document} 
%%%%%%%%%%%%%%%%%%

The configuration file could contain the TeX4ht commands from my previous
post:

%%%%%%%%%%%%%%%%%%%%
\Preamble{xhtml}
\ScriptEnv{foo}
{\ifvmode\IgnorePar\fi\EndP\NoFonts\hfill\break }
{\EndNoFonts }

\ScriptCommand{\FooCmd}
{\ifvmode\IgnorePar\fi\EndP\NoFonts\hfill\break }
{\EndNoFonts }
\begin{document}
\EndPreamble
%%%%%%%%%%%%%%%%%



    _______________________________________________________

Reply to this item at:

  <http://puszcza.gnu.org.ua/bugs/?576>

_______________________________________________
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



More information about the tex4ht mailing list.