karthink
karthink
  • 7
  • 47 995
Emacs 💜 LaTeX
In which I LaTeX All The Things.
Instructions for trying out the LaTeX preview development branch: abode.karthinks.com/org-latex-preview
LaTeX input for impatient scholars: karthinks.com/software/latex-input-for-impatient-scholars/
0:00 This video isn't about writing LaTeX
0:45 Org mode and LaTeX
2:27 This video isn't about Org mode either
3:17 Demo: programming modes
4:39 Demo: the Emacs calculator
9:27 Demo: LaTeX-mode
10:31 Demo: the little things
11:31 How does it work?
12:28 Progress update
13:04 Just the typst of thing you'd ask
13:54 So, about calc...
Переглядів: 2 404

Відео

Every LLM in Emacs, with gptel
Переглядів 12 тис.9 місяців тому
GPTel is a simple LLM client for Emacs. It's always available but stays out of your way. It supports ChatGPT/Azure, Ollama, Gemini, Kagi and more. You can install it from MELPA. For more information: github.com/karthink/gptel 00:00 The pitch 00:27 Installation and basic usage 04:00 Fun with LLM system messages 04:27 Example: GPT-4 as a scientific calculator 05:47 Example: GPT-4 as a thesaurus 0...
Fast, Async LaTeX Previews in Org Mode
Переглядів 9 тис.Рік тому
Instructions for installation at abode.karthinks.com/org-latex-preview (Warning: development branch, bugs ahead!) 00:00 LaTeX previews in Org Mode 00:39 LaTeX Previews are generated in bulk, and hundreds of LaTeX fragments can be processed per second. 01:23 Images are placed in the buffer continuously as they are generated. 02:00 Preview generation is asynchronous and will not block Emacs. 03:0...
Don't like how it works? You can change Emacs.
Переглядів 6 тис.2 роки тому
In which the pursuit of a tiny change in Emacs' behavior leads us deep into the belly of the beast. A semi-live coding session featuring the ultimate yakshaving experience. 00:00 Hyperbolic claims about Emacs 01:00 A tiny but annoying problem 02:03 Generalize much? 03:00 Customize, your fair-weather friend 03:49 Diving in headfirst 06:12 A promising find 11:06 A function that hides: the bottom ...
Vertico Extensions for Emacs
Переглядів 8 тис.2 роки тому
Vertico is an incremental completion system for Emacs. With these extensions you can modify how it works extensively. Vertico: github.com/minad/vertico Vertico extensions: github.com/minad/vertico/tree/main/extensions Timestamps: 00:00 - 01:32 What's Vertico, what are extensions 01:33 - 01:57 Vertico Grid 01:58 - 02:52 Vertico Reverse 02:53 - 03:29 Vertico Buffer 03:30 - 03:55 Combining differe...
Declickbaiting Elfeed - A live coding misadventure
Переглядів 1,4 тис.2 роки тому
In which I attempt to remove clickbait from my Elfeed feed... and briefly remove my Elfeed feed. Folks who want the code (which works, I assure you) can get it at karthinks.com/software/declickbait-elfeed. Folks who enjoy meandering coding streams or floundering Elisp sessions may get something out of the video instead. 00:00 Problem: Clickbait in RSS feed titles 02:05 Goal: Declickbait RSS fee...
popper.el - Popup buffers for Emacs
Переглядів 11 тис.3 роки тому
popper.el is a package for Emacs to toggle and cycle displaying buffers as "popups" easily. You can use it to access a "drop-down" terminal, for example. Code: github.com/karthink/popper Timestamps: 00:00 - 04:39 Motivation: Window management in Emacs 04:40 - 10:36 Demo of popper.el 10:37 - 15:25 Basic customization 15:25 - 19:01 Advanced usage & customization 19:02 - 20:50 A note on winner-mod...

КОМЕНТАРІ

  • @ivymuncher
    @ivymuncher 8 годин тому

    karthink my beloved

  • @HugoNobrega87
    @HugoNobrega87 День тому

    amazing work, well done and thanks!

  • @FineWine-v4.0
    @FineWine-v4.0 День тому

    Now how about Rust ?

  • @BLXXCH
    @BLXXCH День тому

    I want that calc tutorial

  • @Nidish9644
    @Nidish9644 День тому

    I watched this this morning, sent it to a couple friends with a proud "do that with VSCode" message, had lunch, and sat down and set this up on my emacs. I wasted a lot of time figuring out exactly how to install the forked branch of org, but the payout is amazing! Things were also clashing with some customizations I had in place with the previous preview system. My setup was based on org-latex-impatient, org-fragtog, and some other miscellanies. The new preview system is amaazzing!! Thank you very much for this! Also, are you enabling org-latex-preview-auto-mode globally for it to work on comments in codes also?

    • @Nidish9644
      @Nidish9644 День тому

      I'm also getting this warning whenever I call org latex preview in a non-org buffer: Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer *Calculator*> (calc-mode) I know youtube is a strange place to ask for help, but I'm not on anything else :P

    • @karthink
      @karthink 5 годин тому

      @@Nidish9644 Preview support for other major modes is not part of the branch yet, we need to figure out the details of the integration interface. Preview support for Org mode should be feature complete though, you can use it freely in Org mode for now.

    • @Nidish9644
      @Nidish9644 5 годин тому

      @@karthink Yeah in org-mode my experience is super seamless. Thank you! Also, have you looked at fixing previews while inside tables? I'm always annoyed by this if I make tables with a greek letter somewhere, then the org buffer just looks messed up.

    • @karthink
      @karthink 5 годин тому

      @@Nidish9644 Org tables are a bit of a mess and not easy to fix. There are no good solutions, but you could try github.com/casouri/valign

  • @randomsearches369
    @randomsearches369 День тому

    I like this type of flexing.

  • @DucBanal
    @DucBanal День тому

    Great, now I want that two hour tutorial I will never see... Joke aside, tremendous job!

  • @hooxenv9692
    @hooxenv9692 День тому

    this, like gptel, is brilliant. simple idea “what if one has latex preview…everywhere?” you don’t know you can’t live without it until you see it type of tech - looking forward to adopting this!

  • @stevechan5315
    @stevechan5315 День тому

    Your mind-map is so beauty, how do you make it?

    • @karthink
      @karthink 4 години тому

      It was created in Inkscape.

  • @softwarevisualization1803
    @softwarevisualization1803 2 дні тому

    This is awesome, and your cut from calc details back to LaTeX was hilarious.

  • @NeroPawn
    @NeroPawn 2 дні тому

    The transition to the Calc segment until the next when it was revealed Calc was already live previewing the computations blown me away, I use Calc daily but my mind was fully focused on the speech, really well crafted.

  • @amitenbal8252
    @amitenbal8252 4 дні тому

    Great video! Thank you so much! On another note, what mode do you use to edit MATLAB on Emacs?

  • @MitchelHumpherys
    @MitchelHumpherys 22 дні тому

    I want my Emacs-based Cursor replacement! We'll get there soon enough with fantastic projects like this one.

    • @karthink
      @karthink 21 день тому

      I think something like Cursor requires a lot more -- you'd need to index the entire project into a local vector database, for a start. gptel is just a wrapper around Curl.

  • @hooxenv9692
    @hooxenv9692 28 днів тому

    this is such an amazing package thank you for creating it! Humbling! 🎉🎉🎉

    • @karthink
      @karthink 21 день тому

      Hope it's useful

  • @aaronbriggs8310
    @aaronbriggs8310 29 днів тому

    Do you use Doom with this? I haven't been able to get it working with my setup.

  • @Xzcouter
    @Xzcouter Місяць тому

    Just out of curiosity since I am trying to get into emacs and org-mode. Working with org-mode with LaTeX doesn't seem to center the $$ $$ nor \[ \] environments during preview? Is this a quirk of emacs or something I am doing wrong? Moreover how does one exactly activate 'automode'? I cant seem to find any information on it.

    • @karthink
      @karthink Місяць тому

      Please see the link in the description. I suggest making a thread somewhere more conducive to help and troubleshooting -- either the Org mode mailing list, the Emacs subreddit, or some other dedicated Emacs space.

  • @patrickdelaney529
    @patrickdelaney529 2 місяці тому

    Amazing work! Thank you

  • @alexhahn565
    @alexhahn565 2 місяці тому

    Just checking in on this. Has this gotten into an "it just works" / easy to install state? Been using latex in org mode a lot lately, partially thanks to @karthink's other package gptel. Even outside of that I've been writing org files with latex + codeblocks more and more. I am running emacs a couple versions behind, and am fine to upgrade to 29.* if required for this to work but I don't want to go through the upgrade/ slight reworking of my init/ packages and then find out this isn't really ready to use out of the box yet/ requires a lot of setup. That being said bricking up my emacs every time I do a latex preview is getting pretty annoying at this point and I'm willing to invest an hour or two here or there/ read some documentation to get this async version working! PS, please don't read this as whiny "where's my package?!", greatly appreciate the work being done here/ on other things!

  • @sc04198
    @sc04198 3 місяці тому

    org 9.7 has been released in elpa, does it have this feature and how should I call it? it seems that the native org-latex-preview is still very slow

    • @karthink
      @karthink 3 місяці тому

      It doesn't, we missed the deadline since there are still backward compatibility issues to sort out. (It's a very big patch, and about 150 git commits). For now you'll have to continue to install Org from the fork (link in the video description) if you want the new org-latex-preview.

    • @sc04198
      @sc04198 3 місяці тому

      ​@@karthink Ah, I see, it's a very cool feature though! look forward to seeing it in the official release

  • @ieremiesvieira4615
    @ieremiesvieira4615 4 місяці тому

    Such a good video! Would love to see more about your configuration on using org-mode, like input methods, snippets but also visuals!

  • @cloudartisean
    @cloudartisean 4 місяці тому

    Just wanted to say, this package is amazing. Thank you for creating it and this video. I was using the package prior, but with this video I feel like its usage will be even better!

  • @MMABeijing
    @MMABeijing 4 місяці тому

    Hi Karthink, I have been using gptel for a couple of months now, I love it. Until now I have only used it with openai chatgpt. Where and how should I register the backend for , say, Claude within Doom Emacs? I left an github issue about that question, posting here as well . thank you so much, cheers ps: the readme says that backend should be registered as follow: (gptel-make-anthropic "Claude" ;Any name you want :stream t ;Streaming responses :key "your-api-key")

  • @pename3713
    @pename3713 4 місяці тому

    how did you get the syntax highlighting to work inside org mode for latex, I have tried but I could only get one monotone color.

    • @karthink
      @karthink 4 місяці тому

      You can do this by setting the variable org-highlight-latex-and-related. Check its documentation to see what it should be set to.

    • @pename3713
      @pename3713 4 місяці тому

      @@karthink Thank you! also do you have a short explanation of how exactly to use the package in the video, from what I understand we have to build it from source using make and make install but do we have to also include it in the init.el file for it to load or are there more intermediate steps?

    • @karthink
      @karthink 4 місяці тому

      @@pename3713 abode.karthinks.com/org-latex-preview/

  • @danieldoherty5034
    @danieldoherty5034 5 місяців тому

    @karthink, any update on where this is one year on? Also, will the preview functionality be accessible from LaTeX mode?

    • @karthink
      @karthink Місяць тому

      The project is stuck because there are a couple of blocking items (backward compatibility issues) to be resolved. I've been using it for over a year without issues though. LaTeX mode previews are not part of this project, but we're making it easy to use this library in LaTeX, markdown and other modes. Someone needs to write the adapters. Someone wrote a LaTeX-preview-mode prototype based on this, it's on the Org mailing list if you're interested.

    • @danieldoherty5034
      @danieldoherty5034 Місяць тому

      @@karthink Great. Thanks for the update.

  • @yaroslavdrachov9323
    @yaroslavdrachov9323 6 місяців тому

    Thanks a lot for your great work! Is there a right way to preview tikzpicture's in figure environment now?

    • @karthink
      @karthink Місяць тому

      I just use the auto-preview mode added to Org to preview tikz: share.karthinks.com/olp-auto-mode-tikz.mp4

  • @alexandrumatei5599
    @alexandrumatei5599 6 місяців тому

    wow! Amazing work!

  • @VivekHaldar
    @VivekHaldar 6 місяців тому

    Thanks for this great package!

  • @limalimon1738
    @limalimon1738 6 місяців тому

    Great great video! Loving every second of it. Is there any way we could help? Is there a project tracker/help wanted section or something? Keep it up!

  • @weiSane
    @weiSane 7 місяців тому

    The very first crime you committed was not using dark mode. It’s against the law

  • @fumiepichler616
    @fumiepichler616 7 місяців тому

    This is very nice, but should hook to TeX-mode, not to Org-mode.

  • @PabloParisino
    @PabloParisino 7 місяців тому

    Wow. I'm speechless. This is incredibly useful! Has this already been released in the main branch?

    • @karthink
      @karthink 7 місяців тому

      It's a pretty big merge (~120 commits) so it's taking a while to work out the kinks. There are also some breaking changes to Org that have to be addressed. It should land on main sometime in the next few months.

    • @PabloParisino
      @PabloParisino 7 місяців тому

      Thanks @@karthink for your quick and detailed answer. And thanks a lot for this great contribution, these features you bring are indeed very valuable. I hope they are released soon.

  • @jazzzAiman
    @jazzzAiman 7 місяців тому

    I can barely follow this although almost not 😂 what are the recommended resources that could bring me up to speed? Thnx

  • @evior5215
    @evior5215 7 місяців тому

    How did you set org-mode to ask for the label when creating an equation environment? Mine just automatically labels when I use the default org-cdlatex abbreviations.

    • @karthink
      @karthink 7 місяців тому

      You can add an "AUTOLABEL" string to entries in cdlatex-env-alist, see the top of the cdlatex library for configuration examples.

    • @evior5215
      @evior5215 7 місяців тому

      @@karthink Thank you, had to change the reftex-insert-label-flags to make it work. One more question, you used citar to reference the bibliography, but what do you use to reference the equation or section labels? The [eq:equation1] or [section:Headline] parts.

    • @karthink
      @karthink 7 місяців тому

      @@evior5215 It's RefTeX + TeX-fold-mode (as indicated elsewhere)

  • @aloispichler2159
    @aloispichler2159 7 місяців тому

    I need to exchange .tex-files with coauthors. Please, please provide this extension for regular latex mode as well.

    • @karthink
      @karthink 7 місяців тому

      The features are written to be modular, but someone will have to write a parser for latex files that you can query to get math fragment information (perhaps based on treesitter). Once that's in place it should be quite easy to adapt this preview system to .tex files. Hopefully someone will take on this project.

  • @bobhepple491
    @bobhepple491 8 місяців тому

    One word - humbling.

  • @worldgeektube
    @worldgeektube 8 місяців тому

    Tremendous work with an entertaining video tooc Can't wait to try it!

  • @sethbrown1763
    @sethbrown1763 8 місяців тому

    Ok, first let me correct myself - NOW MY MIND IS BOGGLED! What did I just see? You modified an application by inserting a function into the running application from inside a scratch buffer? I need a mind-expanding drug or something :) And the fix is to stick the patch into init.el? Am I understanding this correctly? WTF?

    • @karthink
      @karthink 8 місяців тому

      > You modified an application by inserting a function into the running application from inside a scratch buffer? This is a very common thing to do in Emacs, so I forget that it can seem novel sometimes. > And the fix is to stick the patch into init.el? Am I understanding this correctly? Yup, that works.

    • @sethbrown1763
      @sethbrown1763 8 місяців тому

      @@karthink Sorry to disturb you but how long have you been using Emacs? I just want a rough estimate of how long it might take me to get to the point of comfort with understanding Emacs. I'm a fairly experienced programmer, but even the way Lisp code works, twists my brain into knots :)

    • @karthink
      @karthink 8 місяців тому

      @@sethbrown1763 These are two different questions. If you're a programmer you probably only need weeks to months to get comfortable with the API and tweak Emacs' Lisp environment to your liking. I also don't think Lisp is any trickier to use than Ruby or Python? I've been using Emacs for about twenty years now, but only started using Elisp seriously in the last five. I'm also not a programmer, I couldn't write C to save my life.

  • @sethbrown1763
    @sethbrown1763 8 місяців тому

    Very impressive! My mind is literally boggled! :) Thank you for sharing this video

  • @alrightsquinky7798
    @alrightsquinky7798 8 місяців тому

    I’d really love to see a listing of all of the pertinent variables and minor modes used in this demo. This truly is an astounding improvement.

    • @karthink
      @karthink 8 місяців тому

      Do you mean variables pertaining to the new latex preview system? It's still under development so those aren't final yet. If everything goes as planned, it should "just work" out of the box with little need for tweaking variables. That said, eventually (this year) there will be video demos, a HOWTO guide and the updated Org mode manual for your perusal.

    • @jonatansexdoer96
      @jonatansexdoer96 8 місяців тому

      @@karthink It would still be nice to see /a/ config as a reference, even if it won't be valid soon, as the current documentation makes it a little tricky to know what the new/changed variables are.

    • @karthink
      @karthink 8 місяців тому

      @@jonatansexdoer96 @alrightsquinky7798 tinyurl.com/olp-help (These instructions will periodically go out of date as we're trying to figure out the final customization options before merging sometime in the next few months)

  • @alrightsquinky7798
    @alrightsquinky7798 8 місяців тому

    Money!!! Guess what this teacher’s using for his next batch of course documents? Way to go, Org Mode team!

  • @drifter5626
    @drifter5626 8 місяців тому

    unbind Esc

  • @aloispichler2159
    @aloispichler2159 8 місяців тому

    How to invoke this plugin?

    • @karthink
      @karthink 8 місяців тому

      Install Org-mode from the repo link in the description.

    • @aloispichler2159
      @aloispichler2159 8 місяців тому

      Thanks. Is this possible in ordinary latex-mode as well?

  • @ducksies
    @ducksies 8 місяців тому

    It works way better than I expected. Great work!

  • @GrantZhu-rq8ui
    @GrantZhu-rq8ui 8 місяців тому

    Waiting for your great work added into the official version.

  • @kooooodel
    @kooooodel 9 місяців тому

    Very excited about this. Thank you for your work!

  • @goofansu
    @goofansu 9 місяців тому

    14:24 Did you implement the Kagi FastGPT with gptel? I cannot find it in gptel, is there any plan to add it to gptel? Thanks

    • @karthink
      @karthink 9 місяців тому

      It's on the kagi-fastgpt branch, not merged into master yet. You can try it from there, the README will have the setup instructions.

    • @goofansu
      @goofansu 9 місяців тому

      @@karthinkOk, will try tomorrow. Happy New Year!

    • @goofansu
      @goofansu 9 місяців тому

      @@karthink Cool, it works as expected. I'll see if I can add Kagi Universal Summarizer to gptel, my use case is to summarize articles in elfeed.

    • @karthink
      @karthink 9 місяців тому

      @@goofansu There is some discussion about this in github.com/karthink/gptel/issues/166 A happy new year to you as well!

  • @jimmcleod3623
    @jimmcleod3623 9 місяців тому

    I continue to be impressed with this package. I am attempting to replicate your session. How do you get to mark-down mode around 2:13? Do you have this set as a default when addressing Gemini? Would you mind showing us your config specific settings for this demo?

    • @karthink
      @karthink 9 місяців тому

      I changed gptel-default-mode from Org to Markdown. To not overwhelm the viewer with too much detail, I wrote a helper function to do it silently and bound it to a key, then called it before opening the Gemini chat buffer.

  • @3t1cmidorfeb
    @3t1cmidorfeb 9 місяців тому

    Hi there, could you tell me what font that is? Thank you.

    • @karthink
      @karthink 9 місяців тому

      I added it to the video description.

  • @lucian6860
    @lucian6860 9 місяців тому

    Fantastic. A brilliant example of what makes Emacs so powerful.

  • @goofansu
    @goofansu 9 місяців тому

    9:39 The org-mode buffer seems live rendered, how do you do that?

    • @karthink
      @karthink 9 місяців тому

      tinyurl.com/ms2ksthc It's part of a rewrite of Org's LaTeX preview system, see my previous video for more details.

    • @goofansu
      @goofansu 9 місяців тому

      @@karthink Cool, thank you!