emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ODT export custom link colors?
@ 2011-12-14 17:34 Gary Oberbrunner
  2011-12-14 20:38 ` Christian Moe
  0 siblings, 1 reply; 5+ messages in thread
From: Gary Oberbrunner @ 2011-12-14 17:34 UTC (permalink / raw)
  To: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1173 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-20 22:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 17:34 ODT export custom link colors? Gary Oberbrunner
2011-12-14 20:38 ` Christian Moe
2011-12-15  7:41   ` Jambunathan K
2011-12-15  9:03     ` Christian Moe
2011-12-20 22:01       ` Gary Oberbrunner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).