-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review use of \xspace in macro definitions #1433
Comments
Since
It looks like folks have been working around this issue by wrapping the s in braces to prevent
In this case, it'd be better to just remove the |
The following uses of \newcommand{\techterm}[1]{\textit{#1}\xspace}
\newcommand{\defnx}[2]{\indexdefn{#2}\textit{#1}\xspace}
\newcommand{\term}[1]{\textit{#1}\xspace}
\newcommand{\grammarterm}[1]{\textit{#1}\xspace}
\newcommand{\Fundescx}[1]{\textit{#1}\xspace}
\newcommand{\NTS}[1]{\textsc{#1}\xspace}
\newcommand{\Range}[4]{\tcode{#1#3,\penalty2000{} #4#2}\xspace}
\newcommand{\diffdef}[1]{\hfill\break\textbf{#1:}\xspace}
\newcommand{\stage}[1]{\item{\textbf{Stage #1:}}\xspace}
\newcommand{\doccite}[1]{\textit{#1}\xspace}
\renewcommand{\emph}[1]{\textit{#1}\xspace}
\newcommand{\numconst}[1]{\textsl{#1}\xspace}
\newcommand{\logop}[1]{{\footnotesize #1}\xspace}
\newcommand{\terminal}[1]{{\BnfTermshape ##1}\xspace} These uses are probably fine: \newcommand{\Cpp}{\texorpdfstring{C\kern-0.05em\protect\raisebox{.35ex}{\textsmaller[2]{+\kern-0.05em+}}}{C++}\xspace}
\newcommand{\CppIII}{\Cpp 2003\xspace}
\newcommand{\CppXI}{\Cpp 2011\xspace}
\newcommand{\CppXIV}{\Cpp 2014\xspace}
\newcommand{\opt}{{\ensuremath{_\mathit{opt}}}\xspace}
\newcommand{\xref}{\textsc{See also:}\xspace} Slightly iffy depending on the expected behavior of the environments: \newenvironment{note}[1][Note]{\noteintro{#1}}{\noteoutro{note}\xspace}
\newenvironment{example}[1][Example]{\noteintro{#1}}{\noteoutro{example}\xspace} |
I'd like to move away from xspace entirely. Over-reliance on the |
@zygoloid That's probably the better option. I would document the meaning of the empty braces, though, so that future authors don't remove them out of ignorance. In my lists above, the 'questionable' uses of |
I like |
See http://tex.stackexchange.com/questions/86565/drawbacks-of-xspace with the first answer from the package author of \xspace. Quote:
\xspace in \grammarterm caused spacing issues while addressing #1268.
The text was updated successfully, but these errors were encountered: