[Tex/LaTex] Biblatex citation – changing page prefix

biblatex

I've read a whole bunch of questions here regarding biblatex and citation formatting. I've been a programmer for over 20 years in C and Java and Python and so on and I can't make any headway: it seems as opaque and unforgiving as anything I've ever come across. My contact with TeX is only occasional: I'm trying to write my thesis not become a TeX guru. For the most part I write in pandoc (markdown) and convert it to TeX. But probably as I get to final production, I will use raw TeX because it gives me better flexibility to get a much nicer result.

As far as I can tell, what I want to do is simple and yet many, many, hours later (read: time not spending writing the thesis, therefore unproductive) reading various biblatex.def, standard.bbx files and examples and so forth and various webpages I am totally lost.

I read a page here: "Guidelines for customizing bib latex styles". It was some help but didn't get me over the line. It's like I'm missing a basic piece of information here.

I use biblatex with Biber and the philosophy-classic style as it's close to what I need. I import it like this:

\usepackage[backend=biber,sorting=nyt,style=philosophy-classic]{biblatex}
\renewbibmacro{in:}{}

As you can see I'm also getting rid of the "In: " for journals and book chapters.

I cite a lot of books and journals and the style I must use includes at most citations, the page number:

\autocite[151]{Fabrizi2015} ...
\autocite[44-49]{Levene2010}

These come out as

(Fabrizi 2015, p. 151) … (Levene 2010, pp. 44-49)

This is not what I need, although it's the closest to style to what I require which I've found thus far. I need it to be formatted as follows:

(Fabrizi 2015: 151) … (Levene 2010: 44-49)

I've tried using

\usepackage[backend=biber,sorting=nyt,citestyle=authoryear-comp, bibstyle=authoryear]{biblatex}
\renewbibmacro{in:}{}
\DeclareFieldFormat{pages}{#1}

Which I've seen in many comments/answers but it doesn't seem to make any difference (nor when I use style=philosophy-classic rather than the cite style and bib style entries as above).

I also use textcite and autocites with and without page numbers (when they don't have page numbers, \textcite and \autocite come out OK):

For example, see \textcite[37-38]{Burck1971}. 
Contra to this position is \textcite{Miles1988}.
a map of the places described \autocites[64]{Levene2010}[2]{Fabrizi2015}.

These come out in a similar way to the above.

For example, see Burck (1971, pp. 37-38). … Contra to this position
is Miles (1988). … a map of the places described
(Levene 2010, p. 64; Fabrizi 2015, p. 2).

These all should be:

For example, see Burck (1971: 37-38). … Contra to this position
is Miles (1988). … a map of the places described
(Levene 2010: 64; Fabrizi 2015: 2).

This question here looks almost like mine: BibLaTeX customisation: Pages prefix to suffix but not quite close enough and I can't really make sense of the answer (and it doesn't help the answer is not accepted).

Bibliography is OK for moment. There are some annoyances with the way it prints volumes and issues of journal articles, but the major flaw is the 'pp.' it uses to label the pages on which the article is found. This:

Levene D.S. (2006), ‘History, Metahistory,and Audience Response in Livy
45’, Classical Antiquity, 25, 1, pp. 73-108.

Should be:

Levene D.S. (2006), ‘History, Metahistory,and Audience Response in Livy
45’, Classical Antiquity, 25, 1. 73-108.

But at this point I am not so concerned on the formatting of the bibliography as I am the citation style. There seems to be enough information about the bibliography formatting that I will be able to overcome that problem on my own.

So how do I change the ", p." and ", pp." between the year and the page number?

Best Answer

You can combine the approach from Colon instead of “p.” in Biblatex authoryear-comp and Biblatex: No \postnotedelim for citations that aren't numerals

\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\renewcommand*{\bibpagespunct}{\addcolon\addspace}
\renewcommand{\postnotedelim}{%
  \iffieldpages{postnote}
    {\addcolon\space}
    {\addspace}}
Related Question