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 07:29:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1

Hi Uwe,

Uwe Brauer <address@hidden> writes:

> Ok please tell me for future references which patch you prefer:
>
>
> # HG changeset patch
> +
> +;;; Code:
> +
> +(defvar LaTeX-exam-class-options '("answers" "addpoints")
> +  "Class options for the exam class.")
> +

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.")

> +(TeX-add-style-hook
> + "exam"
> + (lambda ()

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))

> +   (LaTeX-add-environments "solution"
> +                           "solutionorbox"
> +                           "solutionorlines"
> +                           "solutionordottedlines"

I think all these environments take an optional height argument, and
solutionorgrid is missing.  You should write:

(LaTeX-add-environments '("solution" [ "Height" ])
                        '("solutionorbox" [ "Height" ])
                        '("solutionorlines" [ "Height" ])
                        '("solutionordottedlines" [ "Height" ])
                        '("solutionorgrid" [ "Height" ])

> +                           '("questions" LaTeX-env-item)
> +                           '("parts" LaTeX-env-item)
> +                           '("subparts" LaTeX-env-item)
> +                           '("subsubparts" LaTeX-env-item))
> +

> +   (TeX-add-symbols
> +    '("part" [ "Points" ] (TeX-arg-literal " "))
> +    '("subpart" [ "Points" ] (TeX-arg-literal " "))

> +    '("subpart"  ["Points"] (TeX-arg-literal " "))

You have a dupe here.  Hope this helps.

Best, Arash



reply via email to

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