From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Niessen Subject: Re: Change color for two words in LaTeX export using cologr package? Date: Mon, 27 Jul 2015 11:09:18 +0200 Message-ID: <86k2tmm0g1.fsf@example.com> References: <87twst8yjx.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, Rainer M Krug writes: > Eric S Fraga writes: >> On Friday, 24 Jul 2015 at 15:07, Rainer M Krug wrote: >>> In an org document, I want to change the text colour of two words >>> {\color{red} red line } to red in a sentence and the rest should be >>> normal colour. >>> >>> I am missing something, as this changes the text colour for the rest >>> of the sentence into red. How can I only change the colour of the >>> two words? >> >> I usually do this type of thing as follows: >> >> #+latex: {\color{red} >> red line >> #+latex: } >> >> which allows for org-isms in the text. Alternatively, you could do: >> >> ... @@latex:{\color{red} red line}@@ >> >> if you don't need to use org syntax within the {}. > > Thanks - I will try it out on Monday. But it looks good. Or, use a macro "color"... I've begun writing such generic macros for basic and advanced formatting (see [1]), though they are currently limited to the HTML backend: #+MACRO: color @@html:$2@@ I'll update that particular one in the coming hours or days. Best regards, Fabrice Footnotes: [1] https://github.com/fniessen/org-macros -- Fabrice Niessen Leuven, Belgium http://www.pirilampo.org/