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

autolang=hyphen plus related not working #1350

Open
pcdi opened this issue Apr 3, 2024 · 4 comments
Open

autolang=hyphen plus related not working #1350

pcdi opened this issue Apr 3, 2024 · 4 comments
Labels

Comments

@pcdi
Copy link

pcdi commented Apr 3, 2024

I cannot use autolang=hyphen together with related under biber version: 2.20.

M(n)WE:

\documentclass{article}

\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{german}

\usepackage[autolang=hyphen]{biblatex}

\begin{filecontents}{\jobname.bib}
 @Book{GermanOriginal,
  title            = {German Original},
  langid           = {german},
  related          = {EnglishTranslation},
}

@Book{EnglishTranslation,
  title            = {English Translation}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

Errors:

debug.tex:26: LaTeX Error: \begin{document} ended by \end{hyphenrules}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.26 \end
         {document}
debug.tex:26: Undefined control sequence.
\blx@break #1&->\blx@done 
                          \undef \blx@do \undef \blx@done 
l.26 \end
         {document}
@moewew moewew added the bug label Apr 3, 2024
@moewew
Copy link
Collaborator

moewew commented Apr 3, 2024

Thank you very much for reporting this.

I haven't quite figured out what exactly is wrong here, but the problematic commit is quite definitely 134da03.

moewew added a commit that referenced this issue Apr 4, 2024
@moewew
Copy link
Collaborator

moewew commented Apr 4, 2024

This actually revealed a bug that's been with us quite a bit longer than 134da03. The definition of \blx@endlang was not always correct when no language switching needed to be done. That should be fixed in 533b1ee.

@plk We probably need a biblatex-only release of 3.20a soon, because I'm guessing this issue will pop up in other contexts as well.

The language code uses a lot of \lets and I'm wondering if we can simplify stuff a bit if we just use \defs. I'll investigate...

@plk
Copy link
Owner

plk commented Apr 4, 2024

That's fine @moewew - just tell me when ...

@moewew
Copy link
Collaborator

moewew commented Apr 4, 2024

Will do. I'm currently hoping we might include the fixes/whatever we need for #1348 as well, if I can figure out what to do about it soon-ish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants