Comment by CJefferson

2 days ago

I'd much prefer bad looking unicode characters to just skipping them and having broken output honestly. This is currently the main reason I'm considering moving from LaTeX to typst -- just always having broken output as I use more unicode (maths symbols, emojis) in my documents.

> I'd much prefer bad looking unicode characters to just skipping them

That is an option that you can enable. If you're only using a few different languages (which is by far the most typical case), it's mostly automatic with Babel (by using "\babelfont"), but if you really want to support everything, you can use something like [0] (which is admittedly rather convoluted).

> just always having broken output as I use more unicode (maths symbols, emojis) in my documents.

Adding "\tracinglostchars=3" anywhere in your document (before the offending character) will turn any missing characters into an error message, and using the "--halt-on-error" command-line flag will make that error fatal. I've talked to the LaTeX Team and they'd really like it if they could make those the default, but they have 40 years of backwards compatibility to deal with. I've also talked to the Overleaf support team, and it's depressingly common for documents to compile with 50+ errors and for users to think that that's completely okay.

LaTeX is fairly similar to C here, because in both cases, the errors are nearly always important, a good document/program should compile with zero errors, yet thousands of old documents/programs do compile with errors and their users complain if you make them fatal by default.

[0]: https://tex.stackexchange.com/a/707031/270600

  • That's genuinely good to know.

    The thing that often hits me nowadays is using pandoc (or pandoc via quarto) to go markdown -> latex -> pdf, which tends to bury these issues (and in markdown it's more tempting to just write emojis / unicode maths symbols.

    Why use markdown, because I want good HTML output (which I realise is getting better in latex, but still not as good as markdown -> HTML.