emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Gary Oberbrunner <garyo@oberbrunner.com>
To: Orgmode Mailing List <emacs-orgmode@gnu.org>
Subject: ODT export custom link colors?
Date: Wed, 14 Dec 2011 12:34:14 -0500	[thread overview]
Message-ID: <CAFChFyjKt+c5VfDDJcLH=k=gnX8ixkbVqWZ37G1sC+cbviK++w@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2011-12-14 17:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 17:34 Gary Oberbrunner [this message]
2011-12-14 20:38 ` ODT export custom link colors? Christian Moe
2011-12-15  7:41   ` Jambunathan K
2011-12-15  9:03     ` Christian Moe
2011-12-20 22:01       ` Gary Oberbrunner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFChFyjKt+c5VfDDJcLH=k=gnX8ixkbVqWZ37G1sC+cbviK++w@mail.gmail.com' \
    --to=garyo@oberbrunner.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).