I was creating a MWEB to ask for help changing some things in the bibliography but it is not compiling. The special characters are breaking it.
It works fine on my project, but it's a template I'm using and my LaTeX knowledge is the opposite of big. I'm missing something here.
\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 = {Serviço online},
year = {2015},
url = {https://maps.google.com/},
urldate = {2015-04-01},
}
@thesis{Nunes,
author = {Nelson Filipe Nunes},
title = {Planeador colaborativo de deslocações de bicicleta em meio urbano},
year = {2013},
institution = {Instituto Superior, Universidade de Lisboa},
location = {Lisboa, Portugal},
note = {Dissertação para obtenção do Grau de Mestre em Engenharia Informática e de Computadores},
pages = {10-20},
}
\end{filecontents}
\begin{document}
\parencite{WHO1}
...
\parencite[6-7]{Nunes}
...
\autocite{Google}
\printbibliography
\end{document}
What is wrong/missing?
inputenc, or using a Unicode engine. You also need to make sure that the document is properly encoded. If I save your document UTF-8-encoded and add a\usepackage[utf8]{inputenc}everything works fine. (You might have to trash auxiliary files for this to take effect.) If what you want to demonstrate in the MWE has nothing to do with diacritics you might want to consider writing ASCII-only files; you don't even have to ship your own.bibfile you can usebiblatex-examples.bib. – moewe Mar 29 '16 at 05:49author = {World{\ }Health{\ }Organization},, butauthor = {{World Health Organization}},. See Using a 'corporate author' in the “author” field of a bibliographic entry (spelling out the name in full). – moewe Mar 29 '16 at 05:53\usepackage[utf8]{inputenc}from the packages in my template. I see, I was using the{\ }trick because it was the only solution I had found here, I guess I missed that link. – JCML Mar 29 '16 at 12:52