2

I have a problem customizing my bibliography format, I need the citation to be in author/year format which is now displaying correctly, however I need to put square brackets around each citation and a comma in between the author/year.

My citation now is showing as:

Author 1991

Instead I need it to be as follows:

[Author, 1991]

Also in the bibliography page where it shows all the references in the last page, currently it is displaying as follows:

Author (1991)."XX publication". XX publisher, pp. X–X

But I need it to show in two lines adding the citation abbreviation in the first line then the reference in the second, also I need to add the year in the end after the publisher and with no parenthesis. The references must be ordered alphabetically by author name which is showing correctly now. The required format is as follows:

[Author, 1991]

Author."XX publication". XX publisher, 1991, pp. X–X

Here is what I am using currently:

\usepackage[
backend=bibtex,
style=authoryear,
citestyle=authoryear
]{biblatex}
\addbibresource{example.bib}

and for the bibliography page:

\setlength\bibitemsep{2\itemsep}
\printbibliography[heading=bibintoc, title=References, resetnumbers=true]

here is a sample from my "example.bib" file:

@article{11,
    author = {Author},
    title = {XXX},
    journal = {IEEE},
    year = {1991}
}

And here is an example of my citation:

\cite{11}
1
  • 1
    Welcome to TeX.se. It's not recommended to use bibtex as the backend for biblatex. Remove that and compile using biber instead. The citation command for the name and date in brackets is \parencite not \cite. For the first two questions, use the following: \usepackage[style=ext-authoryear]{biblatex} \DeclareOuterCiteDelims{parencite}{[}{]} \DeclareDelimFormat{nameyeardelim}{\addcomma\space} The last question is more complex to achieve, and is a very non-standard looking format. – Alan Munn Sep 26 '20 at 18:25
3

I think that the biblatex-ext styles can do everything that you need. As I mentioned in the comment, you should remove backend=bibtex from your loading options for biblatex and compile with biber instead.

To achieve the [Author, Year] format in citations you have two options. You can use the \autocite command, or you can use the \parencite command. Using \autocite has an advantage if you may need to use very different citation styles across different versions of a document, since it will adapt to other styles automatically. If you only use an author-year style then using \parencite / \textcite (which yields Author (Year) format) is also fine.

\documentclass{article}
\usepackage[citestyle=ext-authoryear,
            bibstyle=ext-authortitle,
            introcite=plain,articlein=false,sorting=nyt]{biblatex}
\DeclareOuterCiteDelims{parencite}{\bibopenbracket}{\bibclosebracket}
\DeclareDelimFormat{nameyeardelim}{\addcomma\space} 
\DeclareFieldFormat{bbx@introcite}{\mkbibbold{\mkbibbrackets{#1}}}
\DeclareFieldFormat{issuedate}{#1}
\renewcommand*{\introcitepunct}{\par}
\renewcommand*{\volnumdatedelim}{\addcomma\addspace}
\setlength{\bibhang}{0pt}
  

\addbibresource{biblatex-examples.bib}
\begin{document}
\autocite{bertram} % \parencite also works here
\printbibliography
\end{document}

output of code

11
  • +1 for biblatex-ext ;-). Just a few observations. Instead of [ and ] I usually prefer \bibopenbracket and \bibclosebracket, since the latter interact with the parentheses/bracket tracker: \DeclareOuterCiteDelims{parencite}{\bibopenbracket}{\bibclosebracket}. I'd probably add sorting=nyt, to get a more author-year sorting. To drop the parentheses around the year for @articles, you don't need to redefine issue+date, just say \DeclareFieldFormat{issuedate}{#1}. Lastly, I usually prefer \autocite with an appropriate autocite option over \parencite. – moewe Sep 27 '20 at 5:59
  • This is perfect! just one more thing if it is possible to make the first line (the author year in brackets part) in the references bold. – s.ali Sep 27 '20 at 9:12
  • @moewe Thanks, (as usual) for the super helpful comments. So many field formats to keep track of :). As someone who only ever will require author/year citations I must confess to not being an \autocite user since it serves no useful purpose for me. – Alan Munn Sep 27 '20 at 13:57
  • 1
    @s.ali Please see the updated answer which also incorporates moewe's (the author of biblatex-ext and one of the biblatex maintainers) comments. – Alan Munn Sep 27 '20 at 13:59
  • @AlanMunn Thanks for your support :) – s.ali Sep 28 '20 at 18:35

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.