6 ms·
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.
by vslavkin 2y 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=heads 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 2y 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?
- fiddlerwoaroof 2y agoI’ve found that the best way to learn a new emacs package is incrementally: for something like Auctex, I initially just enable it for my latex documents and then I configure and learn features as I need them, never learning too much at once. Even with minimal configuration, it gives you some nice things like imenu entries for headings and a menu that surfaces some of the basic latex feature
- vslavkin 2y agoIt's pretty easy, actually. First, install the plugin, I use this with elpaca: ``` (use-package latex :ensure nil :hook (LaTeX-mode . TeX-fold-mode) ;; I don't use a lot the fold, but it's useful (LaTeX-mode . turn-on-reftex) ;; For biblatex (LaTeX-mode . LaTeX-math-mode) ;; For inserting math symbols, altough I think cdlatex is better (LaTeX-mode . outline-minor-mode) ;; If you use outline to surf throughout the buffer ;; (LaTeX-mode . abbrev-mode) ;; If you use abbrevs (LaTeX-mode . visual-line-mode) ;; Either this or auto-fill-mode, which will return when you have more than the `fill-column` characters (LateX-mode . prettify-symbols-mode) ;; Will replace most latex math symbols with unicode :bind (:map LaTeX-mode-map ("s-a" . abbrev-mode) ("s-c" . preview-clearout-at-point) ("s-q" . LaTeX-fill-buffer) ) :custom (TeX-auto-save t) (TeX-parse-self t) (preview-auto-cache-preamble nil) ;; Setting this to t should be faster, but for me it wouldn't work with lualatex (TeX-command-extra-options "-shell-escape") ;; Use pdf-tools to open PDF files (TeX-view-program-selection '((output-pdf "PDF Tools"))) ;; I use pdf-tools to read the pdf in emacs (TeX-save-query nil) ;; Auto save without saving (TeX-show-compilation nil) ;; Hide the compilation (TeX-engine 'luatex) (reftex-plug-into-AUCTeX t) ;; I think this is redundant (TeX-source-correlate-mode t) ;; To enable synctex (click on the pdf to go to source) (TeX-source-correlate-start-server t) :config (add-to-list 'TeX-command-list '("Make" "make" TeX-run-command nil t)) ;; Update PDF buffers after successful LaTeX runs (add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer) ) (use-package auctex :ensure (auctex :pre-build (("./autogen.sh") ("./configure" "--without-texmf-dir" "--with-lispdir=.") ("make"))) :demand :mode (("\\.tex\\'" . LaTeX-mode) ("\\.tex\\.erb\\'" . LaTeX-mode) ("\\.etx\\'" . LaTeX-mode)) :config (with-eval-after-load 'preview (dolist (env '("tikzpicture" "circuitikz")) ;; I want to preview tikzpictures and icrcuitikz (add-to-list 'preview-default-preamble (concat "\\PreviewEnvironment{" env "}") t)) (add-to-list 'preview-inner-environments "axis") ;; And axis (pgfplots) (set-face-attribute 'preview-reference-face nil :foreground "black" :background "white"))) ;; Tikz previews look better with a white background, if you don't use it, it's way cooler to preview latex with a "trasparent" background ``` And then the usage: Just continue using latex as you are, and then try to incorporate auctex commands. The most useful being =latex-environment= and =latex-section= + the previews. So don't write \begin{env}... nor \section{sec}, and instead use C-c C-e and C-c C-s (They seem hard, but they aren't) For the previews, use C-c C-p ... (there are a lot of options there, using which-key you can see them) And for compiling use C-c C-c. I recommend reading https://karthinks.com/software/latex-input-for-impatient-scholars https://karthinks.com/software/latex-input-for-impatient-sch... and if you have the time, read bits of the manual (Sorry, I can't get the code to display right. goto https://gitlab.com/vslavkin/emacs-config/-/blob/master/emacs.org?ref_type=heads&plain=0 https://gitlab.com/vslavkin/emacs-config/-/blob/master/emacs... and search for the latex heading)
- josephg 2y ago> Besides the typst packages, it also lacks the editor packages. I am an emacs user… The typst editor plugin for vscode is pretty great. It gives you a split view of source & pdf, and you can cmd+click on either side to scroll to the corresponding source / rendered output. It also does things like give you autocomplete on fields from externally referenced json data. Obviously, that might be no help if you’re married to eMacs. But if you’re a little promiscuous with editors like I am, give it a try.
- porridgeraisin 2y agoLatex workshop gives an identical experience with latex
- josephg 2y agoYeah I think its fair to say latex has a much more mature ecosystem. And we should expect nothing less from something made in 1985. Its almost 40 years old. But typst is catching up as fast as it can. I find it very usable already.
- porridgeraisin 2y agoYeah, my guess is that it'll fall on either side of the same go/c vs c++/rust "simple rules with more implicit rules in your head" vs "complex tool with less in your head" divide in people's opinion.
- josephg 2y agoCan you say more? That’s not my experience of it. I think it’s more like latex is like c++ and typst is like zig. C++ & latex have been worked on for decades, and has all this design baggage it carries around. An ugly macro system, weird “compile it 3 times” things. But it also has decades of work filling out the 3rd party package ecosystem and decades of stackoverflow questions and answers. Zig & typst are rewrites from scratch with new ideas. The core is better designed, since they have been able to learn from what came before and have a do over. But they’re missing the decades of incremental work fixing bugs and filling out the ecosystem. So, yeah, I’m sure the eMacs plugin is worse for typst and latex. It’s all just … newer.
- Vt71fcAqt7 2y agoOne of the worst things about LaTeX is its reliance on packages to do anything useful. In fact, LaTeX is itself essentially just a set of packages for Tex. I hope whatever replaces LaTeX finds a solution that covers as many usecases as possible without needing any packages.
- tolerance 2y agoWriting Typst in Emacs is pretty easy with this setup. https://codeberg.org/meow_king/typst-ts-mode/wiki/ https://codeberg.org/meow_king/typst-ts-mode/wiki/ https://github.com/Myriad-Dreamin/tinymist/tree/main/editors/emacs https://github.com/Myriad-Dreamin/tinymist/tree/main/editors...
- vslavkin 2y agoIt looks nice, but it doesn't have as many features, altough I understand that, as typst is easier to write, a lot of things aren't needed. I'll try it out when I have time
- aulin 2y ago> I am an emacs user insert joke here In my totally anecdotal experience the intersection between proficient LaTeX users and emacs users is pretty large. So having good emacs support would be a big selling point. My experience on the other hand is also those people never complain about LaTeX, so they're probably not the target for a new typesetting system.
- vslavkin 2y agoYeah, I've also seen that in the latex forums, Emacs is strangely popular. I don't think that there's someone that doesn't have at least one complaint about latex. But probably there are a lot of people that try to understand its flaws and start to love it or something after using it for dozen of years, and don't want to spend the time to switch. (Stockholm syndrome??)
- cbolton 2y agoI have a similar "user profile" and find typst a much better experience. It's true CeTZ is not as mature, but it's much easier to extend where it's missing functionality (because you have a nice, normal scripting language to work with instead of a macro mess). But math is the reason I smile every morning when I open my .typ files. It's so clean and readable, and a pleasure to write, compared to LaTeX. It's also not as mature so I can imagine some things can be tricky to do in typst depending on your needs. But it does everything I need, and is only getting better (I see that several of the annoyances I found are getting fixed in the next release). Can't comment on the AucTeX part, I'm using helix and typst support is not great but good enough.
- vslavkin 2y agoYeah, that's why I thought of contributing to cetz, the language is definitively way better. Although I think that for basic usage, I like the tikz way a bit better. The main problem I'd say is circuitikz. It's a really big and versatile project, and I would need years to make it work. However, thinking about it, it's not like anyone other than me cares about how clean my circuits are. They are high school notes, and the rest of my classmates are doing it on paper, but I haven't found a good alternative. One that probably isn't as clean as circuitikz, but easier, faster and easy to integrate to latex/typst
- andrepd 2y agoWell that's going to remain an issue for a long time: TeX has close to half a century head start :)
- larsrc 2y agoJudging from the releases page on Github, Typst has been in the public since May 2023. You can hardly expect it to catch up with decades of LaTeX packages in that time.
- vslavkin 2y agoTypist is a bit older than that, it was born in 2018. Regardless, I don't expect it to have feature parity with latex, but it still lacks several important and simple packages. Besides, I was just making a point on why people in a similar situation to mine should/shouldn't use it for big documents; what I found good and bad; and what would maintainers need to develop for more people to switch