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

2022-08-26 Thread Michal Hoftich
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}
The following code shows the concept:

This is another paragraph
\end{foo}

normal text

\FooCmd
The following code shows the concept:

This is another paragraph
\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:

  

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



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

2022-08-26 Thread Karl Berry
Follow-up Comment #3, bug #576 (project tex4ht):

Michal, related question: is there a nicer way than \ifx\HCode\undefined to
test "are we running under tex4ht"? Clearly the \ScriptEnv construct, etc.,
need to be conditionalized ...
thanks.


___

Reply to this item at:

  

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