emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Avoid escaping braces in LaTeX export?


From: Richard Lawrence
Subject: Re: [O] Avoid escaping braces in LaTeX export?
Date: Fri, 07 Jun 2013 14:27:26 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Marcin Borkowski <address@hidden> writes:

> Dnia 2013-06-07, o godz. 10:26:31
> Richard Lawrence <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]