From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: latex (beamer) export and short title Date: Fri, 06 Jul 2012 21:24:20 +0200 Message-ID: <87txxksnff.fsf@gnu.org> References: <87d34dc8nz.fsf@med.uni-goettingen.de> <87ipe11fq5.fsf@altern.org> <80liixuvvr.fsf@somewhere.org> <87txxlay20.fsf@med.uni-goettingen.de> <87bojtq8vv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnE7z-0002iE-Em for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 15:23:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnE7x-0006zH-PQ for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 15:23:43 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:55624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnE7x-0006z9-HM for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 15:23:41 -0400 Received: by wibhm2 with SMTP id hm2so849958wib.0 for ; Fri, 06 Jul 2012 12:23:39 -0700 (PDT) In-Reply-To: <87bojtq8vv.fsf@gmail.com> (Nicolas Goaziou's message of "Fri, 06 Jul 2012 16:09:08 +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: Nicolas Goaziou Cc: Andreas Leha , emacs-orgmode@gnu.org Nicolas Goaziou writes: > 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 Argh... this is why I love the new org-export.el !! :) -- Bastien