I'm using Miktex 2.9 and tex4html. In my file I have

<div id="box" class="jxgbox" style="width: 770px; height: 
500px;"></div> <script > etc.

which yields

<div id="box"class="jxgbox\OT1\ss tyle="width: 770px; height: 500px;{\unhbox \voidb@x \penalty \@M \raise .2ex\hbox {$\scriptscriptstyle \gg $}\penalty \@M \hskip \z@skip }</div>

Does anyone have an idea how to get code perfectly unchanged into the HTML File?

Is it a matter of fonts?

  • Welcome to TeX.SE! you may want to read the Markdown formating help for further questions.
    – Cfun
    Jul 7, 2016 at 11:47
  • I think this is caused by the babel package, " characters are in some languages activated and some non wanted code may be inserted then. We need to see a minimal complete document
    – michal.h21
    Jul 7, 2016 at 12:14
  • Dear Micha, awesome. I took babel out and now it worked. Thanks a lot. Christian
    – Christian
    Jul 7, 2016 at 14:02
  • You don't have to take babel out, you can just disable the shorthands
    – michal.h21
    Jul 7, 2016 at 14:13

1 Answer 1


some babel language definition files make some characters active in order to enable shorthands, which are used for inserting some special codes. If you don't use these shorthands, you can disable them using


command issued after \begin{document}.

BTW, it is better to not use \HCode commands inside your document, as it doesn't work in PDF mode. You should use them only in the configuration files, either .4ht files for your custom packages, or in the .cfg file with local definitions. But I would need some complete example to give your better advice.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .