jspitz / biblatex-publist

BibLaTeX bibliography support for publication lists
40 stars 4 forks source link

failure with names with non-ascii characters #35

Closed u-fischer closed 2 years ago

u-fischer commented 2 years ago

publist uses \edef on commands containing text. This can easily break:

\documentclass{article}
\usepackage[style=publist]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
cite \cite{aksin},

\end{document}

errors when reading the bbl with

 (./test-nomgt.bbl
! Illegal parameter number in definition of \@tempb.
<to be read again> 
                   \crcr 
l.89     \endentry

as Ç is (with OT1) not safe in an edef as used by \bpl@ifstreq:

\documentclass{article}
\usepackage[style=publist]{biblatex}

\begin{document}
\makeatletter
\def\testA{Çetinkaya}
\def\testB{blub}
\bpl@ifstreq\testA\testB{whatever true}{whatever false} %errors
\makeatother
\end{document}

In this case the error can be avoided by using

\makeatletter
\renewcommand\bpl@ifstreq[2]{%
    \begingroup\protected@edef\@tempa{#1}\protected@edef\@tempb{#2}%
    \ifx\@tempa\@tempb
        \endgroup\expandafter\@firstoftwo
    \else
        \endgroup\expandafter\@secondoftwo
    \fi
}
\makeatletter

There can be other places where \protected@edef is needed instead of \edef.

jspitz commented 2 years ago

Thanks, @u-fischer. I also fixed the other occurrence. Will release an updated version soon.

jspitz commented 2 years ago

I found another issue which is fixed by using latex3 string handling methods (255eda94fa2b7ff).

jspitz commented 2 years ago

And the other method uses l3 now as well.