It seems like there used to be a working solution but I guess it stopped working with updates to biblatex:
https://tex.stackexchange.com/a/46469/36836
Maybe someone is able to update the solution or suggest a new one?
It seems like there used to be a working solution but I guess it stopped working with updates to biblatex:
https://tex.stackexchange.com/a/46469/36836
Maybe someone is able to update the solution or suggest a new one?
This answer assumes biblatex version >= 3.4.
We will have to change the code so it complies to the new name format (cf. Biblatex 3.3 name formatting). Furthermore I have changed the code to use name hashes instead of relying on string comparison.
The code implements a new option nametracker. If set to context names will be tracked separately for the text and footnotes, if set to global (or true) names will not be tracked separately. Of course that option can only be executed after it is defined. So in the MWE it can not be set at loading-time, it can only be set with \ExecuteBibliographyOptions.
\documentclass[british]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel,csquotes}
\usepackage[style=authoryear, backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\makeatletter
\newrobustcmd*{\cbx@nametracker@global}[1]{%
\xifinlistcs{#1}{cbx@bseen@names@\the\c@refsection}
{}
{\listcsxadd{cbx@bseen@names@\the\c@refsection}{#1}}}
\newrobustcmd*{\cbx@nametracker@context}[1]{%
\iftoggle{blx@footnote}
{\xifinlistcs{#1}{cbx@fseen@names@\the\c@refsection}
{}
{\listcsxadd{cbx@fseen@names@\the\c@refsection}{#1}}}
{\xifinlistcs{#1}{cbx@bseen@names@\the\c@refsection}
{}
{\listcsxadd{cbx@bseen@names@\the\c@refsection}{#1}}}}
\newrobustcmd*{\cbx@ifnameseen@global}[1]{%
\xifinlistcs{#1}{cbx@bseen@names@\the\c@refsection}}
\newrobustcmd*{\cbx@ifnameseen@context}[1]{%
\iftoggle{blx@footnote}%
{\xifinlistcs{#1}{cbx@fseen@names@\the\c@refsection}}%
{\xifinlistcs{#1}{cbx@bseen@names@\the\c@refsection}}}
\DeclareBibliographyOption[string]{nametracker}[true]{%
\ifcsdef{blx@opt@nametracker@#1}
{\csuse{blx@opt@nametracker@#1}}
{\blx@err@invopt{nametracker=#1}{}}}
\def\blx@opt@nametracker@global{%
\let\cbx@ifnameseen\cbx@ifnameseen@global
\let\cbx@nametracker\cbx@nametracker@global}
\let\blx@opt@nametracker@true\blx@opt@nametracker@global
\def\blx@opt@nametracker@false{%
\protected\long\def\cbx@ifnameseen##1##2##3{##3}%
\let\cbx@nametracker\relax}
\def\blx@opt@nametracker@context{%
\let\cbx@ifnameseen\cbx@ifnameseen@context
\let\cbx@nametracker\cbx@nametracker@context}
\appto\blx@secinit{%
\ifcsundef{cbx@bseen@names@\the\c@refsection}
{\global\cslet{cbx@bseen@names@\the\c@refsection}@empty}
{}%
\ifcsundef{cbx@fseen@names@\the\c@refsection}
{\global\cslet{cbx@fseen@names@\the\c@refsection}@empty}
{}}
\InitializeCitationStyle{%
\global\cslet{cbx@bseen@names@\the\c@refsection}@empty
\global\cslet{cbx@fseen@names@\the\c@refsection}@empty}
\ExecuteBibliographyOptions{nametracker=context}
\DeclareNameFormat{labelname}{%
\cbx@ifnameseen{\thefield{hash}}
{\ifcase\value{uniquename}%
\usebibmacro{name:family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\or
\ifuseprefix
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffixi}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefixi}
{\namepartsuffixi}}%
\or
\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\fi}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\cbx@nametracker{\thefield{hash}}}%
\usebibmacro{name:andothers}}
\makeatother
\begin{document}
\cite{companion}
\cite{companion}
\cite{knuth:ct:a}
\cite{knuth:ct:b}
\end{document}
gives
Michel Goossens, Frank Mittelbach and Alexander Samarin 1994
Goossens, Mittelbach and Samarin 1994
Donald E. Knuth 1984
Knuth 1986
style=verbose. It always gives the full name not just the first instance in this case. I am not sure where the problem is. – Daniel Jun 14 '16 at 17:01uniquenamefeature needs to be turned on: add the optionuniquename=trueforverbosewhere it is not turned on by default (unlike forauthoryear). Maybe you also need\renewbibmacro*{cite:full}{% \usebibmacro{cite:full:citepages}% \printtext[bibhypertarget]{% \usedriver {\DeclareNameAlias{sortname}{labelname}} {\thefield{entrytype}}}% \usebibmacro{shorthandintro}}(i.e. uselabelnameinstead ofdefaultforsortnamein the full citations). – moewe Jun 14 '16 at 17:16uniquename=trueto thebiblatexoptions did the trick. – Daniel Jun 14 '16 at 17:19\cite{knuth:ct:a}and then\cite{knuth:ct:b}only if you also add the second bit of code will you get to see "Knuth ..." inknuth:ct:b, if you don't use it you will seeDonald E. Knuthalso forknuth:ct:b, but maybe that is what you want.) – moewe Jun 14 '16 at 17:24\DeclareNameFormat{labelname}bit is the same for both. – moewe Jun 14 '16 at 17:57\citeauthorso thelabelwill not be changed? I am thinking of a full name for the first\citeauthorand for the following\citeauthoronly e.g. Initial and last name or optional only last name.Right now it changes the label and the author’s name, too.
– lukascbossert Jun 15 '16 at 08:19\DeclareNameFormat{citeauthor}instead of\DeclareNameFormat{labelname}in my code and copy the definition of\DeclareCiteCommand{\citeauthor}from the other answer you should be good to go. If you have any trouble with that let me know (either on your github or via a new question here.) – moewe Jun 15 '16 at 14:27\makeatletter\renewcommand*{\cbx@fseen@names}{}\renewcommand*{\cbx@tseen@names}{}\makeatother. If that is enough for you. – moewe Jun 16 '16 at 13:42etoolbox's\AfterEndEnvironment{abstract}{...}. – Daniel Jun 17 '16 at 08:55