Hacker News new | past | comments | ask | show | jobs | submit login

Sure thing, a quick search yields Asciimath which seems at least at first glance as huge improvement in the syntax department: http://asciimath.org

As for LaTeX in general, Markdown beats it soundly in most aspects.




Honestly, I don't see any difference in difficulty between LaTeX's syntax and Asciimath's one. The former has more backslashes and curly braces where the latter uses spaces and parens.

I personally find LaTeX easier to read because I immediately recognize that a curly brace is not part of the formula but just of its representation, while with Asciimath I'm left to guess if a parenthesis was put just to group a subexpression or if it carries a mathematical meaning. For example:

  \frac{abc}{def}
It's clearly "abc" over "def".

  (abc)/(def)
Is the numerator "abc" or "(abc)"? Parentheses often do matter: does the following describe a derivative of order 2n or a power?

  f^(2n)


Hey, shameless plug. I actually wrote a language derived from AsciiMath trying to fix some of these. I use spaces heavily to derive intentions meaning you can write stuff like:

    abc / def
    f^ 2n
even matrices are straight forward:

    [a, b, c
     d, e, f]
https://runarberg.github.io/mathup/


My favorite part of AsciiMath is the concise matrix syntax and also just using quotes to write normal words:

    (-1)^n = {
        [  1         ,  n " even"  ],
        [ -1         ,  n " odd"   ],
        [ cosn+isinn , "otherwise" ]
    :}

    R(theta) = ( 
      [ costheta , -sintheta ] ,
      [ sintheta ,  costheta ] 
    )
It makes typing simple equations very simple, and if it gets complicated I could always write more explicitly/fall back to latex syntax which it parses as well.

It's kinda similar to the philosophy of Markdown -- make simple things easy and allow an escape hatch for when you need to be unambiguous.


Well\believe\it\or\not,\people\usually\read\text\separated\by spaces\rather\than\backslashes. Wouldn't it make sense to carry that over into a programming and markup languages as well? There's no point in redefining something so ubiquitous unless you have a damn good reason for it, or you're just inflating the learning curve. That goes for all language rules.


You seem to misunderstand the use of \ in LaTeX. It's not a separator, it's used to introduce a keyword.

Everything stems from the need to tell apart the text from the non-textual information, or structure. For example you don't add phrases like "the next word in italics" to mark parts of the document, because the reader will not understand if those are part of the text. Instead you must use either symbols that one wouldn't find in the text, like "*", or well-marked keywords, like "\em" or "<b>". Markdown prefers symbols, which look prettier for pure text, but unfortunately in maths nearly all symbols are already taken. LaTeX opted for keywords and chose a leading "\" to mark them, plus some rarely used symbols like "{" for grouping.

Asciimath uses neither uncommon symbols nor well-marked keywords, but rather words like "int" and common symbols like "(". I find it really confusing. In this way if you read "int", you don't immediately know if it stands for an integral sign or a function called "int" or the product of 3 variables called "i", "n", and "t". And when you find a pair of parentheses you don't know if they are part of the formula or if they were added just to group a subexpression.

I think this is called in-band signaling.

Asciimath does have some good points, though. The use of " to mark elements that must rendered as text and not maths is simple and effective. I tend to use it quite often for things like e (2.72), i (imaginary unit), d (differential) that are not variables and thus should be rendered with an upright roman font, not slanted or italics. LaTeX is worse because it forces you to write {\rm i} or \text{i}.


Nice strawman.


In my experience, LaTeX has the advantage of being able to handle even very complex documents and books. LaTeX can be challenging to master, but in return it can produce amazing results. See some of the references below. In particular take a look at [4] (it's a 1200 page LaTeX document) and consider if it could be written in Markdown and Asciimath. The hundreds of graphics appearing in [4] are also produced by LaTeX--the document is the manual for pgf/TikZ a popular graphic package that is itself a set of LaTeX macros.

[1] https://uva-fnwi.github.io/LaTeX/week2/maths2/

[2] https://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics

[3] https://tex.stackexchange.com/questions/397453/what-are-all-...

[4] https://pgf-tikz.github.io/pgf/pgfmanual.pdf


In my experience of writing my BSc thesis in it, it's an absolute trainwreck to work with, especially with Overleaf. Takes forever to compile, won't ever give you a single useful error message, as for Tikz I'd much rather make a proper svg in literally anything else and then import it.

One can also produce amazing results programming in assembly, but I sure as fuck ain't doing that for anything I actually need to get done.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: