Code Monkey home page Code Monkey logo

Comments (3)

dginev avatar dginev commented on August 15, 2024 1

Right, good point. I think we can safely agree that the reversion is incorrect here - as you show it leads to an incorrect rendering.

So a fix that uses a proper reversion attribute on that DefMacro would be one possible healthy upgrade.

from latexml.

dginev avatar dginev commented on August 15, 2024

Based on discussions in some previous issues (#2092 (comment)), I don't think you should have the general expectation that the tex attribute will always retain the original TeX from the document source.

It's both technically a difficult question to solve in general, as well as a bit out-of-scope for LaTeXML's main purpose, which is conversion to structured formats.

We could patch this individual macro you've reported, adding an appropriate reversion directive in the binding here:

DefMath('\lx@braket@V{}{}', '\langle#1\,|\,#2\rangle',
meaning => 'inner-product',
alias => '\braket');

But this is certainly going to be just one of many possible cases where the tex attribute will not match up with the source file.

from latexml.

GregDMeyer avatar GregDMeyer commented on August 15, 2024

got it, thanks!

Just to clarify---in this case the math $\braket{a}{b}$ is not even equivalent to the original math:

\braket{a|b}: $\braket{a|b}$
\braket{a}{b}: $\braket{a}{b}$

Should I have an expectation that compiling the tex attribute as math should not even match the original output?

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.