Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage[utf8]{inputenc}
- \usepackage[T1]{fontenc}
- \usepackage[american]{babel}
- \usepackage[babel]{csquotes}
- \usepackage[backend=biber,style=apa,hyperref]{biblatex}
- \DeclareLanguageMapping{american}{american-apa}
- \begin{filecontents}{mybib.bib}
- @article{ref1,
- author = {Guyon, Isabelle and Elisseeff, Andr\'{e}},
- journal = {The Journal of Machine Learning Research},
- pages = {1157--1182},
- title = {{An introduction to variable and feature selection}},
- volume = {3},
- year = {2003}
- }
- @book{ref2,
- author = {Michel Goossens and Frank Mittelbach and Alexander Samarin},
- title = {The LaTeX Companion},
- year = {1993},
- publisher = {Addison-Wesley},
- address = {Reading, Massachusetts}
- }
- \end{filecontents}
- \addbibresource{mybib.bib}
- \AtBeginDocument{\renewcommand*{\finalandcomma}{}}
- \AtEveryCitekey{\renewcommand*{\finalnamedelim}{%
- \ifthenelse{\value{listcount}>\maxprtauth}
- {}
- {\ifthenelse{\value{liststop}>2}
- {\finalandcomma\addspace\bibstring{and}\space}
- {\addspace\bibstring{and}\space}}}}
- \AtBeginBibliography{\renewcommand*{\finalnamedelim}{%
- \ifthenelse{\value{listcount}>\maxprtauth}
- {}
- {\ifthenelse{\value{liststop}>2}
- {\finalandcomma\addspace\bibstring{and}\space}
- {\addspace\bibstring{and}\space}}}}
- \begin{document}
- Lorem ipsum dolor sit amet \parencite{ref1}, consectetur adipiscing elit \parencite{ref2}.
- \printbibliography
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment