I understand that, just like any tool that has sufficiently many users, (La)TeX grew exponentially in terms of the number of features it has. I like the its core, and I also like the ability to write scientific texts somewhat conveniently. I haven't used Typst yet, but it looks to be something I wanted for quite a while: similar convenience to LaTeX and yet much more simplicity.
To be fair, though, Markdown + KaTeX and MathJax are kind of everything I need right now. Jupyter Notebooks can render enough LaTeX formulas for me to use it when I needed it, even in the university when I'm writing some CS algorithm overview/tutorial or need to do some calculations and hand it in with the explanation. Whenever we had labs in Physics I would do all the calculations in Jupyter Notebooks and that actually looked pretty good. And for my personal blog, I just set up the KaTeX + Hugo which I love: the convenience of Markdown + LaTeX is enough.
This being said, I'm sure there are many people who still have to write papers and would find it useful, but at least for me LaTeX is not a standalone tool that I would use anymore.
Also, part of the value that LaTeX has is an enormous amount of templates that I don't understand but I use them because I have to (e.g. when writing a thesis - it has all the right typesetting, formatting and so on) or because they look very good (I still maintain my Resume in LaTeX format. This is hard to replicate or capture with a new system.
EDIT: Oh, and also Mermaid.js which is now integrated into both GitHub Markdown and Hugo is wonderful for a very small version of TikZ. Although, it is very inconvenient for my taste, but it's still very useful.
Typst: A Programmable Markup Language for Typesetting [pdf] - https://news.ycombinator.com/item?id=34423590 - Jan 2023 (53 comments)
Typst: Compose Papers Faster - https://news.ycombinator.com/item?id=32209794 - July 2022 (30 comments)
Typst: Compose Papers Faster - https://news.ycombinator.com/item?id=32205005 - July 2022 (1 comment)
Also
Writing an Incremental Typesetting Engine - https://news.ycombinator.com/item?id=33215909 - Oct 2022 (0 comments, but looks interesting)
More seriously, I am really following this project closely, and now that it's open source I'd like to see if its possible to add the key libraries my field needs: mathpartir, and something like semantics? especially if typst can provide better syntax and errors!
I was under impression this compiled to TeX. So they are doing typesetting by themselves? Why?
https://news.ycombinator.com/item?id=34423590 - Typst: A Programmable Markup Language for Typesetting [pdf]
previous discussion of website:
https://news.ycombinator.com/item?id=32209794 - Typst: Compose Papers Faster
Using the basic syntax from the tutorial, I got this PDF rendering: https://shottr.cc/s/MVhq/SCR-20230321-ipq.png
The fix for this (in latex) it to mark pairs of matching parentheses with the macros `\left` and `\right`, (for example: `\left( \frac{x}{y} \right)`) which informs latex that it should figure out how tall the content between the brackets is, and then resize the parentheses appropriately.
https://typst.app/docs/reference/meta/query/
For example, I often find lots of hyphens and justified text hard to read, so I try to get latex to not use justified text and to never hyphenate.
However, latex seems to be really bad when you want to do unconventional stuff like that, having to use hackey workarounds which often cause errors all over the place.
The obvious problem that comes to mind is links; otherwise I don’t see the problem. And I can’t think of an alternative to LaTeX that would do better—certainly not Word.
I think for people who write LaTeX in this kind of professional capacity, the macro language is the killer feature.
But I could see fields light on formalism embracing something like this over Ms word, if there was a nice Toolchain for collaborative writing and versioning.
LaTeX (Well, LuaTeX) powers my E-ink newspaper (https://imgur.com/a/NoTr8XX), but I've been curious to use it as a vehicle to try out some of these alternatives and see if they can put together a non-trivial layout.
[1] https://docs.racket-lang.org/scribble/
I saw you mentioned you wrote a custom driver for the display controller. I'm curious how you found that process? I got the feeling a lot of these devices aren't documented very well, but that sounds like a fun project to tackle.
Technically it's a driver, but in practice I'm just talking over a chip via SPI. It's weird and quirky SPI - I think this chip originally just had an I80 interface (Intel 8080 protocol) and then they added a SPI frontend that internally translates to I80. That means you have to SPI with I80-ish chip select semantics etc. which is not what the SPI APIs in the ESP-IDF or Arduino frameworks do by default (leading to things not working unexpectedly), so I had to "bit-bang" CS. Aside from quirks like this it was pretty simple and just following the datasheet to stream the right commands and data.
One thing that made it functionally worth it (aside from the hacking fun and learning) is that E-ink panels perform best if run at a particular drive voltage ('VCOM') that is determined at manufacturing time and attached as a little sticker to the flex cabling sticking out of the unit. I stumbled upon this while reading various data sheets, and as a result my custom code will set the correct voltage, driven by config. If I had used a random lib I probably wouldn't have encountered this.
That said, I've found there's very cool projects out there that go a level deeper. Instead of using an EPD controller like the IT8951 as a convenience, this project runs E-ink panels directly off a MCU by implementing the waveforms directly: https://github.com/vroland/epdiy
After reading the panel datasheets I find that approach quite interesting, and am considering doing fresh Rust impl of that as well.
The Spotify project looks cool! I dig the dithering style. Would like to try a multi-color panel as well.
The display could wake up and ping the raspberry pi which would send it the new image and everyone goes back to sleep until the next morning.
Probably doesn’t matter all that much but if you wanted maximum battery life, maybe?
I already have tuned things to lower the RF power output of the esp32 Wifi habitually - there's a Fritz Wifi repeater just across the room in a corner with near line of sight, so the little thing doesn't exactly have to strain to reach the hotspot.
Also curious how the optimized -S3 and the upcoming -C6 do in the various transfer/power equations.
1. Compilation is ridiculously fast. 2. The language is miles more intuitive, and doesn't require nearly as many hacks. In a handful of hours using typst I've written much more interesting things than I ever would've attempted using latex macros. This might be less important for you, but my latex usage is intermittent, so I've always forgotten it by the next document I write.
I feel similarly about LaTeX and Vim. I like them. They are interesting. I appreciate the history around their development and use. But I just cannot convince myself they are worth learning.
In comparison, I use vim keybindings every day. As a result, despite how esoteric it may be, it's well ingrained into my muscle memory.
It's a bit of a grind, but you can learn the fundamentals of LaTeX in less than a week if you have an hour a day. It was actually a requirement to learn LaTeX well enough to submit a basic report within 1-2 weeks, as part of a first-year computer science course at the University of Toronto.
The course instructors provided a basic LaTeX template (which included some instructions as a guide to how LaTeX worked), and also linked to free online tutorials for more in-depth instructions, which included LaTeX Tutorial from memory, at https://www.latex-tutorial.com . I wrote out notes from articles 01-09 and a few others on the website (as the other articles were less relevant to my purposes) to learn the basics, and then reinforced and developed my understanding of how to use LaTeX by writing future assignments in the course with it.
As an illustration for how LaTeX solves a nice problem, a recent popular submission on HN explored the complexity of typesetting a mathematical document (named "How did Dennis Ritchie produce his PhD thesis? A typographical mystery"): https://news.ycombinator.com/item?id=35177110 . You might not have as much of a need to learn LaTeX if you don't regularly share lots of mathematical equations, but it's relatively quick to learn. LaTeX has also been quite useful to me for writing a professionally-formatted resume, which has been much easier to update than when I formatted my resume using Word.
But once I had to write some pseudocode, make some larger tables, or embed images I suddenly longed for Word. Word certainly can make me curse, but it was still far easier than getting that done in LaTeX.
I stopped using it for my resume because I was too frustrated with essentially re-learning latex basics every time I wanted to make minor changes to content or format.
I actually disagree. The equation editor in word is really quite good (if a little laggy sometimes), once you learn the shortcuts. Being able to see your fractions laid out properly is a massive productivity boost, and makes it much easier to quickly find the part you want to edit. The dealbreaker for me is the lack of equation numbering, without doing quite a few hacks.
Personally, I'd still take the LyX math editor over Word though, for the macros and better performance.
I got quite comfortable with LaTeX after I read a book. For me it was the Kopka & Daly book. Maybe these days it's a bit old-fashioned to get familiar with a programming language, by reading a book? But I think it works.
I use vim fairly frequently for quick edits and small changes but as soon as the scope of the change starts to span more than one file vim starts to feel really frustrating really fast (to me).
A first-year computer science course I took required all the students to develop a basic understanding of LaTeX in 1-2 weeks, and we used LaTeX the rest of the term. I then got used to LaTeX commands, because in my personal experience, I've had plenty of opportunities as part of coursework to use LaTeX (oftentimes, it was required). In the meantime, I haven't yet learned Vim because I've read that it takes a while to learn—at least four weeks of consistent practice, often even longer, e.g. according to this discussion on HN: https://news.ycombinator.com/item?id=15414544
For myself, as someone without personal experience using Vim, LaTeX is essential to my work with commands that I've internalized, whereas Sublime Text and IDEs like Visual Studio Code and PyCharm have been great for editing code (though I recognize that Vim can be an essential tool for editing remote files). I'm curious to learn from others about why Vim can be a better tool for certain tasks, even for local files, in contrast to Sublime or IDEs.
Does Typst support themes so that I can achieve that? Are there other tools I should be aware of?
Are there tools that do all of the above and have themes defined as CSS?
I'm aware of RMarkdown + Knitr which is a fantastic combo (and honestly my inspiration for digging into this problem) but that's obviously still too much "programming" for wider adoption
I guess I can clobber together my own DSL and then run with this. I can't thank you enough
I'd rather use something like JSONResume, Markdown, or even HTML/CSS and printing to PDF. Google docs also has a few nice CV templates.
- have a good template (most of the conferences & some other parts of academia provide this),
- use a decent IDE (many LaTeX editors I tried in the past were great, now I'm fine with just vim),
- stick with the basics (text, tables, formulas, images; it's easy to Google it).
The last point is what matters the most. As soon as you want to change the margins, stylize the table in a different way, tune the text so it looks exactly as you imagine, is when things get complicated. People expect M$ Word and get frustrated with LaTeX. From what I see, Typst solves this in a different way -- it doesn't provide the ability to do that (yet, when it provides it, it will become as complicated as LaTeX).
Why even learn LaTeX or TeX? The Internet is full of recepies. That all you need. Why learning new syntax for formulas when you have a mountain of resources about LaTeX formulas to typeset anything you need.
There are a few "solved problems" in computer science, and typesetting documents is one of them. The progress is made by building TeXmaker, TeXstudio, TeX Live, MiKTeX, XeTeX, LuaTeX, etc. Not segmenting the space.
It's like saying transport is solved when the wheel was invented. Yes LaTeX is great, but it lacks so many decent things, such as good error message, or incremental compilation. Typst is going in the right direction, not segmenting the space.
The other selling point you're missing though is that Typst's compiler is designed for fast incremental compilation, which makes the Typst live preview and Multiplayer/Google Docs-style collaboration experience significantly nicer than Overleaf's, where a change to a large document could easily take 30 seconds or more to render.
Overleaf's slowness is not a LaTeX issue. I was using LaTeX IDEs with near-instant previews more than 10y ago.
Then again, why such emphasis on the preview? Both LaTeX and Typst are not WYSIWYG. The content is already in front of you. There's space for improvement, but building new systems is not the most optimal solution.
But developing your own replacement to LaTeX is whole new level.
Nice one :-)
Few people have every used TeX itself, compared to the massive amounts who have used LaTeX; but if you haven't used raw TeX you should try it sometime; it's surprisingly how simple and powerful it is.
i suspect it does for basic usecases but will still be ultra painful for advanced ones
* The syntax does not use escape sequences for functions/symbols, i.e. phi instead of \phi or floor instead of \floor. You will inevitably run into situations where, for instance, you want to write the letters phi, and have to resort to some ugly hack to write the natural language. This is not okay.
* There is reasonable syntax for text-formatting in bulk (whole paragraphs), but if you want to format a single word or sentence, the syntax seems to involve way too much work.
A side concern: This uses a mix of markdown-style formatting (asterisks for bold text) and programming style formatting. Personally, I think this makes it difficult to visually parse complex documents.
Your first concern is just wrong, afaik content and code live in different syntactic worlds. Code in content has a "#" sigil (and ends at some point) and content in code is delimited with square brackets. Your second concern is weird. For one off things you definitely just wrap it in a function call `#myweirdthing[blabla]`.
Last remark: you're bikeshedding. Seeing your previous remarks i'm not sure you should. Makes complete sense to have a simple powerful syntax and a handful of shortcuts for markdown-level common typography.
I'm absolutely not affiliated btw, just thought about very similar stuff for some time and been waiting for the release. I would've done a couple things sightly differently but the big decisions look very sensible and i'm sure they thought about it for a long time. Good work releasing this and thanks for the free software work!
I also don't know what you mean by the second bullet point. If you want repeatable single word or sentence formatting, you can define a function for it, which there is easy syntax for.
Math fonts and plain text fonts should be different. If you put quotes around something, you get plain text font.
> If you want implicit multiplication, you need spaces between each letter.
Probably the first rule of any good typographical system is that it should not force the user to change how they normally write (barring special exceptions). Any syntax for typography should be additional to this, which is why escape syntax is so good. Forcing the user to put spaces between variables is a no go.
Down in the README it's written that you need to put identifiers into quotes to write them in math blocks
Based the documentation (and the title), it isn't meant to be _a replacement_, but rather _an alternative_ and that's totally OK. Not everything needs a drop-in replacement.
I thought exactly the same: What if I want to write the product of f,l,o,o,r? Well, the "ugly hack" is explained in the readme: You just write "floor" with quotes instead of floor. Seems alright to me ;-)
Latex is horrible but makes beautiful documents and the relevant world either uses latex or Mircosoft Office. Why use anything else? Latex lives by the community of people who use latex for their work and to collaborate. All know 20 year old latex documents will be compilable in 20 years. No competitor outside of Microsoft can survive that.
Except it's not. For example, in 2021, the NeurIPS template compiled differently in different versions of TeXLive (https://tex.stackexchange.com/questions/598567/different-pdf...). To my knowledge this change of behaviour has not been addressed in TexLive.
> Latex is horrible but makes beautiful documents and the relevant world either uses latex or Mircosoft Office. Why use anything else?
And why invent anything new when there are already existing alternatives? Why invent C++, Rust, Zig when there already was C? Why invent Clang when there already was GCC? Why invent Git when there was already CVS? And so on. (Maybe not the best examples, but that's what I could think of on the spot.)
The point is that there are aspects in which the current solutions (in this case, LaTeX) fails, and new systems can address them, since they tend to have much more liberty in the design space than the older system.
I as a graphic designer have been using ConTeXt for more than 10 years now, and I think it's amazing for producing more 'custom' documents and handling typography and stuff. LaTeX and Word fall too short in that purpose.
I guess Typst more of a tool oriented for programmers and computer science people as it seems targeted to give some programming power right into their documents. I may be wrong, but I don't see LaTeX that approachabe from that way (unless you have a decent knowledge of TeX and you are not prone to headaches caused by backslashes).
Let's agree to disagree. So many people can't use LaTeX properly because it's too esoteric and dream of using something different than Office.
The Fibonacci series is not a geometric sequence.
It might be difficult to believe given the unfriendly failure modes characteristic of a macroexpander and an abundance of dusty corners, but LaTeX really is very convenient for a proficient user when the problem fits (e.g. not a magazine).
A big chunk of academic papers are done in Word, even in mathematics.
I think a DSL really makes sense here, because that’s what you spend half of your time dealing with—the syntax—so there is a lot of room to make it easier.
document(
paragraph("blah blah blah"),
math("sum_(i=1)^n i = (n (n+1))/2"),
paragraph("foo bar")
)
Also, I'd imagine being a DSL and having a dedicated compiler is what let's Typst have such great incremental compilation (it's actually instant).[1] https://docs.racket-lang.org/scribble/