asciimath / asciimathml

A new home for asciimathml
http://asciimath.org/
MIT License
956 stars 184 forks source link

Logical symbols "and" and "or" #55

Open aslakr opened 8 years ago

aslakr commented 8 years ago

Why is the logical symbols "and and "or"

{input:"and", tag:"mtext", output:"and", tex:null, ttype:SPACE},
{input:"or",  tag:"mtext", output:"or",  tex:null, ttype:SPACE},

and not

<!ENTITY and              "&#x02227;" ><!--LOGICAL AND -->

and

<!ENTITY or               "&#x02228;" ><!--LOGICAL OR -->

ie. the same as vv/wedge and ^^/vee?

drlippman commented 8 years ago

I think it's just because the words "and" and "or" are used fairly commonly in mathematical writing, and it's nice to have them display non-italicized automatically, rather than having to put them in quotes or wrap them in a text tag. That, and the approach of AsciiMath is to have the input for symbols "look like" the resulting symbol, hence the vv and ^^ inputs.

aslakr commented 8 years ago

I just found it odd that this was listed under logical symbols table.

Also shouldn’t then if also be <mtext>?

{input:"if",  tag:"mo", output:"if",     tex:null, ttype:SPACE},
drlippman commented 8 years ago

Hmm. Good question, which I don't know the answer to. It appears the ttype:SPACE causes it to still show up in non-italicized text, but probable the mtext would be more correct, unless I'm missing something.

bvgastel commented 6 years ago

For me, as a computer scientists, the logical 'and' and 'or' are really important. It is a deal breaker for using AsciiMath. Is should possible to implement the "land" and "lor" (logical-and / logical-or) keywords or the "/\" and "\/" keywords? Any drawbacks?

drlippman commented 6 years ago

Can you clarify what symbols you're talking about? Asciimath already supports wedge and vee, which are what I'm familiar with for logical and and or.

bvgastel commented 6 years ago

Totally overlooked the current vv and ^^ symbols (was not expecting them in the 'operation symbols' section), and there was this open issue... So my bad! (and I'm going to happily use AsciiMath for my slides and documents).

saivan commented 6 years ago

Welcome to the dark side of the force! :)

drlippman commented 6 years ago

Ahh, a documentation issue :) We should get the asciimath/asciimath.github.io repo updated to list vee and wedge under logical symbols. I'm happy to make that change, but could use some guidance: are there any other symbols currently listed under operators that would belong better under logical symbols?