From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Levy, Roger" Subject: "No definition for class" error in export to latex Date: Sat, 11 Jun 2011 13:11:14 -0700 Message-ID: <3134F11C-4D50-42A7-B160-7C8C921D5798@ucsd.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVUWi-0005Eb-9N for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 16:11:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVUWd-00040F-99 for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 16:11:24 -0400 Received: from iport-c2-out.ucsd.edu ([132.239.0.119]:6020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVUWc-0003zN-NC for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 16:11:19 -0400 Content-Language: en-US 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, 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=3Dtest-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, pre= sumably 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 comma= nd 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=3Dtest-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 (Aq= uamacs 2.2) and Org mode 7.5. Incidentally, trying to export to HTML with /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ --visit=3Dtest-file.org \ --funcall org-export-as-html-batch complains differently:=20 OVERVIEW Exporting... File mode specification error: (file-error "Cannot open load file" "html-he= lper-mode") Exporting... Exporting... File mode specification error: (file-error "Cannot open load file" "html-he= lper-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=