[tex4ht] help on syntax add a \Configure{@HEAD}

Radhakrishnan CV cvr at river-valley.org
Wed Jan 8 16:23:41 CET 2014


On Wed, Jan 8, 2014 at 7:13 PM, Nasser M. Abbasi <nma at 12000.org> wrote:

> -------------------------------
>  \Configure{@HEAD}{\HCode{
>      <script type="text/x-mathjax-config">
>        MathJax.Hub.Config({
>          extensions: ["tex2jax.js"],
>          jax: ["input/TeX", "output/HTML-CSS"],
>          tex2jax: {
>            inlineMath: [ ['
> ,'], ["\\(","\\)"] ],
>            displayMath: [ ['$','$'], ["\\[","\\]"] ],
>            processEscapes: true
>          },
>          "HTML-CSS": { availableFonts: ["TeX"] }
>        });
>      </script>\Hnewline
>   }}
> -----------------------
>
> When I run a tex file that uses the above .cfg,
> I get syntax errors:
>
> --------------------------
> ! Undefined control sequence.
> \\  ->\let \reserved at e
>                \relax \let \reserved at f \relax \@ifstar {\let \reserv...
> l.213 \EndPreamble
>                   ?
> --------------------------


​Can you please try the following nma.cfg:

​\Preamble{html}

\makeatletter
\def\bsl{\expandafter\@gobble\string\\}
 \Configure{@HEAD}{\HCode{
     <script type="text/x-mathjax-config">
       MathJax.Hub.Config({
         extensions: ["tex2jax.js"],
         jax: ["input/TeX", "output/HTML-CSS"],
         tex2jax: {
           inlineMath: [ ['$','$'], ["\bsl\bsl(","\bsl\bsl)"] ],
           displayMath: [ ['$$','$$'], ["\bsl\bsl[","\bsl\bsl]"] ],
           processEscapes: true
         },
         "HTML-CSS": { availableFonts: ["TeX"] }
       });
     </script>ewline
  }}


\begin{document}

\EndPreamble


\makeatother
\endinput


-- 
Radhakrishnan
River Valley<https://maps.google.com/maps?q=River%20Valley,%20Thiruvananthapuram%20Neyyardam%20Road,%20Kerala,%20India&vector=1>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20140108/1b9f29b5/attachment.html>


More information about the tex4ht mailing list