# How do I customize the \footcite command in the Historische-Zeitschrift style?

I am trying to customise the \footcite command of the Historische-Zeitschrift Style so that I can use a special citation-type.

Here's what I need:

1. When I have a bibliographic entry with something in custom usera field, and I use \footcite, my citation needs to look like this:

See Athanasius Alexandrinus, Epistula ad Marcellinum de interpretatione psalmorum, in: PG 27, S. 56.

2. When I use \footcite for the second time for the same entry directly after this one, it needs to produce:

See ebd., S. 22.

3. When I use \footcite for the third time for the same entry, but somewhere else in the text, it needs to produce:

See Ath., ep. Marcell. (Wie Anm. 1 ), S. 56.

4. If I don't have anything in that field, the default citation needs to be used. It would look like this:

See Iustinus Martyr, Iustini Martyris dialogus cum Tryphone, in: Miroslav Marcovich (Hrsg.). Bd. 47. (Patrologiae cursus completus: Series Graeca.) Berlin/New York 1997, S. 22.

Now, I managed to get all this, except for thing, for which I can't figure out why it happens. You can see what I am talking about on this picture:

So where the number 2 is, should be 1. It points not at the original footnote where the entry was quoted the first time, but instead at the last repeated entry.

Here is my MWE:

\documentclass[a4paper,11pt]{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage{csquotes}
\usepackage{blindtext}
\usepackage{filecontents}
\usepackage{hyperref}
\hypersetup{
citecolor=black,
filecolor=black,
urlcolor=black
}
\begin{filecontents}{\jobname.bib}
@incollection{athanasius1857,
Author = {{Athanasius Alexandrinus}},
Booktitle = {Patrologiae cursus completus: Series Graeca},
Editor = {Jacques Paul Migne},
Pages = {37-40},
Usera = {PG},
Publisher = {Accurante J.-P. Migne},
Shortauthor = {Ath.},
Shorttitle = {ep. Marcell.},
Title = {Epistula ad Marcellinum de interpretatione psalmorum},
Volume = {27},
Year = {1857}}
@incollection{iustinus1997,
Author = {{Iustinus Martyr}},
Title = {Iustini Martyris dialogus cum Tryphone},
Editor = {Miroslav Marcovich},
Publisher = {Walter de Gruyter},
Series = {Patrologiae cursus completus: Series Graeca},
Shortauthor = {Iust.},
Shorttitle = {De Tryph.},
Volume = {47},
Year = {1997}}
\end{filecontents}
\usepackage[ngerman]{babel}
\usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex,idemtracker=true]{biblatex}
\bibliography{\jobname}
%
\makeatletter
\renewbibmacro*{footcite}{%
\global\boolfalse{cbx@loccit}%
\global\boolfalse{cbx@seenote}% NEW!
\ifciteseen
{\iffieldundef{shorthand}
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
{\usebibmacro{footcite:ibid}}
{\usebibmacro{footcite:note}}}
{\usebibmacro{footcite:shorthand}}}
{\iffieldundef{usera}
{\usebibmacro{footcite:full}}{\printnames{author}%
\printfield{title}\isdot%
\usebibmacro{in:}%
\printfield{usera}%
\printfield[default]{volume}}}}
\usebibmacro{footcite:save}}
\makeatother
%
\begin{document}
\blindtext\footcite[See][S. 56]{athanasius1857}
\blindtext\footcite[See][S. 22]{athanasius1857}
\blindtext\footcite[See][S. 22]{iustinus1997}
\blindtext\footcite[See][S. 56]{athanasius1857}
\printbibliography

\end{document}

• Please note that historische-zeitschrift is quite an old biblatex style (the current version 1.0 seem to date back to June 2012) and as such might have cause some problems; most notably, I'm not really happy with how some text in parentheses is handled (sometimes a spurious whitespace seems to sneak in). – moewe Mar 30 '14 at 16:26
• Yes I realise that, but since there is no newer option I have no choice. Thats the only stile that comes close to that what I need to have. – eklisiarh Mar 30 '14 at 18:25
• Maybe you would like to use verbose-ibid and customise that to your needs (that way it is guaranteed that your style works together well with the newest version of biblatex, being a standard style it will also be easier to modify than historische-zeitung). You could ask a new question about that. – moewe Mar 31 '14 at 19:21
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – user36296 Jul 11 '17 at 14:09
• @thymaro Too lacy to adjust the text building block :) – user36296 Jul 11 '17 at 16:44

Since the historische-zeitschrift style is quite old (it was updated in 2016 to deal with Biblatex 3.3 name formatting), I decided to try and recreate it. The base style I used is verbose-inote.

The relevant lines for the seenote parentheses are

\renewbibmacro*{footcite:note}{%
\ifnameundef{labelname}
{\printfield{label}}
{\printnames{labelname}}%
\ifsingletitle
{}
{\setunit*{\nametitledelim}%
\printfield[title]{labeltitle}}%
\printtext[parens]{%<---- ... and this line
\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}%
\iftoggle{cbx:pageref}
{\ifsamepage{\the\value{instcount}}{\csuse{cbx@f@\thefield{entrykey}}}
{}
\pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
{}}}


The name format is taken care of by (the answer has been edited to use the new name format, see the history for the old format)

\DeclareNameAlias{sortname}{given-family-emph}

\DeclareNameFormat{labelname}{%
\mkbibemph{%
\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:andothers}}}

\DeclareNameFormat{given-family-emph}{%
\mkbibemph{%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\renewbibmacro*{editor}{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\printnames{editor}%
\usebibmacro{editorstrg}%
\clearname{editor}}
{}}
\renewbibmacro*{editor+others}{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\printnames{editor}%
\clearname{editor}}
{}}


Titles etc. are just plain text, no emphasis, quotation marks etzc.

\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{citetitle}{#1}
\DeclareFieldFormat*{booktitle}{#1\isdot}
\DeclareFieldFormat*{journaltitle}{#1\isdot}
\DeclareFieldFormat*{issuetitle}{#1\isdot}
\DeclareFieldFormat*{maintitle}{#1\isdot}


Some fields are not to be displayed

\newcommand{\clearunecfields}{%
\clearlist{language}%
\clearlist{publisher}%
\clearfield{pagetotal}%
\iffieldequalstr{edition}{1}
{\clearfield{edition}}
{}%
}
\AtEveryBibitem{\clearunecfields}
\AtEveryCitekey{\clearunecfields}


(unit) separators

%\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\finallistdelim}{\multilistdelim}
\renewcommand*{\multinamedelim}{\multilistdelim}
\renewcommand*{\finalnamedelim}{\multinamedelim}
\renewbibmacro*{in:}{%
\printtext{\bibstring{in}\intitlepunct}}


The position of date, location and publisher is adjusted

\renewbibmacro*{issue+date}{%
\iffieldundef{issue}
{\usebibmacro{date}}
{\printfield{issue}%
\usebibmacro{date}}%
\newunit}
\renewbibmacro*{location+date}{%
\printlist{location}%
\usebibmacro{date}%
\newunit}
\newbibmacro*{pio+location+date}[1]{%
\printlist{location}%
\printlist{#1}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{publisher+location+date}{\usebibmacro{pio+location+date}{publisher}}
\renewbibmacro*{institution+location+date}{\usebibmacro{pio+location+date}{institution}}
\renewbibmacro*{organization+location+date}{\usebibmacro{pio+location+date}{organization}}
\DeclareFieldFormat{pages}{#1}


Series and number are to be displayed in parentheses at the end of an entry

\renewbibmacro*{series+number}{%
\iffieldundef{series}
{}
{\printtext[parens]{%
\printfield{series}%
\printfield{number}%
\newunit\newblock}
\nopunct}}


Other editor formats for @in... entries

\xpatchbibdriver{incollection}
{\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
}
{\usebibmacro{in:}%
\usebibmacro{byeditor+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock}%
{}{}

\xpatchbibdriver{inbook}
{\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}}%
{}{}

\renewbibmacro*{byeditor+others}{%
\ifboolexpr{
not test {\ifnameundef{editor}}
}
{\printnames{editor}%
\clearname{editor}}%
{}}


Finally, the citation commands are patched to include use the proper author name format

\renewbibmacro*{cite:full}{%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}

\renewbibmacro*{footcite:full}{%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}


MWE

\RequirePackage[ngerman=ngerman-x-latest]{hyphsubst}
\documentclass[12pt,ngerman,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{filecontents}
\usepackage{xpatch}
\usepackage[style=verbose-inote,backend=biber,maxnames=999]{biblatex}
\usepackage{hyperref}
\begin{filecontents*}{\jobname.bib}
@book{schramm,
author    = {Percy Ernst Schramm},
title     = {Hamburg, Deutschland und die Welt},
subtitle  = {Leistungen und Grenzen hanseatischen Bürgertums in der Zeit zwischen Napoleon I. und Bismarck},
edition   = {2},
location  = {Hamburg},
publisher = {Hoffmann \& Campe},
date      = {1952},
}
@book{hanham,
author    = {Harold John Hanham},
title     = {Elections and Party Management},
subtitle  = {Politics in the Age of Disraeli and Gladstone},
location  = {London},
date      = {1959},
publisher = {Longman},
}
@book{BlackEley,
author    = {David Blackbourn and Geoff Eley},
title     = {Mythen deutscher Geschichtsschreibung},
subtitle  = {Die gescheiterte bürgerliche Revolution von 1848},
location  = {Frankfurt am Main and Berlin and Wien},
date      = {1980},
publisher = {Ullstein},
}
@book{Lutz,
author    = {Heinrich Lutz},
title     = {Reformation und Gegenreformation},
location  = {Frankfurt am Main and Berlin and Wien},
date      = {1982},
publisher = {Oldenbourg Wissenschaftsverlag},
edition   = {2},
location  = {München and Wien},
series    = {Oldenbourg Grundriß der Geschichte},
number    = {10},
pagetotal = {251},
}
@article{zorn,
author    = {Wolfgang Zorn},
title     = {Wirtschafts- und sozialgeschichtliche Zusammenhänge der deutschen Reichsgründung (1850–1879)},
journal   = {HZ},
volume    = {197},
date      = {1963},
pages     = {318–34},
}
@collection{schieder,
editor    = {Theodor Schieder},
title     = {Beiträge zur britischen Geschichte im 20. Jahrhundert},
location  = {München},
date      = {1983},
series    = {Historische Zeitschrift, Beihefte},
number    = {8},
edition   = {1},
}
@incollection{alter,
author    = {Peter Alter},
title     = {Der britische Generalstreik von 1926 als politische Wende},
pages     = {89–116},
crossref  = {schieder},
}
@phdthesis{lacher,
author   = {Hugo Lacher},
title    = {Politischer Katholizismus und kleindeutsche Reichsgründung},
subtitle = {Eine Studie zur politischen Ideenwelt im deutschen Katholizismus},
location = {Mainz},
date     = {1963},
}
\end{filecontents*}
\DeclareNameAlias{sortname}{given-family-emph}

\DeclareNameFormat{labelname}{%
\mkbibemph{%
\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:andothers}}}

\DeclareNameFormat{given-family-emph}{%
\mkbibemph{%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\renewbibmacro*{editor}{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\printnames{editor}%
\usebibmacro{editorstrg}%
\clearname{editor}}
{}}
\renewbibmacro*{editor+others}{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\printnames{editor}%
\clearname{editor}}
{}}
\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{citetitle}{#1}
\DeclareFieldFormat*{booktitle}{#1\isdot}
\DeclareFieldFormat*{journaltitle}{#1\isdot}
\DeclareFieldFormat*{issuetitle}{#1\isdot}
\DeclareFieldFormat*{maintitle}{#1\isdot}
\newcommand{\clearunecfields}{%
\clearlist{language}%
\clearlist{publisher}%
\clearfield{pagetotal}%
\iffieldequalstr{edition}{1}
{\clearfield{edition}}
{}%
}
\AtEveryBibitem{\clearunecfields}
\AtEveryCitekey{\clearunecfields}
\renewcommand*{\finallistdelim}{\multilistdelim}
\renewcommand*{\multinamedelim}{\multilistdelim}
\renewcommand*{\finalnamedelim}{\multinamedelim}
\renewbibmacro*{in:}{%
\printtext{\bibstring{in}\intitlepunct}}
\renewbibmacro*{issue+date}{%
\iffieldundef{issue}
{\usebibmacro{date}}
{\printfield{issue}%
\usebibmacro{date}}%
\newunit}
\renewbibmacro*{location+date}{%
\printlist{location}%
\usebibmacro{date}%
\newunit}
\newbibmacro*{pio+location+date}[1]{%
\printlist{location}%
\printlist{#1}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{publisher+location+date}{\usebibmacro{pio+location+date}{publisher}}
\renewbibmacro*{institution+location+date}{\usebibmacro{pio+location+date}{institution}}
\renewbibmacro*{organization+location+date}{\usebibmacro{pio+location+date}{organization}}
\DeclareFieldFormat{pages}{#1}
\renewbibmacro*{series+number}{%
\iffieldundef{series}
{}
{\printtext[parens]{%
\printfield{series}%
\printfield{number}%
\newunit\newblock}
\nopunct}}

\xpatchbibdriver{incollection}
{\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
}
{\usebibmacro{in:}%
\usebibmacro{byeditor+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock}%
{}{}

\xpatchbibdriver{inbook}
{\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}}
{\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}
\setunit{\labelnamepunct}\newblock
\usebibmacro{maintitle+booktitle}}%
{}{}

\renewbibmacro*{byeditor+others}{%
\ifboolexpr{
not test {\ifnameundef{editor}}
}
{\printnames{editor}%
\clearname{editor}}%
{}}

\renewbibmacro*{cite:full}{%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}

\renewbibmacro*{footcite:full}{%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}

\renewbibmacro*{footcite:note}{%
\ifnameundef{labelname}
{\printfield{label}}
{\printnames{labelname}}%
\ifsingletitle
{}
{\setunit*{\nametitledelim}%
\printfield[title]{labeltitle}}%
\printtext[parens]{%
\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}%
\iftoggle{cbx:pageref}
{\ifsamepage{\the\value{instcount}}{\csuse{cbx@f@\thefield{entrykey}}}
{}
\pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
{}}}