13 ms·
Reach for Markdown, not LaTeX
- j7ake 9y agoI would like to see somebody write their PhD thesis in markdown.
- psergeant 9y agoI wrote my MSc dissertation in Markdown
- black_knight 9y agoI did! My maths phd thesis was written in markdown.
- gervase 9y agoI don't think most people are reaching for LaTeX to write to-do lists or other ephemeral notes (which can be pretty effectively written just in .txt), but because they'll need some feature that is simple in LaTeX but difficult or impossible elsewhere. However, I doubt anyone who argue with a modified premise of "Reach for Markdown, not LaTeX, when writing blog posts." But that wouldn't produce as many clicks, either.
- deleted 9y ago[deleted]
- OberstKrueger 9y agoIs that not what it says? The last sentence of the first paragraph is "By reaching first for Markdown, then for LaTeX when necessary, writing is easier and more enjoyable", which would be that premise but applied to any situation where LaTeX is overdoing things.
- lou1306 9y agoI do reach for Markdown/Pandoc whenever possible, but on longer documents one will end up using lots of LaTeX tricks to get the job done (newcommands, subfigures, or that strange package that respects the typesetting conventions of your field). Plus, I think Pandoc-based collaboration is still out of reach, as there are simply too many moving parts: the underlying LaTeX distribution, templates, filters, most of them only available through cloning git repositories. So a typical workflow of mine is: draft in Markdown/Pandoc, start adding stuff, but migrate to LaTeX very soon if you notice something is going wrong (also, the Pandoc LaTeX output sometimes needs some tweaking, so it's better to leave Markdown while the document is relatively small).
- nextos 9y agoFor simple stuff, I prefer org-mode. I have great memories of using OmniOutliner on OS X Tiger. The hierarchical nature of outliners is great for structuring thoughts quickly. Org is even better, as it's plain text and has tons of modules for all sorts of crazy things, including kanban or spaced-repetition. And plenty of export options, including many facilitated by pandoc, literate programming, etc. I do use LaTeX, but I have a love-hate relationship with it. Lots of LaTeX packages don't compose well, and there are tons of pitfalls. But there are beautiful parts too, like TikZ or Memoir. I'd be happier with TeX, but few people use that.
- ggm 9y agoWriting can have two goals. Sorry three. Firstly, to communicate with yourself: the subclasses being taking notes and "thinking aloud on paper" The other goal being to communicate with others. Markdown is good for both. Sorry all three.
- taeric 9y agoIf you are just reaching for something to jot notes and whatnot, you could do worse than looking at org mode. Pandoc is nice, but I have yet to find that a simple export from org doesn't get me most of where I want to go.
- SAI_Peregrinus 9y agoMarkdown 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.
- eevilspock 9y agoMany 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.
- behindmyscreen 9y agoThe 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.
- k_bx 9y agoYou can definitely do that in Typora (unless I miss something what exactly you meant).
- behindmyscreen 9y agoWhen I think of WYSIWYG editors, I see presentation and content being mixed. Unless Typora has figured out how to get remove the need to locate the insertion point of a formula, open an editor, then submit the data to render an image that is placed inline or made into a block. If it has figured that part out then props to them for making it easier to write mathematics in an accessible editor.
- 9y ago
- mbostock 9y agoWe 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 etc. More examples here: https://beta.observablehq.com/@mbostock/measuring-color-difference https://beta.observablehq.com/@mbostock/measuring-color-diff... https://beta.observablehq.com/@mbostock/introduction-to-html https://beta.observablehq.com/@mbostock/introduction-to-html
- dunham 9y agoI 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.
- mbostock 9y agoWell, it’s nice that you can always define your own tagged template literal. ;) The double backslashes certainly are annoying. We may be able to eliminate them by using String.raw. https://github.com/observablehq/notebook-stdlib/issues/10 https://github.com/observablehq/notebook-stdlib/issues/10
- dunham 9y agoI just saw that pop up on the front page of observablehq. That resolves another pain point for me. (My first experiment with the platform happened to have a lot of math exposition in it.)
- johnsonjo 9y agoMike, 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.
- NewEntryHN 9y agoLaTeX for scientific documents, Markdown for lightweight text documents, and ODT from a text editor for everything else.
- fmntf 9y agoGiven how easy the markdown specs are, it is unbelievable how different the text is rendered using different engines.
- GhostVII 9y agoThe text is rendered with CSS, so you should be able to specify whatever rendering style you want using something like Pandoc.
- behindmyscreen 9y agoI 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.
- megaman22 9y agoI really wish I had bitten the bullet and learned LaTeX in college. At the time, trying to actually write a research paper start-to-finish in Word was too painful, too prone to crash and lose data, and badly incompatible with using version control (CVS and SVN, at the time), and so I settled on a process where I'd write the whole thing in plain-text, and insert my citations in inline parentheses, then when I was all done, have to go back and try to format the thing in Word with proper footnotes and formatting. More than a few times, it took nearly as long to get that post-processing right for printing than it did to actually write the paper.
- beefhash 9y agoI'm not in a science department; we have hard requirements to hand in Word documents at times. It hurts my soul.
- wolph 9y agoRestructuredText 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.
- imron 9y ago> RestructuredText has generally worked nicer for me that Markdown Agree. As soon as you want to start having references to other parts of your document(s) RestructuredText wins out over Markdown.
- Tenobrus 9y agoThis is why I reach for Org mode.
- arca_vorago 9y agoReach for emacs org mode, then export to whatever and if you really have to use pandoc.
- jez 9y agoAuthor 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 some starter templates to make the transition easier. Importantly, I encourage everyone to use the tools that they feel most comfortable using!
- username223 9y agoInteresting, and a bit surprising. Back in the Triassic Age, I picked up LaTeX from an undergrad roommate because it was easier than writing up homework by hand, and because you can turn a basic ".txt" file into a ".tex" file with very few changes. I agree that Markdown and friends have their place, but they quickly reach their limits. You write that "Pandoc can take care of the presentation for us," but in my experience, Markdown and such will only get you as far as "good enough." If you want to typeset complicated equations, or print something more complicated than a novel, you need more powerful tools.
- deleted 9y ago[deleted]
- Tarean 9y agoYou can write markdown and pandoc will leave any latex fragments for the backend. This only works for latex based backends like pdf but it works great if you have some formulas. Code formatting and tabels are also vastly easier with pandoc.
- username223 9y agoYeah, LaTeX tables are a pain, so I usually generate them with a script and include them via "\input{...}". But I've come to rely on TeX macros to generate repeated things like fancy chapter intros, and on packages to customize page headers, etc. This stuff is not necessary for a homework assignment, but I doubt it's as easy to accomplish in Pandoc. On an unrelated note, I hadn't checked out Pandoc's output in awhile, and this bit from http://pandoc.org/demo/example13.pdf http://pandoc.org/demo/example13.pdf looks pretty bad: https://i.imgur.com/Kxy4mic.png https://i.imgur.com/Kxy4mic.png . Granted, the terrible word-breaking and spacing is TeX's fault, but typesetting usually seems to require dealing with a few special cases by hand. I wouldn't trust Pandoc, or any other program, to "take care of the presentation" without a bit of hand-holding.
- p4post 9y agoPublishing math formulas (and other non-textual content) with Markdown in KaTex is possible on P4 https://onp4.com/@p4/77z1u https://onp4.com/@p4/77z1u
- azernik 9y agoFor an intermediate choice, I would recommend AsciiDoc [http://asciidoc.org/ http://asciidoc.org/]. I currently use it for some of the more complicated pages on my company's GitHub wiki, and am very satisfied with it. For an example of its usage and look, here [http://asciidoc.org/INSTALL.txt http://asciidoc.org/INSTALL.txt] is the source from which this [http://asciidoc.org/INSTALL.html http://asciidoc.org/INSTALL.html] page was rendered.
- ollin 9y agoUsing Typora for WYSIWYG markdown editing using inline LaTeX and a LaTeX-like theme (http://theme.typora.io/theme/Academic/ http://theme.typora.io/theme/Academic/) has been a nice middle-ground for my most common use-cases of homework and notes. Full LaTeX is wonderful but feels like overkill in many situations.
- vfulco 9y agoReally appreciate this piece. I have been doing more rmarkdown into pdf through pandoc/latex/etc. (yea its complicated but made much easy by the R community) for my English resume editing business. Still wading into Latex to customize docs feels like hieroglyphics. Seems made for grad students with too much time on their hands. The learning curve is steeper than I want or need to to be as an intermediate tool. Addendum: I would really recommend crowd here look at rmarkdown flavored work. There are now a ton of community offerings for resumes/CV/theses even academic journal article templates. Most can be found on github.com and CRAN (the central repository for non-base packages).
- imron 9y agoI found Markdown quite lacking for things like documentation. Restructured Text with Sphinx was similar to Markdown in usage but significantly more flexible (especially references other parts of the documentation).
- bo1024 9y agoI find many of these points unconvincing. All of the pros listed at the beginning also apply to TeX, some arguably better than to Markdown. As far as I can tell, Markdown has several advantages over LaTeX, but these aren't highlighted in the article: * Markdown is easier to learn (at least the basics) * Markdown is more readable when in plain text format * Markdown doesn't require boilerplate/metacode such as package imports * Markdown more easily and naturally renders to HTML (biggest one in my opinion) (I don't particularly find any of these that convincing for my uses except maybe the last one.)
- anh79 9y agoWhen 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)
- gaius 9y agoUse both. RMarkdown + Beamer or something.
- kvm000 9y agoThis is great. I write 100-200 page functional spec documents at a vendor for large scale file based broadcast systems (10-300 linux servers) for a number of customer projects, and have been trying to get away from word since it's slow at that scale and I don't want to spend any time on formatting, and want to get to a templated approach for the others on my team with a consistent output. Currently I'm using markdown with some CSS and just use Marked2 (Mac) to export but don't have it all worked out yet. Markdown + LaTeX + Pandoc is probably better and more powerful or precise than using CSS. I don't use equations but I do use tables a lot and I'm using multimarkdown ascii ones for now (with a nice atom.io auto-format plugin to make it easy to author) and some code blocks with syntax highlighting. The idea is to have a folder per customer/project spec, with a consistent structure of one .md file for the body and a local sub-folder for images (svg workflow(bpmn)/system diagrams mostly, some jpgs for logos, screenshots). The folder would be in a local git repo so we can commit changes and export diffs to see what changed between versions and have multiple people work on the same doc with tracking. I'm using "invisible links" for in-line comments at the bottom of each section that are added while going though it with the customer since it usually takes 5-30 versions before it's finalized and signed off. Those keep a record of discussion with the customer and don't get rendered out in the final output. Also using standard set of status tags (@outstanding, @done, @info) within the comment text. Ex; `[Note: <initials> YYY-MM-DD]: # (comment text @status-tag)`. Going through the in-progress spec with customers and typing notes inline has been much better than word's commenting system and using markdown makes it easy for the customer to read without extraneous formatting code in-line. Currently using a multimarkdown header for variables; customer name, project name, author, author email, spec version, etc., but I might move that to a separate YAML file. Ideally, to make each version of the spec it would be markdown through LaTeX/Pandoc to render a PDF with; - Title page generated automatically using variables (multi markdown header or separate YAML) - Automatic Table of Contents - Automatic header numbering (h1-h6) - Automatic header/footer using variables & auto page numbering - Ability for basic control of image size; 80% width (svg), original pixel resolution (pngs), etc., positioning. - Ability to have global paragraph numbering in sidebar that the customer can reference while discussions are ongoing, and turn that off for final output to PDF. I'm going to spend time with the examples from the original link to try to work that all out but any suggestions or tips would be greatly appreciated. I'd be happy to post an example of the final template and write-up of the approach on GitHub.
- threatofrain 9y agoI imagine many people are already using Latex inside Markdown, a rather nice solution for the quick production of mathematical texts.
- black_knight 9y agoPandoc is really awesome. Even mathematics papers can be written in (mostly) markdown, and then converted to latex before compiling to PDF. For mathematics I would also recommend using Unicode symbols in place of LaTeX commands, which makes the source even more readable. For instance $∏_{x∈X} ∑_{y∈Y} Ψ(x,y) → ∑_{f : X → Y} ∏_{x∈Y} Ψ(x,y)$ instead of $\prod_{x \in X} \sum_{y \in Y} \Psi(x,y) \to \sum_{f : X \to Y} \prod_{x \in Y} \Psi(x,y)$ To get this compiling, your template will have to include declarations for these such as: \DeclareUnicodeCharacter{220F}{\ensuremath{\prod}}
- royal_ts 9y agoBut you can type the second one way easier
- black_knight 9y agoNot really! I use an XCompose file derived from the Plan 9 keyboard setup. So to write ∏ i press my modifer (left shift) button once, and then 'p' followed by 'r'. So it is fewer key presses than \prod (three key presses vs five). I have similar shortcuts for all maths symbols I use regularly. Here is an excerp from the configuration 2200 fa ∀ for all 2202 pd ∂ partial differential 2203 te ∃ there exists 2205 es ∅ empty set 2206 De ∆ increment 2207 gr ∇ nabla 2208 mo ∈ element of (…) 220E qed ∎ tombstone The last one is most sattisfying to type !
- k_bx 9y agoThere's a very simple emacs extension called "pretty lambda", which displays a word "lambda" as a lambda character (but presents as ascii still). I wonder if something like this is possible to do here (of course, the syntax with arguments makes it harder).
- black_knight 9y agoUsing XCompose (see sibling post) has the advantage of working in all programs on X, and producing real unicode.
- setzer22 9y agoThis reminds me very much of the emacs org-mode experience. But the good (bad?) thing about this is that it doesn't require emacs. I was looking for an alternative to recommend to my friends, since having to learn both the new notation and emacs really creates some friction.
- mbid 9y agoI don't get it. Say I already know that I'll need some formulae in my document. Then the use case here seems to be, essentially, that I can write # Section Name instead of \section{Section Name} and that I can write *important stuff* instead of \emph{important stuff}. I can see that the markdown version is a little nicer on the eyes and keyboard, but only by a small margin. Now, if I write a document in latex I need to understand exactly * latex. Latex is a beast, but there are no serious alternatives to typeset formulae. If I want to write markdown with some latex in it, I need to understand * markdown * latex * how pandoc interleaves the two. What if, as will inevitably be the case, something breaks? There will not even be close to as much documentation for the markdown+latex+pandoc stack as for the latex-only stack out there. Is there even a standard for markdown+latex, the pandoc way? Then there's the issue of packages needed to compile. Tex suites are already huge pieces of software. Now I also need to have pandoc. Pandoc is written in haskell, and the haskell stack on arch is a complete clusterfuck. I will not have saved time if I need to understand how to fix pandoc if it breaks after an update. Granted, this is mostly an arch issue, but the point is that the more software you use, the more likely it is that something breaks. The bottom line is that you replace an already complicated piece of software with the exact same piece of software and then something. I find it hard to justify it in this case where there is so little benefit.
- daurnimator 9y agoBut arch has pandoc in pacman. All you have to do is `pacman -S pandoc`
- mbid 9y agoRight, but look at its dependencies. Arch links haskell packages dynamically, so you easily end up in DLL hell.
- daurnimator 9y agoYes it links them dynamically. Why is that a problem? How would that end in DLL Hell? (which is multiple versions of dlls around and different pieces of application using different versions at same time in same process and never being sure what is using what)
- swfsql 9y agoI agree. Had started a project aiming to translate various literature books (no fancy math) into various languages, and markdown makes it a lot easier, for everyone. http://github.com/ancap-ch/from-en http://github.com/ancap-ch/from-en But it's required some regex "replace_all" to be applied when rendering the PDF.