Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower sign misinterpreted #1335

Closed
dschrempf opened this issue Dec 11, 2015 · 2 comments
Closed

Lower sign misinterpreted #1335

dschrempf opened this issue Dec 11, 2015 · 2 comments
Labels
Expected Behavior This is how MathJax works

Comments

@dschrempf
Copy link

Hello,

I am trying to export a LaTeX code block from Emacs Org mode into HTML and have a problem when using lower (<) signs (maybe it also happens with greater signs but I did not check that).

E.g., the following HTML code leads to an error when viewing the file because the '<' sign is interpreted in a wrong way (I don't know how but it seems to be interpreted as part of a tag) and MathJax does not succeed then. I.e., the Firefox HTML syntax checker shows the line \end{equation}... in red in the HTML file.

HTML code:

\begin{equation}
  \text{if } 0<i<N
\end{equation}</li>
</ul>

If I add spaces in-between, it works fine.

HTML code:

\begin{equation}
  \text{if } 0 < i < N
\end{equation}</li>
</ul>

This might just be a problem of HTML failing to parse the source code, but it leads to unexpected behavior. I have also posted this on the Org mode mailing list and they referred me to here.

Best wishes,
Dominik

@dpvc
Copy link
Member

dpvc commented Dec 11, 2015

You are correct that it is due to the <i being interpreted as an HTML tag by the browser. This is explained further in the MathJax Documentation. Remember that you are creating an HTML document, not a TeX document, so you have to keep in mind the implications of that. Mostly, that means you have to be careful about your use of < in situations like this. Since the browser interprets the HTML long before MathJax runs, MathJax can't do anything about this issue, so I'm marking this "expected behavior".

@dpvc dpvc added the Expected Behavior This is how MathJax works label Dec 11, 2015
@dschrempf
Copy link
Author

Thank you.

Hm, this combination is used often in Mathematics though so it might be worth to check it during Org mode HTML export. I will ask people over there.

@pkra pkra closed this as completed Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expected Behavior This is how MathJax works
Projects
None yet
Development

No branches or pull requests

3 participants