Is it possible to do an equivalent of \renewcommand{\command}[args]{text}
for a reserved character such as the caret (^)? For example, if I want to reduce the space after every superscript, i.e. i would want a^b to be replaced by a^b\! systematically?
Many thanks
General ⇒ Redefine reserved character
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Redefine reserved character
Hi Andy,
welcome to the board!
You could make ^ to an active character and then define a macro for it:
Stefan
welcome to the board!
You could make ^ to an active character and then define a macro for it:
Code: Select all
\catcode`^=\active
\newcommand{^}[1]{{\sp{#1}\!}}
LaTeX.org admin
Re: Redefine reserved character
Hey thanks glad to be here and that looks perfect!