Eric’s suggestion works like a charm with the following modification #+latex_header:\newenvironment{response}{\color{red}}{\ignorespacesafterend}
Thanks I really appreciate the help. Cheers, M On May 20, 2016, at 5:00 PM, Leslie Watter <les...@watter.net<mailto:les...@watter.net>> wrote: You can use also macros in combination with latex \newcommand: Following there's a sample with html: #+MACRO: color @@html:<span style="color: $1">$2</span>@@ # macro sample: {{{color(red, aceitação)}}} Note: untested with latex newcommand....1 Cheers, LEslie On Fri, May 20, 2016 at 4:50 PM, Marcin Borkowski <mb...@mbork.pl<mailto:mb...@mbork.pl>> wrote: On 2016-05-20, at 20:45, Eric S Fraga <e.fr...@ucl.ac.uk<mailto:e.fr...@ucl.ac.uk>> wrote: > On Friday, 20 May 2016 at 18:10, Doyley, Marvin M. wrote: >> Hi there, >> >> In my group, we typically response to reviewers comments (in latex) by first >> defining the following command in the header >> >> \newcommand{\response}[1]{\textcolor{red}{#1}} >> then marking up the text as follows >> >> \response{red text} >> >> I try to do the same in org, i.e., putting >> #+latex_header:\newcommand{\response}[1]{\textcolor{red}{#1}} >> then \response{BLAH BLAH} in the text. The only snag is that on export I get >> \response\{BLAH BLAH\} > > Easiest solution is @@latex:\response{blah blah}@@ but that will lose you > all the org formatting. Longer solution is to use environments, such as > > #+begin_response > blah blah blah > #+end_response > > and define a "response" LaTeX environment, along these lines: > > #+latex_header: > \makeatletter\newenvironment{response}{\textcolor{red}}{}\makeatother > > (untested) Notice also that commands and environments in LaTeX are not interchangeable; there are things only commands can do and things only environments can do. (Well, not really - technically, I guess, environments are strictly more powerful than commands, though I'm not 100% sure - but some things are quite difficult to do with environments and trivial with commands.) See also http://tex.stackexchange.com/questions/102141/what-are-the-consideration-when-choosing-either-newcommand-or-newenvironment<https://urldefense.proofpoint.com/v2/url?u=http-3A__tex.stackexchange.com_questions_102141_what-2Dare-2Dthe-2Dconsideration-2Dwhen-2Dchoosing-2Deither-2Dnewcommand-2Dor-2Dnewenvironment&d=CwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=T41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=VX_uCv1LGJK_oX4her-tCTorTtXocoyqvQv-bAOtWGI&s=E18ceWIZlt89thSTn5MiwO2G6Qdu3XH9Mjo0TR1B37o&e=> Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski<https://urldefense.proofpoint.com/v2/url?u=http-3A__octd.wmi.amu.edu.pl_en_Marcin-5FBorkowski&d=CwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=T41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=VX_uCv1LGJK_oX4her-tCTorTtXocoyqvQv-bAOtWGI&s=3aRJKRHeKpjvY0YOvttPHrgWOpGqNNgIEP3SH_ZKcUU&e=> Faculty of Mathematics and Computer Science Adam Mickiewicz University -- Leslie H. Watter