top | item 27288135

Finl is not LaTeX

44 points| signa11 | 4 years ago |finl.xyz | reply

44 comments

order
[+] Rochus|4 years ago|reply
Sounds like attempt n+1.

There were so many before (SILE, Patoline, Rinohtype, ...)

Why not just use LuaTeX, either directly with Lua as a typesetting language, or with a custom language transpiling to Lua or compiling to Lua or LuaJIT bytecode?

Here is a solution based on LuaTeX: https://www.speedata.de/en/

Compiling to LuaJIT bytecode is not that difficult (see e.g. https://github.com/rochus-keller/Oberon and https://github.com/rochus-keller/LjTools).

If it's primarily about a better typesetting language based on TeX, then we already have e.g. https://en.wikipedia.org/wiki/ConTeXt.

[+] paultopia|4 years ago|reply
Is this, like, a real thing that exists or just a blog post about a thing that should exist? I can't tell.
[+] dhosek|4 years ago|reply
It's real, but at very early stages. I wouldn't have posted the link yet myself.
[+] salamanderman|4 years ago|reply
From the blog posts, it looks like they were still deciding what language to write this idea in.
[+] foxes|4 years ago|reply
I agree, as much as I like LaTeX, and what it produces, it is dated. It's missing modern features. Lots of stuff is clunky. The content part should be declarative programming. It should be functional underneath the hood. I think ggplot2 is maybe an example of declarative visualization creation. You just declare what is in the document, very clear structure. Perhaps there is some styling/rendering component you can tweak. Seems like a job for Haskell. Needs like a simple DSL in a sense though.

At least you can use Pandoc to turn old LaTeX documents into html/etc. I kind of like using tex flavoured markdown and just generating html with pandoc.

[+] xvilka|4 years ago|reply
I think completing the rewrite[1] of Tectonic[2] (Rust-powered XeTeX) has bigger potential and it's already working in many cases.

[1] https://github.com/crlf0710/tectonic

[2] https://tectonic-typesetting.github.io/en-US/

[+] dhosek|4 years ago|reply
My goal with finl is not to re-create TeX but to reimagine it. The macro-oriented programming language is a big pain point, as are the whole concept of category codes. In many instances, LaTeX is still hemmed in by the constraints of ca 1980 computing technology. If you look through tex.web, you'll see things like weird string concatenations that were done in order to save a handful of bytes of memory. It was a radical change to TeX in the 80s to move to 32-bit addressing for the main memory array from 16-bit addressing. And Unicode support is occasionally weird, particularly in the incompatibilities between how ^^ literals are managed in pdfTeX vs XeTeX/LuaTeX (in the former, ^^D7 is a byte, in the latter ^^D7 is a code point and turns into a two-byte UTF sequence).
[+] lahcim8|4 years ago|reply
I too have recently been interested in TeX and Rust. Apart from Tectonic (wrapper around XeTeX and dvipdfmx) and the attempt to rewrite it in Rust (your first link), I also found [1], an attempt to rewrite TeX itself in Rust. I also understand that you are a supporter of the Tectonic in Rust effort, so hopefully you can fill me in on the current progress.

At first I though that just rewriting XeTeX/dvipdfmx in Rust just for sake of being written in Rust was foolish, because of TeX's untypical memory model. Also because of the manual translation using c2rust (also on C code generated from Pascal code that uses a lot of macros).

But after lookin at it now it seems that the rewrite progressed and the result are parts looking very Rusty, which is nice.

I too had ideas about TeX in Rust, but I think that starting with LuaTeX would be much more beneficial. Apart from LuaTeX having obvious support of scripting in Lua and being very extensible, XeTeX has other disadvantages. See for example [2], which still in my opinion misses many internal differences, where LuaTeX is much superior.

Do you have any tips on how to join the Tectonic / TeX in Rust community? Where can I potentially discuss my foolish TeX/Rust ideas, being very new to Rust?

[1] https://github.com/crlf0710/tex-rs [2] https://tex.stackexchange.com/a/593217/125126

[+] nsajko|4 years ago|reply
Why would Tectonic have big potential? Why is it noteworthy at all? What benefits does it provide compared to ConTeXt?
[+] boromi|4 years ago|reply
What does [1] do over [2] ? I looked at the readme of [1] but it's just a fork of [2], so I'm not sure why [2] needs a rewrite? Is [1] just a rewrite of [2] in Rust?
[+] riffraff|4 years ago|reply
> It’s time to separate out the language for formatting the document from the language for writing the document,

so, docbook + XSLT? :)

[+] hestefisk|4 years ago|reply
Shudder. Haha. XSLT was actually conceptually a good idea. Just quite hard to read once written in lines and lines of XML. In the 2000s I wrote a web site in mod_perl/Axkit that used XSLT to translate pure XML files into readable XHTML 1.0 for web browsers and WAP (!) for phones.
[+] zippergz|4 years ago|reply
This reminds me of something I have been wondering. If my goal is to programmatically create beautifully typeset documents (on par with modern high quality books or magazines), are there any great options? I don't care about mathematical notation, which is a big focus in LaTeX. Every time I've started going down the LaTeX path, it has felt like I'm swimming upstream by not wanting it to look like a standard CS or math academic paper. There is a very distinct "LaTeX look" that I don't care for.

I want to be able to use any OpenType or Postscript font, tweak leading, kerning, and so on. Basically all of the controls that I could get in InDesign or Quark XPress, but generated by code. Is there a good way to do this?

[+] periheli0n|4 years ago|reply
This is so much what I am thinking each time I'm forced to write in LaTeX. But then again, there is already a ton of alternatives out there. HTML + CSS + JS for screens. Word, InDesign, Scribus for pdf.

The one thing that forces me back to LaTeX is bibtex. There is simply nothing that can replace it. Some tools come close, like Mendeley for Word, but they have issues too (like being controlled by a giant company).

I'll switch for anything that lets me markup documents, render equations, and use bibtex. At present LaTeX is the most comfortable option to do all these three, in spite of the countless issues I have with it.

[+] nanna|4 years ago|reply
As far as I understand LaTeX3 is basically ready, it's just that the developers decided to make it available as an optional environment rather than a replacement to LaTeX2e - which would render it incomparable with all the things. It's also not comprehensively documented, though there are introductions. Core development work, again as far as I understand, has now shifted automatically annotated pdfs (might be the wrong term).

http://www.texfaq.org/FAQ-latex3-prog

[+] dhosek|4 years ago|reply
Not exactly. Originally LaTeX3 was going to be a complete rewrite of LaTeX2e. In the last year or so, there was essentially a declaration of surrender and LaTeX2e+expl3/xparse is now LaTeX3 but still called LaTeX2e. There will never be a LaTeX3 exactly. Some issues with LaTeX development are essentially intractable. They're doable in theory (because TeX is Turing complete), but not in practice.
[+] Koshkin|4 years ago|reply
> Imagine if a user of Word could access a plugin that let her type \sum_{i=0}...

MS Word in Office 360 provides direct support for the LaTeX syntax in formulas.

[+] dhosek|4 years ago|reply
Yeah, I learned about that after I wrote that post.
[+] Upvoter33|4 years ago|reply
Almost all of these projects are doomed to fail (sadly). TeX is clunky, etc., but it makes really beautiful documents and the math support is ridiculously good. It's just a very high bar, so people are willing to live with crummy stuff. Even MS Word (a product with many billions of dollars of investment, likely) doesn't make documents that look as good as TeX.
[+] ltmq|4 years ago|reply
> ... suggestions for resolving issues aren’t always present...

It is not obvious, but you should turn on clippy in Rust plugin setting.