2

I'm using the code in the end and I'm having this result: enter image description here

I'd like to change the format of the pages just in the citation, and not in the bibliography, to:

(Nunes, 2013: 6-7)

I've tried reading the biblatex package pdf and even looking at the biblatex_.def but my LaTeX knowledge is small and failing me.

PS: Why is the space missing before the google maps link?

\documentclass{article}
\usepackage[portuguese]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear,dashed=false,backref=true]{biblatex}
\renewcommand\nameyeardelim{\addcomma\addspace}
\DefineBibliographyStrings{portuguese}{%
  url={Disponível em},
}
\DeclareFieldFormat{url}{\bibstring{url}\addcolon\space\url{#1}}
\DeclareFieldFormat{urldate}{\mkbibbrackets{#1}}

\addbibresource{\jobname.bib}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@online{WHO1,
    author = {World{\ }Health{\ }Organization},
    shortauthor = {WHO},
    title = {The Ottawa Charter for Health Promotion},
    year = {1986},
    url = {http://www.who.int/healthpromotion/conferences/previous/ottawa/en/},
    urldate = {2015-03-31},
}

@online{Google,
    author = {Google{\ }Maps},
    note = {Servico online},
    year = {2015},
    url = {https://maps.google.com/},
    urldate = {2015-04-01},
}

@thesis{Nunes,
    author = {Nelson Filipe Nunes},
    title = {Planeador colaborativo de deslocacoes de bicicleta em meio urbano},
    year = {2013},
    institution = {Instituto Superior Tecnico, Universidade de Lisboa},
    location = {Lisboa, Portugal},
    note = {Dissertacao para obtencao do Grau de Mestre em Engenharia Informatica e de Computadores},
    pages = {10-20},
}
\end{filecontents}

\begin{document}

\parencite{WHO1}
...
\parencite[6-7]{Nunes}
...
\textcite{Google}

\printbibliography

\end{document}
JCML
  • 167
  • The simplest thing to do is \DeclareFieldFormat{postnote}{#1}. This will only print the what you put in the 'postnote' of a citation (either \cite[<prenote>][<postnote>]{<key>} or \cite[<postnote>]{<key>}). Regarding the space, if mean in the bibliography list, the space is not 'missing', it is just compressed because TeX doesn't want to stretch out the line so much that to get to the first possible break point. Add another word or two (or more) to your note field and you'll see what I mean. – jon Mar 29 '16 at 02:23
  • 1
    Thanks for the reply @jon. I was just going to post that I found and answer on this question but I have some questions about it. I don't know if I should bump it or ask here. I understood the compressed explanation, thanks again. – JCML Mar 29 '16 at 02:30
  • Oh, I forgot about the colon. That's what this is for: \renewcommand*{\postnotedelim}{\addcolon\space}. Was it just those two changes? – jon Mar 29 '16 at 02:34
  • Yes @jon. Thanks again! Should you add it as an answer or should I add my question as duplicate since I found the other after? And what does the \DeclareFieldFormat{multipostnote}{#1} do? (from the answer I linked) Postnote is always the number and the prenote is text I can add? (asking so I don't mess anything in the future) – JCML Mar 29 '16 at 02:42
  • The multipostnote is for the plural \cites (and other \*cites) commands (e.g., \cites( multiprenote )( multipostnote )[ prenote ][ postnote ]{ key }...[ prenote ][ postnote ]{ key }). It is the postnote for the entire citation string. – jon Mar 29 '16 at 02:46
  • I think we could close this as a duplicate unless you feel more of an explanation is warranted. It's up to you. – jon Mar 29 '16 at 02:49
  • 1
    OK, let's close this as a duplicate. – JCML Mar 29 '16 at 03:02
  • See also Biblatex citation - changing page prefix and the questions linked there. – moewe Mar 29 '16 at 05:50

0 Answers0