From mboxrd@z Thu Jan  1 00:00:00 1970
From: Richard Lawrence <richard.lawrence@berkeley.edu>
Subject: Avoid escaping braces in LaTeX export?
Date: Fri, 07 Jun 2013 10:26:31 -0700
Message-ID: <87bo7hkf20.fsf@berkeley.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40512)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1Ul0Yq-00076L-3F
	for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 13:34: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 1Ul0Yp-0001Zc-1T
	for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 13:34:48 -0400
Received: from plane.gmane.org ([80.91.229.3]:40544)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1Ul0Yo-0001ZS-R0
	for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 13:34:46 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1Ul0Yj-0005g7-3c
	for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 19:34:41 +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 19:34:41 +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 19:34:41 +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

Hi all,

I'm wondering if there is a way to prevent the LaTeX exporter from
escaping "{" and "}" characters.  There are export options to control
the behavior of a number of other special characters, but I don't see
any way to control export of braces in the documentation.  Am I just
missing it?  If not, I'd like to request this as a feature.

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~]}}

Then in my notes I have things like:

 Marcus' point is more subtle, though, than that the substitutional
 reading validates these inferences or theorems while the objectual
 reading does not.  \ic{This would not persuade Quine, for example: the
 failure of existential generalization in modal contexts is for Quine a
 reason to reject quantified modal logic, rather than give the
 existential quantifier a different reading.}  

The new exporter exports this as:

 Marcus' point is more subtle, though, than that the substitutional
 reading validates these inferences or theorems while the objectual
 reading does not.  \ic\{This would not persuade Quine, for example: the
 failure of existential generalization in modal contexts is for Quine a
 reason to reject quantified modal logic, rather than give the
 existential quantifier a different reading.\} 

with the braces wrapping the argument for my custom command escaped.
This breaks the custom command in the export.

I can't test it at the moment, but I believe the old exporter did not
escape these braces, as I used this command regularly and it compiled
correctly.

I would like to be able to get the old behavior back.  I don't mind
manually escaping braces when necessary, because I almost always do not
want them escaped.  I understand if this is not a reasonable default,
but it would be nice for me if it were something I could set on an
#+OPTIONS line.  If others are interested in this, I can look into
creating a patch.

(By the way, it looks like there was a patch for a similar issue in
commit c6fd49726f2eaf417361b190b37e2d8ffb5864fc, but that is from April
2009 and therefore would apply to the old exporter.)

Thanks for your insights!

-- 
Best,
Richard