Page MenuHomePhabricator

Using \left( ... \right) in <chem> environment: "TeX parse error: Missing or unrecognized delimiter for \left"
Closed, DeclinedPublic

Description

In the chemical formula

<chem>\left( \frac{a}{2}   \frac{b}{3} \right) O</chem>

I get an error TeX parse error: Missing or unrecognized delimiter for \left

A live example is at https://en.wikipedia.org/w/index.php?title=User:Salix_alba/sandbox&oldid=809956844

The error stems from trying to convert the first formula in https://en.wikipedia.org/wiki/Chemical_oxygen_demand to use the chem environment.

Event Timeline

Aklapper renamed this task from \left( ... \right) in <chem> environment. to Using \left( ... \right) in <chem> environment: "TeX parse error: Missing or unrecognized delimiter for \left".Nov 12 2017, 9:53 PM

IIUC, <chem> / <ce> wraps the content in \ce{} to pass it to the mhchem extension (which has a separate parser).

So this would be expected behavior.

IIUC, <chem> / <ce> wraps the content in \ce{} to pass it to the mhchem extension (which has a separate parser).

Confirmed: https://github.com/wikimedia/mediawiki-extensions-Math/blob/acc203d059f42bc92a62867b7d9f55e0eca3b336/src/MathHooks.php#L407

Closing this as expected behavior. Please re-open if I misunderstood the OP.