From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: latex (beamer) export and short title Date: Fri, 06 Jul 2012 16:09:08 +0200 Message-ID: <87bojtq8vv.fsf@gmail.com> References: <87d34dc8nz.fsf@med.uni-goettingen.de> <87ipe11fq5.fsf@altern.org> <80liixuvvr.fsf@somewhere.org> <87txxlay20.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn9Gq-0000ih-B0 for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 10:12:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sn9Gj-0003k2-VX for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 10:12:31 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:55219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn9Gj-0003jo-ND for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 10:12:25 -0400 Received: by wibhm11 with SMTP id hm11so566261wib.12 for ; Fri, 06 Jul 2012 07:12:23 -0700 (PDT) In-Reply-To: <87txxlay20.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Fri, 06 Jul 2012 14:12:07 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andreas Leha Cc: emacs-orgmode@gnu.org Hello, Andreas Leha 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