Page MenuHomePhabricator

In <chem> equations using a triple bond, # as well as a \circ causes a math syntax error
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Enter the chem formula
  • <chem>C#C\circ</chem>

What happens?:

Error message:
Failed to parse (syntax error): {\displaystyle \ce{C#C\circ}}

What should have happened instead?:

Render correctly. The individual components
<chem>C#C</chem>
:<chem>C=C\circ</chem> both render correctly

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Example on Wikipedia https://en.wikipedia.org/w/index.php?title=User:Salix_alba/sandbox&oldid=1137382089
This came from an equation on https://en.wikipedia.org/wiki/Acetylide

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Physikerwelt moved this task from Inbox to Doing on the Math board.
Physikerwelt added a project: Texvcjs.

Seems to be a bug in texvcjs

physikerwelt@a1 texvcjs % ./bin/texvcjs --usemhchem '\ce{C#C}'
+{\ce {C#C}}
physikerwelt@a1 texvcjs % ./bin/texvcjs --usemhchem '\ce{C=C\circ}'
+{\ce {C=C\circ }}
physikerwelt@a1 texvcjs % ./bin/texvcjs --usemhchem '\ce{C#C\circ}'
S

The good news is, once it passes texvcjs. It is rendered curl -d 'q=\ce{C#\circ C}' localhost:10044/svg > test.svg

An alternative that does work is <chem>C#\begin{math}C\circ\end{math}</chem>

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

[mediawiki/services/texvcjs@master] Allow \circ command in bonds

https://gerrit.wikimedia.org/r/888287

Change 889095 had a related patch set uploaded (by Stegmujo; author: Stegmujo):

[mediawiki/extensions/Math@master] Allow \circ command in bonds in TexVCPHP

https://gerrit.wikimedia.org/r/889095

Change 888287 merged by jenkins-bot:

[mediawiki/services/texvcjs@master] Allow \circ command in bonds

https://gerrit.wikimedia.org/r/888287

Change 889095 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Allow \circ command in bonds in TexVCPHP

https://gerrit.wikimedia.org/r/889095