From mboxrd@z Thu Jan  1 00:00:00 1970
From: Richard Lawrence <richard.lawrence@berkeley.edu>
Subject: Re: Avoid escaping braces in LaTeX export?
Date: Fri, 07 Jun 2013 14:27:26 -0700
Message-ID: <87r4gdehmp.fsf@berkeley.edu>
References: <87bo7hkf20.fsf@berkeley.edu> <20130607204548.6fabee8f@aga-netbook>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38392)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1Ul4K5-0004uP-3G
	for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 17:35:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1Ul4K3-0008TE-U8
	for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 17:35:49 -0400
Received: from plane.gmane.org ([80.91.229.3]:52378)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1Ul4K3-0008TA-EQ
	for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 17:35:47 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1Ul4Jy-0001U6-FV
	for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 23:35:42 +0200
Received: from c-50-161-39-52.hsd1.ca.comcast.net ([50.161.39.52])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <emacs-orgmode@gnu.org>; Fri, 07 Jun 2013 23:35:42 +0200
Received: from richard.lawrence by c-50-161-39-52.hsd1.ca.comcast.net with
	local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <emacs-orgmode@gnu.org>; Fri, 07 Jun 2013 23:35:42 +0200
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=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

Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:

> Dnia 2013-06-07, o godz. 10:26:31
> Richard Lawrence <richard.lawrence@berkeley.edu> napisaƂ(a):
>
>> Here's my use case.  I often create new commands in LaTeX to abstract
>> over some common pattern so I can easily type it and change it later
>> if necessary.  For example, when taking notes on readings, I have a
>> command that makes its argument into an `inline comment' (basically
>> an aside to myself) defined as follows:
>> 
>> #+LATEX_HEADER: \newcommand{\ic}[1]{{\footnotesize [~#1~]}}
>> 

> Quick and dirty workaround (untested):
>
> #+LATEX_HEADER: \def\ic!#1!{{\footnotesize [~#1~]}}
>
> Of course, you may do \def\ic(#1){...}, \def\ic~#1~{...} etc.  The
> "delimiter" characters may not appear in the argument, though (nesting
> is not supported!).
>
> This is very un-LaTeX-y (it is much lower-level TeX syntax), but it is
> occasionaly useful (and heavily used by LaTeX itself, btw - this is
> used among others for delimiting optional arguments).

Hmm, that does work for this case, thanks!  

Still, this won't work directly for cases where I have loaded a LaTeX
package that provides a command which uses curly braces.  (I could
redefine such commands, as above, but that could get real ugly, real
fast...).  It seems like this a general problem that the exporter should
have a way to handle.

-- 
Best,
Richard