auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] [corrected patch]


From: Arash Esbati
Subject: Re: [AUCTeX-devel] [corrected patch]
Date: Fri, 30 Dec 2016 17:36:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1

Uwe Brauer <address@hidden> writes:

>    > If I get it right, the class has more options.  I think it should be:
>
>    > (defvar LaTeX-exam-class-options
>    >   '("answers" "noanswers"
>    >     "cancelspace" "nocancelspace"
>    >     "addpoints")
>    >   "Class options for the exam class.")
>
>
> Oops where did you find that? I thought I looked up the manual.

  -> emacsclientw -n `kpsewhich exam.cls` RET

I wanted to find out which class exam loads and stumbled over them.

>    > exam loads article.cls and takes the same class options and pass them to
>    > article.  You can implement this within AUCTeX by doing something like
>    > this in the style hook:
>
>    > (TeX-run-style-hooks "article")
>
>    > ;; Add options from `LaTeX-article-class-options' only once:
>    > (dolist (opt LaTeX-article-class-options)
>    >   (add-to-list 'LaTeX-exam-class-options opt))
>
>
> Do you mean
>
> (TeX-add-style-hook
>  "exam"
>  (lambda ()
> ; begin code from arash
>    (TeX-run-style-hooks "article")
>
>    ;; Add options from `LaTeX-article-class-options' only once:
>    (dolist (opt LaTeX-article-class-options)
>      (add-to-list 'LaTeX-exam-class-options opt))
> ; end code from arash

Exactly.  This way, you get access to options provided by article.cls
when you start a new document and `LaTeX-exam-class-options' is not
polluted every time you hit `C-c C-n'.

Best, Arash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]