Live data from Hacker News

LaTeX Makes Me Angry

jmtd.net

91–100 of 103 posts

Re: LaTeX Makes Me Angry

#91
post #62

I personally often go to pandoc markdown. Quick translations to latex. Has first class support for latex packages (just include them in your pandoc's header). TeX like syntax for math with `$\delta$` for inline and `$$x=2$$` for newlines. Subscript/Superscript is `CO~2~` and `e=mc^2^`. A very comfy way to work once you get used to it.

This doesn't support citations or macros. [edit] Maybe I'm referring to the VScode Markdown plugin. Are there editors for the above workflow?

Pandoc is a standalone application that converts between a huge variety of formats, including markdown to pdf, which means that you can write your plain text markdown in the editor of choice and then convert it to pdf using pandoc.

To use citations, the standard way is to use the `pandoc-citeproc` filter.

Re: LaTeX Makes Me Angry

#92
post #90
post #33

Earlier quoted context omitted.

> What would be the advantage of the replacement compared to TeX/LaTeX? In my experience, LaTeX is pretty clunky, unintegrated and poorly documented. To do any kind of useful typesetting I have to depend on at least five or six third-party packages, and that’s assuming that I don’t need anything ‘fancy’ like nicely formatted references, customised lists or tables, diagrams, hyperlinks or — God forbid — code blocks wi…

I think it comes down to whether the complexity of TeX/LaTeX is essential or accidental. My feeling is, more than half of the complexity is essential (typesetting is, like human grammar, full of obscure rules and exceptions), and therefore, it simply doesn't pay off to anyone to rewrite the system (not to mention, the more essential complexity is in a given problem, the more accidental complexity you're going to accr…

> I think it comes down to whether the complexity of TeX/LaTeX is essential or accidental.

I tend to agree with this, but I do think quite a bit of the complexity in LaTeX is accidental. For instance, the existence of numerous packages for basic typesetting tasks, none of which entirely work with each other, are a clear example of unnecessary complexity. Also, as a macro-expansion language, the nature of TeX itself makes some things more difficult than they need to be — consider basic arithmetic, to take just one example.

Furthermore, I’ll note that age really is a big factor here: there are many things we want to do today in modern, computer-based typesetting which were much less important back when TeX was invented. For instance, in a recent presentation I wanted to make two images transparent and overlay them; I had to drag in TikZ (quite a bulky package!) to do so much as modify their opacity. Similar examples are numerous, ranging from hyperlinks to vector graphics to comments to animations.

Of course, typesetting is a complex task, and a typesetting program is never going to be simple. But I feel that fixing the above problems would at least make it somewhat easier than it currently is with LaTeX.

> There has been unsuccessful attempts to remove the accidental complexity, like Lout. It is very hard.

I’ve never used Lout, or even heard of it before now; could you expand on where it ran into problems?

Re: LaTeX Makes Me Angry

#93
post #87
post #62

Earlier quoted context omitted.

This doesn't support citations or macros. [edit] Maybe I'm referring to the VScode Markdown plugin. Are there editors for the above workflow?

pandoc has great citation support, not sure what you mean by macros.

> pandoc has great citation support

Sure, on paper. Every time I use Pandoc, I have to look up how it works again, and I find it hard to get it working. I think it's hard to make it integrate with Bibtex/Natbib.

> not sure what you mean by macros.

It gives you a way of defining \RR so you don't have to write \mathbb{R} over and over again.

Also, what about editor support? There are editor plugins for Latex and for Markdown, but I've never seen one for the hybrid you're suggesting. How do I get a preview of the document I'm working on while I'm writing it? I'd like to hit Ctrl+S and immediately see the changes.

Re: LaTeX Makes Me Angry

#94
post #91
post #62

Earlier quoted context omitted.

This doesn't support citations or macros. [edit] Maybe I'm referring to the VScode Markdown plugin. Are there editors for the above workflow?

Pandoc is a standalone application that converts between a huge variety of formats, including markdown to pdf, which means that you can write your plain text markdown in the editor of choice and then convert it to pdf using pandoc. To use citations, the standard way is to use the `pandoc-citeproc` filter.

> To use citations, the standard way is to use the `pandoc-citeproc` filter.

I keep using this and finding problems. I actually need to integrate with Latex's existing citation libraries instead of using Pandoc's specific ones. How do I get your thing to invoke Natbib?

Also, what about editor support? There are editor plugins for Latex and for Markdown, but I've never seen one for the hybrid you're suggesting. How do I get a preview of the document I'm working on while I'm writing it? I'd like to hit Ctrl+S and immediately see the changes.

Re: LaTeX Makes Me Angry

#97
post #26
post #23

Earlier quoted context omitted.

Title doesn't match, it's ripped from the first paragraph which really doesn't encompass the theme of the article. Yes, in hindsight it came off more clickbaity than intended. The article did raise a theme of frustration I share though: sometimes you just want the framework/tooling to get out of the way and let you write, something that regularly comes up when I'm working through technical documentation.

In fact, it appears the article has a different title: ‘Focus writing with (despite) LaTeX’, which I think summarises it much better. (Perhaps the author changed the title in the past few minutes?)

No, I didn’t change the title. Blame the submitter :)

Re: LaTeX Makes Me Angry

#98
post #24

> format the document source for legible reading. Yes, it's the input to the typesetter, and yes, the output of the typesetter needs to be legible. But it's worth making the input easy to read, too. How is that difficult? Most text editors support word wrapping and syntax highlighting. > avoid rebuilding your rendered document too often. It's slow, it takes you out of the activity of writing, and it throws up lots of…

Give me your thesis source code, I will just remove one bracket from your complex equations Let’s see how many hours you will spend to fix it. The compiler will just tell you “out of memory error” with no line number. Good luck finding it. Latex and its tooling ecosystem are atrocious for productivity. For a type system that promises “just write, forget about formatting” the effort it requires to get document formatt…

I've never had typos take hours to fix.

But then again the text editor I use has syntax and bracket highlighting.

Re: LaTeX Makes Me Angry

#99
post #94
post #91

Earlier quoted context omitted.

Pandoc is a standalone application that converts between a huge variety of formats, including markdown to pdf, which means that you can write your plain text markdown in the editor of choice and then convert it to pdf using pandoc. To use citations, the standard way is to use the `pandoc-citeproc` filter.

> To use citations, the standard way is to use the `pandoc-citeproc` filter. I keep using this and finding problems. I actually need to integrate with Latex's existing citation libraries instead of using Pandoc's specific ones. How do I get your thing to invoke Natbib? Also, what about editor support? There are editor plugins for Latex and for Markdown, but I've never seen one for the hybrid you're suggesting. How do…

I'd guess you have to first convert markdown to tex with --natbib flag, then compile the tex (assuming the input is input.md and you want input.tex at the output)

`pandoc -f markdown -t latex -o input.tex --natbib input.md`

It is perhaps not unexpected that the capabilities of such a simple thing as markdown are not too overwhelming. Pandoc does not extend markdown as a markup language, it can only convert markdown to pretty much whatever you want. If you have rather precise requirements such as natbib for citations, it may be better to start with latex right away.

I usually use pandoc to produce simple short documents. Occasionally I use it to do the peer review for journals, when from a single markdown source, pandoc builds me a plain text file with latex commands substituted with unicode symbols, and also a pdf.

This all can be simplified with pandocomatic (a thing that automates calls to pandoc) and entr (a thing that invokes a command upon file update).

In the simplest form, `ls input.md | entr pandoc -o output.pdf input.md` will call pandoc each time the file input.md is updated.

Re: LaTeX Makes Me Angry

#100
post #93
post #87

Earlier quoted context omitted.

pandoc has great citation support, not sure what you mean by macros.

> pandoc has great citation support Sure, on paper. Every time I use Pandoc, I have to look up how it works again, and I find it hard to get it working. I think it's hard to make it integrate with Bibtex/Natbib. > not sure what you mean by macros. It gives you a way of defining \RR so you don't have to write \mathbb{R} over and over again. Also, what about editor support? There are editor plugins for Latex and for Ma…

Define your \newcommands in commands.tex and tell pandoc to add it to the header: `pandoc -H commands.tex ...` There can be multiple header files like this.
Post reply on HN