3

I'm new to LaTeX. I have already grasped the basics and I have already started working my thesis on it. It is a very nice program to work with. However, I am having a difficulty. I am unable to cite in the style which I'm looking for. I have looked around and researched. There are tons of info out there, so much that it becomes very confusing. Biber, biblatex, natbib and whatever else ... one can easily get lost in the process. In the end, I'm still unable to cite in the style I need.

I need the cite in as in this example:

  1. blabla bla bla (Smith A., 2018)

  2. Smith A. (2018) has said blabla blabla

The nearest I'm getting with biblatex and natbib is: "(Smith 2018)"

I need the first letter of the first name after the surname and a comma before the year. In brackets.

5

With biblatex it is fairly straightforward to make a few changes to the standard authoryear styles to get close to what you describe.

The code is commented and it should be possible to look up the commands in the biblatex documentation if their names do not give enough hints as to what they do already.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

% giveninits shortens all given names to initials
% autocite=inline gives 'inline' (\parencite) citations for \autocite
\usepackage[style=authoryear, autocite=inline, giveninits=true, backend=biber]{biblatex}

% names in "Family, Given" format
\DeclareNameAlias{sortname}{family-given}   % bibliography
\DeclareNameAlias{labelname}{family-given}  % citations

% no comma between family name and given initial:
% "Family G."
\renewcommand*{\revsdnamepunct}{}

% comma between name and year in citation
\DeclareDelimFormat{nameyeardelim}{\addcomma\space}

\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite{sigfridsson}

\textcite{sigfridsson}

\autocite{nussbaum}

\printbibliography
\end{document}

(Sigfridsson E. and Ryde U., 1998)//Sigfridsson E. and Ryde U. (1998)//(Nussbaum M., 1978)//References//Nussbaum M. (1978). Aristotle’s ‘De Motu Animalium’. Princeton: Princeton University Press.//Sigfridsson E. and Ryde U. (1998). ‘Comparison of methods for deriving atomic charges from the electrostatic potential and moments’. In: Journal of Computational Chemistry 19.4, pp. 377–395. doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.

For a general introduction into biblatex see biblatex in a nutshell (for beginners) and What to do to switch to biblatex?. The example above needs Biber, Biblatex with Biber: Configuring my editor to avoid undefined citations tells you how you can set up your editor to run Biber.

2
  • The above does exactly what I asked. I need one more information. How do I make it ommit name of several authors and print "and al.,(year)" 1.The earth is spherical in shape (Andrews and al., 2018) 2. Andrews and al. (2018) assumed that blablabla Hoping to hear back Jan 26 '19 at 16:02
  • 1
    @NadeemMuhammad Have a look at tex.stackexchange.com/q/69028/35864
    – moewe
    Jan 26 '19 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.