emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] ODT export custom link colors?


From: Gary Oberbrunner
Subject: [O] ODT export custom link colors?
Date: Wed, 14 Dec 2011 12:34:14 -0500

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"<span style=\"background-color:%s;\">%s</span>"  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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]