emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Moe <mail@christianmoe.com>
To: Marvin Doyley <marvinpas@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org text color highlights fails
Date: Thu, 04 Nov 2010 16:29:06 +0100	[thread overview]
Message-ID: <4CD2D142.6010809@christianmoe.com> (raw)
In-Reply-To: <AANLkTi=itCi+ze5NPfO5Lu9J8xqQ0LZnCPGCXwehjy=K@mail.gmail.com>

Hi,

You are not doing anything wrong.

The below solution only changes color in exported text (HTML, Latex).

It doesn't put different faces on different link types in the Org 
buffer. So it's not a great help in editing.

Yours,
Christian Moe

On 11/4/10 4:13 PM, Marvin Doyley wrote:
> Hi there,
>
> There have been some useful discussions on changing text color in org
> mode, a very useful feature when editing manuscripts.
> Anyway, I tried the following function without any success. No change
> in color, it just behave like a normal link (i.e, underlined). Could
> someone shed some light on what I am doing wrong ?
>
> Cheers,
>
> M
>
> ;; org-mode color
> (org-add-link-type
>   "color"  nil
>   (lambda (path desc format)p
>    (cond
>     ((eq format'html)
>      (format"<span style=\"color:%s;\">%s</span>"  path desc))
>
>     ((eq format'latex)
>      (format"{\\color{%s}%s}"  path desc)))))
> ;; org-mode highlight
> (org-add-link-type
>   "hl"  nil
>   (lambda (path desc format)
>    (cond
>     ((eq format'html)
>
>      (format"<font style=\"background-color:%s;\">%s</font>"  path desc))
>     ((eq format'latex)
>      (format"\\colorbox{%s}{%s}"  path desc))))) ;; require \usepackage{color}
>
>
> Examples:
> [[color:blue][test this out]]
> [[hl:yellow][highlighted text]]
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


-- 

Christian Moe
E-mail:  mail@christianmoe.com
Website: http://christianmoe.com

  reply	other threads:[~2010-11-04 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04 15:13 org text color highlights fails Marvin Doyley
2010-11-04 15:29 ` Christian Moe [this message]
2010-11-04 16:04   ` Marvin Doyley

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=4CD2D142.6010809@christianmoe.com \
    --to=mail@christianmoe.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=marvinpas@gmail.com \
    /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).