[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ALMOST SOLVED] overriding frame insertion in beamer.el
From: |
Mandar Mitra |
Subject: |
[ALMOST SOLVED] overriding frame insertion in beamer.el |
Date: |
Thu, 10 Aug 2023 16:12:24 +0530 |
Keita Ikumi wrote (Thu, Aug 10, 2023 at 04:31:27PM +0900):
> Hmm, strange. I'll have a look later. Sorry for inconvenience.
Not at all! On the contrary, thank you all so much for maintaining and
improving a wonderful package.
I suspect (but don't know for sure) that there was something wrong with this
part of my beamer.el:
(LaTeX-add-environments
'("frame" (lambda (env &rest ignore) ...
I copy-pasted the "frame" entry from elpa/auctex-13.2.1/style, and wrote my own
LaTeX-beamer-env-frame in my beamer.el to override the package version. Things
now work almost like I wanted.
Three follow-up questions:
1. The "frame" entry in elpa/auctex-13.2.1/style/beamer.el looks like
'("frame" LaTeX-env-args [TeX-arg-beamer-overlay-spec]
[TeX-arg-beamer-default-overlay-spec]
[TeX-arg-key-val (("allowdisplaybreaks" ("0" "1" "2" "3" "4"))
("allowframebreaks") ("b") ("c") ("t") ("s")
("noframenumbering")
("fragile" ("singleslide"))
("environment") ("label") ("plain") ("shrink")
("squeeze"))]
LaTeX-beamer-env-frame)
If I hit just ENTER in response to the prompt from TeX-arg-beamer-overlay-spec,
I don't get any prompts from TeX-arg-beamer-default-overlay-spec and
TeX-arg-key-val. In order to get those prompts, I *have* to provide some input
to TeX-arg-beamer-overlay-spec. Am I missing some setting?
2. Sorry, I must be missing something obvious, but I couldn't find a defun for
LaTeX-add-environments, or much documentation regarding the format of the entry
for each environment.
3. Low priority: would it be worth adding a customisable variable to let people
choose between the \frametitle{} and \begin{frame}{title} styles?
On a related note, in case this is useful to anyone, I also have (in the
beamer.el within the TeX-style-private directory)
---------------------------------------------------------------------------
(setq-local imenu-create-index-function
'imenu-default-create-index-function)
(setq-local imenu-generic-expression
'((nil ; put in top-level menu
"^\\\\begin{frame}\\(\\[[a-z,]+\\]\\)?{\\(.+\\)}"
2 ; which bracketed expression goes in title
)))
---------------------------------------------------------------------------
so that I can use imenu to jump to a slide by title.
-mandar