Page MenuHomePhabricator

texvcjs should not replace $\omicron$ with $\mathrm{o}$
Closed, ResolvedPublic


Currently, texvcjs replaces

  • \omicron with \mathrm{o} and
  • \Omicron with \mathrm{O} and

I am not aware of a LaTeX package that defines those macros. LaTeX experts might use o or O respectively.
However, there are UTF-8 symbols for \omicron (U+03BF) and \Omicron (U+039F).
According to the texvcjs logic, the checked output can always be rendered with LaTeX if all specified in the requiredPackages field are loaded.

MathJax natively supports the \omicron macro and I defined in the mathjax texvc extension that \Omicron is rendered as \mathrm{O} to be consistent with the current texvc interpretation.

Now, I basically see two options:
texvcjs does the following replaces

  • \omicron with o and
  • \Omicron with O.


  • texvcjs does not touch \omicron and \Omicron.
  • the MathJax texvc extension macro \Omicron is updated to output the UTF-8 symbol U+039F
  • texvc reports the pseudo latex package mathoid as in the requiredPackages field.

I see the following pros and cos:

Aeasy to implement, generates standard LaTeXno unicode semantics, texvcjs modifies the code passed to the renderer
Bno texvcjs modifications, unicode semantics in MathMLcode does not compile with LaTeX

Original request from

As far as I can see, we still use texvc to replace e.g. \omicron with \mathrm{o} although MathJax would render \omicron just fine. This means \mathrm{o} is not italic as it should be and cannot be changed with \mathit \mathbf etc. because unknown to the user \mathrm is already specified and e.g. we still remove whitespaces although MathJax would render whitespaces just fine.

The result of the consultation is to proceed with option A.

Event Timeline

@Debenben Can you have a look at the replacement list and check if there are further commands, where the replacements generate false results. Just by looking at the PDF, one can, for instance, see that also \Omicron is not italic-ish. I did never realize that because I was not aware of how \omicron is supposed to look. I do relay on your input here;-)

I realized that \Omicron (the uppercase variant) does not render on

@Physikerwelt \Omicron being upright is fine, see

I would use the unicode-math package for XeLaTeX or LuaLaTeX as reference here, for non-Latin languages we need unicode support anyway. A difference with the uppercase letters is that with LaTeX you get the unicode character 039F which is Greek capital letter omicron and in Wikipedia you get unicode character 004F which is Latin capital letter O, but their appearance is the same.

Physikerwelt triaged this task as Low priority.
Physikerwelt moved this task from Backlog to ready to go on the Texvcjs board.
Physikerwelt updated the task description. (Show Details)
Physikerwelt set Due Date to Apr 3 2020, 10:00 PM.

@Physikerwelt According to this post "omicron not working in latex" from 2015:

The mention of it (\omicron) in the wikibook was an error that has apparently been corrected since you asked the question.

And, as also mentioned in that post, the "Short Math Guide for LaTeX" by Michael Downes (AMS) says:

In the list of lowercase letters there is no omicron because it would be identical in appearance to Latin o.

Based on that, your proposed option A seems to be the right way to go. As a workaround, you may want to consider the unicode-math package that @Debenben mentioned.

@Physikerwelt: Hi, the Due Date set for this open task was two months ago.
Can you please either update or reset the Due Date (by clicking Edit Task), or set the status of this task to resolved in case this task is done? Thanks! :)

No reply, hence I reset the Due Date.

@Andreg-p I am not sure what do here? Just implement A or do nothing?

Change 751432 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/services/texvcjs@master] Fix rendering of \\omicron and \\Omicron

[mediawiki/services/texvcjs@master] Fix rendering of \\omicron and \\Omicron

I agree with Debenben above that \Omicron should not be changed for consistency with other upper-case Greek letters.

Change 751432 merged by jenkins-bot:

[mediawiki/services/texvcjs@master] Fix rendering of \\omicron and \\Omicron

Locally, with the latest version of texvcjs, my Mathoid unit tests return one failure which I assume is related to this change:

  185 passing (11s)
  1 failing

  1) Run test for all mathjax-texvc commands:
       Run texvc tests
         69 $\Omicron$:

      AssertionError [ERR_ASSERTION]: 69 failed. SVG is different!

Here is the original SVG from the Mathoid unit tests:

Here is the SVG that I get now: (Ignore this, I made a mistake. Instead, see the image below).

@dom_walden are you sure you get a lowercase o? It is possible that we need to adjust the mathoid reference picture, however, it should be uppercase.

@dom_walden are you sure you get a lowercase o? It is possible that we need to adjust the mathoid reference picture, however, it should be uppercase.

Oops, you are right. I made a mistake. Here is what I get when I pass \\Omicron to the mathoid cli (by passing it this json file P28344):

The new one looks good, according to option A. Would you mind changing the test? If you, from the discussion, get another impression of how the \omicron and \Omicron should be rendered we can also revise the decision since participation in the discussion was not very active. It was hard for me to come to a decision in that case.

Change 798387 had a related patch set uploaded (by Dom Walden; author: Dom Walden):

[mediawiki/services/mathoid@master] Update unit tests for Omicron.

Change 798387 merged by jenkins-bot:

[mediawiki/services/mathoid@master] Update unit tests for Omicron.

Change 809135 had a related patch set uploaded (by Dom Walden; author: Dom Walden):

[mediawiki/services/mathoid@master] Update PNG and Markdown files after changes to Omicron.

Change 809135 merged by jenkins-bot:

[mediawiki/services/mathoid@master] Update PNG and Markdown files after changes to Omicron.

Physikerwelt claimed this task.