From: "Christine Köhn" <firstname.lastname@example.org>
To: "Xianwen Chen (陈贤文)" <email@example.com>
Subject: Re: Exam LaTeX class
Date: Fri, 19 Mar 2021 11:13:23 +0100 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
Xianwen Chen (陈贤文) writes:
> Does someone have experiences with the exam LaTeX class:
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 two exports to PDF.
> 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
Here is one way to do the latex part. You could pass a jobname to latex.
I have this
in a myexam.sty file to switch between modes (with or without solutions
and todo notes) and use it in the latex file with
You could add your own latex class to org-latex-classes and add this
The jobname has to be passed to latex with something like -jobname
withsolution if you want it to be with solutions. I use a Makefile for
this purpose which calls latexmk
latexmk -pdf -pdflatex="pdflatex --interaction=errorstopmode" -use-make
and adds -jobname=$(basename $@) if asked to create a pdf ending with
withsolution.pdf. I can send you the Makefile if you're interested.
To use the jobname from within orgmode, you'll have to change
org-latex-pdf-process to use the jobname if needed. I think one way to
achieve this is to add a new export backend which is derived from latex
(see org-export-define-derived-backend) and which sets
org-latex-pdf-process accordingly (and resets it afterwards).
Hope this helps.
next prev parent reply other threads:[~2021-03-19 10:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 13:46 Exam LaTeX class Xianwen Chen (陈贤文)
2021-03-19 10:13 ` Christine Köhn [this message]
2021-03-24 10:26 ` Xianwen Chen (陈贤文)
2021-03-24 13:16 ` Diego Zamboni
2021-03-28 16:33 ` Xianwen Chen (陈贤文)
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).