Page MenuHomePhabricator

mhchem
User

Projects

User does not belong to any projects.

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Saturday

  • Clear sailing ahead.

User Details

User Since
Jul 14 2016, 9:38 AM (406 w, 3 h)
Availability
Available
LDAP User
Unknown
MediaWiki User
Mhchem [ Global Accounts ]

Recent Activity

Nov 19 2023

mhchem added a comment to T350737: native:chem expression <chem>A ->[{}\atop\ce{+H2O}] B</chem> fail.

@mhchem what do you think?

Nov 19 2023, 5:43 PM · Patch-For-Review, User-Physikerwelt, Math

Apr 27 2023

mhchem added a comment to T329620: Enable Chem support in TexVC(PHP) for MathML generation.

Hello @mhchem, I just wanted to inform you that I am currently working on a port of mhChemparser in typescript to PHP. I would be happy to get some help from you if you're interested. Let me know if you're available, and we can figure out the details on how we can collaborate on this.

Apr 27 2023, 7:15 PM · MW-1.42-notes (1.42.0-wmf.3; 2023-10-31), MW-1.41-notes (1.41.0-wmf.27; 2023-09-19), Patch-For-Review, Accessibility, Math

Mar 11 2023

mhchem added a comment to T329620: Enable Chem support in TexVC(PHP) for MathML generation.

I suggest these test cases. https://github.com/mhchem/mhchemParser/blob/master/test/test.html

Mar 11 2023, 2:19 PM · MW-1.42-notes (1.42.0-wmf.3; 2023-10-31), MW-1.41-notes (1.41.0-wmf.27; 2023-09-19), Patch-For-Review, Accessibility, Math
mhchem added a comment to T329620: Enable Chem support in TexVC(PHP) for MathML generation.

So, what exactly do you need? An mhchem to MathML parser, right?
I wrote a TypeScript parser, so I would say I have a bit of experience. https://github.com/mhchem/mhchemParser

Mar 11 2023, 7:00 AM · MW-1.42-notes (1.42.0-wmf.3; 2023-10-31), MW-1.41-notes (1.41.0-wmf.27; 2023-09-19), Patch-For-Review, Accessibility, Math

May 11 2020

mhchem added a comment to T184880: texvcjs - Find solution for other commands within \ce.

To summarize it

May 11 2020, 8:08 PM · Math, Texvcjs
mhchem added a comment to T245631: Consider converting texvcjs to a LaTeX sanity checker that does not modify the original input.

that's secure enough

I am not sure what security implications you have in mind. MathJax cannot write to the hard-disk like good-old LaTeX could.

May 11 2020, 7:56 PM · Math, Texvcjs
mhchem added a comment to T245631: Consider converting texvcjs to a LaTeX sanity checker that does not modify the original input.

This was also asked for in the first comment of T140217

May 11 2020, 7:37 PM · Math, Texvcjs
mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

A have to admit that the wrong rendering of \ce{H - C} (as if it were \ce{H-C}) is not the fault of texvcjs removing spaces, any more. It is because the mhchem "legacy" version is still being used. (So, this would indeed be another ticket. Looking forward to switching to MathJax3 T237516).
But formulas with $ are still being modified by texvcjs, as mentioned in the first comment.

May 11 2020, 7:36 PM · Math, Patch-For-Review, Texvcjs

May 5 2020

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

Let me observe that despite this ticket being "resolved", most of the examples in the first post still do not render properly.

May 5 2020, 9:30 PM · Math, Patch-For-Review, Texvcjs

Feb 19 2020

mhchem added a comment to T197842: Deprecate texvc commands conflicting with LaTeX commands used in common packages.

OK. I think we understand the LaTeX commands allowed in MediaWiki quite well.

Feb 19 2020, 8:00 AM · MW-1.35-notes (1.35.0-wmf.27; 2020-04-07), Platform Team Workboards (External Code Reviews), User-Physikerwelt, MW-1.32-notes (WMF-deploy-2018-07-10 (1.32.0-wmf.12)), Patch-For-Review, Math

Jul 24 2018

mhchem added a comment to T197842: Deprecate texvc commands conflicting with LaTeX commands used in common packages.

@Physikerwelt How exactly does that work? What are these "warning information from restbase"?

Jul 24 2018, 6:19 PM · MW-1.35-notes (1.35.0-wmf.27; 2020-04-07), Platform Team Workboards (External Code Reviews), User-Physikerwelt, MW-1.32-notes (WMF-deploy-2018-07-10 (1.32.0-wmf.12)), Patch-For-Review, Math

Jun 10 2018

mhchem added a comment to T195861: Create a committee to improve the math support in Wikimedia projects.

@Debenben Thank you for the mhchem list. Does this include all <chem> and <ce> tags? And all math including \ce{}? (It probably doesn't include <math>\ce H</math>, but they are a no-brainer to me, so we don't need them.) BTW, equations are still cut-off before a containing >. I guess I can't easily run that extraction on my own but would need to ask you if I need an updated list in a year's time?

Jun 10 2018, 5:20 AM · User-Physikerwelt, User-mobrovac, Math

Jun 7 2018

mhchem added a comment to T195861: Create a committee to improve the math support in Wikimedia projects.

@Pkra Exactly! That's why I was asking what update strategy you see.

Jun 7 2018, 7:23 AM · User-Physikerwelt, User-mobrovac, Math
mhchem added a comment to T195861: Create a committee to improve the math support in Wikimedia projects.

@Debenben Your estimation might be right if you compare 'texvcjs + legacy mhchem' (current) with 'legacy mhchem'. I compared 'texvcjs + legacy mhchem' (current) with 'up-to-date mhchem'. The issue is, that users added quite a lot of braces to pass through texvcjs. But braces in mhchem syntax have a (rarely used) special meaning that was not properly implemented in legacy mhchem. I'd be fine to approach this step by step. But the goal should be to use the current mhchem version, at the end.

Jun 7 2018, 6:54 AM · User-Physikerwelt, User-mobrovac, Math

Jun 6 2018

mhchem added a comment to T195861: Create a committee to improve the math support in Wikimedia projects.

Thanks for the <chem> examples. They might not be the best choice semantically, but they show that we have a severe issue with <chem>. I estimate that 90% of all usages will render differently without texvcjs. Users really were creative in their attempts to circumvent unexpected output. I don't see a chance to create an automatic conversion tool (except this tool contains a few generic rules and 900 replacements that fit just one instance). So, I would be very interested, what update strategy you see. If it would be possible to have old and new renderings active at the same time, we could auto-rename all <chem> to <chemold> and then, in a manual process, I (hopefully with a little bit of help by the community) could convert them until there is no <chemold> remaining, at which point it could be switched off.

Jun 6 2018, 7:45 PM · User-Physikerwelt, User-mobrovac, Math

May 30 2018

mhchem updated the task description for T195861: Create a committee to improve the math support in Wikimedia projects.
May 30 2018, 5:30 PM · User-Physikerwelt, User-mobrovac, Math
mhchem added a comment to T195861: Create a committee to improve the math support in Wikimedia projects.

I am in!

May 30 2018, 2:53 PM · User-Physikerwelt, User-mobrovac, Math

Jan 16 2018

mhchem created T185033: Fix texvcjs grammar for X^{2+}.
Jan 16 2018, 7:47 PM · Math, Texvcjs
mhchem created T185027: Bad spacing around \xrightarrow.
Jan 16 2018, 7:27 PM · Math, Platform Team Workboards (External Code Reviews), Texvcjs

Jan 14 2018

mhchem added a comment to T184880: texvcjs - Find solution for other commands within \ce.

Is the wrong rendering of <chem>X + Y + {\alpha}-Z</chem> (where the presence of alpha modifies the rendering of the +) related or is this a separate bug?

Jan 14 2018, 9:04 PM · Math, Texvcjs
mhchem created T184880: texvcjs - Find solution for other commands within \ce.
Jan 14 2018, 9:02 PM · Math, Texvcjs
mhchem added a comment to T184879: Fix \ce grammar with macros above/below texts .

Weirdly enough, this is not reset by opening a new \ce. I strongly suggest, each \ce starts its own grammar parsing.
Example: <math chem>\ce{A + B ->[\text{a}] C + D} \quad \ce{C + D}</math> Both ocurrences of C + D are rendered wrongly.

Jan 14 2018, 7:48 PM · Math, Texvcjs
mhchem created T184879: Fix \ce grammar with macros above/below texts .
Jan 14 2018, 7:44 PM · Math, Texvcjs

Jan 13 2018

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

<math chem>T_{\ce{H2O}}</math> works. (Now, we just have to solve the $ issue and apply an update (legacy=false)).

Jan 13 2018, 5:10 PM · Math, Patch-For-Review, Texvcjs

Jan 12 2018

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

How can we resolve these gaps?

Jan 12 2018, 9:13 AM · Math, Patch-For-Review, Texvcjs

Jan 11 2018

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

Thanks for the new parser. It works fine on Wikipedia.

Jan 11 2018, 10:57 AM · Math, Patch-For-Review, Texvcjs

Jan 6 2018

mhchem created T184355: Update MathJax/mhchem.
Jan 6 2018, 10:23 PM · Math
mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

This is an interesting usage of mhchem's \ce. It is semantically wrong, but the result might be okay.

Jan 6 2018, 9:51 PM · Math, Patch-For-Review, Texvcjs

Jul 14 2017

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

@Pkra Sorry for the confusion. One can use \color, of course. But the option to use it unescaped inside \ce, like in \ce{\color{red}{H2}O}, that's an undocumented feature of mhchem for MathJax. It is undocumented, rarely used, not well tested, possibly inconsistent between different implementations (MathJax, LaTeX, color.js etc.) I'd just omit it for the time being. One can always escape to math mode \ce{$\color{red}{\ce{H2}}$O}.

Jul 14 2017, 8:57 AM · Math, Patch-For-Review, Texvcjs

Jul 13 2017

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

To be honest, I am not sure yet, what the best solution would be. As \color was an undocumented feature anyway, I would leave it out of texvcjx, for now.

Jul 13 2017, 8:50 PM · Math, Patch-For-Review, Texvcjs

Jul 5 2017

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

@manfredschaefer
You mean the line <single macro> ::= '\alpha' | '\delta' | '\mu' | '\eta' | '\gamma' ! ToDo - Complete the list? Just insert all lower and uppercase greek letters.

Jul 5 2017, 11:35 PM · Math, Patch-For-Review, Texvcjs

Jun 11 2017

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

@Physikerwelt @manfredschaefer Could you please contact me via e-mail? I think I could contribute with some valuable hints.

Jun 11 2017, 12:42 PM · Math, Patch-For-Review, Texvcjs

Jun 7 2017

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

If you tell me what you're up to, I could give some feedback. You can contact me via e-mail.

Jun 7 2017, 6:36 PM · Math, Patch-For-Review, Texvcjs

Feb 12 2017

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

To have all options on the table (but I don't know if I would like it):

  1. duplicate the mhchem parser into the texvcjs code base

(The core of MathJax/mhchem is a parser that takes mhchem/ce syntax and converts it into LaTeX syntax. So instead of having "input -> texvcjs -> mhchem.js -> MathJax", one could have "input -> mhchem.js -> texvcjs -> MathJax)

Feb 12 2017, 5:41 PM · Math, Patch-For-Review, Texvcjs
mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

Thanks for the effort. Please be aware that this is not just about whitespace. While whitespace might be the most important issue here, there are a lot of other cases where texvcjs makes it impossible to enter mhchem syntax, e.g. $\ce{^227_90Th+}$.

Feb 12 2017, 2:48 PM · Math, Patch-For-Review, Texvcjs

Jul 19 2016

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

Hi @Physikerwelt! Please be aware that the Grammar I provided is for checking validity of the input, only. I assumed that you are interested in "active" LaTeX tokens (like ^ _ & $ { } \macros etc.), so I focussed on these. But I simplified much by merging letters and digits. So the grammar isn't really a semantic grammar. It doesn't give you the typographic parsing of \ce{CO2 + C -> 2 CO}. In fact, for this particular example, having no active token, the grammar would just find spaces, letters and non-letters and say that it is valid (= whitelisted) input.

Jul 19 2016, 8:34 PM · Math, Patch-For-Review, Texvcjs

Jul 18 2016

mhchem added a comment to T12186: texvc strips whitespace required to render certain macros.

This issue is now handled in https://phabricator.wikimedia.org/T140217

Jul 18 2016, 9:59 PM · Math
mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

@Physikerwelt @csteipp
I created a grammar for checking the validity of \ce arguments.
https://raw.githubusercontent.com/mhchem/MathJax-mhchem-validity-syntax/master/mhchem-strict-simplified.grm

Jul 18 2016, 11:16 AM · Math, Patch-For-Review, Texvcjs

Jul 14 2016

mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

@Physikerwelt Seems I have to learn quite a lot here. I did not even know that texvc's purpose is security. Can you point me to documentation? What threats are you protecting against by removing whitespace as input for a JS package?

Jul 14 2016, 12:03 PM · Math, Patch-For-Review, Texvcjs
mhchem added a comment to T140217: Adjust texvcjs to prevent whitespace modifications in ce-tags.

The description is quite correct. mhchem input syntax is not LaTeX syntax.

  • $\ce{^227_90Th+}$
  • $\ce{X_$i$^$x$}$

Whitespace has a syntactic meaning.

  • $\ce{H-C}$ differs from $\ce{H - O} differs from $\ce{H-}$ (- becoming a bond, a minus operator or negative charge)

Even braces have a synactic meaning.

Jul 14 2016, 9:59 AM · Math, Patch-For-Review, Texvcjs