From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Mason Subject: Re: Filter not working (org 8.0.3) Date: Thu, 05 Sep 2013 16:34:55 -0230 Message-ID: <5228D5D7.60503@mun.ca> References: <5228A8DF.5010704@mun.ca> <87y57bp7gv.fsf@gmail.com> <5228B9EB.10909@mun.ca> <8761uf150h.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHerY-0004MZ-63 for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 15:05:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHerR-0006Kv-W9 for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 15:05:04 -0400 Received: from nina.ucs.mun.ca ([134.153.232.76]:43363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHerR-0006Ke-Pp for emacs-orgmode@gnu.org; Thu, 05 Sep 2013 15:04:57 -0400 In-Reply-To: <8761uf150h.fsf@gmail.com> 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: org-mode Hello, On 09/05/2013 04:15 PM, Nicolas Goaziou wrote: > #+LATEX_HEADER: \usepackage[right=2in,left=0.5in]{geometry} > #+LATEX_HEADER: \usepackage{parskip} > > * Setup :noexport: > #+BEGIN_SRC emacs-lisp :exports both > (defun margin-graphics (contents backend info) > (when (eq backend 'latex) > (replace-regexp-in-string "\\`\\\\includegraphics.*?\\({.+}\\)" > "\\\\marginpar{\\\\includegraphics[width=0.9\\\\marginparwidth]\\1} " > contents))) > > (add-to-list (make-local-variable 'org-export-filter-link-functions) 'margin-graphics) > #+END_SRC That got rid of the verbatim output. Thanks. Unfortunately the replacement of \includegraphics... by \marginpar... still does not work: #+CAPTION: Acicular [[../images/acicular.eps]] produces \begin{figure}[htb] \centering \includegraphics[width=.9\linewidth]{../images/acicular.eps} \caption{Acicular} \end{figure} I'm using org Emacs 24.3.1 (Org mode 8.0.3). Please don't spend any more time on this on my account: I'll use ConTeXt instead. Cheers, Roger This electronic communication is governed by the terms and conditions at http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php