From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chaitanya Krishna Subject: Re: Using color in latex export Date: Sat, 13 Sep 2014 12:05:07 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd74d8679c4c40502ef8a35 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSkCx-00065m-8s for emacs-orgmode@gnu.org; Sat, 13 Sep 2014 06:05:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSkCv-0000t6-KY for emacs-orgmode@gnu.org; Sat, 13 Sep 2014 06:05:31 -0400 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:65218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSkCv-0000t2-Cz for emacs-orgmode@gnu.org; Sat, 13 Sep 2014 06:05:29 -0400 Received: by mail-pa0-f50.google.com with SMTP id bj1so3040629pad.37 for ; Sat, 13 Sep 2014 03:05:28 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --047d7bd74d8679c4c40502ef8a35 Content-Type: text/plain; charset=UTF-8 Thank you (Nick and Tom). Both the solutions above worked. Regards, Chai On Fri, Sep 12, 2014 at 9:53 PM, Thomas S. Dye wrote: > Aloha Chai, > > Chaitanya Krishna writes: > > > Hello all, > > > > I would like to have some text in color when I export my org document to > > latex. > > > > I tried this: > > ... > > #+latex_header: \usepackage{color} > > \textcolor{red}{Text I want in red} > > One way is with a macro, e.g., > > #+MACRO: red \textcolor{red}{$1} > > This is {{{red(Text I want in red)}}}. > > Which exports to > > This is \textcolor{red}{Text I want in red}. > > > Or, more generally, > #+MACRO: color \textcolor{$1}{$2} > > This is {{{color(green,Text I want in green)}}}. > > Which exports to > This is \textcolor{green}{Text I want in green}. > > hth, > Tom > > -- > Thomas S. Dye > http://www.tsdye.com > -- 42 --047d7bd74d8679c4c40502ef8a35 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you (Nick and Tom). Both the solutions above worked.=

Regards,
Chai

On Fri, Sep 12, 2014 at 9:53 PM, Thom= as S. Dye <tsd@tsdye.com> wrote:
Aloha Chai,

Chaitanya Krishna <icymist@gmail.co= m> writes:

> Hello all,
>
> I would like to have some text in color when I export my org document = to
> latex.
>
> I tried this:
> ...
> #+latex_header: \usepackage{color}
> \textcolor{red}{Text I want in red}

One way is with a macro, e.g.,

#+MACRO: red \textcolor{red}{$1}

This is {{{red(Text I want in red)}}}.

Which exports to

This is \textcolor{red}{Text I want in red}.


Or, more generally,
#+MACRO: color \textcolor{$1}{$2}

This is {{{color(green,Text I want in green)}}}.

Which exports to
This is \textcolor{green}{Text I want in green}.

hth,
Tom

--
Thomas S. Dye
http://www.tsdye.com=



-- 42
--047d7bd74d8679c4c40502ef8a35--