[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Binding various TeX commands to single key
From: |
Ikumi Keita |
Subject: |
Re: Binding various TeX commands to single key |
Date: |
Sat, 04 Jun 2022 18:33:00 +0900 |
Hi Luca
>>>>> pglpm@duralexnonlex.org writes:
> I'd like to bind the call to the "LaTeX", "Biber", and "View"
> commands, as defined in TeX-command-list (and possibly others) each to
> a single key.
> I tried defining a function based on TeX-command-sequence and
> keybinding that:
> (defun launch-latex ()
> (interactive)
> (TeX-command-sequence 'LaTeX t)
> )
Use `TeX-command' for that purpose. These would fit the bill:
(defun launch-latex ()
(interactive)
(TeX-master-file nil nil t) ; optional for most cases
(TeX-command "LaTeX" #'TeX-master-file))
(define-key LaTeX-mode-map [f8] #'launch-latex)
And for "View", there is already a shortcut for it, you can just do
(define-key TeX-mode-map [f9] #'TeX-view)
Bye,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine