Giter Site home page Giter Site logo

Comments (6)

mpickering avatar mpickering commented on September 24, 2024

As far as I'm aware \to and \rightarrow are exactly the same character?

http://tex.stackexchange.com/questions/19185/which-one-should-be-used-in-limit-rightarrow-or-to

Attached is a picture of them both rendered on my system.

limrightarrowto

On Mon, Jul 21, 2014 at 11:04 AM, Jesse Rosenthal [email protected]
wrote:

ping @mpickering https://github.com/mpickering

ESymbol Rel \8594 is interpreted as \rightarrow in limits. But for the
LaTeX to be typeset correctly, it should be translated to \to:

let Right x = readTeXMath "\lim_{x \to \infty} y"
x
[EDown (EMathOperator "lim") (EGrouped [EIdentifier "x",ESymbol Rel "\8594",ESymbol Ord "\8734"]),EIdentifier "y"]
toTeXMath DisplayInline x
"{\lim}_{{x}\rightarrow \infty }{y}"

This probably only needs to be implemented for

EDown (EMathOperator "lim") ...

although there might be some uses for implementing it for

EDown (EMathOperator s) ... | s elem ["lim", "max", "min"]

(That would take care of the main things that should be typeset like that,
even if off the top of my head I can't make any useful sense of "max as n
approaches...")

I'd submit a pull request, but I'm not sure of the workflow here. @jgm
https://github.com/jgm -- would you prefer these things go through your
pr queue, or to maintainer and then up to you, kernel style?


Reply to this email directly or view it on GitHub
#32.

from texmath.

jkr avatar jkr commented on September 24, 2024

Yes -- you're quite right. I'd been laboring under a misapprehension for a while (thought they were the same char, but the TeX functions behaved differently in this case). Apologies.

That being said, I think there is a problem here. The way that toTexMath wraps the EMathOperator "\lim" in braces makes it not do the correct thing with the arrow underneath. That's what I had mistakenly attributed to the wrong character

Compare the output here

\documentclass{article}

\begin{document}

$${\lim}_{x \rightarrow 2} y$$

$$\lim_{x \rightarrow 2} y$$

\end{document}

from texmath.

jkr avatar jkr commented on September 24, 2024

Oh -- and I've been so busy switching over to it that I forgot to mention -- awesome work!

from texmath.

mpickering avatar mpickering commented on September 24, 2024

Ok, I'm unsure about the best way to fix this easily. The problem without
the braces is that if \lim is followed by any alphaNum character (for
example \lima) then the command isn't recognised. Adding a space afterwards
doesn't work either for obvious reasons. Maybe it would be worth checking
for the special case when a math operator is part of a super/subscript?
Would that work?

On Mon, Jul 21, 2014 at 2:10 PM, Jesse Rosenthal [email protected]
wrote:

Yes -- you're quite right. I'd been laboring under a misapprehension for a
while (thought they were the same char, but the TeX functions behaved
differently in this case). Apologies.

That being said, I think there is a problem here. The way that toTexMath
wraps the EMathOperator "\lim" in braces makes it not do the correct thing
with the arrow underneath. That's what I had mistakenly attributed to the
wrong character

Compare the output here http://commonmeasure.org/%7Ejkr/foo.pdf

\documentclass{article}

\begin{document}

$${\lim}_{x \rightarrow 2} y$$

$$\lim_{x \rightarrow 2} y$$

\end{document}


Reply to this email directly or view it on GitHub
#32 (comment).

from texmath.

jkr avatar jkr commented on September 24, 2024

Hmm... well, it looks like it goes beyond EMathOperator. \sum (and prod and so on, I'd imagine) produce the same issue with ESymbol Op .... So, yeah, it does seem to need to be something in the way you handle EDown, EUp and EDownup. Maybe have a special braceless version that these functions call out to? Or a "wrap" bool or something? (I haven't looked closely enough to see how it's done.) There should always only be a _ or a ^ after the operator in the output of these types, so it shouldn't be a problem.

from texmath.

jgm avatar jgm commented on September 24, 2024

+++ Jesse Rosenthal [Jul 21 14 03:04 ]:

I'd submit a pull request, but I'm not sure of the workflow here.
[2]@jgm -- would you prefer these things go through your pr queue, or
to maintainer and then up to you, kernel style?

Best to go through @mpickering first. He's the one who really knows
this code.

from texmath.

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.