What is the proper way of preventing my new command from eating following space? I define it as follows:
\newcommand\ISPPA{I\textsubscript{SPPA}}
To use it in text as such:
the \ISPPA{} for bla bla
Is there a way without requiring the braces? And either way is my new command alright or am I missing some best practice and might mess up spacing etc?
the \ISPPA{} foror using a control spacethe \ISSPA\ for. There are other methods, but those either lead to a non-standard syntax or make your macro inconsistent with other LaTeX-defined macros and their space-eating behaviour. See also https://tex.stackexchange.com/q/31091/35864. – moewe May 27 '22 at 13:07\ISPPA,becomes "ISPPA ,". You can counter that with thexspacepackage, but then you still need to look through your document to make sure it's doing things correctly. And if you need to look through your document, you might as well leave out xspace and do things by hand anyway. – Teepeemm May 27 '22 at 13:30\ISPPAgets tokenized as a control word token by TeX's reading apparatus. After tokenizing a control word token the reading apparatus switches to state S (skipping blanks). This is hardwired in TeX. You can have\ISPPAsurrounded by non-control-word-tokens that trigger state M(middle of line). E.g.,\newcommand\foo[1]{#1}...the \foo{\ISPPA} for bla bla. Instead of a control-word-token you can define a control-symbol-token (control sequence token whose name is a single non-letter) or an active character token. TeX's reading apparatus switches to state M after tokenizing such tokens. – Ulrich Diez May 27 '22 at 14:55\uppercaseand\lowercasedon't "look" at the expansion of macros, thus you could dothe \lowercase{\ISPPA} for bla bla...orthe \uppercase{\ISPPA} for bla bla...;-) – Ulrich Diez May 27 '22 at 15:04