From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: latex newcommand in org Date: Fri, 20 May 2016 19:45:12 +0100 Message-ID: <87k2iomuvb.fsf@ucl.ac.uk> References: <4623b22355d94329a72b69bd254e036d@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3pQJ-0004pu-6P for emacs-orgmode@gnu.org; Fri, 20 May 2016 14:45:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3pQF-0002Sv-1Q for emacs-orgmode@gnu.org; Fri, 20 May 2016 14:45:22 -0400 Received: from mail-am1on0129.outbound.protection.outlook.com ([157.56.112.129]:15862 helo=emea01-am1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3pQE-0002Sn-O6 for emacs-orgmode@gnu.org; Fri, 20 May 2016 14:45:18 -0400 In-Reply-To: <4623b22355d94329a72b69bd254e036d@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Marvin M. Doyley's message of "Fri, 20 May 2016 18:10:47 +0000") 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" To: "Doyley, Marvin M." Cc: "emacs-orgmode@gnu.org" 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) -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-775-g3308a5