Page MenuHomePhabricator

MathML with SVG or PNG causes "Undefined control sequence \emph"
Open, Needs TriagePublic

Event Timeline

According to https://en.wikipedia.org/wiki/Help:Displaying_a_formula \emph doesn't seem to be valid command anyway. What is it supposed to do?

\emph is a text mode macro in LaTeX (even though it can be used in math mode, it will actually switch back to text mode again).

If the main goal is italic text elements inside math tags, then \textit would be the appropriate choice - this would be equivalent to ''...'' in wikitext (which generates <i> in HTML but the HTML5 semantics of <i> are not very useful in practice, e.g., for accessibility).

If the goal is emphasis (similar to <em> in HTML), then that's a more complex issue. Especially, if the main point is to get \emph's behavior of adapating to the surroundings (italic in normal context, normal in italic content).

I think it boils down the question if we want to extend the set of whitelisted macros and allow \emph as part of the Wikimedia LaTeX syntax. I personally think we don't really need it, but we can also make if poll on this.