From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marvin Doyley Subject: org text color highlights fails Date: Thu, 4 Nov 2010 11:13:32 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1972210254==" Return-path: Received: from [140.186.70.92] (port=42237 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PE1VR-000385-3U for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 11:13:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PE1VO-0007s9-Az for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 11:13:35 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:43113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PE1VO-0007s2-69 for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 11:13:34 -0400 Received: by fxm2 with SMTP id 2so1492631fxm.0 for ; Thu, 04 Nov 2010 08:13:32 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1972210254== Content-Type: multipart/alternative; boundary=001636e911d8e4191c04943b99d9 --001636e911d8e4191c04943b99d9 Content-Type: text/plain; charset=ISO-8859-1 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 "%s" 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 "%s" path desc)) ((eq format 'latex) (format "\\colorbox{%s}{%s}" path desc))))) ;; require \usepackage{color} Examples: [[color:blue][test this out]] [[hl:yellow][highlighted text]] --001636e911d8e4191c04943b99d9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi there,

There have been some useful discussions on changing text c= olor in org mode, a very useful feature when editing manuscripts.
Anyway= , I tried the following function without any success. No change in color, i= t 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=3D\"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=3D\"background-color:%s;\">%s= </font>" path desc))
((eq format 'latex)
(forma= t "\\colorbox{%s}{%s}" path desc))))) ;; require \usepackage{colo= r}

Examples:
[[color:blue][test this out]]
[[hl:yellow][highlighted = text]]

--001636e911d8e4191c04943b99d9-- --===============1972210254== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1972210254==--