3

I am using first latex compiler to generate pdf document. Into .tex source, I have the following equation :

\begin{align}
\text{tenseur sym\'etrique :}\,\,\,\,& S_{ij}=(1/2)\,(T_{ij}+T_{ji}) \notag \\
\text{tenseur antisym\'etrique :}\,\,\,\,& A_{ij}=(1/2)\,(T_{ij}-T_{ji})
\label{exo4117}
\end{align}

That generates this rendering :

Latex rendering

Now, I tried to generate HTML pages with MathJax using htlatex compiler and I get the following result :

Htlatex rendering

As you can see, the french accent is not taken into account. I suspect the \text{...} to be implied in this issue.

How can I circumvent this problem and produce this MathJax equation with french accent (like I did with latex compiler) ? Any suggestion is welcome.

Regards

2

It seems that MathJax doesn't support TeX accents in math text. You can just use accented characters directly:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

\begin{align}
  \text{tenseur symétrique :}\,\,\,\,& S_{ij}=(1/2)\,(T_{ij}+T_{ji}) \notag \\
  \text{tenseur antisymétrique :}\,\,\,\,& A_{ij}=(1/2)\,(T_{ij}-T_{ji})
  \label{exo4117}
\end{align}

\end{document}

To request good support for accented characters, it seems necessary to use

MathJax.Hub.Config({
  "HTML-CSS": {
    mtextFontInherit: true
  }
})

as a configuration for MathJax. Full configuration file for tex4ht:

\RequirePackage{mathjax-latex-4ht}
\Preamble{xhtml}
\begin{document}
\Configure{@HEAD}{\HCode{\unexpanded{<script type="text/x-mathjax-config"> MathJax.Hub.Config({ 
        TeX: {Macros : {  mathlarger: ["{\\large \#1}",1] }},
        "HTML-CSS": { mtextFontInherit: true }
});</script>}}}
\EndPreamble

It is rendered in this way:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.