From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Oberbrunner Subject: ODT export custom link colors? Date: Wed, 14 Dec 2011 12:34:14 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f3ba4d3d4136b04b410c626 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rasik-0007jo-Nh for emacs-orgmode@gnu.org; Wed, 14 Dec 2011 12:34:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rasie-00074H-At for emacs-orgmode@gnu.org; Wed, 14 Dec 2011 12:34:22 -0500 Received: from mail-gy0-f169.google.com ([209.85.160.169]:38813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rasie-000742-8B for emacs-orgmode@gnu.org; Wed, 14 Dec 2011 12:34:16 -0500 Received: by ghrr18 with SMTP id r18so566702ghr.0 for ; Wed, 14 Dec 2011 09:34:15 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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: Orgmode Mailing List --e89a8f3ba4d3d4136b04b410c626 Content-Type: text/plain; charset=ISO-8859-1 I use custom links like [[bgcolor:red][Warning!]] to add some color to my documents. I can export those colors to HTML and LaTeX like this: (org-add-link-type "bgcolor" nil (lambda (path desc format) (cond ((eq format 'html) (format"%s" path desc)) ((eq format 'latex) (format"\\colorbox{%s}{%s}" path desc)) (t (format"BGCOLOR LINK (%s): {%s}{%s}" format path desc))))) ... but as you can see in the odt case I don't know what to put to get my colors to come through. Is there anything I can do there? Is it some kind of XML styling stanza? (By the way, before I added my 't' case above, it returned nil, which caused the odt exporter to blow up with an unhelpful error. Would a patch for that be considered too much of a corner-case? I'd be happy to submit one.) -- -- Gary --e89a8f3ba4d3d4136b04b410c626 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I use custom links like [[bgcolor:red][Warning!]] to add some color to my d= ocuments. =A0I can export those colors to HTML and LaTeX like this:

(org-add-link-type
=A0 "bgco= lor" =A0nil
=A0 (lambda (path desc format)
=A0 =A0(cond
=A0 = =A0 ((eq format 'html)
=A0 =A0 =A0(format"<span style= =3D\"background-color:%s;\">%s</span>" =A0path desc= ))
=A0 =A0 ((eq format 'latex)
=A0 =A0 =A0(format"\\colorbox{%s}{%s}" =A0path desc))
<= div>=A0 =A0 (t
=A0 =A0 =A0(format"BGCOLOR LINK (%s): {%s}{%s= }" =A0format path desc)))))

... but as you ca= n see in the odt case I don't know what to put to get my colors to come= through. =A0Is there anything I can do there? =A0Is it some kind of XML st= yling stanza?

(By the way, before I added my 't' case above, = it returned nil, which caused the odt exporter to blow up with an unhelpful= error. =A0Would a patch for that be considered too much of a corner-case? = =A0I'd be happy to submit one.)

--
-- Gary
--e89a8f3ba4d3d4136b04b410c626--