I am using following commands and macros to create a new citation style citation \aytcite
which give out citations as "Author et al (2018)". So can we modify it and make it do "Author et al (2018)[2]" with the same \aytcite
command?
\usepackage[backend=biber,style=ieee,sorting=none,labeldateparts,maxbibnames=99,maxcitenames=2,mincitenames=1]{biblatex}
\ExecuteBibliographyOptions{
url=false
}
\urlstyle{same}
\addbibresource{Biblio.bib}
\providebool{cbx:parens}
\newbibmacro*{citeyear}{%
\iffieldundef{shorthand}
{\iffieldundef{labelyear}
{\usebibmacro{cite:label}}
{\usebibmacro{cite:labeldate+extradate}}}
{\usebibmacro{cite:shorthand}}}
\newbibmacro*{aytcite}{%
\ifnameundef{labelname}
{\iffieldundef{shorthand}
{\usebibmacro{cite:label}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nonameyeardelim}\bibopenparen}%
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
\usebibmacro{cite:labeldate+extradate}}
{\usebibmacro{cite:shorthand}}}
{\printnames{labelname}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nameyeardelim}\bibopenparen}%
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
\usebibmacro{citeyear}}}
\newbibmacro*{cite:shorthand}{%
\printtext[bibhyperref]{\printfield{shorthand}}}
\newbibmacro*{cite:label}{%
\iffieldundef{label}
{\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
{\printtext[bibhyperref]{\printfield{label}}}}
\newbibmacro*{cite:labeldate+extradate}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperref]{\printlabeldateextra}}}
\newbibmacro*{aytcite:postnote}{%
\iffieldundef{postnote}
{\ifbool{cbx:parens}
{\bibcloseparen}
{}}
{\ifbool{cbx:parens}
{\setunit{\postnotedelim}}
{\setunit{\extpostnotedelim\bibopenparen}}%
\printfield{postnote}\bibcloseparen}}
\DeclareCiteCommand{\aytcite}
{\boolfalse{cbx:parens}}
{\usebibmacro{citeindex}%
\iffirstcitekey
{\setcounter{textcitetotal}{1}}
{\stepcounter{textcitetotal}%
\textcitedelim}%
\usebibmacro{aytcite}}
{\ifbool{cbx:parens}
{\bibcloseparen\global\boolfalse{cbx:parens}}
{}}
{\usebibmacro{aytcite:postnote}}