# HG changeset patch # User Uwe Brauer # Date 1579681674 -3600 # Wed Jan 22 09:27:54 2020 +0100 # Node ID d31c0dffa4504087895f291c0c44368d471ad6ad # Parent daa699562d03ef0423a49cfd067dc36ae3bea928 Update exam: support for environments like checkboxes, choices etc * style/exam.el ("exam"): Add support for checkboxes, choices etc. * Change the option for inserting choice to '("choice" (TeX-arg-literal " ")). diff -r daa699562d03 -r d31c0dffa450 style/exam.el --- a/style/exam.el Sat Jan 18 23:38:39 2020 +0100 +++ b/style/exam.el Wed Jan 22 09:27:54 2020 +0100 @@ -56,6 +56,14 @@ "question") ((string= environment "parts") "part") + ((string= environment "choices") + "choice") + ((string= environment "oneparchoices") + "choice") + ((string= environment "checkboxes") + "choice") + ((string= environment "oneparcheckboxes") + "choice") ((string= environment "subparts") "subpart") ((string= environment "subsubparts") @@ -94,6 +102,10 @@ (LaTeX-add-environments '("solution" [ "Height" ]) '("select") + '("choices" LaTeX-env-item) + '("oneparchoices" LaTeX-env-item) + '("checkboxes" LaTeX-env-item) + '("onepaircheckboxes" LaTeX-env-item) '("solutionorbox" [ "Height" ]) '("solutionorlines" [ "Height" ]) '("solutionordottedlines" [ "Height" ]) @@ -104,7 +116,7 @@ '("subsubparts" LaTeX-env-item)) ;; Tell AUCTeX about special environments: - (let ((envs '("questions" "parts" "subparts" "subsubparts"))) + (let ((envs '("questions" "parts" "subparts" "subsubparts" "choices" "oneparchoices" "checkboxes" "oneparcheckboxes"))) (dolist (env envs) (add-to-list 'LaTeX-item-list (cons env 'LaTeX-exam-insert-item)))) @@ -229,7 +241,7 @@ '("checkboxchar" 1) '("checkboxeshook" 0) '("checkedchar" 1) - '("choice" 0) + '("choice" (TeX-arg-literal " ")) '("choicelabel" 0) '("choiceshook" 0) '("chpgword" 1)