Live data from Hacker News

Reach for Markdown, not LaTeX

blog.jez.io

81–90 of 184 posts

Re: Reach for Markdown, not LaTeX

#81
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…

Mike, great job on Observable and thanks for all your work on D3 as well! I read through the whole thread about observable that was on hacker news a couple weeks ago, but I didn't see an answer to a question I have. Are there any plans to allow observable to be run locally like a jupyter notebook? Like an app or anything. Even if the site was like a progressive web app that could be nice.

I know observable as a whole is not open-source so I understand this may not align with the best interests of the company. Also observable is fairly new so I'm sure you have a lot higher priority features on the release radar. I honestly wouldn't mind paying for an application even if it was an electron app.

Anyways good luck with Observable! I think its a great notebook format with a great API.

Re: Reach for Markdown, not LaTeX

#82
post #48

Earlier quoted context omitted.

Not many go into LaTeX "loving it". Many of us try Word first, and are just unhappy with its output. If you need something that is well typeset and don't want to spend a few $10k on professional typesetting software, LaTeX fits the bill well. Everything else about LaTeX is a pain, not a joy. Is a lot of documentation written in LaTeX? I would never use it for that. Paper that is going to be submitted to a conference?…

Back to my CS undergrad days, I wrote my assignments in LaTeX. It can handle practically every CS nerds: Complicated math expression? Check. Displaying beautiful pseudocode? Check. Binary tree? Check. Karnaugh map? Check. Etc etc. Probably you've heard that only real men write LaTeX using plain text editors. I'm not a real man enough, so IDE like TeXnicCenter or Texmaker is needed :p These days, personally I use Pand…

I used Texniccenter also, but I don't find that I use any of the markup help, I just like the syntax highlighting (these days I just use vscode). I try not to do anything complicated with LaTeX anymore, its just never worth the trouble.

Re: Reach for Markdown, not LaTeX

#83

Earlier quoted context omitted.

I'd also add that while Markdown and LaTeX can do some of the same things, they're designed toward very different tasks. I've used both numerous times in my career, and I can't remember a case where it's been ambiguous which tool was more appropriate for the task. If it's going to be printed, you probably want LaTeX. If it's going to be rendered to a screen, you probably want Markdown. If it's going to be rendered to…

If you haven’t tried it yet, I encourage you to give Markdown + Pandoc a try for printed docs. Pandoc can take a LaTeX template and flow Markdown into it. I find Markdown formatting simpler to remember and execute than LaTeX, and there are a huge number of editors and live-preview apps that will let you validate your Markdown as you write. A few keystrokes, and you get a beautiful PDF document, flawlessly typeset in…

Makefiles address that.

     make html pdf
This one has many OSXisms & wants some homebrew bits, but may give you a starting point:

https://pastebin.com/raw/H43MKTCq

Referenced utility script:

https://pastebin.com/raw/J6quT7Mj

Re: Reach for Markdown, not LaTeX

#84
post #26

Author here! I'd like to take a second to point out that the audience I had in mind when writing this article was mostly my fellow classmates in college. In school we were hastily introduced to LaTeX freshman year and were required to typeset our homeworks before submission. The point of the article isn't "you should never use LaTeX" but rather "hey, there's this other, simpler tool that you might like better!" plus…

I was also required to typeset homework for some classes in college, but I used LyX [1] instead and never really learned how to typeset a whole document. I picked up the equation syntax though. [1] http://www.lyx.org/

LaTeX equation syntax is a gateway drug to heavier typesetting systems. I also started out at maths pastebins when wanting to explain things to others in a readable way.

Re: Reach for Markdown, not LaTeX

#85
post #26

Author here! I'd like to take a second to point out that the audience I had in mind when writing this article was mostly my fellow classmates in college. In school we were hastily introduced to LaTeX freshman year and were required to typeset our homeworks before submission. The point of the article isn't "you should never use LaTeX" but rather "hey, there's this other, simpler tool that you might like better!" plus…

I'm a bit confused by this. As I see it, LaTeX can do everything that Markdown can before things get complicated. Where LaTeX does get complicated (e.g. when designing figures or drawings), Markdown doesn't offer any advantage or even any functionality. For composing simple documents or outlines and doing typesetting of equations, LaTeX has some boilerplate but it's really not that much.

I'm not sure... I think you raise a good point, and I would have the same thing as you before I started writing in Org and exporting to LaTeX, instead of a) writing in LaTeX directly, or b) drafting/outlining in Org and rewriting the final copy in LaTeX. Now I think exporting from Org is so much easier.

Re: Reach for Markdown, not LaTeX

#86

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 shoul…

I'm not in a science department; we have hard requirements to hand in Word documents at times. It hurts my soul.

Re: Reach for Markdown, not LaTeX

#87
post #26

Author here! I'd like to take a second to point out that the audience I had in mind when writing this article was mostly my fellow classmates in college. In school we were hastily introduced to LaTeX freshman year and were required to typeset our homeworks before submission. The point of the article isn't "you should never use LaTeX" but rather "hey, there's this other, simpler tool that you might like better!" plus…

I'd also add that while Markdown and LaTeX can do some of the same things, they're designed toward very different tasks. I've used both numerous times in my career, and I can't remember a case where it's been ambiguous which tool was more appropriate for the task. If it's going to be printed, you probably want LaTeX. If it's going to be rendered to a screen, you probably want Markdown. If it's going to be rendered to…

I've done the latter, but basically it's been luck that the program I used (Pages 09) works for print, and also copy/pastes decent html.

Currently jerry-rigging a script to get html out of it by pasting the scrivener and exporting, while keeping pages 09 for print.

It....works, but I would not recommend it unless you have a clear reason to do both. And I'd recommend another program, as pages 09 will eventually be made incompatible on mac.

Re: Reach for Markdown, not LaTeX

#88
When I prepared my master thesis some years ago, I needed to extract parts of the main materials to build another small book that contained only the main ideas, theorems and proof highlights. \LaTeX and it's programming interface really helped as I could define a new environment for example

\begin{shipboth} contents for both thesis and the small book \end{shipboth}

This is an example of making things DRY. How can I do the same with Markdown (and their tools)?

(Well I rarely use \LaTex today; my R\'esum\'e was typeset in \LaTeX and it helped me to get a good job but when it has so many things I just write them in a .odt file)

Re: Reach for Markdown, not LaTeX

#89
post #55

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.

I use RStudio with `knitr` when it is the wrong tool, because it is just too easy to make something that is easy to read and people think I put a lot of effort into formatting. I do have a few templates that I use so that the text isn't always Computer Modern, but it is mostly a mix of Markdown, Latex math, and features from R like `kable` for making tables. I even tend to plot graphics into the text using R, rather…

This is what I do, too, except I use Org instead of knitr, because it lets me embed many more languages than just R. I should finish the blog post about this at some point...

Re: Reach for Markdown, not LaTeX

#90

Earlier quoted context omitted.

Wow, this is just so far off the mark I don't even know where to begin. LaTeX excels in three areas that are crucial for writing complex documents -- cross references, citations, and indexing. You clearly have not had to endure the house of horrors that is the MS Word ToC, or trying to get autonumbering working as you wish for sections, figures, and tables, or managing a large (100s of pages) multipart document, or a…

I thought Latex was superior to Word in every way than I had a colleague that knew Word. Word if you learn it is just fine generating a ToC or autonumbering sections, figures, and tables. In practice, Markdown is better than either for documentation that isn't printed. It's easier to edit, can be viewed with a plain text editor, and has a minimal learning curve.

> I thought Latex was superior to Word in every way than I had a colleague that knew Word. Word if you learn it is just fine generating a ToC or autonumbering sections, figures, and tables.

No, it doesn't work well even if you know what you're doing. It's much better than when blindly trying to hack your way through, but there are still so many weird quirks it does which you always have to spend a lot of time on.

Post reply on HN