Charles Berry <ccbe...@ucsd.edu> 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

Reply via email to