How to delete the year referencing in some and maintain some. Ex: Smith et. al (1997) said that....Smith et. al. said that

by aan   Last Updated September 12, 2019 01:23 AM

I want to have:

McIntosh at al. said that ABC definitions (McIntosh et al, 1997; Abc, 1999).

Which mean delete the year in some case, and include the year in some case.

and not below:

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}

@article{journal1,
  title={journal123},
  author={McIntosh, Gerald C and Brown, Susan H and Rice, Ruth R and Thaut, Michael H},
  journal={Journal of Neurology, Neurosurgery \& Psychiatry},
  volume={62},
  number={1},
  pages={22--26},
  year={1997},
}

@article{journal2,
  title={journal123456},
  author={Abc, Def, GhI},
  journal={Journal of Neurology, Neurosurgery \& Psychiatry},
  volume={62},
  number={1},
  pages={22--26},
  year={1999},
}


\end{filecontents}


\documentclass[british]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\usepackage{csquotes}
\usepackage[%
  style=authoryear, 
  backend=biber, 
  maxcitenames=2,
  giveninits
]{biblatex}
\addbibresource{\jobname.bib} % \jobname to use the bib file created with filecontents

\DeclareNameAlias{sortname}{family-given}
\DeclareDelimFormat{nameyeardelim}{\addcomma\space}

\usepackage[unicode,colorlinks,citecolor=blue]{hyperref}
% \renewcommand*{\nameyeardelim}{\addcomma\space}

\newcommand{\mycite}[1]{\citeauthor{#1}'s \citeyear{#1}}

\DeclareCiteCommand{\citeauthor}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printtext[bibhyperref]{\printnames{labelname}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citeyear} % <======================================
    {}
    {(\bibhyperref{\printdate})}
    {\multicitedelim}
    {}

% \DeclareCiteCommand{\parencite}[\mkbibparens]
\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\makeatletter
\let\[email protected]@textciteOrig\[email protected]@textcite
\renewbibmacro{textcite}{% <============================================
   \bibhyperref{%
   \let\bibhyperref\relax\relax%
   \[email protected]@textciteOrig%
   }%
}%
\makeatother


\begin{document}



\textcite{journal1} said that ABC definitions \parencite{journal1, journal2} 

\printbibliography
\end{document}


Related Questions


Why double ((Smith, 1998);(Berrnet, 2001)) in referencing

Updated September 12, 2019 00:23 AM



Revert packages to prior versions

Updated March 06, 2017 22:23 PM