emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Hofer <sebhofer@gmail.com>
To: emacs-orgmode@gnu.org
Subject: placement of \title, \author,...
Date: Sun, 28 Nov 2010 20:11:18 +0100	[thread overview]
Message-ID: <87aaktclgp.wl%sebhofer@gmail.com> (raw)

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)

             reply	other threads:[~2010-11-28 19:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28 19:11 Sebastian Hofer [this message]
2010-12-03 20:03 ` placement of \title, \author, Carsten Dominik

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=87aaktclgp.wl%sebhofer@gmail.com \
    --to=sebhofer@gmail.com \
    --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).