emacs-orgmode
[Top][All Lists]
Advanced

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

Exam LaTeX class


From: 陈贤文
Subject: Exam LaTeX class
Date: Thu, 18 Mar 2021 13:46:50 +0000
User-agent: Roundcube Webmail/1.4.10

Does someone have experiences with the exam LaTeX class: http://www-math.mit.edu/~psh/exam/examdoc.pdf?

I made a simple hack to make it work, by adding the following lines to the .emacs file:

(add-to-list 'org-latex-classes
'("exam"
"\\documentclass{exam}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

The next step I'm trying to do, but don't know how, is to ask LaTeX exporter to create two exports to PDF.

One export is the usual export.

The other export is to have [answers] in \documentclass, which in LaTeX will be:

\documentclass[answers]{exam}

When answers is specified, the resulted PDF will include the solutions that are preset in the solution environments.

The switch of printing or hiding solution environments can also be achieved by one of the following preamble codes: \printanswers or \noprintanswers.

I guess one way is to modify the org-latex-export-to-pdf function, so that when the document class is exam, the exporter first export without solutions, and then export to an other PDF file (such as foo-with_solutions.pdf).

But maybe someone else has hacked on the exam document class as well and would like to share their experiences?

Xianwen


reply via email to

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