|
From: | 陈贤文 |
Subject: | Re: Exam LaTeX class |
Date: | Wed, 24 Mar 2021 10:26:15 +0000 |
User-agent: | Roundcube Webmail/1.4.10 |
Dear Christine (and CC list), Thank you! On 2021-03-19 10:13, Christine Köhn wrote:
That's very interesting way to solve the problem using LaTeX. Thank you for sharing this. At the moment I'm leaning more towards solving it using emacs lisp.
Thank you again. I'm thinking of a function like following. I'm using comments to express the programming detail that I don't know how to do yet.
(deffun org-latex-export-to-pdf-exam ()
(interactive)
# do some emacs lisp to add \printanswers to the end of org document header, i.e., adding a line of #+LATEX_HEADER: \printanswers
(org-latex-export-to-pdf)
# do some emacs lips to move the foo.pdf to foo-with_solutions.pdf
# do some emacs lisp to add \noprintanswers to the end of org document header, i.e., removing the line of #+LATEX_HEADER: \printanswers and adding a line of #+LATEX_HEADER: \noprintanswers
(org-latex-export-to-pdf)
# remove the line of #+LATEX_HEADER: \noprintanswers
)
I don't know enough emacs lisp to fill in the details here for now. However, I think this would be a way to do it within emacs. So each time I call org-latex-export-to-pdf-exam, it would export two PDF files, one with solutions and one without.
What do you think?
Yours sincerely,
Xianwen
|
[Prev in Thread] | Current Thread | [Next in Thread] |