emacs-orgmode
[Top][All Lists]
Advanced

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

Re: How to handle strings with commas in macros?


From: Kaushal Modi
Subject: Re: How to handle strings with commas in macros?
Date: Thu, 7 Apr 2022 12:42:40 -0400

On Thu, Apr 7, 2022 at 12:30 PM William Denton <wtd@pobox.com> wrote:
I'm using macros to format names in a LaTeX export, like so:

on export and LaTeX will format it.  That works fine.  But in an index of names,
if I want

{{{m(Denton, William)}}}

then Org takes that as two arguments to the macro, and outputs

\m{Denton}

Is there a way to get around this?

The comma needs to be backslash escaped.

{{{m(Denton\, William)}}}

Ref: (org) Macro Replacement

> (1) Since commas separate the arguments, commas within arguments have
to be escaped with the backslash character.  So only those backslash
characters before a comma need escaping with another backslash
character.

reply via email to

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