emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] LaTeX export: images in margin


From: Roger Mason
Subject: Re: [O] LaTeX export: images in margin
Date: Fri, 16 Aug 2013 12:02:46 -0230
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

Hello once more,

On 08/16/2013 11:34 AM, Roger Mason wrote:

(defun margin-graphics (contents backend info)
  (when (eq backend 'latex)
    (replace-regexp-in-string "\\`\\\\includegraphics.+\\({.+}\\)"
       "\\\\marginpar{\\\\includegraphics\1} " contents)))

(add-to-list 'org-export-filter-link-functions 'margin-graphics)

However, the LaTeX file contains this:

\marginpar{\includegraphics^A}

rather than the expected

\marginpar{\includegraphics[]{filename}}
This line:

(replace-regexp-in-string "\\`\\\\includegraphics.+\\({.+}\\)"
       "\\\\marginpar{\\\\includegraphics\1} " contents)))

should be:

(replace-regexp-in-string "\\`\\\\includegraphics.+\\({.+}\\)"
       "\\\\marginpar{\\\\includegraphics\\1} " contents)))

Note the double backslash before the '1' in the replacement text.

Cheers,
Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php



reply via email to

[Prev in Thread] Current Thread [Next in Thread]