TransWikia.com

apa style and citing both in text as at the end of a sentence

TeX - LaTeX Asked on May 29, 2021

Currently, I am using bibliographystyle{abbrvnat}. This enables me to cite in text with citet{xxx} and cite at the end of a sentence with citep{xxx}. Furthermore, the reference list at the end of my document is alphabetically ordered based on an author’s last name. However, the reference list shows the first letter of the author’s first name at the beginning of each line, which does not have my preference. The reference style is shown in the image below: abbrvnat reference style

I would like to have my reference list in APA style. However, still be able to both cite in-text ( the Einstein journal paper (1905) …) as cite at the end of a sentence (Einstein, 1905).

Can someone help me with this?
Thank you!

One Answer

You could use biblatex, the apa style and natbib citation styles.

(citefield{A-reference}{title} from biblatex)

b

Try this code.

documentclass[12pt,a4paper]{article}

begin{filecontents}[overwrite]{jobname67.bib}
@article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{"o}rper}. ({German})
    [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    keywords =     "physics"
}
        
    @book{knuth,
        author       = {Knuth, Donald E.},
        title        = {The {TeX book}},
        date         = 1984,
        maintitle    = {Computers & Typesetting},
        volume       = {A},
        publisher    = {Addison-Wesley},
        location     = {Reading, Mass.},
        langid       = {english},
        langidopts   = {variant=american},
    }   
    
    @book{companion,
        author       = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
        title        = {The {LaTeX} Companion},
        date         = 1994,
        edition      = 1,
        publisher    = {Addison-Wesley},
        location     = {Reading, Mass.},
        pagetotal    = 528,
        langid       = {english},
        langidopts   = {variant=american},
    }
    
end{filecontents}

usepackage{csquotes}
usepackage[backend=biber,
language=auto,
style=apa,
natbib=true]{biblatex}

addbibresource{jobname67.bib} %<<<<<<<<<<<<<<<<<

begin{document}

In this document there are three cited items:

textit{citefield{companion}{title}}  book citep{companion}, the citeauthor{einstein}'s journal paper (citeyear{einstein}) and other LaTeX related items  like citet{companion} and a nice citeauthor{knuth}`s book citep{knuth}.

printbibliography  
    
end{document}

Answered by Simon Dispa on May 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP