5

I am using citation-style-language package on Overleaf with Luatex to cite references as follows:

\documentclass{article}
\usepackage{citation-style-language}
\cslsetup{style=vancouver}

\addbibresource{paperpile.bib}

\title{csl timeout minimal} \author{Minoru Matsui} \date{July 2023}

\begin{document}

\maketitle

\section{Introduction} \cite{Matsui2023-lk} \printbibliography

\end{document}

with the .bib file of paperpile.bib as

@MISC{Matsui2023-lk,
  title        = "test",
  author       = "åüéç Jaromír Kovářík, Surname",
  year         =  2023,
}
%% the following does not work
@comment{
@MISC{Matsui2023-lk,
  title        = "test",
  author       = "{\"a} {\^e} ,{\`i} {\.I} {\o} {\'u} {\aa} {\c c} {\u g} {\l} {\~n} {\H o} {\v r} {\ss} {\r u}",
  year         =  2023,
}
}

which produces ↓

enter image description here

The problem is that I cannot make it work when I comment out the former part and use the latter commented-out section. I want to use the latter way of formatting special characters because

  1. Paperpile exports .bib file as such, and
  2. My understanding is that I should not use special characters such as ü directly in .bib file.

To explain the situation more precisely, the compile timeouts on Overleaf (try it yourself here). What am I doing wrong? Should I specify the character encoding as UTF-8? Should I load another package or something? I understand that the package is still in its early stage. Should I submit an issue to their repo?

  • I've just tried this on an up-to-date TeX Live 2023, and it works other than an issue with a hyperref command (which I suspect is unrelated). As this is very developmental code, I suspect it might be that the Overleaf version is too old to do what you want. Can you add \listfiles to your input and report the File list that appears in the .log file? – Joseph Wright Jul 03 '23 at 07:01
  • 1
    The documentation of \addbibresource in the user manual notes: ”Note that only UTF-8 encoding is supported in the ⟨resource⟩ file.” So IMHO you should use UTF-8 for the bib file with citation-style-language (BTW: with biblatex IMHO this would also be best). – cabohah Jul 03 '23 at 09:03
  • @cabohah I think that's talking about other input encodings, not LICR – Joseph Wright Jul 03 '23 at 19:09

1 Answers1

6

As @josephwright pointed out, the citation-style-language package from Overleaf (TeX Live 2022) was is old (v0.1.0) and the latest released version is 0.4.1 (2023-04-12). The BibTeX (.bib) parser within it was completely rewritten in v0.2.1 (2022-09-18) to support LaTeX diacritics.

Since Overleaf provides no way to update the packages, I suggest uploading all the .sty and .lua files from the latest development version to the project and it compiles successfully (see https://www.overleaf.com/read/dkjqrmwbmfqy).

The mentioned hyperref-related issue is caused by LaTeX2e 2023-06-01 kernel's change and it has been fixed in the development version (zepinglee/citeproc-lua@db0af89).