From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marvin Doyley Subject: Re: org text color highlights fails Date: Thu, 4 Nov 2010 12:04:12 -0400 Message-ID: References: <4CD2D142.6010809@christianmoe.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0975242779==" Return-path: Received: from [140.186.70.92] (port=50037 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PE2IV-00047x-FA for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 12:04:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PE2IP-0007iL-Ei for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 12:04:14 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:58279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PE2IP-0007hv-6h for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 12:04:13 -0400 Received: by fxm2 with SMTP id 2so1541240fxm.0 for ; Thu, 04 Nov 2010 09:04:12 -0700 (PDT) In-Reply-To: <4CD2D142.6010809@christianmoe.com> 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: mail@christianmoe.com Cc: emacs-orgmode@gnu.org --===============0975242779== Content-Type: multipart/alternative; boundary=001636c5b4150e2c9704943c4f67 --001636c5b4150e2c9704943c4f67 Content-Type: text/plain; charset=ISO-8859-1 I see, Does anybody know how to change text color in the Org buffer ? for what it is worth I currently use the following for marking up my students latex file #+Latex_header:\newcommand{\insertt}[1]{\textcolor{blue}{#1} } ; Insert the following text #+Latex_header:\newcommand{\delete}[1]{\sout{\textcolor{red}{#1}} }; delete the following thanks M On Thu, Nov 4, 2010 at 11:29 AM, Christian Moe wrote: > 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"%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]] >> >> >> >> >> _______________________________________________ >> 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 > > --001636c5b4150e2c9704943c4f67 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I see,

Does anybody know how to change text color in the Org buffer = ?

for what it is worth I currently use the following for marking up = my students latex file

#+Latex_header:\newcommand{\insertt}[1]{\text= color{blue}{#1} }=A0=A0=A0=A0 ; Insert the following text
#+Latex_header:\newcommand{\delete}[1]{\sout{\textcolor{red}{#1}} }; delete= the following

thanks
M

On Thu,= Nov 4, 2010 at 11:29 AM, Christian Moe <mail@christianmoe.com> wrote:
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 buffe= r. 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
=A0"color" =A0nil
=A0(lambda (path desc format)p
=A0 (cond
=A0 =A0((eq format'html)
=A0 =A0 (format"<span style=3D\"color:%s;\">%s</sp= an>" =A0path desc))

=A0 =A0((eq format'latex)
=A0 =A0 (format"{\\color{%s}%s}" =A0path desc)))))
;; org-mode highlight
(org-add-link-type
=A0"hl" =A0nil
=A0(lambda (path desc format)
=A0 (cond
=A0 =A0((eq format'html)

=A0 =A0 (format"<font style=3D\"background-color:%s;\"&g= t;%s</font>" =A0path desc))
=A0 =A0((eq format'latex)
=A0 =A0 (format"\\colorbox{%s}{%s}" =A0path 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@gn= u.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


--

Christian Moe
E-mail: =A0mail@= christianmoe.com
Website: http://chris= tianmoe.com


--001636c5b4150e2c9704943c4f67-- --===============0975242779== 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 --===============0975242779==--