Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sortings where volume comes before year #766

Closed
wants to merge 1 commit into from
Closed

Add sortings where volume comes before year #766

wants to merge 1 commit into from

Conversation

svenper
Copy link

@svenper svenper commented Jun 28, 2018

This could be useful for reissues. The new sortings are basically copied from nyvt and anyvt.

This could be useful for reissues. The new sortings are basically copied from nyvt and anyvt.
@moewew
Copy link
Collaborator

moewew commented Jun 29, 2018

Thank you for this pull request.

So far requests to change existing sorting schemes (#485) or add new ones (#486) have been struck down, so I'm not sure if we can merge this. As you can see it is not too hard to create a template/scheme like this on one's own. It seems quite a niche requirement, especially given that not all entries usually have a volume...

@moewew
Copy link
Collaborator

moewew commented Oct 10, 2018

Given that earlier suggestions like this were turned down (cf. #485, #486) I'd like to close this pull request.

The schemes that ship with biblatex should only cover the most common cases and show what is possible. There need not be a scheme for all possible applications. It is also fairly straightforward to create custom sorting schemes and it is common practice to do so.

So if you are OK with it and there is no strong evidence that those two sorting schemes are sought-after and used in many disciplines, I'd rather have people write those schemes up in their own documents and styles and would vote not to include them in core biblatex.

@svenper
Copy link
Author

svenper commented Oct 11, 2018

I agree, I was a bit too quick on the wagon here, and in hindsight this was not the approprate change either.

But this format is however inconsistent:

[1] J. Smith. The Collection.
     Vol. 1: Introduction. 2017.
     Vol. 2: Propagation. 1972.
     Vol. 3: Conclusion. 1983.
[2] J. Smith. The Collection. Vol. 2: Propagation. 1972.
[3] J. Smith. The Collection. Vol. 3: Conclusion. 1983.
[4] J. Smith. The Collection. Vol. 1: Introduction. 2017.

Maybe it could be changed in some other way, either sorting the @mvbook by year or sorting entries crossreferenced to the same @mvbook immediately after the first volume in another way.

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@mvbook{collection,
	relatedtype = {multivolume},
	related = {volume1,volume2,volume3},
	maintitle = {The Collection},
	author = {Smith, J.},
}
@book{volume1,
	crossref = {collection},
	title = {Introduction},
	volume = {1},
	year = {2017},
	origdate = {1961},
}
@book{volume2,
	crossref = {collection},
	title = {Propagation},
	volume = {2},
	year = {1972},
	origdate = {1972},
}
@book{volume3,
	crossref = {collection},
	title = {Conclusion},
	volume = {3},
	year = {1983},
	origdate = {1983},
}
\end{filecontents*}

\usepackage[sorting=nyvt]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}

\nocite{*}%
\printbibliography

\end{document}

@svenper svenper closed this Oct 11, 2018
@moewew
Copy link
Collaborator

moewew commented Oct 11, 2018

I agree that the output in the example does not appear natural at first glance. On the other hand strictly speaking one has to agree that the sorting is correct according to the sorting scheme. This is not that much of an issue in a numbered bibliography, where a reader usually does not have the expectation that a certain sort order must be followed and probably will not care, meaning that natural order becomes more attractive, but it could be an issue in large bibliographies for author-year citations: there sorting should match what is known from the citation label.

If you want to sort outside the overall sorting scheme then you have to use sorttitle or sortyear (in light of plk/biber#228 please use sortyear only with integer input)

In this case using sortyear = {1961}, for volume1 feels natural and gives the desired sorting with both nyvt and nyt.

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@mvbook{collection,
  relatedtype = {multivolume},
  related     = {volume1,volume2,volume3},
  maintitle   = {The Collection},
  author      = {Smith, J.},
}
@book{volume1,
  crossref = {collection},
  title    = {Introduction},
  volume   = {1},
  year     = {2017},
  origdate = {1961},
  sortyear = {1961},
}
@book{volume2,
  crossref = {collection},
  title    = {Propagation},
  volume   = {2},
  year     = {1972},
  origdate = {1972},
}
@book{volume3,
  crossref = {collection},
  title    = {Conclusion},
  volume   = {3},
  year     = {1983},
  origdate = {1983},
}
\end{filecontents*}

\usepackage[sorting=nyvt]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}%
\printbibliography
\end{document}

That might naturally lead you to

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@mvbook{collection,
	relatedtype = {multivolume},
	related = {volume1,volume2,volume3},
	maintitle = {The Collection},
	author = {Smith, J.},
}
@book{volume1,
	crossref = {collection},
	title = {Introduction},
	volume = {1},
	year = {2017},
	origdate = {1961},
}
@book{volume2,
	crossref = {collection},
	title = {Propagation},
	volume = {2},
	year = {1972},
	origdate = {1972},
}
@book{volume3,
	crossref = {collection},
	title = {Conclusion},
	volume = {3},
	year = {1983},
	origdate = {1983},
}
\end{filecontents*}

\usepackage{biblatex}

\DeclareSortingTemplate{noyt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{origyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
}

\ExecuteBibliographyOptions{sorting=noyt}

\addbibresource{\jobname.bib}

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants