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

Neo-Euler does not properly render text (uses math font instead). #1098

Closed
mforbes opened this issue Mar 17, 2015 · 7 comments
Closed

Neo-Euler does not properly render text (uses math font instead). #1098

mforbes opened this issue Mar 17, 2015 · 7 comments
Labels
Expected Behavior This is how MathJax works

Comments

@mforbes
Copy link

mforbes commented Mar 17, 2015

When using the Neo-Euler font, constructs like the following are problematic: the surrounding text font should be used in each of these cases:

  • Operators: \sin
  • Text boxes: \text{this is text} and \mathrm{this is also text}
  • Equations tags: \tag{this is text too}

Here is what appears instead:

\int \mathrm{d}{x} \sin(x) = -\cos(x) + \mathrm{\text{h.c.}}  \tag{A simple identity}

screen shot 2015-03-16 at 7 58 30 pm

This is what it should look like (output from LaTeX with surrounding Palatino font)

screen shot 2015-03-16 at 8 01 04 pm

\documentclass{article}
\usepackage{mathpazo}
\usepackage[small]{eulervm}
\usepackage{amsmath}
\begin{document}
\begin{equation}
  \int \mathrm{d}{x} \sin(x) = -\cos(x) + \mathrm{\text{h.c.}}  \tag{A simple identity}
\end{equation}
\end{document}
@pkra
Copy link
Contributor

pkra commented Mar 17, 2015

This can be configured via mtextFontInherit, see http://docs.mathjax.org/en/latest/options/HTML-CSS.html

@pkra pkra closed this as completed Mar 17, 2015
@pkra pkra added the Expected Behavior This is how MathJax works label Mar 17, 2015
@mforbes
Copy link
Author

mforbes commented Mar 17, 2015

Yes this works. Why is mtextFontInherit false by default? Sorry for the noise.

@pkra
Copy link
Contributor

pkra commented Mar 17, 2015

No problem. @dpvc will correct me but I think for the same reasons MathJax cannot support arbitrary fonts (see http://docs.mathjax.org/en/latest/font-support.html): the lack of bounding box information for arbitrary fonts means MathJax cannot ensure the layout is correct. I suspect this is less of a problem today than it was for v2.0 and in turn would only change at v3.0.

@mforbes
Copy link
Author

mforbes commented Mar 17, 2015

Actually, there still seems to be a problem with operators like \sin and \ln (see below). I think that \mathrm{} for Neo-Euler is using the math font when it should also use the surrounding text font. \textrm{} works correctly as shown below in the h.c. and the tag. The d is still wrong (declared using \mathrm{d} as are the \sin and \cos.

screen shot 2015-03-17 at 3 47 20 pm

@pkra
Copy link
Contributor

pkra commented Mar 18, 2015

I think that \mathrm{} for Neo-Euler is using the math font when it should also use the surrounding text font.

I think MathJax is replicating TeX/LaTeX behavior correctly here, i.e., it should be using the configured font in \mathrm.

Again, arbitrary fonts cannot be used with MathJax for lack of browser font APIs. At most, something like #1121 could help at some point.

@mforbes
Copy link
Author

mforbes commented Mar 18, 2015

Where is \mathrm configured and how can I change that? Whatever it is, it is critical that it is not the same as the math font since \cos is not c*o*s. The eulervm package for sure inserts the text font for operators.

@mforbes
Copy link
Author

mforbes commented Apr 3, 2015

@pkra Should I open this as a new issue? \mathrm should really not use the math font, even if it is upright as in Neo-Euler.

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

2 participants