From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Hofer Subject: placement of \title, \author,... Date: Sun, 28 Nov 2010 20:11:18 +0100 Message-ID: <87aaktclgp.wl%sebhofer@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from [140.186.70.92] (port=46970 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMmes-0003V1-4b for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 14:11:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMmer-0004FV-06 for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 14:11:33 -0500 Received: from lo.gmane.org ([80.91.229.12]:39700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMmeq-0004Ep-7k for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 14:11:32 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PMmeo-0001QO-RL for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 20:11:30 +0100 Received: from ahgate1.aei.uni-hannover.de ([130.75.117.49]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Nov 2010 20:11:30 +0100 Received: from sebhofer by ahgate1.aei.uni-hannover.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Nov 2010 20:11:30 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, would it be possible to move the \title, \author, \date commands to after \begin{document}? This may sound like a stupid suggestion, but some classes (in particular revtex - the standard class for journals of the american physical society) throw errors otherwise. A possible patch is attached. I tested the modification for the standard classes (article, report, book and beamer) and they all work fine. I'm wondering if Carsten never experienced this problem... TIA Sebastian diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 91bf380..e58c11d 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1281,6 +1281,8 @@ OPT-PLIST is the options plist for current buffer." (org-export-apply-macros-in-string org-export-latex-append-header) ;; define alert if not yet defined "\n\\providecommand{\\alert}[1]{\\textbf{#1}}" + ;; beginning of the document + "\n\\begin{document}\n\n" ;; insert the title (format "\n\n\\title{%s}\n" @@ -1297,8 +1299,6 @@ OPT-PLIST is the options plist for current buffer." (format-time-string (or (plist-get opt-plist :date) org-export-latex-date-format))) - ;; beginning of the document - "\n\\begin{document}\n\n" ;; insert the title command (when (string-match "\\S-" title) (if (string-match "%s" org-export-latex-title-command)