Live data from Hacker News

Reach for Markdown, not LaTeX

blog.jez.io

11–20 of 184 posts

Re: Reach for Markdown, not LaTeX

#11

Markdown can do quite a lot, but it doesn't have any way to write mathematical formulae. Since that's 90% of why I use LaTeX in most cases it seems silly to recommend Markdown. LaTeX has a superset of features, and is well suited to what it does properly (typesetting). Markdown is quick and easy to use, so it's good for blog posts.

Many flavors of Markdown support math extensions. Many do so in a way that degrades gracefully when the extended Markdown is opened in a standard Markdown tool.

Typora is a great WYSIWYG Markdown editor that uses MathJax to render LaTeX mathematical expressions.

Re: Reach for Markdown, not LaTeX

#12
post #8

We recently added support for embedding LaTeX expressions (and really, any dynamically-generated DOM) within Markdown template literals to Observable notebooks. So you can say md`I like ${tex`\\KaTeX`}`, and KaTeX renders its logo, which is then embedded within the generated Markdown. I’m admittedly biased, but I love the ease of writing Markdown combined with being able to inline arbitrary DOM for math, sparklines e…

I worked around the inline math issue by doing:

    md2 = x => md([x[0].replace(/\$(.*?)\$/g, m => tex([m.slice(1,-1)]).outerHTML)])
I do appreciate you adding support for ${tex`...`}, but it's still a bit more verbose than I'd like to type.

Re: Reach for Markdown, not LaTeX

#15
I used LaTeX all the time at university. It made citation/bib easy, it made writing reports for mathematics way more efficient, and the presentation of the documents were beautiful. I had a prof rave about how nice the my paper looked once when I turned it in.

I wish I had stuck with it afterward. I write enough that it would make my work less painful, but I let the skill laps. This article is making me think I should pick it back up.

Re: Reach for Markdown, not LaTeX

#16

Markdown can do quite a lot, but it doesn't have any way to write mathematical formulae. Since that's 90% of why I use LaTeX in most cases it seems silly to recommend Markdown. LaTeX has a superset of features, and is well suited to what it does properly (typesetting). Markdown is quick and easy to use, so it's good for blog posts.

Many flavors of Markdown support math extensions. Many do so in a way that degrades gracefully when the extended Markdown is opened in a standard Markdown tool. Typora is a great WYSIWYG Markdown editor that uses MathJax to render LaTeX mathematical expressions.

The problem is, if you do a lot of formula writing in a narrative, most WYSIWYG editors that support LaTeX formula rendering are just not efficient. I want to type my thoughts, start a formula block, write my expression, end the block, and continue going. You can't do that in most WYSIWYG editors.

Re: Reach for Markdown, not LaTeX

#17
RestructuredText has generally worked nicer for me that Markdown. Especially when combined with Sphinx you can easily embed LaTeX math structures as well.

Having that said, depending on the scale of the paper I usually tend to go back and forth between RestructuredText and LaTeX. When it's large and might need some fine tuning it's better to use LaTeX, when you simply need to jot something down... no need for the complex LaTeX setup.

Re: Reach for Markdown, not LaTeX

#20

Markdown can do quite a lot, but it doesn't have any way to write mathematical formulae. Since that's 90% of why I use LaTeX in most cases it seems silly to recommend Markdown. LaTeX has a superset of features, and is well suited to what it does properly (typesetting). Markdown is quick and easy to use, so it's good for blog posts.

My problem with LaTeX is that a ton of programmers think it's a good idea to use LaTeX instead of, say, Word or Writer or plain text wrapped at 80 characters or a Wiki for things like process or project documentation.

Programmers love to use LaTeX, because they get to feel like they're doing something exciting like writing a computer program when what they're actually doing something incredibly boring like writing documentation. They get to use the same plain text editor they're familiar with. They get to use the same version control that they use with their code. I've seen programmers try to use many justifications for why LaTeX is important for their doc because LaTeX has some feature that everybody knows they don't actually need to use.

The truth is that unless you have a literal need for actual true typesetting, you should absolutely not use LaTeX for documentation. The reason for this is two fold:

1. "First, you need a properly configured LaTeX build environment," are never, ever the first words that anybody wants to hear when they need to read, update, modify, and manage documentation. Documents that are not going to be published outside the company should never require a build environment.

2. No matter what your job is, you're not going to have it forever and someone will probably be in it after you. If all your documentation is written in LaTeX, then suddenly, "Ability to write, modify, and maintain LaTeX documents," is a mandatory requirement. That's a significantly higher bar than "Ability to write, modify, and maintain Microsoft Word documents." Congratulations, you just added significant complexity to your job for essentially no benefit to the company.

The only time you should favor LaTeX is when you're writing a document that will be published and is essentially entirely text. You're a mathematician or some other discipline and actually need to write extremely complex symbology. You have extremely complex and numerous references to manage. You're writing a high level research paper. Congratulations! You're the intended audience for LaTeX.

If you're a software engineer writing standard documentation, put the text editor down and use Microsoft Word. Documentation is meant to be read by everyone, not make you feel good about being forced to write it.

Post reply on HN