From mboxrd@z Thu Jan  1 00:00:00 1970
From: Charles Berry <ccberry@ucsd.edu>
Subject: Re: New Exporter html - latex - beamer
Date: Wed, 20 Mar 2013 14:16:34 +0000 (UTC)
Message-ID: <loom.20130320T150435-767@post.gmane.org>
References: <m2sj3wmlgx.fsf@sachwertpartner.de> <87a9q217wp.fsf@ucl.ac.uk>
	<m2hak7i4ug.fsf@sachwertpartner.de> <87620nc68j.fsf@tajo.ucsd.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([208.118.235.92]:32818)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1UIJoy-0001C6-OY
	for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 10:16:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1UIJov-0003cn-Tj
	for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 10:16:52 -0400
Received: from plane.gmane.org ([80.91.229.3]:39885)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1UIJov-0003ch-MS
	for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 10:16:49 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1UIJpG-0008L5-T1
	for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 15:17:10 +0100
Received: from 172-7-166-26.lightspeed.sndgca.sbcglobal.net ([172.7.166.26])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <emacs-orgmode@gnu.org>; Wed, 20 Mar 2013 15:17:10 +0100
Received: from ccberry by 172-7-166-26.lightspeed.sndgca.sbcglobal.net with
	local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <emacs-orgmode@gnu.org>; Wed, 20 Mar 2013 15:17:10 +0100
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=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: emacs-orgmode@gnu.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