Code Monkey home page Code Monkey logo

Comments (4)

brucemiller avatar brucemiller commented on July 22, 2024

Those commands are preserved in text, but discarded in math.
It's actually a bit tricky, since the goal is to parse the
math, as far as possible. Even ignoring the fact that spacing
conceivably carries some semantics, their presence interferes
with any remotely writable grammar! So, currently, they
get removed before parsing.

I do have a crude mental model of how they might be preserved:
Rather than throw them out, they would be attached to adjacent
symbols (preceding, following?), carried through the parse,
and then turned into something reasonable during final processing
(eg. mpadded for MathML ?). It really isn't clear that the
padding would be in the right place, though, and needs some thought.

So, this is on the back burner for now....
but I'll leave the ticket open as a reminder; Thanks!

from latexml.

worden-lee avatar worden-lee commented on July 22, 2024

Maybe ?

I don't know anything about MathML really, so I leave it to you.
Thanks for responding!

from latexml.

worden-lee avatar worden-lee commented on July 22, 2024

Also I'm happy to see that spaces inside \text{} are working, so I can get good output from e.g. [f(x)=4\text{ when }x>0]. I don't think that was working in older revisions, which was a big part of my unhappiness about spacing. Or maybe I was using \mbox instead of \text or something...

from latexml.

brucemiller avatar brucemiller commented on July 22, 2024

I finally was able to focus my attention on this one (also).
Basically I needed to accept a workable, even if not-quite-correct,
solution: before we throw away spacing hints, we copy the width
to the preceding token as an rspace; That gets carried through
until it gets converted to presentation MathML, and gets wrapped
by an mpadded when needed. It seems to work.

Sorry for the delay, and thanks for the report.

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.