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

@incollection and @inproceedings drivers are largely redundant #2

Closed adamliter closed 9 years ago

adamliter commented 9 years ago

It looks like the only difference between the drivers that you have for the @incollection entries and @inproceedings entries is that @inproceedings entries include

\printlist{organization}%
\newunit

after \printfield{note}% whereas @incollection entries do not.

You can see that the drivers and their output are nearly indentical.

MWE

\begin{filecontents*}{\jobname.bib}
@incollection{mccarthy:1999,
    Address = {Malden, MA and Oxford},
    Author = {McCarthy, John J. and Prince, Alan S.},
    Booktitle = {Phonological Theory: {The} Essential Readings},
    Editor = {Goldsmith, John A.},
    Pages = {238-288},
    Publisher = {Blackwell},
    Organization = {Blahblah},
    Title = {Prosodic morphology},
    Year = {1999}}
@inproceedings{mccarthy:1999:organization,
    Address = {Malden, MA and Oxford},
    Author = {McCarthy, John J. and Prince, Alan S.},
    Booktitle = {Phonological Theory: {The} Essential Readings},
    Editor = {Goldsmith, John A.},
    Pages = {238-288},
    Publisher = {Blackwell},
    Organization = {Blahblah},
    Title = {Prosodic morphology},
    Year = {1999}}
\end{filecontents*}

\documentclass{article}

\usepackage[
    backend=biber,
    bibstyle=biblatex-sp-unified,
    citestyle=sp-authoryear-comp,
    maxcitenames=3,
    maxbibnames=99
]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}

\nocite{*}

\printbibliography

\end{document}

Output

screen shot 2015-06-15 at 4 17 45 pm

I've underlined the only difference.

Anyway, particularly since the unified style sheet says nothing about including the organization that hosted a conference—except to the extent that many conference names are often named after the organization that hosts them, in which case the information goes in either journaltitle or booktitle, depending on whether the publication has an ISSN—, why not just delete

\printlist{organization}%
\newunit

from the @inproceedings driver and then make @incollection an alias of @inproceedings?

Specifically, something like:

\DeclareBibliographyAlias{incollection}{inproceedings}

\DeclareBibliographyDriver{inproceedings}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \ifnameundef{editor}
    {\setunit{\addspace}}
    {\usebibmacro{byeditor+others}\setunit{\addcomma\space}}
  \usebibmacro{maintitle+booktitle}%
  \setunit{\addcomma\space}
  \printfield{edition}%
  \setunit{\addcomma\space}
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \setunit{\addcomma\space}
  \printfield{volumes}%
  \setunit{\addspace}%
  \usebibmacro{series+number}%
  \setunit{\addcomma\space}
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  %\printlist{organization}%                              DELETE/COMMENT OUT THIS LINE
  %\newunit                                               DELETE/COMMENT OUT THIS LINE
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

Anyway, just a friendly recommendation for cleaning and shortening up the code a bit. But perhaps you had a good reason for doing things this way.

adamliter commented 9 years ago

This is a bit tangential to the content of the issue as I originally phrased it, but I have a further suggestion about the driver for @inproceedings (and I don't want to open another issue and overwhelm you :)). Given that the Unified Style Sheet says that conference proceedings published with ISSNs should be treated as articles, what do you think about defining the driver for @inproceedings to check for whether an ISSN is present in the entry?

This requires that the bibliographic database include an ISSN for all conference proceedings publications with an ISSN. And if there is an ISSN present, then the driver can do more or less what the article driver does. If the ISSN is absent, then the driver can do what it currently does.

I see this approach as being preferable to your current method. While the maintainer of the database does have to go out of their way to enter the ISSN into the database, it seems preferable (at least in my opinion) to entering the bibliographic information as an @article entry type, which isn't strictly true. This would make the database portable insofar as it would be more readily usable with other styles that don't have this wonky requirement.

I've actually gone ahead and done this in this branch if you want to take a look at the changes and see what you think.

fintelkai commented 9 years ago

Thanks for this. I've pulled in your changes. Works well. There's on issue that I haven't had time to iron out. Your code inserts a period between the proceedings title and the volume(number) info. To make it just like the journal article entry, that period will have to go. If you can figure it out, let me know. I may open an issue just to not forget about this.