Hello,
I have a formula that mixes some math and some computer C language symbol SOME_CONSTANT, as follows :
--------8<-----------8<-----------8<-----------8<-----------8<-------
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Minimum working example</title>
<meta name="author" content="Vincent" />
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
displayAlign: "center",
displayIndent: "0em",
"HTML-CSS": { scale: 100,
linebreaks: { automatic: "false" },
webFont: "TeX"
},
SVG: {scale: 100,
linebreaks: { automatic: "false" },
font: "TeX"},
NativeMML: {scale: 100},
TeX: { equationNumbers: {autoNumber: "AMS"},
MultLineWidth: "85%",
TagSide: "right",
TagIndent: ".8em"
}
});
</script>
<script type="text/javascript" id="MathJax-script" async
src="
https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js?config=TeX-AMS_HTML">
</script>
</head>
<body>
This: \(-2^{\texttt{SOME\_CONSTANT}}\).
</body>
</html>
--------8<-----------8<-----------8<-----------8<-----------8<-------
Now the \_ does not display as just _, but as \_.
To tell the context, I generate the page from some Emacs OrgMode document, and therefore I need some syntax that works both with the OrgMode LaTeX export and with the OrgMode HTML export, the latter using MathJax.
I can find some OrgMode based work-around with some hook preprocessing the content of formulas, or by changing the option how OrgMode processes the ^/_ (super/under)scripts. But I was wondering whether there is some mathjax based setting to do this also.
Thanks in advance for any clue.
Vincent.