unwanted space after a command

Gray, Gary L. euler at psu.edu
Mon Oct 25 15:41:53 CEST 2021


I have defined several commands that look like:


to use when entering computer code in documents for the classes I teach. I like the command because it allows me to put underscores or anything else I need in it. The command works nicely if I do something like:


but if I have a backslash in the command, an extra space is added after the command. For example, with

\fn{w = A\b}.

there is a space between the "b" and the period. How can I define a command like this that doesn't add that extra space?

Thank you!

-- Gary L. Gray (he/him/his)

More information about the texhax mailing list.