Re: Exam LaTeX class

2021-03-28 Thread 陈贤文
Dear Diego, Gracias! I slightly modified your solution. I added the #+INCLUDE line to the end of #+LATEX_HEADER, because then it will overwrite any previous \printanswers and \noprintanswers defined in the HEADER. #+TITLE:... ... #+LATEX_HEADER: \usepackage{hyperref} #+INCLUDE:

Re: Exam LaTeX class

2021-03-24 Thread Diego Zamboni
Hi Xianwen, I think the easiest way to conditionally include text in the preamble of the document would be by including a file which can be empty sometimes, and contain the appropriate text when needed. For example, you could have something like this in your Org file: #+include:

Re: Exam LaTeX class

2021-03-24 Thread 陈贤文
Dear Christine (and CC list), Thank you! On 2021-03-19 10:13, Christine Köhn wrote: Here is one way to do the latex part. You could pass a jobname to latex. I have this \IfEndWith*{\jobname}{withsolution}{% \usepackage{todonotes} \printanswers }{\usepackage[disable]{todonotes}} in a

Re: Exam LaTeX class

2021-03-19 Thread Christine Köhn
Hi Xianwen, Xianwen Chen (陈贤文) writes: > Does someone have experiences with the exam LaTeX class: > http://www-math.mit.edu/~psh/exam/examdoc.pdf? Yes, but I haven't useid it with orgmode. > The next step I'm trying to do, but don't know how, is to ask LaTeX > exporter to create

Exam LaTeX class

2021-03-18 Thread 陈贤文
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}" ("\\sect