Page MenuHomePhabricator

enwiki:Ordered_weighted_averaging_aggregation_operator parsing failing for Mathoid
Closed, ResolvedPublic

Description can be displayed with the old PNG mode, but three formulae on the page fail to parse with Mathoid.

Event Timeline

mobrovac added a project: Math.
mobrovac added a subscriber: Physikerwelt.

. @Pkra is this a known problem?

This is expected behavior since the LaTeX markup is incorrect. LaTeX also throws error though modern LaTeX installations will likely ignore the misplaced limits and render the result.

The problem lies in the wrapping braces around the mathop (e.g., {\mathop {\max} }\limits), which ends the scope of \mathop, leading to misplaced \limits The desired markup is probably \mathop {\max}\limits which renders fine in MathJax and LaTeX.

@Pkra I'm not entirely sure, if I understand the problem. Can you update the marup on the page, in a way that the \limits of \vee are under the \vee symbol?
The formula in question starts with \mu_G(x)=...

$\mu _{G} (x) = \mathop{\vee}\limits_{\alpha :x \in \Phi _\alpha \left( {A_\alpha ^1 , \cdots ,A_\alpha ^n } \right)_\alpha } \alpha$

A simpler test case is

\mathop A\limits_a^b

a fix is to replace the \mathop with operatorname, which displays the limits above and below the A. If we look at what we get from LaTex

which render slightly differently. In our system the \operatorname version renders like LaTeX's \mathop version.

In our system the \operatorname version renders like LaTeX's \mathop version.

I'm wondering if the problem is texvc. Could it be that it turns something like \mathop A\limits_a^b into something like {\mathop{A}}\limits_a^b?

The OP had things like {\mathop {\max} }\limits_a^b being passed to mathoid / mathjax-node. As I mentioned, that's actually invalid LaTeX and real LaTeX will issue a warning but then ignore \limits -- yet MathJax is not so gracious. So in the end the old (real LaTeX) PNG generator turned {\mathop {\max} }\limits_a^b into {\mathop {\max} }_a^b (which, as you point, looks like using operatorname) so if there is a problem in texvc it never showed.

@Pkra as you expected \mathop A\limits_a^b is beeing transformed to {\mathop {A}}\limits _{a}^{b}.

Let's investigate what LaTeX does:

    \item \verb|\mathop A\limits_a^b|: $\mathop A\limits_a^b$%
    \item \verb|{\mathop {A}}\limits_{a}^{b}|: ${\mathop {A}}\limits _{a}^{b}$%
      \textbf{error}:``Limit controls must follow a math operator.''%
    \item \verb|{\mathop {\max} }\limits_a^b|:${\mathop {\max} }\limits_a^b$%
      \textbf{error}:``Limit controls must follow a math operator.''%
    \item \verb|{\mathop {\max} }_a^b|: ${\mathop {\max} }_a^b$%

^^Is exactly what @Pkra explained above. However, I'm still unsure how to alter texvc(js) in a way that the brakets are inserted correctly.

OK. I thik I fixed it see
@mobrovac can you have a look?

Merged and deployed. The page seems to load fine now after purging. Resolving. Thank you @Physikerwelt and @Pkra for figuring this one out!