[tex4ht] How to insert HTML code at any location in the generated HTML file?

Nasser M. Abbasi nma at 12000.org
Wed Jul 10 12:58:46 CEST 2013


On 7/10/2013 5:49 AM, Radhakrishnan CV wrote:
> On Wed, Jul 10, 2013 at 1:54 PM, Nasser M. Abbasi <nma at 12000.org> wrote:
>
>> I am converting a latex document that I used to compile with
>> latex2html to htlatex.
>>
>
> [...]
>
>
>> What is the correct way to insert HTML code any where in
>> the document, and have it show at that location in the HTML
>> file? I have very large amount of HTML code that was inserted in
>> that document.
>>
>
> You might use {verbatim} environment as in any LaTeX document.
>
> \documentclass{article}
>
> \begin{document}
>
> \begin{verbatim}
>
>     any HTML code here
>
> \end{verbatim}
>
> \end{document}
>
> Hope this helps.
>
> Best regards
>

Sure, I know I can use Verbatim.

May be I did not explain the problem well.

I want to inject HTML code, into the generated HTML itself
(when running htlatex only)

If I write

--------------------------
\documentclass{article}
\begin{document}

\begin{verbatim}
<h2>This is HTML head 2 </h2>
\end{verbatim}

\end{document}
---------------------------

the HTML generated will just look like this:

    <h2>This is HTML head 2 </h2>

Which is clearly not what I wanted.

regards,
--Nasser







More information about the tex4ht mailing list