[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Change color for two words in LaTeX export using cologr package?
From: |
Fabrice Niessen |
Subject: |
Re: [O] Change color for two words in LaTeX export using cologr package? |
Date: |
Mon, 27 Jul 2015 11:09:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) |
Hello,
Rainer M Krug <address@hidden> writes:
> Eric S Fraga <address@hidden> 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:<span style="color: $1">$2</span>@@
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/