plk / biblatex

biblatex is a sophisticated bibliography system for LaTeX users. It has considerably more features than traditional bibtex and supports UTF-8
520 stars 118 forks source link

maxitems option #1331

Closed hvoss49 closed 11 months ago

hvoss49 commented 11 months ago

From what I read in the documentation, maxitems=1 should only print the first location and then the andother string. But there is no difference in the output.

\documentclass{article}
\pagestyle{empty}
\usepackage[ngerman]{babel}
\usepackage[style=authoryear,maxitems=1]{biblatex}
\addbibresource{biblatex-examples.bib}

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

@Patent{almendro,
    hyphenation   = {german},
    author    = {Almendro, Jos{\'e} L. and Mart{\'i}n, Jacinto and S{\'a}nchez, Alberto and
        Nozal, Fernando},
    title         = {Elektromagnetisches Signalhorn},
    number    = {EU-29702195U},
    location      = {countryfr and countryuk and countryde},
    date          = {1998},
    annotation    = {This is a \texttt{patent} entry with a \texttt{location} field. The number is
        given in the \texttt{number} field. Note the format of the \texttt{location}
        field in the database file. Compare \texttt{laufenberg}, \texttt{sorace}, and
        \texttt{kowalik}}
}
moewew commented 11 months ago

Yes, @patent location is one of the few instances in the standard biblatex styles that explicitly override an option like this. (Presumably because the patent location is so important that it should not be abbreviated?)

See line 520 in the following excerpt

https://github.com/plk/biblatex/blob/a96bcb92ba20ca8cfdbd2223beae3c697e5ce33e/tex/latex/biblatex/bbx/standard.bbx#L502-L538

If you try another combination, for example @(mv)book and publisher or location you get shortened lists

\documentclass{article}
\pagestyle{empty}
\usepackage[ngerman]{babel}
\usepackage[style=authoryear,maxitems=1]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}
\nocite{nietzsche:ksa}  \printbibliography
\end{document}

https://github.com/plk/biblatex/blob/a96bcb92ba20ca8cfdbd2223beae3c697e5ce33e/bibtex/bib/biblatex/biblatex-examples.bib#L899-L920

gives

Nietzsche, Friedrich (1988). Sämtliche Werke. Kritische Studienausgabe. Hrsg. von Giorgio Colli und Mazzino Montinari. 2. Aufl. 15 Bde. München u.a.: Deutscher Taschenbuch-Verlag u.a.

picture of the output reproduced above

hvoss49 commented 11 months ago

Understood ... thanks