[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] New Exporter html - latex - beamer
From: |
Robert Eckl |
Subject: |
Re: [O] New Exporter html - latex - beamer |
Date: |
Mon, 25 Mar 2013 23:39:11 +0100 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
Charles Berry <address@hidden> writes:
> <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
My response is very late, sorry.
Thank you for your effort and the code. I'll try to use it, sounds good.
Reading from filters on worg didn't give me any idea how to use it,
but your code and explanations seems a good entry.
Perhaps later i'll try to adapt that functionality to the parallel
beamer/html-export.
Cu,
Robert