HackerTrans
TopNewTrendsCommentsPastAskShowJobs

vslavkin

no profile record

comments

vslavkin
·12 เดือนที่ผ่านมา·discuss
Well, yes. I'd say that's what emacs is. A framework for, mostly, text based applications in lisp. The advantage is its "unified interface".

Everything is configured in the same language, uses mostly the same keybinds, and can easily be integrated with other apps of the framework.
vslavkin
·2 ปีที่แล้ว·discuss
Agree. This could be easily done in org. I feel that if org was more popular, a lot of these solutions would disappear, or would be a small project that just reads some org properties. I guess it would be key to have better support for easier editors, like vscode and maybe even a dedicated editor
vslavkin
·2 ปีที่แล้ว·discuss
I've been using it a bit and it works very well, altough it's hard to get used to its way to define ”environments”. About cetz, I miss mainly circuits. There's a plugin, but's years behind circuitikz or its alternatives. I haven't tried it yet, so I can't tell if the support for mindmaps, trees, etc. is as good.
vslavkin
·2 ปีที่แล้ว·discuss
It seems good, and there's an emacs version, altough simpler than auctex.

Not having the preview in the code buffer, isn't a dealbreaker, especially when typst is so fast, but it's still a useful feature.

The part of the packages I wasn't talking about a tex feature but an emacs one. When you import a package, it'll usually add environments or macros (in typst i believe they are called commands). Emacs would recognize thay you imported a package and with a shortcut you are able to quickly insert a command without writing it manually (because that's too much time... Like a template) It also recognizes the document type for inserting sections, and whether you are or not inside a math environment.

Albeit, looking a bit more in typst I think it's as mandatory as in latex. Commands tend to be simpler and shorter, especially sections. So maybe it wouldn't impact as hard as I had thought.

For references, using bib files, it would be almost as good as latex.

The auto labeling is useful for align envs or itemizes. AucTeX adds a label to each item or equation automatically. Again, not a dealbreaker, but would be great.

Reading a bit more, it seems that typst is a bit more different that what I had thought. I will not switch till cetz is more mature or I find another alternative.

Maybe I'll remake my Cv in typst just to try it out (+ my cv is horrible)
vslavkin
·2 ปีที่แล้ว·discuss
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
vslavkin
·2 ปีที่แล้ว·discuss
ATM, I have 220 in my pc, another 200 in my laptop, and 100+ in my phone. But a few weeks ago, I deleted arch from my pc, and I had firefox with ~1500 and floorp with more or less the same, altough distributed in several workspaces. I spent a lot of time closing tabs. My problem is that I use tabs both for current work and for saving ideas/things, so I had to go through all the tabs, adding it to pocket when it deserved.
vslavkin
·2 ปีที่แล้ว·discuss
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
vslavkin
·2 ปีที่แล้ว·discuss
It 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
vslavkin
·2 ปีที่แล้ว·discuss
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)
vslavkin
·2 ปีที่แล้ว·discuss
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??)
vslavkin
·2 ปีที่แล้ว·discuss
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.
vslavkin
·2 ปีที่แล้ว·discuss
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)