[OS X TeX] Concatinating backslash and id

Ross Moore ross at ics.mq.edu.au
Wed May 10 19:30:36 EDT 2006

Hi Peder,

On 11/05/2006, at 7:09 AM, Peder Axensten wrote:

> I need to define a macro, but I have the macro name without a  
> backslash.
> How can I concatenate them (\ and #1, below)?


    cs = control sequence

Or you can leave some braces and one of the \expandafter commands
  (as in Frank's posting):


This also works when #1 contains non-letter charcters;
e.g., digits and punctuation.

But in that case, to call the macro that was defined this
way, you need to use, e.g.  \csname item37name\endcsname

> /Peder

Hope this helps,


Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

More information about the MacOSX-TeX mailing list