emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Robert Klein <kleinrob@mpip-mainz.mpg.de>
To: emacs-orgmode@gnu.org
Subject: Re: Help with new exporter
Date: Thu, 11 Jul 2013 07:22:45 +0200	[thread overview]
Message-ID: <51DE4125.7050608@mpip-mainz.mpg.de> (raw)
In-Reply-To: <37de0540be0008c1748751bae1f6c044@johnrakestraw.com>

Hi John,

I don't think I had those square brackets, yesterday, but see at the end
about them.


Anyway, I thought of something which gives me a result I'd say is Ok for me:

1. Change the .org files as follows
   - add a space to empty headings (as written yesterday)
   - add "texht:nil" to the #+OPTIONS: line (without the quotes)

2. Use the following class definition:

#+begin_src emacs-lisp
(setq org-latex-classes
      '(("exam"
         "\\documentclass[12pt]{exam}
% BEGIN exam Defaults
[NO-DEFAULT-PACKAGES]
[PACKAGES]

\\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} %% %s" "\\end{questions}")
         ("\\question %% %s" . "\\question* %% %s")
         ("\\begin{parts} %% %s" "\\end{parts}")
         ("\\part %% %s" . "\\part* %% %s"))))
#+end_src

As you can see, I still have the %s (now without the curly braces) but
as a LaTeX comment after %...

About the labels, well, I'd just leave them; as long as you don't
reference them they shouldn't disturb anything.


If you still get those square brackets; I use org-mode from the git
repository, as of yesterday or the day before.  Are you using org-mode
8.0.2 or earlier?  I think this gets fixed by Aaron Ecay's patch from
May 02/03.  If you don't want to use the git version, download version
8.0.5 from orgmode.org.


Does this work for you?


Best regards
Robert




On 07/10/2013 10:46 PM, John Rakestraw wrote:
> Hi, Robert --
> 
> Thanks very much for your work on this. I'm now *much* closer than I
> was. However, I'm not there yet.
> 
> Here's a snippet of the tex file that I need:
> 
> --8<---------------cut here---------------start------------->8---
> \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}
> --8<---------------cut here---------------end--------------->8---
> 
> However, if I use the org-latex-class definition that you suggested,
> this is what I get:
> 
> --8<---------------cut here---------------start------------->8---
> \begin[]{questions}{}
> \label{sec-1}
> \question[]{}
> \label{sec-1-1}
> A paragraph here describes this section and tells students how many
> terms to
> identify.
> \begin[]{parts}{}
> \label{sec-1-1-1}
> \part[]{}
> \label{sec-1-1-1-1}
> term 1
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-2}
> term 2
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-3}
> term 3
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-4}
> term 4
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-5}
> term 5
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-6}
> term 6
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-7}
> term 7
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-8}
> term 8
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-9}
> term 9
> \newpage
> \fillwithdottedlines{\fill}
> \newpage
> \end{parts}
> 
> --8<---------------cut here---------------end--------------->8---
> 
> 
> The additional lines in the tex file add numbers and oddly formatted
> text to the pdf. The numbering scheme is also off -- these lines in the
> class definition:
> 
> \renewcommand\thequestion{\Roman{question}}
> \renewcommand\thepartno{\arabic{partno}}
> \renewcommand\partlabel{\thepartno.}
> 
> are supposed to have to have the question-level headings numbered with
> Roman numerals and the part-level headings numbered with Arabic numbers.
> But for some reason that numbering scheme isn't imposed.
> 
> Perhaps I need either just to write in latex or to work with what Rasmus
> is suggesting; I've not had time yet to digest his suggestions. I'm
> floating on the edge of my knowledge here....
> 
> Thanks again.
> 
> --John
> 


-- 
Robert Klein - Max Planck-Institut für Polymerforschung
Ackermannweg 10
55128 Mainz

  parent reply	other threads:[~2013-07-11  5:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 16:32 Help with new exporter John Rakestraw
2013-07-10 16:58 ` Robert Klein
2013-07-10 17:27   ` John Rakestraw
2013-07-10 19:37 ` Robert Klein
2013-07-10 20:46   ` John Rakestraw
2013-07-10 21:04     ` John Rakestraw
2013-07-11  4:04       ` Charles Berry
2013-07-11  5:22     ` Robert Klein [this message]
2013-07-11 15:15       ` John Rakestraw
2013-07-11 23:05         ` John Rakestraw
2013-07-12  3:00           ` Thomas S. Dye
2013-07-10 19:56 ` Rasmus
     [not found] <51DFEC7B.7050504@mpip-mainz.mpg.de>
2013-07-12 11:47 ` Robert Klein
2013-07-12 13:41   ` Nick Dokos
2013-07-12 14:12     ` Rasmus
2013-07-12 14:59       ` Nick Dokos
2013-07-12 15:05         ` John Rakestraw
2013-07-12 15:27           ` Rasmus
2013-07-12 15:47             ` John Rakestraw
2013-07-12 15:28           ` Nick Dokos
2013-07-12 15:49             ` John Rakestraw
2013-07-12 16:20               ` Nick Dokos

Reply instructions:

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51DE4125.7050608@mpip-mainz.mpg.de \
    --to=kleinrob@mpip-mainz.mpg.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).