0

I want to have

(Goossens et al., 1993)

But using biblatex, it will give below

\parencite  --> (Goossens et al. 1993)

I am using a template in Overleaf template

\usepackage{biblatex}

\addbibresource{references.bib}
\usepackage{uorbib}

in uorbin.sty file:

% This contains styling elements for bibliography
% stuff: Entire citation is colored instead of just
% year.
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{uorbib}
  [2018/01/18 v0.01 LaTeX package for UOR thesis]

%% Bib stuff
\DeclareFieldFormat{citehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{#1}}

\DeclareFieldFormat{textcitehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{%
    #1%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}}}

\savebibmacro{cite}
\savebibmacro{textcite}

\renewbibmacro*{cite}{%
  \printtext[citehyperref]{%
    \restorebibmacro{cite}%
    \usebibmacro{cite}}}

\renewbibmacro*{textcite}{%
  \ifboolexpr{
    ( not test {\iffieldundef{prenote}} and
      test {\ifnumequal{\value{citecount}}{1}} )
    or
    ( not test {\iffieldundef{postnote}} and
      test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )
  }
    {\DeclareFieldAlias{textcitehyperref}{noformat}}
    {}%
  \printtext[textcitehyperref]{%
    \restorebibmacro{textcite}%
    \usebibmacro{textcite}}}

\endinput
%%
%% End of file `uorbib.sty'.

I try to change to \usepackage{natbib} to get \citep{goossens93} and (Goossens et al., 1993)

But is not working using the template.

aan
  • 2,663
  • 2
    So, basically, the only difference between the current output and the desired output is the missing comma between author name and year? Why not simply use \renewcommand*{\nameyeardelim}{\addcomma\space} as mentioned in the answers to this question? How to add a comma between author and year – leandriis Aug 18 '19 at 19:58
  • @leandriis, thanks. It worked. What is the different between biblatex and natbib? – aan Aug 18 '19 at 20:02
  • 2
    natbib and biblatex are completely different bibliography/citation systems, see https://tex.stackexchange.com/q/25701/35864. The two are incompatible and while switching from one to the other can be done (I won't say easily, but certainly with a little effort) it is quite unlikely that you can reproduce the exact output of one system with the other. – moewe Aug 18 '19 at 20:05
  • 2
    Note that in recent versions of biblatex \DeclareDelimFormat{nameyeardelim}{\addcomma\space} is preferred over \renewcommand*{\nameyeardelim}{\addcomma\space}. – moewe Aug 18 '19 at 20:07
  • @moewe, how you manage to find all those related question in here? Could you give me some guideline so that I can find it first without asking repeated questions? – aan Aug 18 '19 at 20:14
  • 1
    It usually helps if you know the answer: That gives you many more search terms to try ;-). Of course you can try and reformulate your question to see if you can come up with more search terms, but in the end there are so many questions with the same generic keywords on this site that finding the answer you need amongst all the other stuff cab be quite challenging. – moewe Aug 18 '19 at 20:24

0 Answers0