moewew / biblatex-ext

Extensions for the biblatex standard styles
LaTeX Project Public License v1.3c
24 stars 3 forks source link

Field "volume" with "citexref=true" #38

Open matteofg opened 1 year ago

matteofg commented 1 year ago

Below a mwe:

% !TEX encoding = UTF-8 Unicode
% !TEX program = lualatex
% !BIB program = biber

\begin{filecontents}{\jobname.bib}
@mvbook{a,
  author = {Author1},
  title = {Title1},
  volumes = {3},
}
@inbook{b,
  author = {Author2},
  title = {Title2},
  pages = {40-80},
  volume = {2},
  crossref = {a},
}
\end{filecontents}

\documentclass{article}

\usepackage[style=ext-authortitle, citexref]{biblatex}
  \addbibresource{\jobname.bib}

\begin{document}
\autocite{a}
\autocite{b}
\printbibliography
\end{document}

If a multi-volume entry is present, the related in* entry (inbook, incollection, etc.) should also print the volume field, just as the pages field is printed. Otherwise, it is not possible to know which volume the contribution is in.

Matteo

moewew commented 1 year ago

Thanks for reporting this.

A cursory glance suggests that a solution here might not be as straightforward as one might hope: We need to check if the volume field comes from the crossref and only do something in that case. There are ways to test that (I think), but I need to think of a way to do that nicely.

While we're at it, the unxref'd version looks pretty strange as well.

\documentclass{article}

\usepackage[style=ext-authortitle, citexref]{biblatex}

\begin{filecontents}{\jobname.bib}
@mvbook{a,
  author    = {Author1},
  title     = {Title1},
  volumes   = {3},
}
@inbook{b,
  author   = {Author2},
  title    = {Title2},
  pages    = {40-80},
  volume   = {2},
  crossref = {a},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
%\autocite{a}
\autocite{b}
\printbibliography
\end{document}