emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: "Tory S. Anderson" <torys.anderson@gmail.com>
Cc: orgmode list <emacs-orgmode@gnu.org>
Subject: Re: export for Beamer with author options
Date: Thu, 21 Aug 2014 18:17:29 -0400	[thread overview]
Message-ID: <87fvgpqyh2.fsf@gmail.com> (raw)
In-Reply-To: <87a96x4itu.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

Hi Tory,

You’re right...I inadvertently tested the proposed solution with the
latex backend, but it turns out there’s a small difference between how
the latex and beamer backends calculate their \author.  I think both
backends should behave identically here and that the latex behavior is
more correct (i.e. #+options: author:nil suppresses generation of \author
entirely), and the attached patch makes beamer follow latex’s lead.

(It actually seems like there’s an opportunity to factor lots of common
code out of both backends’ template functions, making mismatches like
this less likely in the future.  But that’s a bigger project...)

Sorry for the confusion,
Aaron


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-beamer.el-Match-latex-backend-in-generation-of-au.patch --]
[-- Type: text/x-diff, Size: 1069 bytes --]

From 8e327b373effb3690cfc0d8fec85b51704d1fb92 Mon Sep 17 00:00:00 2001
From: Aaron Ecay <aaronecay@gmail.com>
Date: Thu, 21 Aug 2014 18:09:04 -0400
Subject: [PATCH] ox-beamer.el: Match latex backend in generation of \author.

* lisp/ox-beamer.el (org-beamer-template): Match latex backend in
generation of \author.
---
 lisp/ox-beamer.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 97763e9..b415481 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -846,8 +846,7 @@ holding export options."
 		       (org-export-data (plist-get info :email) info))))
        (cond ((and author email (not (string= "" email)))
 	      (format "\\author{%s\\thanks{%s}}\n" author email))
-	     (author (format "\\author{%s}\n" author))
-	     (t "\\author{}\n")))
+	     ((or author email) (format "\\author{%s}\n" (or author email)))))
      ;; 6. Date.
      (let ((date (and (plist-get info :with-date) (org-export-get-date info))))
        (format "\\date{%s}\n" (org-export-data date info)))
-- 
2.0.4


[-- Attachment #3: Type: text/plain, Size: 16 bytes --]


-- 
Aaron Ecay

  reply	other threads:[~2014-08-21 22:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21 20:57 export for Beamer with author options Tory S. Anderson
2014-08-21 21:16 ` Aaron Ecay
2014-08-21 21:46   ` Tory S. Anderson
2014-08-21 22:17     ` Aaron Ecay [this message]
2014-08-22 12:08       ` Nicolas Goaziou
2014-08-22 13:08         ` Tory S. Anderson
2014-08-22 13:37           ` Nicolas Goaziou
2014-08-22 18:56             ` Marcin Borkowski
2014-08-22 19:23               ` Marcin Borkowski
2014-08-22 19:43             ` Aaron Ecay

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=87fvgpqyh2.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=torys.anderson@gmail.com \
    /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).