Live data from Hacker News

Reach for Markdown, not LaTeX

blog.jez.io

171–180 of 184 posts

Re: Reach for Markdown, not LaTeX

#171

Earlier quoted context omitted.

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

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…

> And point #1 is a complete straw man, setting up a TeX env takes 20 minutes and the basic doc format has not changed since the 1990s at least.

Well, I had to re-encode my documents twice in that time, once to isolatin1, and once to Unicode, because I was writing in Spanish and German. But it was actually fun to figure how to make that translation happen completely automated and happen in a few seconds.

Re: Reach for Markdown, not LaTeX

#172
post #113

Earlier quoted context omitted.

You can definitely do that in Typora (unless I miss something what exactly you meant).

When 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.

For formulas it just re-renders formula as you type it, no WYSIWYG magic where it's over-complicated. For regular Markdown it's WYSIWYG.

Re: Reach for Markdown, not LaTeX

#173
post #166

Earlier quoted context omitted.

> Latex is a beast, but there are no serious alternatives to typeset formulae. People keep repeating this like it's true, but MS Word has had an excellent formula editor for a decade now (the one they shipped before Word 2007 was terribly shitty though). It's wysiwyg (which is fantastic if you're editing a big formula), it supports all math notation I've ever needed, and it has surprisingly decent UX. It even support…

Agreed, there's a great formula editor which is very nice if you want to create math presentations in powerpoint instead of in beamer (and I wouldn't blame you, especially if you're in a hurry). But could you really imagine writing a serious mathematical document (paper, book, thesis) in Word? No Git, no vim/emacs, no plain text? Abandoning the digital lingua franca of mathematical communication? Abandoning the packa…

> But could you really imagine writing a serious mathematical document (paper, book, thesis) in Word?

Yes I could, and I did. My Master's thesis is written in Word and it was pretty heavy on the theory and the formulas. If you're interested it's online on http://e.teeselink.nl/thesis_et.pdf. It's not a particularly stunning thesis in terms of content, but in my humble opinion it's a pretty document, definitely no worse than the average LaTeX-produced thesis.

See eg page 58 (the 70th page of the PDF) for some large formulas. It's not arithmetic but Structured Operational Semantics, but I doubt that matters for this argument. (in hindsight I hate that page and the ones like it - the sheer overload of single-character variables makes it totally impossible to understand)

By the way you said "no git" but Word files can be version controlled just fine - particularly when you're working solo which I was. I used Subversion (hey, 2007) but ok.

I used Word because I noticed in earlier years that LaTeX made my mind drop down into "programmer mode" every time I wanted to accomplish something that was non-trivial. This nerd sniped me and it distracted me from writing the actual content. I ended up with super nice LaTeX themes and definitions and homecooked macros (excuse me for having forgotten the real names these things have in LaTeX, I last used it over 10 years ago), my content sources were super clean, but I spent at least as much time on setting up LaTeX as actually writing. Plus, I found editing large formulas frustrating because I had to find the right place in a fullscreen wall of backslashes and curlies.

Word forced me to focus on the content because everything layout-wise I wanted to accomplish was boring and, mostly, easy.

The only thing that was cumbersome was getting IEEE-style references (i.e. the ones that Bibtex generates by default) to work. It worked out in the end but wasn't as easy as it should be (I noticed that they fixed that since). Also I had zero problems with that thing where Word just doesn't want to do what you tell it to (indents jump, list items suddenly disappear etc, you know the drill) because I only used Word Styles (a bit like CSS classes) and never custom formatting. As long as you stick to that, Word sucks less.

Re: Reach for Markdown, not LaTeX

#174
post #167

Earlier quoted context omitted.

> Latex is a beast, but there are no serious alternatives to typeset formulae. People keep repeating this like it's true, but MS Word has had an excellent formula editor for a decade now (the one they shipped before Word 2007 was terribly shitty though). It's wysiwyg (which is fantastic if you're editing a big formula), it supports all math notation I've ever needed, and it has surprisingly decent UX. It even support…

LaTeX uses a different strategy where WYSIWYG is no advantage. The markup commands tell the computer about the logical structure of the text. This is not possible in a WYSIWYG system precisely because it displays the final result, and intermixing both is a mess. Word is a glorified typewriter, LaTeX is a diligent professional typesetter. Apart from that: Microsoft Word /seems/ easy to use but this is not really true,…

> You also say that Word has been getting better

I didn't say that. Like, not even close, where did you get that from? In fact I haven't noticed a single improvement in Word since 2007 except the installer.

> And to add, I am also pissed by the appearance that Microsoft - not specifically for this comment, but very much in general - seems to follow the strategy to make their commercial products mentioned as much as possible in the context of free and open source software,

I'm seriously bothered that you're accusing me of being a talking head for some multinational corporation. I'm a moderately happy customer, that's all. Our financial relationship is 12 euros a month, from me to them.

If you really can't discuss the merits of software alternatives separately from some big "everybody who disagrees with me is on the enemy's payroll" conspiracy theory, the IMO you already lost the argument.

> As here, somebody who really has medium knowledge on how to use LaTeX will rarely suggest to use Word instead.

I used LaTeX in anger, then noticed that getting comfortably good at it doesn't make it a less shitty experience, and I decided that I preferred Word. Please note that I think that both Word and LaTeX are pieces of shit, I simply think that Word is slightly less shit (or, well, shit in a way that bothers me less and you're free to disagree).

I think the fact that you can't imagine anyone knowledgeable could prefer Word over LaTeX shows a severe lack of empathy and imagination on your part.

Re: Reach for Markdown, not LaTeX

#175
post #139

Earlier quoted context omitted.

But arch has pandoc in pacman. All you have to do is `pacman -S pandoc`

Right, but look at its dependencies. Arch links haskell packages dynamically, so you easily end up in DLL hell.

Yes 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)

Re: Reach for Markdown, not LaTeX

#176

Earlier quoted context omitted.

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

Yup, having a default Markdown doc project that you clone is a big help. That way, you can include a Makefile, as well as embed LaTeX header info. For cases where you really need to share your doc with coworkers in an editable form, you can even define an MS Word target...

That's among the targets here.

Re: Reach for Markdown, not LaTeX

#177
post #98

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 it's going to be rendered to a screen and printed, better start looking for a job, because that project is going down in flames. What makes you say that? I'm just finished up my first published book. The entire thing is in LaTex, which is extremely powerful. With conditionals and macros etc. etc. So I make a print-ready pdf and I'm good to go. I run the whole thing through pandoc and it spits me out an ePub that…

It's mostly a joke. I've worked on a few things that "needed" to be PDFs with links inside them, because the clients couldn't decide whether they wanted a print version or a digital version, and went with "both". I won't write off the idea that it can be done usefully, I've just never seen it result in anything but a bad user experience for both use cases.

I'd agree your use case is a good one for LaTeX.

Re: Reach for Markdown, not LaTeX

#178
post #62

Earlier quoted context omitted.

When you say "rendered to a screen", do you really mean "placed on a webpage"? PDFs generated by LaTeX are rendered to screen all the time. edit: Actually, I find that I completely agree with your point if "printed" is replaced by "shared in pdf format" and "rendered to screen" is replaced by "shared in plain text or HTML format".

You can simplify it even further: Will the content be shown with fixed line lengths, or with responsive line lengths?

I'll have to think about this further, but at first glance this seems like a better heuristic than what I wrote.

There's a little bit of opinion embedded in my original post, which is that PDF is an inappropriate format when intended for screens. It's okay if you're wanting to provide a primarily printed document on the web or in email, it's okay, but if your primary target is screens, PDF provides a pretty poor user experience.

Re: Reach for Markdown, not LaTeX

#179

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…

Why is LaTeX unambiguously better for print? Is it just the support for math notation, or is there more to it? And since "print" very often means a PDF that's also available online, has there been any progress on tagged PDF support in pdflatex or a similar tool? This is important for accessibility.

> Why is LaTeX unambiguously better for print? Is it just the support for math notation, or is there more to it?

LaTeX is techniques and heuristics from hundreds of years of typesetting for print, codified into a program.

HTML is at most 29 years old, and has only supported typesetting of any kind for a fraction of that. What typesetting capabilities it supports are designed by committees, and its primary purpose has always been screen display, never print.

In the simplest/best case, LaTeX will simply produce nicer-looking results for print. In more complex/worse cases, LaTeX can do things that HTML in a browser can't reasonably do at all for print, even with CSS.

> And since "print" very often means a PDF that's also available online, has there been any progress on tagged PDF support in pdflatex or a similar tool? This is important for accessibility.

I can't answer this question directly because it's been a while since I attempted such a thing, but this is largely what I was joking about with the "the project is going down in flames" bit in my previous post. If you are concerned about accessibility, targeting a proprietary format that resists parsing for text-to-speech or fragment translation and doesn't support variable-width lines for screen readers is a bad idea. Tagged PDFs are really just a hacky attempt to fix the problem: HTML was designed with accessibility in mind from the beginning (though admittedly HTML/CSS/JS as used by modern websites do a very poor job of providing accessibility). Maybe there has been progress in adding this to pdflatex, but it's still a bad idea.

Re: Reach for Markdown, not LaTeX

#180
post #167

Earlier quoted context omitted.

LaTeX uses a different strategy where WYSIWYG is no advantage. The markup commands tell the computer about the logical structure of the text. This is not possible in a WYSIWYG system precisely because it displays the final result, and intermixing both is a mess. Word is a glorified typewriter, LaTeX is a diligent professional typesetter. Apart from that: Microsoft Word /seems/ easy to use but this is not really true,…

> You also say that Word has been getting better I didn't say that. Like, not even close, where did you get that from? In fact I haven't noticed a single improvement in Word since 2007 except the installer. > And to add, I am also pissed by the appearance that Microsoft - not specifically for this comment, but very much in general - seems to follow the strategy to make their commercial products mentioned as much as p…

> I didn't say that. Like, not even close, where did you get that from? In fact I haven't noticed a single improvement in Word since 2007 except the installer.

I have /taught/ MS Word 5.0 in 1997 or so, and written large documents (technical translations) in Word 6.0. Given that I had deadlines and I needed to pay our rent, I had really nerve-wrecking experiences when the whole system failed to work in the early morning hours before our dead-line. Well, Windows is more stable today, but usability of MS Word has not improved. All over all, I am saying that the WYSIWYG or "glorified typwriter methaphor" is just plain wrong if you want a consistently formatted large document. Consistency matters, and it is only achievable if standardized styles are applied to pieces of text. At the some time, enormous flexibility is needed, and this is where WYSIWYG fails. Some people here mentioned that formatting text for the web is different from optimum typesetting of paper documents, which have a fixed width. To some extend, this is true. But here is the rub: The fixed-length lines of paper documents, as well as the whole page layout, is optimized for easy reading - as well as everything else, for example the fonts. Of course you can have a web document with arbitrarily long lines. But there is no browser which formats it for good readbility on a 38 inch wide-screen display. It will make lines that are more than 120 characters long, when optimum readbility is at about 65. LaTeX takes care of the latter, that is why LaTeX documents are more readable.

> Please note that I think that both Word and LaTeX are pieces of shit, I simply think that Word is slightly less shit (or, well, shit in a way that bothers me less and you're free to disagree).

If you really know LaTeX well, it is excellent for formatting large technical documents with minimum efforts. You have to learn how to maintain and compile a biliography, and an index, but this is not really difficult with the tools which TeX and LaTeX provide. Admitted, some documents are not worth that effort, but everyone who has worked with a large software or API knows well that once documentation is longer than maybe 70 pages, finding information becomes the real issue. Again, Word is of no help here.

That has nothing to do with empathy. It is a technical question. Maybe word is useful for some rather limited uses, but even for a one-page letter, LaTeX is less fuss if you care about consistent formatting.

> I'm seriously bothered that you're accusing me of being a talking head for some multinational corporation. I'm a moderately happy customer, that's all. Our financial relationship is 12 euros a month, from me to them.

It would be totally dumb to accuse an individual of astroturfing for a company, because it is nearly impossible to prove. (However, actually I have managed to spot at least one paid shill who admitted it later - if you know German, you can read about it [here](https://www.gen-ethisches-netzwerk.de/agrobusiness/umkaempft...).

That said, it is totally obvious that Microsoft is taking influence here (probably by using various intermediate companies) , and the strategy is clearly to mention Microsoft products as often as possible in comments and contributions which appear to be, but are not, from unpaid users. Microsoft is even well-known to do that since a long time, so this is not a outlandish accusation but simply a fact. The desired effect is totally clear as well - if something is mentioned often enough, it becomes familiar, and what is familiar becomes unconsciously associated with "liked" or "proven", and if then people have to make a choice with limited information and under (possibly self-inflicted) time-pressure, they chose what they have heard or seen often. It is exactly how advertising works, and it should just be called as that.

Of course, the solution is not to accuse individual contributors of astroturfing which cannot be proven, but rather to lay out how the product which is promoted is really inferior and a really really bad choice for the task in question. Let's keep it at that level.

Post reply on HN