[texhax] Passing curly brace as a part of arguments to a macro

Philip TAYLOR P.Taylor at rhul.ac.uk
Sun Jul 29 23:05:51 CEST 2012

Mayuresh wrote:

> Is it not possible to send text with curly braces as macro argument?

It is very very difficult.  If you understand category codes, you
can manipulate them to temporarily make braces behave differently,
but this will conflict with any need that your macro places on
their normal definition.  Possibly simpler (depending on what you
are really setting out to achieve) is to pass the rather more

	{\char `\{}


	{\char `\{}

but a very great deal depends on what you are trying to accomplish.

Philip Taylor
\def \demo #1#2{[\tt #1#2]}
\demo {{\char `\{}}{\char `\}}

More information about the texhax mailing list