emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] org text color highlights fails


From: Christian Moe
Subject: Re: [Orgmode] org text color highlights fails
Date: Thu, 04 Nov 2010 16:29:06 +0100
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

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.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


--

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




reply via email to

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