I’ve been thinking a lot about improving my current technology for scientific publishing, and I wanted to write down some of my thoughts, so I can stop obsessing over them see what other people have to think.
Current state of the art
First, I want to list some of the technologies that I have been looking at, which all in my opinion fall short in one way or another. It is as of yet unclear to me whether the correct way forward is to adapt one of these, or to write something from scratch.
- LaTeX. In some ways, LaTeX is the gold standard for scientific publishing. However, it has a key failure, which is that it does not produce HTML. There have been many projects over the years to fix this, and they all… kind of work. But I think that good HTML will only really happen via something that natively “thinks” in web technology, and LaTeX is not that.
- Gerby. A software to make wikis out of LaTeX files, used for the stacks project and Kerodon.
- Quarto. In some ways, quarto is the gold standard for scientific publishing on the web. Notable stand-out features involve good cross-referencing and literate programming. But quarto consists of 4 different languages (haskell for pandoc, lua for pandoc filters, server-side javascript for the main bulk, and then client-side javascript for other stuff), that are angrily duct-taped together, and so it is pretty hard to push it to do anything it wasn’t explicitly designed to do.
- TeXmacs. TeXmacs is a really cool WYSIWYG editor (what you see is what you get) editor for scientific publishing. It does have html output, but the html output is fairly hard-coded for one specific style, and does not compose well with other stuff. This is generally the case with TeXmacs; it does everything itself. This also means it’s hard to publish papers written in TeXmacs.
- Pollen. Pollen is a racket DSL for creating beautiful web books. Having a real language under the hood instead of just a formatting language is incredibly powerful. However it is fairly customized for the purpose of books; some work is required to support other purposes.
- Astro. Astro is a static site generator written in javascript. In some ways, astro is the state-of-the-art for static non-technical content, and its advantage is that a lot of the stuff that other frameworks have to include client-side javascript for (like MathJax), it runs at compile-time, so even though astro is written in javascript, it actually produces pages with the least javascript.
- LaTeX.css. This just turns an html page into something that looks like LaTeX. However, it uses css counters for theorems, etc., which means that you can’t refer to them by number with an equivalent of
\ref
. - Typst. Typst is the up-and-coming contender for LaTeX. It boasts a very impressive collaborative editor, and like scribble, it is its own language, so it is very extensible. However, it doesn’t support HTML yet, and was not built to support HTML from the beginning, so I have my doubts about the quality of the eventual HTML output, if they do add HTML output. Also, I don’t know how it would be integrated in an overall website.
- Forum Magnum. ForumMagnum is what LessWrong runs on, and its native publishing format has a lot of great features, like crossreferences and potentially a collaborative editor. But it’s heavily customized for LessWrong itself; I wanted to run LocalCharts on ForumMagnum originally, but it wouldn’t have worked.
Desiderata
In this section, I list features that I want, and under each feature, current technology that has those features.
- A document programming language, rather than a markup language.
- LaTeX
- TeXmacs
- Pollen
- Astro (sort of, through mdx)
- Typst
- High-quality cross-referencing and bibliography.
- LaTeX
- TeXmacs
- Quarto (sort of, I have some problems with its cross-referencing)
- Typst
- Gerby
- High-quality typesetting on web, including math.
- Astro
- Pollen
- Forum Magnum
- Quarto (sort of… I don’t like Bootstrap)
- TeXmacs (sort of… not very customizable)
- LaTeX.css
- Gerby (sort of… not very customizable)
- LaTeX-interoperability, so that a blog post can easily turn into a journal article.
- LaTeX
- Quarto
- Scribble (another racket tool similar to Pollen)
- TeXmacs (sort of… not very compatible)
- Gerby
- Incremental compilation, so that edits to a single document don’t require recompilation of the whole project
- LaTeX (with subfiles)
- Quarto
- Astro
- Pollen maybe?
- Gerby maybe?
- Real-time collaboration.
- LaTeX, with overleaf.
- Markdown-based solutions with hedgedoc, sort of.
- Any text-based format with visual studio code.
- Something more user friendly for collaboration than git
- LaTeX, with overleaf
- Forum Magnum.
- LocalCharts with docs.localcharts.org (which I’m writing this on now)
- Astro, via content management systems
- TikZ support
- LaTeX, but no method for LaTeX->HTML supports this
- Quarto, with custom lua filters
- TeXmacs (jankily)
- Astro, with a markdown plugin
- not Gerby, even though it is LaTeX-based
- Large-scale project support, for wikis/blogs/books.
- Quarto
- Pollen
- Astro
- Forum Magnum
- Gerby
- Presentations.
- LaTeX
- Quarto
- TeXmacs
- Typst?