0

I have a document that I want to set up to APA citation (cites and bibliography):

\documentclass[12pt, letterpaper]{article}
\usepackage[spanish,activeacute]{babel}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{xpatch}
\usepackage{filecontents}
\usepackage{csquotes}
\usepackage[backend=bibtex, style=authoryear]{biblatex}
\addbibresource{Biblio.bib}

\begin{document}
Some text \cite{someone}
\printbibliography
\end{document}

How can I customize the cites and Bibliography at the end to meet the APA Standards? Thank you in advance

HcN
  • 1,274
  • 9
  • 25
  • Why not simply use \usepackage[backend=bibtex, style=apa]{biblatex}? – Bernard Dec 11 '15 at 22:14
  • \documentclass[12pt, letterpaper]{article} \usepackage[english, spanish,activeacute]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}

    \usepackage[hyperref=true, url=false,isbn=false, backref=true, backend=biber, citestyle=authoryear,bibstyle=authoryear, maxcitenames=3, maxbibnames=100]{biblatex} \DefineBibliographyStrings{spanish}{backrefpage = {ver p.}, backrefpages = {ver pp.}}

    \begin{document}

    \section{Introducción}\label{sec:intro}

    E sustancialmente, aunque no de forma constante \cite{RecchinideLattesLattes1975}.

    \printbibliography \end{document}

    – Nicolás Sacco Dec 12 '15 at 00:19
  • I get Package inputenc Error: Unicode char \u8:́ not set up for use with LaTeX when I print the bibliography – Nicolás Sacco Dec 12 '15 at 00:20
  • Maybe try adding \usepackage[utf8]{inputenc}. Also, did you try with backend=biber? One advantage of biber is it understands utf8. – Bernard Dec 12 '15 at 00:32
  • Yes, I try, same error message – Nicolás Sacco Dec 12 '15 at 00:35
  • Using biber I get this log when i run the \printbibliography Undefined control sequence. Underfull \hbox (badness 10000) in paragraph Font shape T1/lmr/bx/sc' undefined(Font) usingT1/lmr/bx/n' instead Replacing `T1/lmr/bx/sc' by (spanish) faked small caps destination with the same identifier (name{page.1}) has been already used, duplicate ignored \relax l.189 [1 Overfull \hbox (6.03165pt too wide) in paragraph Overfull \hbox (9.88014pt too wide) in paragraph No file Notas.nls. Some font shapes were not available, defaults substituted. Please rerun LaTeX. – Nicolás Sacco Dec 12 '15 at 00:37
  • Biber uses a cache, and it may happen this cache gets corrupted. You should delete it and retry. – Bernard Dec 12 '15 at 00:39
  • 1
    That code will not give the log messages you posted. Please paste that code into a new .tex file, switch backend=bibtex to backend=biber, add \usepackage[utf8]{inputenc} and see if that file compiles when you do pdflatex -> biber -> pdflatex -> pdflatex. – cfr Dec 12 '15 at 00:49
  • yes it does. i dont know what it's wrong with the long one then – Nicolás Sacco Dec 12 '15 at 01:00
  • How can you help me? – Nicolás Sacco Dec 12 '15 at 01:08
  • \documentclass[]{article}

    %opening \title{} \author{}

    \usepackage[style=apa, backend=biber]{biblatex} \addbibresource{Biblio.bib}

    \begin{document}

    \begin{abstract} En este trabajo se construyen y analizan tablas de vida de cohorte para las cohortes de nacimiento de 1898 y de 1998 en la Argentina, con el objetivo de aportar una mirada complementaria y de largo plazo (dos siglos) a las investigaciones transversales de esperanza de vida al nacer. \end{abstract}

    *** why i get error from this?

    – Nicolás Sacco Dec 12 '15 at 01:47
  • Please try to find a minimal example that really shows an error and add it to the question, that way we can be sure we are all talking about the same thing. The snippet in your comment above compiles fine for me, but it doesn't contain any citations. What you are missing for biblatex-apa is the language mapping \DeclareLanguageMapping{spanish}{spanish-apa} (if you are writing in Spanish, that is). – moewe Dec 12 '15 at 08:16
  • % I have this code, but i get error everytime...how do i clean the biber cache?

    \documentclass[12pt, letterpaper]{article} \usepackage[english, spanish]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{csquotes} \usepackage{xpatch} \usepackage{filecontents}

    \usepackage[backend=biber]{biblatex} \DeclareLanguageMapping{spanish}{spanish-apa} \addbibresource{Biblio.bib}

    \begin{document}

    asdasdasd \cite{Bhrolchain1992} \printbibliography \end{document}

    – Nicolás Sacco Dec 18 '15 at 04:26
  • Please edit your question to include the code you are trying to compile, please also make sure that we have the necessary .bib file to run it. Ensure that the document encoding of all files involved is correct (UTF-8 in your case). Compile it with pdflatex test,biber test, pdflatex test, pdflatex test (assuming your file is called test.tex) ignoring any errors you might get. Then examine the .log file of the last LaTeX run and the .blg file and report any errors or warnings. – moewe Dec 18 '15 at 18:39
  • The Biber cache problem should be solved from version 2.2 onward, but you can find out about it in Biblatex/biber fails with a strange error about missing recode_data.xml file. If you don't have the most recent versions of Biber and biblatex, an update might be a good idea, make sure that the versions match after the update, currently I have biblatex 3.1 and Biber 2.2. – moewe Dec 18 '15 at 18:41
  • BTW You can ping users by mentioning their name with an @ stuck to the front (like @NicolásSacco). – moewe Dec 18 '15 at 18:42
  • Are there any news here? Did you get your document going? – moewe Dec 30 '15 at 08:11
  • @Bernard Since you seem to have answered the question in the body text, would you mind writing up a short answer? (You could mention that biblatex-apa implements APA style to the letter, if one wants a simple author-year styles instead authoryear and friends might be better suited.) – moewe Dec 30 '15 at 08:13
  • @Moewe: Done. I added some details for new users. – Bernard Dec 30 '15 at 10:23

1 Answers1

2

The easier way to customise a bibliography is to load biblatex and compile the bibliography with biber which has possibilities that bibtex doesn't have, and understands utf8.

Biblatex uses a latex-like syntax, and there exists a biblatex-apapackage, which implements APA style, and might be a starting point for customisation via the xpatch package. So I would write in the preamble

\usepackage[bibstyle=apa, backend=biber]{biblatex}

As mentioned by @moewe, for a simple author-year style, you can use one of the pre-defined styles with:

\usepackage[style=authoryear, backend=biber]{biblatex}

Note the syntax used to produce the bibliography with biblatex is slightly different from the syntax with bibtex: you have to write in the preamble:

\addbibresource{mybibfile.bib}

with the extension, and at the place where you want the bibliography, write

\printbibliography
Bernard
  • 271,350