Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using facilities of latex-extra with exam documentclass #33

Open
mandarm opened this issue Jul 20, 2020 · 0 comments
Open

Using facilities of latex-extra with exam documentclass #33

mandarm opened this issue Jul 20, 2020 · 0 comments

Comments

@mandarm
Copy link

mandarm commented Jul 20, 2020

The exam documentclass provides a questions environment, which comprises one or more \question s. Each question can have parts, subparts, etc. A skeleton might look like:

\begin{questions}

\question[2] What is foo? That 2 in square brackets denotes the marks for this question.
  \begin{choices}
  \choice bar
  \choice baz
  \end{choices}
  
\question (\totalpoints{} marks)
  Blah blah
  \begin{parts}
  \part[1] This is a difficult question worth 1 point.

    \begin{oneparchoices}
    \choice TRUE
    \choice FALSE
    \end{oneparchoices}

  \part[2] How many points is this question with 4 alternatives worth?
    \begin{choices}
    \choice 1
    \choice 2
    \choice 3
    \choice 4
    \end{choices}

I've been trying to modify latex/section-hierarchy to take care of the above. I tried

     (setq latex/section-hierarchy
           (append '("\\\\\\(checkbox\\|choice\\)\\_>"
                     "\\\\\\(begin\\|end\\){\\(onepar\\)?\\(checkbox\\|choic\\)es}"
                     "\\\\subsubpart\\(\\[[0-9]+\\]\\)?"
                     "\\\\\\(begin\\|end\\){subsubparts}"
                     "\\\\subpart\\(\\[[0-9]+\\]\\)?"
                     "\\\\\\(begin\\|end\\){subparts}"
                     "\\\\part\\(\\[[0-9]+\\]\\)?"
                     "\\\\\\(begin\\|end\\){parts}"
                     "\\\\question\\(\\[[0-9]+\\]\\)?"
                     "\\\\\\(begin\\|end\\){questions}")
                   (remove "\\\\part\\*?\\_>" latex/section-hierarchy))))

C-cC-n and C-cC-p takes me forward and backward across questions as expected, but I can't get things to work with parts, choices, etc. If you could please tell me what I'm doing wrong, that would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant