6 ms·
Finl is not LaTeX
- paultopia 5y agoIs this, like, a real thing that exists or just a blog post about a thing that should exist? I can't tell.
- georgyo 5y agoDoesn't look to be real to me: https://github.com/dahosek/finl https://github.com/dahosek/finl
- dhosek 5y agoIt's real, but at very early stages. I wouldn't have posted the link yet myself.
- skywal_l 5y ago"finl is not attempting to replicate TeX and LaTeX but to reimagine and replace it. It’s more like Java vs C++" So what will it be: Java or C++. No,... don't answer... Joke aside, LaTeX was a pain to use 20 years ago and still is, so good luck on your endeavor !
- dhosek 5y agoThe idea being that much as Java relieves some of the pain of writing object oriented code in C++, finl relieves some of the pain of writing documents in LaTeX. It helps, of course, to have a deep understanding of TeX and LaTeX in doing so. Looking at sile, for example, on my initial look, it seems that the creators didn't fully understand LaTeX or what makes LaTeX worth re-imagining. At the risk of being insulting, it kind of feels less like C++ to Java and more like Perl to PHP, where the creators of PHP were clearly influenced by Perl, but didn't understand why Perl works the way it does.
- salamanderman 5y agoFrom the blog posts, it looks like they were still deciding what language to write this idea in.
- dhosek 5y agoI've decided on Rust. I'm in the midst of a "short story" exploration of Rust and PDF typesetting with a replacement for gftodvi (gftopdf) which, while it will have a potential userbase in the high single digits, gives me a low-risk way to experiment with typesetting to PDF. One of the sub libraries of finl (the charsub module) will be part of this code in the 1.0 release and potentially other sub libraries will be incorporated as development continues.
- jamincan 5y agoOut of curiousity, did you look at nom at all for parsing?
- dhosek 5y agoI have a bit. I really want to avoid writing code as much as possible. The flip side is that I've noticed that a lot of people in the Rust community are too quick to reach for a library. For gftopdf, I had someone suggest that I use nom to parse the GF byte code, but there's enough impedance mismatch and missing functionality (I don't know that 24-bit integers exist outside of Knuthian binary formats) and the functionality was simple enough (four short functions to read values of u8, u16, u24 and i32 into an i32 container, plus a read a string with a 1–3 byte length parameter at the beginning) that it didn't seem appropriate to have the overhead of an external dependency. On the flip side, I was more than happy to use anyhow, thiserror and structopt for their functionality. I suspect though, given how input will get tokenized, though, that I may not be able to use a generic library.
- xvilka 5y agoI 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 https://github.com/crlf0710/tectonic [2] https://tectonic-typesetting.github.io/en-US/ https://tectonic-typesetting.github.io/en-US/
- dhosek 5y agoMy 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).
- xvilka 5y agoI understand your motivation. The thing is, there were many attempts to reimagine TeX, and none of them succeeded. Not because there were bad ideas, far from that. It's a huge project requiring a significant development team.
- tavianator 5y agoOr one (1) Donald Knuth
- guavaNinja 5y agoPlus a huge number of TeX packages have been made and used. You can't just ask people to leave all of that and learn a new language.
- 5y ago
- nanna 5y agoAs 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 http://www.texfaq.org/FAQ-latex3-prog
- dhosek 5y agoNot 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.
- intc 5y ago> Some issues with LaTeX development are essentially intractable. Could you perhaps open this claim a little? What's wrong with the L3 programming layer? (https://www.alanshawn.com/latex3-tutorial/ https://www.alanshawn.com/latex3-tutorial/ - Already integrated to the format)
- nanna 5y agoThanks for sharing this link. Really helpful.
- dhosek 5y agoIt's ultimately still macro expansion. Don't get me wrong, I think that the work of Frank Mittelbach et al is nothing short of miraculous (and has been for the roughly thirty years since Frank burst upon the scene). If you look under the hood it gets clear just how tough programming in TeX macros is. I have a half-finished extension to expl3 to create a zip function that will take two lists and a macro to zip the two lists into a single list (half-finished because the motivating factor was a tex.stackexchange question and there's a similar function that's underdocumented and not a proper zip that I was able to use to provide an answer).
- deleted 5y ago[deleted]
- riffraff 5y ago> It’s time to separate out the language for formatting the document from the language for writing the document, so, docbook + XSLT? :)
- hestefisk 5y agoShudder. 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.
- dhosek 5y agoMy personal website was generated using XSLT and some perl scripts to generate mostly static HTML files. I lost the master scripts during a computer upgrade somewhere but the only parts I update these days are backed by a database and that's the stuff I need to update.
- wtetzner 5y agoI swear there was an alternative non-XML syntax for XSLT, but now my Google-Fu seems to be failing me. Maybe I was just imagining it.
- foxes 5y agoI 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.
- Rochus 5y agoSounds 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/ https://www.speedata.de/en/ Compiling to LuaJIT bytecode is not that difficult (see e.g. https://github.com/rochus-keller/Oberon https://github.com/rochus-keller/Oberon and https://github.com/rochus-keller/LjTools 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 https://en.wikipedia.org/wiki/ConTeXt.
- deleted 5y ago[deleted]
- zippergz 5y agoThis 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?
- Koshkin 5y ago> 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 5y agoYeah, I learned about that after I wrote that post.
- Upvoter33 5y agoAlmost 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 5y ago> ... suggestions for resolving issues aren’t always present... It is not obvious, but you should turn on clippy in Rust plugin setting.
- periheli0n 5y agoThis 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.