New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infix \vert produces wrong math output #958

dginev opened this Issue Mar 13, 2018 · 2 comments


None yet
2 participants

dginev commented Mar 13, 2018

I have distilled a minimal example from the arxiv-vanity 1603.00788, which (besides some missing package issues, notably glossaries.sty) has some broken equations.

The core problem comes from a redefinition of \mid as:




$p (\mbx\mid\mbtheta)$


The problems are two-fold:

  • First, firefox renders the MathML with the vertical bar as prefix, as opposed to the regular probability syntax in the PDF:

    • Firefox: ffmath

    • PDF: pdftest

    • I haven't checked the mathjax rendering, but there comes part 2 of the issue.

  • Second, the tex attribute is very low-level and out of scope for renderers like MathJax, because of commands such as \leavevmode and \nobreak. This may not be latexml's problem to solve, and could indeed be better addressed by solving #432 , which suggests adding a "high-level macro" math annotation attribute. My minimal example produces a slightly different string, but on arxiv-vanity it is:

    p(\mathbf{\boldsymbol{x}}\leavevmode\nobreak\ |\leavevmode\nobreak\ \mathbf{%

This comment has been minimized.


dginev commented Mar 13, 2018

I should also attach the presentation MathML that I made a FF screenshot for:

      <mo stretchy="false">(</mo>
         <mo rspace="5.8pt" stretchy="false">|</mo>
         <mpadded width="+3.3pt">
      <mo stretchy="false">)</mo>

This comment has been minimized.


brucemiller commented Mar 14, 2018

Ah, simple problem; when I tweaked the grammar to recognize various forms of VERTBAR as infix, I forgot to update the grammatical role so postprocessing would treat it as infix. Fixed now! Thanks for the report.

@dginev dginev modified the milestones: LaTeXML-0.8.4, LaTeXML-0.8.3 Apr 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment