metanorma / metanorma.org

Official Metanorma website
https://www.metanorma.org
MIT License
7 stars 7 forks source link

AsciiMath page: how to represent "text" in equations #137

Closed ronaldtse closed 5 years ago

ronaldtse commented 5 years ago

if the user writes (by accident) an additional quotation mark in math mode, like this: stem:["some text""] (notice the additional quotation mark at right) the compiler doesn't generate a new output (and doesn't tell you what went wrong).

It happenned to me, and it took me a while to discover where the error was. So, I thought it could be helpful to spread the info.

We should explain the AsciiMath syntax on metanorma.com, especially since it somewhat differs from asciimath.org in implementation.

Originally posted by @manuel489 in https://github.com/metanorma/metanorma-standoc/issues/128#issuecomment-537735750

opoudjis commented 5 years ago

... in fact, this is documenting the Asciidoctor/Asciimath gem, which is not our job, it's Asciidoctor/Asciimath's.

Failing that, perhaps someone other than me can peruse the Asciidoctor/Asciimath source code, and write this up.

opoudjis commented 5 years ago

So, this task is to add a page to metanorma.com, documenting the differences between AsciiMath as documented on http://asciimath.org, and AsciiMath as implemented in https://github.com/asciidoctor/asciimath, which is what we use. It will involve going through the code, and listing the AsciiMath commands that are not included in asciimath.org, such as the font commands like ii.

It also should document common gotchas. (A longstanding gotcha: the asciidoctor/asciimath parser is more insistent than the asciimath.org parser about needing to include parentheses in expressions to group parts of it: I found that very early on with fractions.)

This is a page that will be included under author/ref/.

strogonoff commented 5 years ago

Just to chime in for a bit—yeah, if it’s in reference-like format then it should be under author/ref. I’d recommend using existing references (document attributes namely) as a framework for how to structure the new page.

tgolubev commented 5 years ago

Hi All! Here is my attempt to document the differences:

Differences between asciimath.org and https://github.com/asciidoctor/asciimath/blob/master/lib/asciimath/parser.rb:

Operation Symbols:

parser.rb:

asciimath.org:


Miscellaneous symbols:

Missing from asciimath.org:


Relation symbols

Missing from asciimath.org:


Logical symbols

All are the same.


Grouping brackets

Present in asciimath.org but not in parser.rb:


Arrows

All the same


Accents

Missing from parser.rb:


Greek letters

Lots of capital greek letters missing from asciimath.org:


Standard functions

All the same


Font commands

Missing from asciimath.org

opoudjis commented 5 years ago

OK, thank you for this.

I need this comparison turned into an Asciidoc page to be added to metanorma.com; please work with @strogonoff to do so:

So, this task is to add a page to metanorma.com, documenting the differences between AsciiMath as documented on http://asciimath.org, and AsciiMath as implemented in https://github.com/asciidoctor/asciimath, which is what we use.

opoudjis commented 5 years ago

@tgolubev I am concerned that I have not heard back from you on this task in the past week. I have created a page for you to populate with the required information, in branch feature/asciimath : https://github.com/metanorma/metanorma.com/blob/feature/asciimath/author/ref/asciimath.adoc . Please populate it as requested with specifics of the differences between asciimath.org and Asciidoctor Asciimath.

tgolubev commented 5 years ago

@opoudjis I have copied over the differences to asciimath.adoc, but I am not sure about the desired formatting since I am not familiar with Asciidoc formatting. I apologize, but it seems that it would be more efficient if someone skilled with Asciidoc does the final formatting. (My skills with math editing are in LaTeX.)

opoudjis commented 5 years ago

Ok, thank you, I'll take it from there.