How to use an Ł with the complexity package
The package has
% We redefine 4 commands inside of Latex, but preserve them for usage
\let\defaultL\L
\renewcommand{\L}{\ComplexityFont{L}}
\let\defaultP\P
\renewcommand{\P}{\ComplexityFont{P}}
\let\defaultS\S
\renewcommand{\S}{\ComplexityFont{S}}
This goes against all basic LaTeX conventions of not redefining macros that pertain to the LaTeX internal character representation (LICR). There should at least be an option for not redefining \L
, \P
and \S
.
The workaround of using \defaultL
, \defaultP
and \defaultS
mentioned in the manual is ineffective, because if one types Ł
, ¶
or §
using UTF-8, the result will be L, P and S respectively, because the UTF-8 characters are translated back in the LICR to \L
, \P
and \S
. There should be, at least, an option for avoiding those redefinitions.
However, it's easy to go back:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[bold,basic]{complexity}
% fix the bad mistake in complexity.sty
\let\L\defaultL
\let\P\defaultP
\let\S\defaultS
\begin{document}
Even Ł gets rendered as a bold L.
\begin{thebibliography}{50}
\bibitem{GKKLS:2015} Homer J. {\L}{\k{a}}cki. \textsl{Mmmmm...donuts}.
\end{thebibliography}
\end{document}
UPDATE
As of version 0.81a of the complexity
package, released 2017-09-16, the disableredefinitions
option is available. With the option, \L
, \P
and \S
are not redefined and instead \cL
, \cP
and \cS
can be used as shorthands for \ComplexityFont{L}
, \ComplexityFont{P}
and \ComplexityFont{P}
.
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[bold,basic,disableredefinitions]{complexity}
\begin{document}
Now Ł gets rendered correctly and \cL{} prints the class
\begin{thebibliography}{1}
\bibitem{GKKLS:2015} Homer J. {\L}{\k{a}}cki. \textsl{Mmmmm...donuts}.
\end{thebibliography}
\end{document}