Remix.run Logo
thangalin 16 hours ago

ConTeXt often goes unmentioned in TeX threads.

https://wiki.contextgarden.net/

It's a monolithic kernel with a relatively sane collection of "setup" macros that, by and large, can accomplish much of what LaTeX and its packages can do.

If you're curious about how to build TeX from scratch, have a look at my TeX.SE answer:

https://tex.stackexchange.com/a/576314/2148

I'd imagine making a FOSS port in Rust that has non-cryptic error messages wouldn't be a multi-year project using modern GPTs.

ilyagr an hour ago | parent | next [-]

https://github.com/typst/typst is an interesting competitor to ConTeXt. It's not even TeX, but somehow I tried (and liked) it before I tried CoTeXt. TeX syntax is not something I ever enjoyed in LaTeX.

How much more compatible with LaTeX is ConTeXt than typst? For example, is there tikz for ConTeXt?

dataflow 15 hours ago | parent | prev | next [-]

> ConTeXt often goes unmentioned in TeX threads.

> It's a monolithic kernel with a relatively sane collection of "setup" macros that, by and large, can accomplish much of what LaTeX and its packages can do.

I don't know what constitutes "sane", but I literally just downloaded and installed it right now because you mentioned it, and it choked on a trivial hello world:

  $ mtxrunjit --script context doc.tex
  ...
  > tex error on line 1 in file doc.tex: ! Undefined control sequence
  ...
  1 >>  \documentclass{article}
  2     \begin{document}Hello, world\end{document}
...which might explain why it goes unmentioned?

I feel like this is gonna be a tougher sell than you expect. How the heck is a user expected to switch to ConTeXt?

mr_mitm 15 hours ago | parent | next [-]

You wrote a LaTeX document. ConTeXt does not claim to be compatible with LaTeX.

You can find a "hello world" here: https://wiki.contextgarden.net/Document_layout_and_layers/Tu...

noosphr 14 hours ago | parent | prev | next [-]

LaTeX is not ConTeXt.

Both use TeX as their layout engine. Both are different type of markup languages that live on top of TeX.

gucci-on-fleek 14 hours ago | parent | prev [-]

How did you install ConTeXt? Because "mtxrunjit" shouldn't be included in any modern versions.

Copyrightest 15 hours ago | parent | prev [-]

I imagine making a buggy and unmaintainable version could be done quickly, sure, if you don't mind your documents being killed by a thousand small typesetting cuts. TeX is incredibly complicated for good reasons, people should read Knuth's book.

The reason TeX is written in a 1984 dialect of Pascal is that the typesetting bugs have been solved in a completely specified language; it is much easier to write a transpiler for Pascal->C than to rewrite TeX. Asking an LLM to rewrite it in the language-du-jour is a huge cost for very little benefit.

BTW it has been so depressing in the last few months to see LLM-generated projects make claims about performance/accuracy, but there is no benchmarking code on Github and the "thousands of tests" are all useless happy paths. I am sure we will see some grifter claim that Claude rewrote TeX and I am sure dozens of credulous HN users will take it seriously. But we won't see a useful rewrite. It'll be resume-oriented slop like that dishonest Mathematica-in-Rust project we saw last week.

thangalin 7 hours ago | parent [-]

> it is much easier to write a transpiler for Pascal->C than to rewrite TeX. Asking an LLM to rewrite it in the language-du-jour ...

I thought that the combination of the Pascal and Java versions[1] of TeX would be sufficient guidance to produce another language/implementation.

> is a huge cost for very little benefit

A greenfield Java implementation with an MIT license would have been useful[2] for rendering TeX inside of my desktop Markdown editor[3]. Instead, I had to rename all the Java source files to abide by the NTSPL license terms (or GPLv2, which is viral).

[1]: https://en.wikipedia.org/wiki/New_Typesetting_System

[2]: https://gitlab.com/DaveJarvis/KeenType/-/blob/main/LICENSE.t...

[3]: https://keenwrite.com/screenshots.html