Hacker News new | ask | show | jobs
by periheli0n 1280 days ago
The real shocker is that it’s 2022 and LaTeX is still the best writing environment for a PhD thesis. It has so many downsides: the markup syntax is ugly, it really works best only if one used paginated output such as PDF, a zoo of partly incompatible packages, need for compilation, obscure figure placing algorithms that are difficult to control, and so on.

It still beats the competition because of rock-solid referencing, both to in-text elements like equations, chapters, etc as well as citing literature with bibtex.

Plus, it’s extremely stable, so someone who learnt LaTeX 20 years ago, like yours truly, can download the newest TeX distribution and feel at home immediately.

Nevertheless, I would prefer a Markdown-based system that can use CSS and MathML, and has a 100% bibtex clone for references.

Yes, pandoc goes quite a long way along this route, but setting up such a pipeline is still too complicated for many.

8 comments

It must depend on the field. A close relative of mine is a PhD advisor in a science field. He's hands-off about it, but is also aware of what his students are doing. If asked, he recommends MS Word, which is also what he uses for his manuscripts.

My own experience was as a physics student, 30 years ago. Students paid a heavy price for being able to print and submit the entire thesis with no manual intervention. The students who chose LaTeX took the longest at it. I didn't have access to a Unix terminal anyway, and banged out my thesis on an MS-DOS machine. Whatever my word processor couldn't support, I added by hand. The readers were OK with this.

My solution to all typographic problems was "take care of it after defense." I spent a few days after my defense getting my copy to be ready for duplication, including sticking all of the page numbers on with glue because I couldn't make inline figures work.

Sure, one can write a thesis in MS Word. It has come a long way with support for large documents. But I still find its referencing clumsy, opaque and unstable.

For example, automatic updates of figure numbers in captions and references: Countless times it failed on me and I had to manually recreate the fields, bookmarks, cross-references, and whatnot is needed.

Bibliographies are hardly doable without an external tool that comes with its own headaches.

Typography in MS word is quite decent these days, though. Anyway, the content of a PhD thesis shouldn't be judged by its typography (as long it maintains a readable standard).

I think things have changed a bit since you were a physics student. Conferences hand out latex templates and expect you to use them (wish they would also hand out an overleaf template. If any conference organizers are reading this...). Universities also do this with their undergrad/masters/thesis templates. Arxiv expects you to upload tex source code (it'll reject a PDF if you wrote that PDF with latex. It also is terrible at error messaging which is a huge pain since submission timing is for some stupid reason important). I'm sure latex is also easier than back then, but there's a lot of momentum in the latex direction that I think would be really difficult to undo. Even paper acceptance is highly influenced by formatting and figure design. I think it is just a different world as we have a lot more researchers now than even 30 years ago.
Amusingly, some things haven't changed. I was the first student to turn in a word processed term paper at my college, I think in 1983. And I estimate that I earned as much as a full letter grade on my GPA because the prof's had never thought about how to grade a paper that was 100% mechanically perfect. It didn't hurt that I had become a very fast typist thanks to programming. I selectively chose courses where the grading was primarily based on written work, something that most students feared.
I'm sorry, I'm failing to realize why this story is about how things have/n't changed w.r.t. word/latex usage withing the last 30 years in academic writing.
Your comment about formatting and figure design influencing acceptance, triggered my droll little reminiscence. I certainly wasn't disagreeing with you.
> If asked, he recommends MS Word, which is also what he uses for his manuscripts.

My university actually required that people use MS Word for their thesis, which seemed to work out okay for many, despite such a top down approach not seeming like the best option.

Personally, I used LibreOffice anyways and while it was certainly as clunky as Word (especially once images, diagrams and formulas got involved), it was also passable.

Except that things like bibliography refused to work correctly and completely broke, about which I wrote a bit of a rant: https://blog.kronis.dev/everything%20is%20broken/libreoffice...

LaTeX has, like Org Mode, this mythical aura of being super hard. However, replicating the functionality of Word is trivial and takes an hour or two for a savvy computer user to grasp.

There's always Overleaf, Pandoc or LyX to make things even simpler. LyX in particular deserves to be better known.

Complex things, like TikZ, are of course difficult and time consuming. But those are impossible using Word.

IMHO, the biggest advantages of LaTeX are reproducibility and reference management. Big Word documents are quite fragile. And reference management is a mess.

Honestly, it isn't the writing part that annoys me the most. It is tikz and the fact that I can't make animations in beamer. Just resolving these issues would go a long way for me. Tikz could be fixed simply if there was a GUI that could allow for sliders or moving specific objects. Or at least a better way to make a good grid (tip: draw a grid on your canvas, draw whatever you want, remove grid). Things are so difficult to properly line up, even if we have mathematical representations. It shouldn't be that hard...
I recently discovered this python interface for tikz https://github.com/allefeld/pytikz

While it does not directly address the issues you point at, it does alleviate some issues.

* The syntax is somewhat easier to parse.

* It is a lot easier to write functions to redraw the same components over and over again.

* Doing math calculations to systemically place objects in relation to each other is a lot easier because python's arithmetic syntax is a lot more intuitive than TeX's.

Of course, this does mean that you have to fire up python to draw figures.

Since it looks like you've contributed to this project, I have one MAJOR suggestion. Show examples. There's countless tikz projects I've seen that promise a lot and show absolutely nothing. I've invested lots of time to fruitless ends that would have been resolved if I just could see some examples that would show me if this is even in the right ballpark of what I'm looking for or not.

Examples code is a must for any software (test cases work as examples btw) and example graphics are a must for any graphics software. I know this isn't your fault, but I'm just venting a bit here. I'll check this out the next time I'm writing a paper but I just don't get how people can put software out there without any examples (even toy examples). If you have any examples you're willing to share I'd find that extremely helpful.

I merely fixed a small bug in the code.

There are some examples in this notebook https://nbviewer.org/github/allefeld/pytikz/blob/master/pyti...

Otherwise, this is just a python interface for tikz. Whatever is possible in tikz is possible in this. For every command in tikz, the corresponding python command is here https://allefeld.github.io/pytikz/tikz/

However, I do agree that more examples would help. In its current form, its mostly useful to people who are already familiar with tikz and need simpler syntax, and can quickly get up to speed with this.

Thanks, these examples do help!
> I can't make animations in beamer

Not yet. But you can easily learn to do them:

    \usepackage{animate}
    ...
    \animategraphics[width=10em,loop,autoplay]{4}{a_}{0}{10}
will animate at 4fps the sequence of images a_0.png through a_10.png
Mathpix Markdown is an attempt and bringing together the best of words (Markdown and LaTeX) while providing excellent interoperability with LaTeX, meaning you can easily export your Mathpix Markdown documents to LaTeX, including equation references, tabular environments, images, etc:

https://github.com/Mathpix/mathpix-markdown-it

Disclaimer: I'm the founder of Mathpix.

I would strongly recommend MyST. MyST extends Markdown for technical and scientific communication. See https://www.myst.tools/
I tried MyST recently. All I see is a markup language that slowly become more and more complex over time to support more and more features that LaTeX already supports while at the same time acquiring the same syntax complexity of latex.

What people don't acknowledge is that there is a base level of syntax complexity needed to produce fully general documents. If you do, the natural conclusion is that to fix latex, you need a full rewrite of latex with minor changes to fix all the inconsistencies that have crept into it.

My PhD written in MyST is here:

https://phd.row1.ca/phd/introduction

Allows web-first, as well as a PDF output (via LaTeX).

Going by the documentation it does it by... drumroll... converting to LaTeX!

(edit: generating PDFs that is)

To be fair, there is no better free tool than LaTeX to typeset PDFs. But it fails at non-paginated, free-flowing content.
Have you tried Quarto? It should tick everything in your box (except MathML, but hey that might work too since Quarto is built on pandoc)
+1 for quarto, i wrote my thesis in rmarkdown which flipped easily between latex and html output, with a bibtex referencing system. It also allowed you to inline latex for more complex outputs. And inlining calculated tables and charts meant i could keep my writing and code together. Quarto is the successor.
Thanks for the pointer, that looks interesting. Especially because it is open source!

I see it supports Jupyter notebook. Math support in those isn’t too bad at all, so it might just work for many cases.

I'm looking forward to trying Typst when it's available. It's the first LaTeX alternative that's ever interested me.

http://typst.app/

think the most solid way, and the way I'd do it now if starting my PhD all over, would be a bunch of org docs with LaTeX weaved in.

Pandoc I think really e a different niche, hard to imagine really a complicated document benefiting from even more pipelining. You're editing a lot...

> Nevertheless, I would prefer a Markdown-based system

My free, cross-platform desktop Markdown editor, KeenWrite[1], integrates with the ConTeXt typesetting software[2]. I'm working on a branch to make integration containerized[3] because its installation is painful. KeenWrite limits math to plain TeX[4] so that the output can be rendered using any TeX-based typesetter (ConTeXt, LaTeX, MathJax, εχTEX, etc.).

Here's a sample document typeset using ConTeXt (skip to page 40 for the math):

https://pdfhost.io/v/4FeAGGasj_SepiSolar_Highlevel_Software_...

That document theme is called Solare[8].

> that can use CSS and MathML

Adding CSS mixes presentation logic with content, which is something KeenWrite strives to avoid. Instead, KeenWrite implements Pandoc's annotation syntax to keep presentation logic out of the content. I've written about this extensively in my Typesetting Markdown series[5].

You can produce some pretty amazing documents just with annotations, such as the following that I wrote in Markdown and typeset using ConTeXt:

https://impacts.to/downloads/lowres/impacts.pdf

> has a 100% bibtex clone for references.

Markdown fails at references. At some point, I'd like to implement cross-references in KeenWrite. Except there's at least six competing standards for the syntax, which I've also remarked upon[6], making the choice of syntax difficult[7].

> setting up such a pipeline is still too complicated for many

FWIW, my Typesetting Markdown series, which explains how to set up a typesetting pipeline using Pandoc, is one of the reasons I developed KeenWrite: to replace that entire pipeline (R, Markdown, externalized variable interpolation, math, and typesetting) with a single tool.

[1]: https://github.com/DaveJarvis/keenwrite

[2]: https://wiki.contextgarden.net/Installation

[3]: https://github.com/DaveJarvis/keenwrite/blob/1_typeset_using...

[4]: https://github.com/DaveJarvis/keenwrite/blob/main/docs/scree...

[5]: https://dave.autonoma.ca/blog/2020/04/28/typesetting-markdow...

[6]: https://talk.commonmark.org/t/cross-references-and-citations...

[7]: https://xkcd.com/927/

[8]: https://github.com/DaveJarvis/keenwrite-themes/tree/main/sol...