[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] New Exporter html - latex - beamer
From: |
Charles Berry |
Subject: |
Re: [O] New Exporter html - latex - beamer |
Date: |
Wed, 20 Mar 2013 14:16:34 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
<cberry <at> ucsd.edu> writes:
>
> Robert Eckl <eckl.r <at> gmx.de> writes:
>
[snip]
>
I said
> You might be able to do what you want with filter functions.
>
>
> You can do that with this filter:
>
But you will want to add something to it to treat links without the :windowenv:
tag in the normal way
> ,----
> | #+BEGIN_SRC emacs-lisp
> | (defun filter-links-windowized (link backend info)
> | "Rid :windowenv: from LINK desc and format per BACKEND. Ignore INFO."
> | (let ((clean-string (replace-regexp-in-string ":windowenv:" "" link)))
Replace this line:
> | (if (eq backend 'latex)
with these:
(if (and
(eq backend 'latex)
(string-match ":windowenv:" link))
> | (let ((wprefix "\\begin{window}[0,r,")
> | (wpostfix"}},{}]\n\\parbox{0.7\\textwidth}{")
> | (repstrng
> | "\\1{\\\\includegraphics[width=0.28\\\\textwidth]\\2}"))
> | (concat wprefix
> | (file-name-sans-extension
> | (replace-regexp-in-string
> | "\\([^}]*}\\)\\({.*}\\)"
> | repstrng
> | clean-string))
> | wpostfix))
> | clean-string)))
> | #+end_src
> `----
then ordinary links like
[[http://good.place.com][See good place]]
will be handled in the usual manner by the latex backend
Chuck