[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] latex (beamer) export and short title
From: |
Nicolas Goaziou |
Subject: |
Re: [O] latex (beamer) export and short title |
Date: |
Fri, 06 Jul 2012 16:09:08 +0200 |
Hello,
Andreas Leha <address@hidden> writes:
> I'd be a regular user of such functionality, especially for
> presentations. But as the concept is useful in other (LaTeX-)
> documents, a more general support for short titles might be appropriate,
> I'd say.
It is as simple as using a filter to remove the title provided by the
template and install your own.
#+begin_src emacs-lisp
(defun ngz-enforce-my-title (contents backend info)
;; In LaTeX export, if I defined a title with a short title, remove
;; default title command provided by template, if any.
(if (or (not (eq backend 'e-latex))
(not (string-match "^\\\\title\\[.*\\]{.*}$" contents))
(not (string-match "^\\\\title{.*}\n" contents)))
contents
(replace-match "" nil nil contents)))
(add-to-list 'org-export-filter-final-output-functions 'ngz-enforce-my-title)
#+end_src
Now you can use the following Org setup:
#+begin_src org
#+TITLE: Long Title
#+LATEX_HEADER: \title[short title]{long title}
#+end_src
Regards,
--
Nicolas Goaziou