Closed guidovw closed 8 years ago
:+1: :smile:
I actually just noticed that sp-authoryear-comp.cbx
defines some commands for citations with pages. They are defined on lines 240–243.
But it's a bit odd to not support the "correct" formatting of citations with page numbers through the standard citation commands of Biblatex, like \textcite
and \autocite
.
This could be done by putting the following in sp-authoryear-comp.cbx
, as @guidovw mentioned.
\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
d34ecfd adds these lines. @adamliter can you open a new issue with a proposal for a "correct" formatting of citations using \textcite
/ \autocite
? (I'm still getting up to speed with Biblatex vs. Bibtex so I'd appreciate a précis of the diff(erence) if you have the time)
@chbrown By "correct" formatting, I meant the actual final display (e.g., (Chomsky 1981: 55–57), rather than (Chomsky 1981, pp. 55–57)) and not anything to do with the actual source code.
As far as Biblatex citation commands go, you could take a look at pp. 85–96 of the Biblatex manual.
\autocite
is a higher-level style-independent command used for what are usually parenthetical citations. In styles like the one implemented by the authoryear.cbx
file, for example, this just gets expanded to \parencite
, more or less. However, in the Chicago style, this would expand to \footcite
(you can also set this explicitly; I've provided an example MWE at the end of this if you'd like to try it out). So in this sense, using \autocite
is better practice than \parencite
because it makes the source code more portable in case you want to change the style.
\textcite
is not a style-independent command, but it is Biblatex's command for doing in text citations.
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = arara
% arara: pdflatex
% arara: biber
% arara: pdflatex: { synctex: yes }
\begin{filecontents*}{\jobname.bib}
@article{chomsky2013:projection,
Author = {Chomsky, Noam},
Doi = {10.1016/j.lingua.2012.12.003},
Journaltitle = {Lingua},
Issn = {0024-3841},
Issuetitle = {Syntax and cognition: core ideas and results in syntax},
Editor = {Rizzi, Luigi},
Pages = {33--49},
Title = {Problems of projection},
Volume = {130},
Date = {2013-06}}
\end{filecontents*}
\documentclass{article}
\usepackage[
backend=biber,
bibstyle=biblatex-sp-unified,
citestyle=sp-authoryear-comp,
maxcitenames=3,
maxbibnames=99,
autocite=footnote % notice the explicit setting of this option
]{biblatex}
\addbibresource{\jobname.bib}
\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\begin{document}
Something important \autocite[37--39]{chomsky2013:projection}.
\printbibliography
\end{document}
I have an issue getting the unified bib style to work with bib latex. In sp-template.tex (with the biblatex option) I get in-text citation style like (McCarthy & Prince 1999, pp. 248-250), rather than (McCarthy & Prince 1999: 248-250). Citation in the text is \citep[248-250]{mccarthy:1999}.
@adamliter points out to me that the desired output can be achieved by putting the following lines in the preamble:
\renewcommand*{\postnotedelim}{\addcolon\space} \DeclareFieldFormat{postnote}{#1} \DeclareFieldFormat{multipostnote}{#1}
But it's a bit odd that those lines of code aren't included in sp-authoryear-comp.cbx.