Giter Club home page Giter Club logo

Comments (4)

drlippman avatar drlippman commented on May 8, 2024

What are you meaning by "in tex mode"?  There is no separate tex mode, unless I'm misunderstanding you.  

The tex attribute in the symbols is used when latex has a different symbol for the equivalent asciimath input. It enables either symbol to be used.  In the case of Lim, typing Lim or \Lim should do the same thing.

-------- Original message --------
From: saf-itpro [email protected]
Date:07/18/2015 11:36 AM (GMT-08:00)
To: asciimath/asciimathml [email protected]
Subject: [asciimathml] Use of the tex property in the AMsymbols object (array) (#38)
In ASCIIMathML.js file some tex property values below are clear to me: For example in the following portion of the AMsymbols, inputs alpha , beta, ...,delta in the ASCIIMathML mode will be same as in the tex mode but the input epsi in the ASCIIMathML mode is epsilon in tex mode. I assumes text:null means the ASCIIMathMl input and the text inputs are the same.

But for the case of "Lim" shown under "standard functions" below, the "Lim" does not work in the text mode. I may be misunderstanding the tex property defined in the AMsymbols. Please help. Thanks..Saf

var AMsymbols = [
//some greek symbols
{input:"alpha", tag:"mi", output:"\u03B1", tex:null, ttype:CONST},
{input:"beta", tag:"mi", output:"\u03B2", tex:null, ttype:CONST},
{input:"chi", tag:"mi", output:"\u03C7", tex:null, ttype:CONST},
{input:"delta", tag:"mi", output:"\u03B4", tex:null, ttype:CONST},
{input:"Delta", tag:"mo", output:"\u0394", tex:null, ttype:CONST},
{input:"epsi", tag:"mi", output:"\u03B5", tex:"epsilon", ttype:CONST},
............
//standard functions
{input:"lim", tag:"mo", output:"lim", tex:null, ttype:UNDEROVER},
{input:"Lim", tag:"mo", output:"Lim", tex:null, ttype:UNDEROVER},
{input:"sin", tag:"mo", output:"sin", tex:null, ttype:UNARY, func:true},
{input:"cos", tag:"mo", output:"cos", tex:null, ttype:UNARY, func:true},


Reply to this email directly or view it on GitHub.

from asciimathml.

saf-itpro avatar saf-itpro commented on May 8, 2024

David, it's probably an issue of my misunderstanding of tex attribute. I was looking for the LaTeX equivalents of the corresponding ASCIIMath inputs in the symbols array. So if the tex attribute is not null then it is the LaTeX equivalent of the corresponding ASCIIMath input (e.g. epsi vs. epsilon). But if tex is null then that does not necessarily mean that the LaTeX equivalent of the corresponding ASCIIMath input would be the same; for instance, in {input:"divide", tag:"mo", output:"-:", tex:null, ttype:DEFINITION} the tex attribute is null but \divide does not work in ams-LaTeX. Correct?

from asciimathml.

drlippman avatar drlippman commented on May 8, 2024

First off, its worth noting that the symbols array was never intended to be used to convert asciimath to latex (which isn't to say you can't, just it wasn't intended that way so may not be robust)

For the division symbol, the symbol you referenced is a definition entry, which means it provides an alternate input for another symbol.  In this case, you'd need to consider as a pair:

{input:"-:", tag:"mo", output:"\u00F7", tex:"div", ttype:CONST},
{input:"divide",   tag:"mo", output:"-:", tex:null, ttype:DEFINITION},

The second entry says divide is equivalent to -:.  The first says -: in asciimath is equivalent to \div in tex.

-------- Original message --------
From: saf-itpro [email protected]
Date:07/19/2015 11:17 AM (GMT-08:00)
To: asciimath/asciimathml [email protected]
Cc: David Lippman [email protected]
Subject: Re: [asciimathml] Use of the tex property in the AMsymbols object (array) (#38)
David, it's probably an issue of my misunderstanding of tex attribute. I was looking for the LaTeX equivalents of the corresponding ASCIIMath inputs in the symbols array. So if the tex attribute is not null then it is the LaTeX equivalent of the corresponding ASCIIMath input (e.g. epsi vs. epsilon). But if tex is null then that does not necessarily mean that the LaTeX equivalent of the corresponding ASCIIMath input would be the same; for instance, in {input:"divide", tag:"mo", output:"-:", tex:null, ttype:DEFINITION} the tex attribute is null but \divide does not work in ams-LaTeX. Correct?


Reply to this email directly or view it on GitHub.

from asciimathml.

saf-itpro avatar saf-itpro commented on May 8, 2024

David, thank you for helping me understand the structure of the symbols array. -Saf

from asciimathml.

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.