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

mtextFontInherit does not inherit font style (bold, italic, etc.) #226

Closed
nageh opened this issue Apr 10, 2012 · 9 comments
Closed

mtextFontInherit does not inherit font style (bold, italic, etc.) #226

nageh opened this issue Apr 10, 2012 · 9 comments

Comments

@nageh
Copy link

nageh commented Apr 10, 2012

Using "HTML-CSS": {mtextFontInherit: true} does adopt the surrounding text's font family but not its style. In particular, \textbf, \textit and co., which are defined as ['Macro','\mathord{\bf{\text{#1}}}',1], do not display the text in bold/italic/etc. face.

@dpvc
Copy link
Member

dpvc commented Apr 10, 2012

OK, thanks. I confirm the report, and will work on a resolution.

@ghost ghost assigned dpvc Aug 13, 2012
dpvc added a commit to dpvc/MathJax that referenced this issue Aug 17, 2012
… so that \textbf and \textit will work properly. Resolves issue mathjax#226.
@dpvc
Copy link
Member

dpvc commented Aug 17, 2012

The issue226 branch of my fork of MathJax should cause HTML-CSS and SVG output to properly use the style and weight indicated in the mathematics, but the font-family of the surrounding text.

@fred-wang
Copy link
Contributor

OK, so the Configuration/HTML-CSS/mtextFontInherit/issue226.html is not correct. I should rather test with \textbf and \textit.

@dpvc
Copy link
Member

dpvc commented Aug 18, 2012

Right. I understand the test you had in mind, but in order to make the output using mtextFontInherit work consistently for either value (true or false), it needs to ignore the style and weight of the outer font and use that of the mathematics. Otherwise, if the outer font were bold, say, then \text{A} and \textbf{A} would not be different, and they should be.

@fred-wang
Copy link
Contributor

So just to be sure that we agree: the issue here is that {mtextFontInherit: true} prevents \textit and \textbf to behave as expected?

@fred-wang
Copy link
Contributor

OK, I'll write two != reftests

x against \textbf{x}
x against \textit{x}

(with mtextFontInherit = true in both cases)

@fred-wang
Copy link
Contributor

(I meant \text x)

@fred-wang
Copy link
Contributor

Configuration/HTML-CSS/mtextFontInherit/issue226a.html
Configuration/HTML-CSS/mtextFontInherit/issue226b.html

Verified with Opera, Chrome and Firefox.

=> In testsuite, Ready for release

@dpvc
Copy link
Member

dpvc commented Aug 18, 2012

Yes, you are correct, \text{x} against \textbf{x} and \text{x} against \textit{x} should be it. Thanks.

@dpvc dpvc closed this as completed Nov 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
  NODES
COMMUNITY 2
Project 5
USERS 1