1

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\abx@macro@textciteOrig\abx@macro@textcite
\renewbibmacro{textcite}{% <============================================
   \bibhyperref{%
   \let\bibhyperref\relax\relax%
   \abx@macro@textciteOrig%
   }%
}%
\makeatother


\begin{document}



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

\printbibliography
\end{document}
  • 5
    Use \citeauthor{…} and its relatives? – David Purton Sep 12 '19 at 3:01
  • @DavidPurton Would you type that up as an answer, please? – moewe Sep 12 '19 at 15:31
3

You can use \citeauthor for this. See the biblatex manual for details.

MWE

\documentclass{article}

\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}
\citeauthor{baez/article} said ABC \autocite{baez/article}.
\end{document}

MWE output

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.