From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: placement of \title, \author,... Date: Fri, 3 Dec 2010 21:03:01 +0100 Message-ID: References: <87aaktclgp.wl%sebhofer@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=58502 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POcm2-0008AU-9O for emacs-orgmode@gnu.org; Fri, 03 Dec 2010 16:02:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POcm1-00071d-0q for emacs-orgmode@gnu.org; Fri, 03 Dec 2010 16:02:34 -0500 Received: from mail-ew0-f43.google.com ([209.85.215.43]:39340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POcm0-00071S-Ou for emacs-orgmode@gnu.org; Fri, 03 Dec 2010 16:02:32 -0500 Received: by ewy22 with SMTP id 22so7199645ewy.30 for ; Fri, 03 Dec 2010 13:02:32 -0800 (PST) In-Reply-To: <87aaktclgp.wl%sebhofer@gmail.com> 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: Sebastian Hofer Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On Nov 28, 2010, at 8:11 PM, Sebastian Hofer wrote: > 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) > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode