semprag / biblatex-sp-unified

An opinionated biblatex implementation of the Unified Stylesheet for Linguistics Journals
LaTeX Project Public License v1.3c
39 stars 12 forks source link

Date ranges in citations #33

Closed anghyflawn closed 4 years ago

anghyflawn commented 7 years ago

BibLaTeX allows the .bib file to contain date ranges, which is useful (among other things) for items such as dictionaries and dialect atlases that come out over several years but where it doesn't really make sense to refer to the individual volumes. The date range gets correctly printed in the bibliography, but only the initial year is shown in the citation. I'm afraid I failed to understand how date printing works :(.

Here's an MWE (meant to run with XeLaTeX):

\begin{filecontents*}{\jobname.bib}
@MVBook{sgds,
  editor       = {Ó Dochartaigh, Cathair},
  title        = {Survey of the {Gaelic} dialects of {Scotland}},
  location     = {Dublin},
  publisher    = {Dublin Institute for Advanced Studies},
  date         = {1994/1997}
}

\end{filecontents*}

\documentclass{article}
\usepackage{xltxtra}
\setmainfont{DejaVu Serif} % or whatever
\usepackage[
    backend=biber,
    bibstyle=biblatex-sp-unified,
    citestyle=sp-authoryear-comp,
    maxcitenames=3,
    maxbibnames=99
]{biblatex}

\addbibresource{\jobname.bib}

\begin{document}

\textcite{sgds}

\printbibliography

\end{document}

And the output

fintelkai commented 7 years ago

Thank you. FWIW, if you switch to the standard authoryear-comp citestyle (citestyle=authoryear-comp), the label is printed correctly. Sigh. I'm trying to figure out why I rewrote all of authoryear-comp rather than just pull it in and tweak what needed to be tweaked. Stay tuned. Might take a while.

fintelkai commented 4 years ago

This is now fixed. The citation style (now called unified.cbx) is built on top of authoryear-comp.cbx and typesets date ranges correctly.