Code Monkey home page Code Monkey logo

Comments (5)

dginev avatar dginev commented on July 16, 2024 1

Thank you for the report. The macro definition of \sfrac in xfrac.sty.ltxml is currently internally expanding to a variant of \nicefrac, which causes the error in the raw latex call - which tries to typeset \nicefrac without nicefrac.sty loaded.

I'm curious what the best fix is here. The current implementation is expediently reusing some internal macros from the nicefrac binding, which leads to the reversion of \sfrac ending up incorrect (as in - missing dependencies).

Edit: And maybe it's also worth stating that this kind of fragility could be expected in any binding which has made the decision to require packages in the .ltxml file that are not required in the original .sty/.cls file. So there is a more general problem to solve beyond the (very nice!) minimal working example.

from latexml.

orbita2d avatar orbita2d commented on July 16, 2024 1

Workaround:

%\usepackage{xfrac}
\usepackage{nicefrac}
\newcommand{\sfrac}{\nicefrac}

from latexml.

orbita2d avatar orbita2d commented on July 16, 2024

I don't know the architecture to suggest anything, but it's not obvious to me why the pipeline for latex->xml would need to be the same as the one for rendering to svg.

The main benefit of using --mathsvg in my view is to be able to do math rendering with all the bells and whistles which latex allows (which MathML/latexml/whatever will not support). So the svg rendering process should be as transparent as possible.

from latexml.

dginev avatar dginev commented on July 16, 2024

@orbita2d

The main benefit of using --mathsvg in my view is to be able to do math rendering with all the bells and whistles which latex allows (which MathML/latexml/whatever will not support).

Well, maybe. But you also have the option to convert to MathML and then use MathJax to render that as SVG as a final step in the browser.

LaTeXML's primary math output format today is MathML, and most of our testing and development work is aimed there. I think the other formats are there for a good reason, but your expectation shouldn't be that they are/will always be better than MathML.

from latexml.

orbita2d avatar orbita2d commented on July 16, 2024

Sure, I'm happy to accept that my preferences are not shared.

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.