Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a easier / clearer syntax like Markdown that can compile into LaTeX?

I love LaTeX. Let's get that straight right off the bat.

The only thing I'm wishing for is a clearer syntax that compiles into LaTeX, like Markdown for HTML. This is because most of the simple document creation that I do (like taking notes in class), could be faster and improved if I could just type 1/2 instead of \frac{1}{2} and it compiles it into a neat fraction. I know about and use AucTeX, and it makes for faster typing, but it's still not very clear and more prone to syntax errors in general.

If such a simpler syntax exists that compiles into LaTeX, please tell me in the answers below. If there is nothing satisfactory, I would love to start an open-source project towards this goal, but I would like to know of existing alternatives first.

like image 234
Chetan Avatar asked Oct 04 '10 00:10

Chetan


2 Answers

A Markdown to LaTeX script exists for the Markdown in Python Markdown implementation. There is another extension called mdx_math that allows inline LaTeX math. The Haskell Markdown to whatever converter, Pandoc, can have inline LaTeX math and can export to LaTeX. There are probably others in the Markdown family. However, none of these (AFAIK) give an alternate syntax for doing math.

There are a few mathematical markup languages according to Wikipedia. Although it is written in JavaScript, you might be interested in ASCIIMathML.

You will probably need to write something yourself, but a Markdown extension looked for blocks that used a clean syntax (like ASCIIMathML) would be neat.

like image 153
David Johnstone Avatar answered Dec 08 '22 00:12

David Johnstone


If you think only about the simplest cases, you're going to be in for a world of hurt. \frac{1}{2} is waaay too simple.

What would you use for your simple syntax for each of the following:

\frac{1}{x + 1}

\frac{1}{x} + 1

\frac{x^2}{x + 1}

x^\frac{2}{x + 1}

\frac{x}{{x + 1}^2}

\frac{x}{x + 1}^2

I'll be very surprised if your first attempt doesn't include several duplicates (conflicts).

like image 30
Ben Voigt Avatar answered Dec 08 '22 00:12

Ben Voigt