Code Monkey home page Code Monkey logo

Comments (5)

brucemiller avatar brucemiller commented on August 24, 2024

The postprocessor tries to mockup unattached sub/superscripts
in MathML when parsing has failed, but it doesn't actually attach
them to the anything. The reason it has failed to parse is due to the
zoo of meanings that "|" can have. In your example, it probably
is punctuation (but possibly "divides"); I haven't managed
to get a grammar sorted out that recognizes this case,
unless you've explicitly told it that | is punctuation.
(there are macros in latexml.sty that support this).

I'll have to figure out if it's cheaper to fix the postprocessor
or the parser! :>

from latexml.

worden-lee avatar worden-lee commented on August 24, 2024

zoo of meanings that "|" can have. In your example, it probably
is punctuation (but possibly "divides"); I haven't managed
to get a grammar sorted out that recognizes this case,
unless you've explicitly told it that | is punctuation.
(there are macros in latexml.sty that support this).

In this case it's "given" as in conditional probability, so it's analogous to a comma or semicolon separating function arguments. I'll have a look at using those macros in the paper.

I'll have to figure out if it's cheaper to fix the postprocessor
or the parser! :>

Thanks!

from latexml.

worden-lee avatar worden-lee commented on August 24, 2024

Yes, using \lxPunct{|} does fix the output. Thanks again.

from latexml.

petrelharp avatar petrelharp commented on August 24, 2024

I have a (possibly?) related observation: if the integral is surrounded by mismatching parentheses -- as is necessary when typesetting multi-line formulas -- the limits are also unattached. Here is an example:

\begin{align*}
   X &= Y \times \left[ A   \right. \\ 
    & \qquad \left. + (1/2) \int_0^\infty  B(s) ds \right]
\end{align*}

The following gives the same result:

\begin{align*}
   X &= Y \times [ A  \\ 
    & \qquad  + (1/2) \int_0^\infty  B(s) ds ]
\end{align*}

--p

from latexml.

brucemiller avatar brucemiller commented on August 24, 2024

I guess I'm going to consider that the fix to ticket #144 also fixes
this one....
At least it fixes the symptom; improving parsing will be a long-term
task in LaTeXML anyway! :>

from latexml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.