ymittal / asciimath

AsciiMath to LaTeX converter
0 stars 2 forks source link

Angle brackets #7

Open davidfarmer opened 5 years ago

davidfarmer commented 5 years ago

Inner products are usually written with angle brackets. It looks sort of like this: <u,v> except that the delimiters are not angled as sharply. In TeX it is written \langle u,v\rangle

You might think that AsciiMath would just use the less-than and greater-than signs, but they can't because of their parsing rules. They offer two options: shown here:

<<u,v>> or (:u,v:)

I don't like either of those.

If we insist that the less-than sign, when used as a relation, have spaces around it, then we are free to let people use a more natural input for inner product.

There are various other special uses of < and > that need to be taken into account: <=, >=, =>, <=>, ->, more

Does this seem workable?

ymittal commented 5 years ago

Ah, interesting find. I'd argue that more people use or might prefer no spacing around relational operators (2>3). Inner products are used less frequently than relations, so I think we should look into other ways of supporting inner productions.

I also don't like the Asciimath options. However, I do think that <<u, v>> is a minor yet justifiable inconvenience. What do you think?

davidfarmer commented 5 years ago

Space around equals is official for Python, so that is some precedent.

How about space around relations is highly recommended, but if you put no space on both sides then that will work. Then we can make the inner product work by insisting that the spacing be appropriately asymmetric, as in:

xxxx <xx,x> xxxx

On Sun, 21 Apr 2019, Yash Mittal wrote:

Ah, interesting find. I'd argue that more people use or might prefer no spacing around relational operators (2>3). Inner products are used less frequently than relations, so I think we should look into other ways of supporting inner productions.

I also don't like the Asciimath options. However, I do think that <<u, v>> is a minor yet justifiable inconvenience.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.[AABTULAQTJ7LSZUBCWOYEXLPRS65FANCNFSM4HHED2DQ.gif]