-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
textcolor consumes whitespaces #1474
Comments
acts like
and drops the spaces, although of course the space dropping is happening at a different level and
has a space whereas
does not. The case shown is effectively an instance of ths second case where pre-tokenised spaces are dropped for color but not a font change. The change you show would of course have the effect described, but I do wonder if it's safe to change the spacing here after 30 years, especially as other cases with pre-tokenized spaces would still show differences. |
probably not. Maybe one could give a simple package option that if set preserves spaces, and if not set, it keeps the old behavior? |
Whitespaces after the opening brace of the text argument of
\textcolor{<color>}{ <text>}
consumes the whitespace, while other\text
-Macros (like\textbf{ }
) don't consume trailing whitespaces. I would like to suggest to ensure that all\textXY
macros behave the same way when it comes to trailing spaces.(same with
xcolor
instead ofcolor
)test.log
A potential fix could be to define
\@textcolor
as\def\@textcolor#1#2#3{\protect\leavevmode{\color#1{#2}\relax#3}}
to eliminate the effects of the\ignorespaces
that comes with\color
, iff the community decides that this is an issue and that\textcolor{}
should behave like\textbf{}
.The text was updated successfully, but these errors were encountered: