emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Levy, Roger" <rlevy@ucsd.edu>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: "No definition for class" error in export to latex
Date: Sat, 11 Jun 2011 13:11:14 -0700	[thread overview]
Message-ID: <3134F11C-4D50-42A7-B160-7C8C921D5798@ucsd.edu> (raw)

Hi,

I am an org-mode newbie and trying to learn how to export to latex and html from the command line, and have encountered a difficulty when I include a custom class in the latex header.  Here's a sample file ("test-file.org") I'm using:

***

#+TITLE: Test
#+LaTeX_CLASS: apa

file contents

***

and here is the command I'm using:

/Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \
    --visit=test-file.org \
    --funcall org-export-as-latex-batch

which gives me the output

OVERVIEW
Exporting to LaTeX...
No definition for class `apa' in `org-export-latex-classes'

and no .tex file output.  From within Aquamacs, I don't get this error, presumably because I have the following in my .emacs file:

(add-to-list 'org-export-latex-classes
	     '("apa"
	       "\\documentclass{apa}
               [NO-DEFAULT-PACKAGES]
               \\usepackage{graphicx}
               \\usepackage{apacite}"
	       ("\\section{%s}" . "\\section*{%s}")
	       ("\\subsection{%s}" . "\\subsection*{%s}")
	       ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
))

How can I make this modification of org-export-latex-classes from the command line?  I have tried putting the above content in a file ("$HOME/tmp/add.el") and making the call

/Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \
    --load $HOME/tmp/add.el \
    --visit=test-file.org \
    --funcall org-export-as-latex-batch

but this gives me the error

  Symbol's value as variable is void: org-export-latex-classes

I would be very grateful for any suggestions!  This is GNU Emacs 23.3.1 (Aquamacs 2.2) and Org mode 7.5.

Incidentally, trying to export to HTML with

/Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \
    --visit=test-file.org \
    --funcall org-export-as-html-batch

complains differently: 

OVERVIEW
Exporting...
File mode specification error: (file-error "Cannot open load file" "html-helper-mode")
Exporting...
Exporting...
File mode specification error: (file-error "Cannot open load file" "html-helper-mode")
Saving file /tmp/test-file.html...
Wrote /tmp/test-file.html
HTML export done, pushed to kill ring and clipboard

but it actually does produce a sensible html file.

Many thanks in advance for patience with my newbie question.

Best

Roger

             reply	other threads:[~2011-06-11 20:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 20:11 Levy, Roger [this message]
2011-06-11 23:37 ` "No definition for class" error in export to latex Nick Dokos
2011-06-12  2:10   ` Levy, Roger
2011-06-15 19:08 ` Eric S Fraga

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=3134F11C-4D50-42A7-B160-7C8C921D5798@ucsd.edu \
    --to=rlevy@ucsd.edu \
    --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).