Skip to content
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

Biblatex 3.18b, expl3 case changing, and \bibstring cmds in fields #1246

Closed
dfussner opened this issue Sep 24, 2022 · 3 comments
Closed

Biblatex 3.18b, expl3 case changing, and \bibstring cmds in fields #1246

dfussner opened this issue Sep 24, 2022 · 3 comments
Labels
external caused by non-biblatex component

Comments

@dfussner
Copy link
Contributor

With an up-to-date TeXLive toolchain, XeLaTeX fails when it uses the
expl3 case-changing module and there's a \bibstring command at the
start of a field which has automatic contextual capitalization via the
\ifcapital -> \MakeCapital pair (as with shorthandintro in the MWE;
the \addperiod in the pages field ensures that \ifcapital tests true,
otherwise the problem doesn't appear). Some styles make fairly heavy
use of contextual capitalization in field formats, so as people update
their toolchains this may start to bite, assuming anyone uses
bibstrings in their .bib files. I never saw it with an older
toolchain, even when it used the expl3 case-changer. I still don't see
it with the latex2e case-changer, and it works with both modules if
the command is \bibxstring instead of \bibstring. It's possible that
this is a case of "don't do that" -- I know that 3.18b contains code
to try to cope with related issues, but perhaps the doubling of the
\MakeCapital in the field format and then in the \bibstring code is
just plain wrong, and users need to be warned off using \bibstring
(and maybe some other control sequences) in .bib fields. I've got a
workaround of sorts coded up for biblatex-chicago which just turns off
\MakeCapital when the field starts with a control sequence, but if the
general advice were to be to use \bibxstring then my workaround would
need tweaking. Any thoughts?

Here's a MWE that breaks on my system:

\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{csquotes}
\usepackage[american]{babel}
\usepackage[style=verbose-inote,backend=biber]{biblatex}
\begin{filecontents}[overwrite]{\jobname.bib}
@Article{author:forthcoming,
  author = 	 {Author, Margaret~M.},
  title = 	 {Article Title},
  journaltitle = {Journal Name},
  pages = {21--24\addperiod},
  shorthandintro = {\bibstring{citedas} ABC},
  shorthand = {ABC},
  year = 	 {forthcoming},
  volume = 	 98
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\thispagestyle{empty}
\noindent\cite{author:forthcoming}.
\printbibliography
\end{document}

Thanks.

@moewew
Copy link
Collaborator

moewew commented Sep 25, 2022

Seems that there is a problem with \text_titlecase_first:n which biblatex uses for \MakeCapital (latex3/latex3#1130).

See also https://tex.stackexchange.com/q/656690/35864.

@dfussner
Copy link
Contributor Author

@moewew Thanks for passing this along to the L3 list. I tried (very briefly) the solution proposed there and it seems so far to work. I'll test it a bit more thoroughly when I get a moment.

@moewew
Copy link
Collaborator

moewew commented Oct 8, 2022

The problem should be resolved in L3 programming layer <2022-09-28> (available in both MikTeX and TeX Live).

@moewew moewew closed this as completed Oct 8, 2022
@moewew moewew added external caused by non-biblatex component and removed bug labels Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external caused by non-biblatex component
Projects
None yet
Development

No branches or pull requests

2 participants