0

I have very very simple equations. It's working well in PdfLaTeX and not working in tex4ht.

\documentclass[a4paper,twoside]{book}
\begin{document}
$K^\mathrm{mno}$
\end{document}

I know before superscript need to give {. But it's working fine in PdfLaTeX and why not working in tex4ht/make4ht. Not only "^"(superscript) "_" also not working.

How to do i need to work in tex4ht/make4ht? Any great help is highly appreciate.

I have need to achive in simple cfg file and find it below:

\Configure{ext}{xhtml}
\Preamble{xhtml,html5,mathml,NLM,charset=UTF-8,-xtpipes,NoFonts,refcaption,ext=.xhtml}
\Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}
\begin{document} 
\renewcommand{\a}{\alpha}
\renewcommand{\mathrm}{<br/><br/>}
\EndPreamble
Sebastiano
  • 54,118
Balaji
  • 2,282
  • 2
    K^\mathrm{mno} is wrong syntax. That it works in pdflatex is luck, but as you see you are not so lucky with tex4ht. Use the right input syntax K^{\mathrm{mno}}. – Ulrike Fischer Oct 06 '20 at 07:53
  • @Ulrike: I have known that. But i would like to do automatically this point using config file. How to give "^" and "_" braces automatic process. Kindly advise. Pdflatex concept will not work in our tex4ht? – Balaji Oct 06 '20 at 07:56
  • Or we can modify old latex command to new latex command. So that i will try above my point in this format. for example ^\mathrm need to change ^\bmathrm. – Balaji Oct 06 '20 at 07:58
  • 2
    Wasn't I clear? Use the right input syntax. It only works in pdflatex because of some special points of the internal processing, see https://tex.stackexchange.com/questions/175247/why-does-x-text-y-work/175256#175256. It doesn't make sense to add some complicated code to tex4ht only because you are too lazy to input two braces. – Ulrike Fischer Oct 06 '20 at 08:01
  • I’m voting to close this question because Ulrike solved it in the comments – DG' Oct 06 '20 at 08:09
  • TeX4ht works purely based on correct format of LaTeX tagging method and you should follow it without excuse, as Ulrike mentioned you should correct your tagging – MadyYuvi Oct 06 '20 at 15:25
  • at last questions how to configure mathbf to bold "\Configure{mathbf}{\HCode{
    }\NoFonts}{\HCode{}\EndNoFonts}". This syntax is correct or not...
    – Balaji Oct 06 '20 at 16:34

0 Answers0