From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: Re: Help with new exporter Date: Wed, 10 Jul 2013 18:58:23 +0200 Message-ID: <51DD92AF.8020809@mpip-mainz.mpg.de> References: <28c5d705dc41bc66d5a17e23d5dc9324@johnrakestraw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwxiw-0005n3-5J for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 12:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uwxiu-0002Mt-Lh for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 12:58:38 -0400 Received: from gate1.mpip-mainz.mpg.de ([194.95.63.248]:31416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwxiu-0002Mj-Bx for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 12:58:36 -0400 Received: from [10.20.2.71] (port=55026 helo=vmmail1.mpip-mainz.mpg.de) by gate1.mpip-mainz.mpg.de with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Uwxir-0004rD-0V for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 18:58:33 +0200 Received: from p54a36683.dip0.t-ipconnect.de ([84.163.102.131] helo=[192.168.254.115]) by vmmail1.mpip-mainz.mpg.de with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72) (envelope-from ) id 1UwxiT-0003KH-Lj for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 18:58:10 +0200 In-Reply-To: <28c5d705dc41bc66d5a17e23d5dc9324@johnrakestraw.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi John, would you mind posting an example of the org file, too? It would be easier for me to wrap my thoughts about this.. (The gurus probably don't it...) Thanks a lot Robert On 07/10/2013 06:32 PM, John Rakestraw wrote: > Greetings, list -- > > I've been using Philip Hirschhorn's exam documentclass > (http://www-math.mit.edu/~psh/#ExamCls) for several years to produce my > exams. I've been writing the exams in org-mode and using the exporter to > produce the pdf. > > I've recently moved to org 8.0. (I like it!) I've successfully converted > all of my other export class definitions, but I can't figure out how to > define the exam class so that I can export my exams. I've pasted below > the class definition that worked with the previous exporter (I know it's > clumsy, but it worked) and also a sample version of what I need in the > tex file. > > (I know I could just write the tex file directly, but it's nice to have > all of the course materials included in human-readable form in the > course org file.) > > My problem is that I can't get the exporter to produce chunks like this: > > \begin{questions} > \question > A paragraph describing how the students should answer the following > questions. > \begin{parts} > \part > A multi-line question > \part > Another multi-line question > \end{parts} > \end{questions} > > Thanks for whatever advice anyone can offer. > > --John > > > Old template: > --8<---------------cut here---------------start------------->8--- > (setq org-export-latex-classes (cons '("exam" > ### I know that in the new exporter I need to change this variable to > "org-latex-classes" ### > "% BEGIN exam Defaults > [NO-DEFAULT-PACKAGES] > [PACKAGES] > \\documentclass[12pt]{exam} > \\usepackage{palatino} > \\extrawidth{.5in} > \\extraheadheight{-.75in} > \\extrafootheight[-3in]{-.75in} > \\pagestyle{headandfoot} > \\NoKey > \\NumberOfVersions{1} > \\renewcommand\\thequestion{\\Roman{question}} > \\renewcommand\\thepartno{\\arabic{partno}} > \\renewcommand\\partlabel{\\thepartno.} > > > % END exam Defaults > > " > ("\\begin{questions}" "\\end{questions}" > "\\begin{questions}" "\\end{questions}") > ("\\question" . "\\question*") > ("\\begin{parts}" "\\end{parts}" "\\begin{parts}" > "\\end{parts}") > ("\\part" . "\\part*")) > > org-export-latex-classes)) > > --8<---------------cut here---------------end--------------->8--- > > An example of what I need the exporter to produce: > > --8<---------------cut here---------------start------------->8--- > \documentclass[letterpaper]{exam} > \extrawidth{.5in} > \extraheadheight[.3in]{-.75in} > \extrafootheight{-.25in} > \raggedright > \renewcommand\thequestion{\Roman{question}} > \renewcommand\thepartno{\arabic{partno}} > \renewcommand\partlabel{\thepartno.} > \firstpageheader{Name: \enspace\makebox[3in]{\hrulefill}\\Exam > 1\\}{}{Introductory Class \\May 7, 2013\\} > \begin{document} > > \begin{coverpages} > text describing how the exam should be printed and prepared for > distribution. > \end{coverpages} > > > > \begin{questions} > \question > A paragraph here describes this section and tells students how many > terms to > identify. > \begin{parts} > \part > term 1 > \vspace*{\fill} > \part > term 2 > \vspace*{\fill} > \part > term 3 > \vspace*{\fill} > \part > term 4 > \vspace*{\fill} > \part > term 5 > \vspace*{\fill} > \part > term 6 > \vspace*{\fill} > \part > term 7 > \vspace*{\fill} > \part > term 7 > \vspace*{\fill} > \part > term 8 > \end{parts} > \end{questions} > \newpage > \fillwithdottedlines{\fill} > \newpage > \begin{questions} > \question > Short Answer. A paragraph describing how I want students to respond to the > following questions. I want to leave vertical space filled with dotted > lines > between the questions, and I want two questions on each page. > \begin{parts} > \part > This is the first question. It will be several lines long, so I'm > writing enough > filler here to add at least a second line. > \fillwithdottedlines{\fill} > \part > This is the second question. It will also be several lines long, so I need > filler enough to get to the second line for this example. > \fillwithdottedlines{\fill} > > \newpage > \fillwithdottedlines{\fill} > \newpage > \part > This is the 3d question. > \fillwithdottedlines{\fill} > \end{parts} > \end{questions} > \newpage > \fillwithdottedlines{\fill} > \newpage > \begin{questions} > \question > Essay Question. This is a section of essay questions. Students will > answer only > one of these questions, so I don't need to leave space between the two > questions. > \begin{parts} > \part > The first of the essay questions goes here. It will be several lines > long, so I > want enough text in the example to provide a line break. > \part > The second essay question. It is also several lines long, so I'll add some > rambling text here for the second line. > \end{parts} > \end{questions} > \fillwithdottedlines{\fill} > \newpage > \fillwithdottedlines{\fill} > \end{document} > > --8<---------------cut here---------------end--------------->8--- > >