`\usepgfplotslibrary{colorbrewer}` breaks `\@`
Closed this issue · 2 comments
LaTeXer commented
Normally, when used after a period \@
marks it as a non-end-of-sentence period. But once you load the colorbrewer
library, it seems to redefine \@
such that it simply gobble the space after it. Even stranger, if you manually load the TikZ colorbrewer
before the PGFPlots one, the effect goes away.
MWE:
\documentclass{article}
\usepackage{pgfplots}
% \usetikzlibrary{colorbrewer}
\usepgfplotslibrary{colorbrewer}
\begin{document}%
\noindent%
Test. Test. Test. Test.\\%
Test. Test\@. Test.\@ Test.\\%
\noindent%
x\meaning\@ x\\
x\the\csname @m\endcsname x\\
\end{document}
and with the manually loaded TikZ library
muzimuzhi commented
Somehow \usepgfplotslibrary{colorbrewer}
leaves category code of @
altered (from 12 to 11). Then \@
ignores spaces right after it, hence Test.\@ Test.
becomes Test.\@{}Test.
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgferror{\the\catcode`\@} % ! Package pgf Error: 12.
\usepgfplotslibrary{colorbrewer}
\pgferror{\the\catcode`\@} % ! Package pgf Error: 11.
\begin{document}
\noindent
Test. Test. Test. Test.\\
Test. Test\@. Test.\@ Test.\\
Test. Test\@. Test.\@{} Test.\\
\end{document}