Skip to main content
added 631 characters in body
Source Link
Adobe
  • 1.9k
  • 14
  • 27

You can check TeX-style-hook-list:

(if (member '("beamer") TeX-style-hook-list)
    (message "beamer is used")
  (message "beamer is not used") )

Edit

My solution is based on expecting aux file auctex creates for each tex file you visit. When I wrote this solution emacs parsed that file and it worked. Now when I open the same tex file emacs doesn't seem to read this file anymore. So one has to force emacs to read it:

(load (concat (file-name-directory buffer-file-name)
              TeX-auto-local
              "/"
              (file-name-sans-extension (file-name-nondirectory  buffer-file-name))
              ".el") )
(if (member '("beamer") TeX-style-hook-list)
    (message "beamer is used")
  (message "beamer is not used") )

then it works.

You can check TeX-style-hook-list:

(if (member '("beamer") TeX-style-hook-list)
    (message "beamer is used")
  (message "beamer is not used") )

You can check TeX-style-hook-list:

(if (member '("beamer") TeX-style-hook-list)
    (message "beamer is used")
  (message "beamer is not used") )

Edit

My solution is based on expecting aux file auctex creates for each tex file you visit. When I wrote this solution emacs parsed that file and it worked. Now when I open the same tex file emacs doesn't seem to read this file anymore. So one has to force emacs to read it:

(load (concat (file-name-directory buffer-file-name)
              TeX-auto-local
              "/"
              (file-name-sans-extension (file-name-nondirectory  buffer-file-name))
              ".el") )
(if (member '("beamer") TeX-style-hook-list)
    (message "beamer is used")
  (message "beamer is not used") )

then it works.

Source Link
Adobe
  • 1.9k
  • 14
  • 27

You can check TeX-style-hook-list:

(if (member '("beamer") TeX-style-hook-list)
    (message "beamer is used")
  (message "beamer is not used") )