• __mharrison__ an hour ago

    I've moved all of my LaTeX-based content creation to Typst.

    It's:

    - Fast—Compiling my books would take around 1 minute (I often had to compile twice due to indexing). With Typst, it takes less than 5 seconds.

    - Easy to write—I actually don't write it, I wrote a bunch of Pandoc plugins to tweak the output from Pandoc (I write all my books in Jupyter these days, so lots of markdown).

    - Easy to read—I've used LaTeX for years (and wrote a bunch of tooling around it) and still couldn't tell you when to use a { or a [. Typst is very readable.

    - Easy to script—Okay, I did write some Typst the other day. I migrated my LaTeX-based invoicing system to Typst. I created a list of objects with pricing and count and was able to throw it into a table easily. It has less code than my LaTeX version, which was using a library, and is easier to read. (I did need to write a function to properly format $ because that doesn't exist. A few rounds with AI made that easy.)

    - Has great error messages—If you've used LaTeX, you know what I mean.

    My needs are different from others, but I'm writing PDFs that need to be printed into a real book that looks professional. This includes front matter, footnotes, callouts, page numbers, page headers and footers, and indexes. I don't do a lot of math-heavy stuff, so I can't comment on that. And the widow/orphan support is a little weak.

    Otherwise, I'm happy to never use LaTeX again!

    • akoboldfrying 37 minutes ago

      With your experience of both, have you found that Typst has fewer issues with conflicting/non-commutative plugins than LaTeX does?

      Because that's where I lose the most time with LaTeX: packages often mess with the (piles of) global state in ways that sometimes conflict, and the only "solution" seems to be that, if you're very lucky, sometimes conscientious package authors will try to "detect" (through various hacks) whether some other known-conflicting package has already been loaded and adjust accordingly. I didn't see any mention in TFA of any module system or even local variables in Typst to contain this explosion of complexity, so I suspect it will be just as bad in this respect as LaTeX is once there are as many plugins available.

    • YmiYugy 3 hours ago

      In the very limited time I used typst it has been pretty amazing, but imho there is one missing feature that a LaTeX successor, but even more so, templating engine should have. Come up or adapt a format, that can defer certain styling decisions to the consumer of the document. Stuff like, font, font size, line spacing, citation style, double or single column, numeration style, etc.

      On a different note, we got to find a better way to exchange data than pdf reports. In my totally made up estimation about 10% of development time for enterprise software is spend on variations of these pdf templating tools and another 20% on extracting data from such generated pdfs.

      • vslavkin 3 hours ago

        I've been looking into it. It's `blazingly fast` (aside from the rust joke, it really is way faster than latex), the syntax is more "modern", consistent, etc.

        The main problem is the popularity. It just does not have enough packages, at least for my use case.

        I mainly do a lot of equations (simple math), and a loooot of tikz (forest, circuitikz, pgfplots, etc.) [https://gitlab.com/vslavkin/escuela/-/tree/main/5to?ref_type...] I'm not a fan of tikz, but it's the only way to mantain the graphics homogeneous, clean, easily editable, compiled with the document and with links/references. Cetz (the typst alternative) is years behind. I've been thinking of contributing, but tikz is really complex, and I don't have enough time ATM.

        Besides the typst packages, it also lacks the editor packages. I am an emacs user insert joke here, and I use AucTeX, which is a really great, and gigant package to edit latex (+cdlatex). AFAIK there's nothing like it for typst, which makes me way slower.

        Another thing is that they changed the math syntax. While the latex one wasn't perfect it was insanely popular, because of its use on markdown and a lot of pages (and this was thanks to mathjax iirc).

        The good thing is that something like latex or typst will always be needed, so there'll always people that want to have something like it; latex/tex isn't really great, and it has a really low entry bar.

        Maybe I'll switch when I have more time to study it and make packages. (It could be as soon as next year or a late as... never)

        • sourcepluck 2 hours ago

          > I use AucTeX, which is a really great, and gigant package to edit latex (+cdlatex)

          This is tangential, but have you any quick tips for someone looking to get started with AucTeX? I'm a comfortable Emacser who has started to occasionally think of some document I'd like to do in LaTeX (some maths questions for a student, or an overview of some topic). I've looked at AucTeX once or twice, and ran away thinking, oh, I'll do that some other time.

          What is the order of events? Should I make a few really basic LaTeX documents first with a terminal, and then try AucTeX?

        • alphazard 5 hours ago

          This is neat. I've used Latex before, and it definitely suffers from poor ergonomics. Both the language and tooling contribute to this.

          The selling point seems to be that this is more similar to Markdown. That makes sense, Markdown is objectively more common and has more users than Latex. I've used both, but Markdown way more often.

          Here's something I don't understand: it would be trivial to make Typst even more similar to Markdown, and yet it exists at some strange middle point in the language design space, arbitrarily far from Markdown.

          • huijzer 4 hours ago

            Well maybe it’s good to make it clear that it isn’t markdown to avoid confusion? Also Typst has less syntactic sugar which also has benefits.

            More generally, I am really impressed by Typst’s abstractions. I have typset my whole PhD thesis in it without needing any external packages. It was so easy to use the basic building blocks and write a few extra functions for the rest.

            • raphman 3 hours ago

              Is your template/source available by chance?

            • sshine 4 hours ago

              Places I’ve switched from LaTeX to Typst: My resume, research papers. Markdown was never a serious contender for my resume, since I want to control the rendering and the layout.

              Places I’ve switched from Markdown to Typst: Slides. There are some okay Markdown-to-HTML solutions, but they have this unfortunate side-effect that you move the slides to some other computer, and something breaks in your rendering. PDFs ftw.

              • Animats 4 hours ago

                > The selling point seems to be that this is more similar to Markdown.

                The problem is that extending Markdown syntax gets messy.

                    #figure(
                      image("image.jpg", width: 70%),
                      caption: [
                        Observe the image in the picture
                      ],
                    ) <figure>
                
                This is kind of a strange blend of Markdown, CSS, JSON, and HTML. TeX at least has a consistent syntax.
                • orangeboats 3 hours ago

                  It may be similar to Markdown if you squint your eyes real hard, but it's not Markdown.

                  Furthermore, quoting a random snippet without any elaboration is unhelpful and only serves to confuse people (as it already did for the other comment!)

                  # means "evaluate". figure(...) is the function being evaluated.

                  The syntax inside figure(...) is fairly regular, not too different from what you'd see in typical programming languages (but with a document-oriented twist like the %).

                  <figure> may seem to be related syntatically to #figure(...), but it's not. It's just a label. Like an HTML div tag with id="figure". It can very well be changed to <foo> in your example and it'd still work.

                  • smartmic 3 hours ago

                    These 6 lines actually put me off. Probably I have to read more about Typst syntax but, same for me, consistent syntax which covers necessary complexity wins over bending a markup language for purposes for which it was never intended.

                    • airstrike 3 hours ago

                      Strange to the untrained eye, perhaps. To me that just looks like a function. In a long document I recently wrote, I defined a custom function

                          #let img(filepath, inset: 0.5em, caption: none) = {
                            figure(
                              box(inset: inset, stroke: 0.5pt + gray, image(filepath)),
                              caption: caption
                            );
                          }
                      
                      and just used it like:

                          #img("images/excel-5.0.png", caption: "Microsoft Excel 5.0 was released in 1993.")
                      
                      
                      edit: fixed unused inset param
                      • SkiFire13 2 hours ago

                        Was do you find inconsistent here? It seems pretty consistent to me, except maybe the <figure>

                      • mbivert 4 hours ago

                        I'm not sure the selling point is similarity with markdown, but rather, to improve, or modernize LaTeX/TeX-the-language/s: TeX is really archaic: if you're curious, there's a series of articles by overleaf[0] detailing some of TeX's inner-working, quite insightful.

                        I remember reading — but can't find a source at the moment — that TeX originally didn't had counters; people came to rely on Church numerals[1] instead, before Knuth finally implemented them.

                        EDIT: found out where I've read about it: [2]

                        [0]: https://www.overleaf.com/learn/latex/A_six-part_series%3A_Ho...

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

                        [2]: https://news.ycombinator.com/item?id=29713270

                        • SkiFire13 2 hours ago

                          Personally, I don't really care about it being similar to Markdown. After all if someone wants Markdown they can just use that... For me the selling point is that it provides almost the same features as Latex except with a sane scripting language. This allows me to actually write my own scripts, as opposed to Latex where even understanding how basic stuff worked was a huge pain.

                          • llm_trw 4 hours ago

                            Markdown is a very poor language to try and use for anything other than single column typewriter like text.

                            As evidenced by the fact that every project which uses it for more than that adds arbitrary extensions.

                            The minimum viable language for non-mathematical technical documentation is reStructuredText.

                            • __mharrison__ an hour ago

                              I write markdown and use Pandoc (plus some filters) to create Typst. Happy to never touch LaTeX again.

                              • prettymuchnoone 4 hours ago

                                Could you give an example of how it could be more similar to Markdown? I recently used Typst for my bachelor's project and never really thought that it needed to be simpler

                              • elashri 4 hours ago
                              • mbo an hour ago

                                First of all, I will commend the Typst community for attempting to rectify the trainwreck that is LaTeX typesetting. It appears that they have succeeded.

                                So Typst has its own styling system, and its own scripting system, and plugin system via WASM... isn't this just HTML with extra steps? Not to mention that Typst doesn't support HTML export https://github.com/typst/typst/issues/188#issuecomment-14933..., which is a major impediment to vision-impaired accessibility in the academic community.

                                I think this is all a bit of a shame that there's been no major efforts to reform HTML as the go-to file format for scientific publishing instead. All the elements are there - <cite>, citation.js, KaTex, Web Components, good plotting libraries (Observable Plot), WASM. Was all this extra engineering effort required to get us a Markdown style syntax? I know people hate XML-based markup... but it's not _that_ bad, right?

                                • Onavo an hour ago

                                  The key difference between print systems and web tech is responsiveness. Anything print related is primarily designed with dead tree format in mind, so the layout won't change, and you don't have to worry about text reflowing after editing.

                                  It's also why LaTeX/PDF to HTML converters are so difficult to build, because the underlying engine has no semantic information about the structure (this may be changing with LLMs and multimodal setups).

                                  • aniviacat 24 minutes ago

                                    One could ask if responsiveness is relevant for documents.

                                    You could simply use a static layout for your html, and then add borders or zoom (just like in a pdf viewer).

                                    Then you'd have the editability, accessibility and performance of html, with the same responsiveness as a pdf (none).

                                    I've never really given this much thought, but html could reallly become the standard file format for documents.

                                    • mbo 18 minutes ago

                                      > The key difference between print systems and web tech is responsiveness.

                                      True, but... we were very good at building unresponsive websites in the early 2000s. Can't we just return to tradition and disable a lot of the responsive behaviour that we've layered onto HTML with an off-the-shelf stylesheet? Hardcode some width properties, ya know? (This is not a rhetorical question, genuinely curious).

                                  • viralsink 2 hours ago

                                    I like Typst, but I've had a couple issues so far:

                                    1. The line spacing. It's not defined as baseline to baseline, but as the space inbetween two lines of text. Very difficult for an assignment with a prescribed line height since it usually refers to a baseline-baseline measure. 2. While having multiple columns is really easy, adding floating elements for the text to wrap around seems not possible. There's a reason all these CV templates have the info bar on the right instead of the left.

                                    • Aaron2222 12 minutes ago

                                      You can change how the bounding box Typst uses for layout is defined (i.e. set the top and bottom edges both to the baseline), then I would imagine the spacing would be baseline to baseline. Would need to adjust the space before a paragraph to compensate though.

                                    • bitexploder 4 hours ago

                                      Built my resume with typst and know of several other folks using it for serious document typesetting. It is a very nice and modern typesetting system and language that just feels easy to make it do what I want.

                                      It incorporates elements like templates and it is very easy to create reusable content “functions”. It is everything I want out of LaTeX while being super fast and easy to use.

                                      Edit: pandoc can generate typst output if you want to explore :)

                                      • sega_sai 4 hours ago

                                        I was hoping that the syntax for equations would be borrowed from LaTeX but it is not the case unfortunately. I would like to switch away from LaTeX, but i think the syntax for equations in LaTeX is pretty sensible actually.

                                        • Gualdrapo 3 hours ago

                                          Have you tried with ConTeXt? As LaTeX, it's built atop TeX - though it's not as modular (and popular) it's more powerful.

                                          I'd like to like Typst, but (as mentioned the other day) it follows the same model as LaTeX - great for some predefined styles, but the moment you want or need something different you'd need to get third party plugins, and with that all the perks and cons they may have.

                                        • moelf 2 hours ago

                                          the current show-stopper issue is that Typst can't insert PDF as figure[1], this makes a lot of scientific publication workflow impossible.

                                          [1]: https://github.com/typst/typst/issues/145

                                          • quotemstr 33 minutes ago

                                            C-f r u s t RET

                                            But of course.

                                            I'd rather see effort go into improving LaTeX performance instead of creating some new incompatible thing in a trendy language. One could also imagine an Elixer-style "resyntaxing" of LaTeX that would preserve compatibility with decades of packages. I don't think a long-developed ecosystem should be given up lightly.

                                            • darkteflon 4 hours ago

                                              Love to hear some informed opinions on typst versus quarto.

                                              • ternaryoperator 4 hours ago

                                                Search in HN for Typst and you'll see this link is routinely posted and as little as three months ago got nearly 200 comments.

                                                • timeon 4 hours ago

                                                  There is overlap, with creating whole documents, but I can imagine at some point one could use Typst inside Quatro. (Like using Typst inside Obsidian.)

                                              • vivekd 4 hours ago

                                                I've tried typsit and Ive really been enjoying it. It's very easy to learn and easy to use. It's a new project so it can't as of yet replace the functionality of LaTeX's many packages. However it is good for quick and easy texts, it's replaced markdown and office for me for writing simple documents on a computer.

                                                • pseingatl 3 hours ago

                                                  Does Typst have epub or html export?

                                                  • njkleiner 3 hours ago
                                                    • CJefferson 2 hours ago

                                                      Both have been “on the roadmap” from day 1, with little progress.

                                                      Many open source projects put “we should make our system accessible to disabled vision issues” on the roadmap, depressingly few projects then actually do it.

                                                      Even latex, which in academic circles is famous for not having html output, nowadays produces more accessible output than typist.