Comments (4)
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.
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.
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.
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.
—
Reply to this email directly or view it on GitHub.
from asciimathml.
David, thank you for helping me understand the structure of the symbols array. -Saf
from asciimathml.
Related Issues (20)
- Inconsistent whitespace sensitivity with numbers HOT 3
- Test environment 'collapses' multiple kinds of whitespace into one HOT 1
- Support more geometry symbols HOT 1
- Support physical units HOT 2
- Vec() crashes updater HOT 1
- An exception occurs when using parseMath!The attribute "mathvariant" is incorrect! HOT 1
- TextMate grammar
- Add ≢ HOT 2
- Support for \mathscr.
- Formal grammar is incomplete
- Add support for ⊈
- support for mathjax 3 HOT 1
- Make comma `,` escapable without making it a text `","` HOT 2
- Please add `∼` (tilde operator) and `≁` (not tilde) HOT 2
- Thousands separator not documented HOT 2
- AsciiMath render intermittently not triggering in dropdown menu on iOS Safari HOT 1
- MathML-Core support shipped by default in chromium 109 HOT 2
- Convert asciimath JavaScript output to PDF
- Fraction bars aren't rendered as text HOT 2
- hyperlinks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciimathml.