top | item 41823131

(no title)

vslavkin | 1 year 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)

discuss

order

josephg|1 year 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.

vslavkin|1 year ago

I don't know which of the several typists plugins are you talking about, but they all seem decent, but years from achieving the features auctex has.

Just to say, the most important features:

Well, the feature you mentioned of clicking the PDF and redirecting to the source.

Preview in the same buffer (window) as the code

It uses other regexps to recognize the enabled packages, and then adds the package's macros and environments to its list, so with a command you can open an environment or macro, and it recognizes which packages you are using, if you are in a math environment, etc. and shows only the ones you can use in the context. It's like a super-intelligent set of macros.

AucTex has also great support for bibtex/biblatex, and glossary/glossaries, both for using the macros and for compiling.

Automatic, intelligent, labeling.

And a lot more (altough this is probably the biggest latex package, there are a lot of other smaller packages that are also extremely useful) . Maybe it's not the hardest package to do, but it needs a lot of people and time to replicate, basically what typst is also lacking, for now.

porridgeraisin|1 year ago

Latex workshop gives an identical experience with latex

cbolton|1 year ago

I 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|1 year ago

Yeah, 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

sourcepluck|1 year 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|1 year ago

I’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|1 year ago

It'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-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... and search for the latex heading)

aulin|1 year 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|1 year ago

Yeah, 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??)

andrepd|1 year ago

Well that's going to remain an issue for a long time: TeX has close to half a century head start :)

larsrc|1 year ago

Judging 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|1 year ago

Typist 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

Vt71fcAqt7|1 year ago

One 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.