[texhax] single commands to start and end superscript

Susan Dittmar SDittmar at eureca.de
Tue Feb 12 19:13:40 CET 2008

Quoting Matthew Leingang (leingang at math.harvard.edu):
> On Feb 12, 2008, at 10:01 AM, Susan Dittmar wrote:
> >I would like to change an existing macro in a LaTeX document. Said
> >macro parses a sequence of characters, outputting them one by one,
> >changing fonts or substituting symbols when encountering special
> >characters.
> >
> >What I would like to add is a 'switch to superscript' and a 'leave
> >superscript' character. Thus, I need single commands for those two
> >actions.
> >
> >I do not know enough of the bare bones to come up with those, so  any
> >help would be appreciated.
> Sounds interesting.  Can you post code of the existing macro and some
> examples of it in use?



% Some font declarations (as I did not want to shorten the parser macro)

% call the (recursive) parser and make sure it terminates:
% the parser itself (originally from songbook.sty):
		\ifx#1##% double sharp because we're inside a \def
					\ChBassFont /%
						\bgroup\ChBkFont [\egroup%
							\bgroup\ChBkFont ]\egroup%


``simple'' example:\\

what I have now for superscripts: \\

% what I would like for superscripts (I think I know how to find the point
% for the `end superscript' position, that's not yet part of the macro):


More information about the texhax mailing list