summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/historische-zeitschrift/historische-zeitschrift.cbx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-12-03 23:13:13 +0000
committerKarl Berry <karl@freefriends.org>2016-12-03 23:13:13 +0000
commit2b60ba1b42d43ea46d6a02d7d2dac28c83eb8b46 (patch)
tree6d361e278148d44c2b80a85ec0e39bd55ef0d495 /Master/texmf-dist/tex/latex/historische-zeitschrift/historische-zeitschrift.cbx
parentfd075c8e55d935a0b5e68825a1c43f1af04c272f (diff)
historische-zeitschrift runtime files restored
git-svn-id: svn://tug.org/texlive/trunk@42635 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/historische-zeitschrift/historische-zeitschrift.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/historische-zeitschrift/historische-zeitschrift.cbx221
1 files changed, 221 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/historische-zeitschrift/historische-zeitschrift.cbx b/Master/texmf-dist/tex/latex/historische-zeitschrift/historische-zeitschrift.cbx
new file mode 100644
index 00000000000..003bf5b2bd4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/historische-zeitschrift/historische-zeitschrift.cbx
@@ -0,0 +1,221 @@
+% historische-zeitschrift.cbx, Dominik Waßenhoven 2014-2016
+
+\ProvidesFile{historische-zeitschrift.cbx}[2016/12/01 v1.2 HZ citation style]
+
+\DeclareBibliographyOption{postnote}{%
+ \ifcsdef{hz@opt@postnote@#1}
+ {\csuse{hz@opt@postnote@#1}}
+ {\PackageError{historische-zeitschrift}
+ {Invalid option 'postnote=#1'\MessageBreak
+ Valid values are 'afterparen', 'inparen'}}}
+
+\def\hz@opt@postnote@afterparen{%
+ \renewbibmacro*{postnote}{%
+ \ifbool{cbx@seenote}
+ {\iffieldundef{postnote}
+ {\printtext{\bibrightparen}}
+ {\printtext{\bibrightparen}%
+ \postnotedelim%
+ \printfield{postnote}}}%
+ {\iffieldundef{postnote}
+ {}
+ {\postnotedelim%
+ \printfield{postnote}}}}}
+
+\def\hz@opt@postnote@inparen{%
+ \renewbibmacro*{postnote}{%
+ \ifbool{cbx@seenote}
+ {\iffieldundef{postnote}
+ {\printtext{\bibrightparen}}
+ {\postnotedelim%
+ \printfield{postnote}%
+ \printtext{\bibrightparen}}}%
+ {\iffieldundef{postnote}
+ {}
+ {\postnotedelim%
+ \printfield{postnote}}}}}
+
+\ExecuteBibliographyOptions{
+ citetracker=context,
+ ibidtracker=constrict,
+ singletitle=false,%<----------------
+ pagetracker,
+ autocite=footnote,
+ postnote=afterparen
+}
+
+\providecommand*{\mkidem}[1]{#1}
+\providecommand*{\mkibid}[1]{#1}
+\newbool{cbx@loccit}
+% to check if a 'see note' phrase is in use:
+\newbool{cbx@seenote}
+
+\DeclareBibliographyOption{ibidpage}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{loccittracker=false}}}
+
+%% 'Ders.' bei inbook, wenn gleicher Autor
+\renewbibmacro*{bybookauthor}{%
+ \ifnamesequal{author}{bookauthor}
+ {\midsentence*\bibstring[\mkidem]{idem\thefield{gender}}\addcolon}
+ {\printnames{bybookauthor}}}
+% {\printnames[byauthor]{bookauthor}%
+% \newunit\newblock}}
+
+%%%%% %%%%% %%%%% %%%%% %%%%%
+%%%%% Reformatting %%%%%
+%%%%% %%%%% %%%%% %%%%% %%%%%
+
+\DeclareFieldFormat{citetitle}{#1\isdot}
+\DeclareFieldFormat[article]{citetitle}{#1}
+\DeclareFieldFormat[inbook]{citetitle}{#1}
+\DeclareFieldFormat[incollection]{citetitle}{#1}
+\DeclareFieldFormat[inproceedings]{citetitle}{#1}
+\DeclareFieldFormat[patent]{citetitle}{#1}
+\DeclareFieldFormat[thesis]{citetitle}{#1}
+\DeclareFieldFormat[unpublished]{citetitle}{#1}
+
+\DeclareFieldFormat{postnote}{#1}
+\DeclareFieldFormat{multipostnote}{#1}
+
+%%%%% %%%%% %%%%% %%%%% %%%%% %%%%%
+%%%%% Bibliography strings %%%%%
+%%%%% %%%%% %%%%% %%%%% %%%%% %%%%%
+\DefineBibliographyStrings{german}{%
+ seenote = {wie Anm\adddot},
+}
+
+%%%%% %%%%% %%%%% %%%%%
+%%%%% Postnote %%%%%
+%%%%% %%%%% %%%%% %%%%%
+% has to be redefined, because the 'see note' phrase
+% might be in parentheses (option 'postnote')
+% \renewbibmacro*{postnote}{%
+% \ifbool{cbx@seenote}
+% {\iffieldundef{postnote}
+% {\printtext{\bibrightparen}}
+% {\postnotedelim
+% \printfield{postnote}%
+% \printtext{\bibrightparen}}}
+% {\iffieldundef{postnote}
+% {}
+% {\postnotedelim
+% \printfield{postnote}}}}
+
+%%%%% %%%%% %%%%% %%%%% %%%%%
+%%%%% Cite bibmacros %%%%%
+%%%%% %%%%% %%%%% %%%%% %%%%%
+
+\newbibmacro*{cite}{%
+ \global\boolfalse{cbx@seenote}% NEW!
+ \iffieldundef{shorthand}
+ {\usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ {\printfield{shorthand}}}
+
+\newbibmacro*{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}}}%
+ {\usebibmacro{footcite:full}%
+ \usebibmacro{footcite:save}}}
+
+\newbibmacro*{footcite:save}{%
+ \ifundef\@thefnmark
+ {\ifundef\@theenmark % endnotes.sty
+ {\csgdef{cbx@note@\thefield{entrykey}}{%
+ \BibliographyWarning{Missing footnote mark}\textbf{??}}}
+ {\global\cslet{cbx@note@\thefield{entrykey}}\@theenmark}}%
+ {\global\cslet{cbx@note@\thefield{entrykey}}\@thefnmark}%
+ \csxdef{cbx@first@\thefield{entrykey}}{\the\value{instcount}}}
+
+\newbibmacro*{footcite:full}{%
+ \printtext{%
+ \bibhypertarget{\thefield{entrykey}:\the\value{instcount}}{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{footcite:note}{%
+ \global\booltrue{cbx@seenote}% NEW!
+ \ifnameundef{labelname}
+ {\printfield{label}}
+ {\printnames{labelname}}%
+ \ifsingletitle
+ {}
+ {\setunit*{\addcomma\space}%
+ \printfield[title]{labeltitle}}%
+ \setunit*{\addspace}%<--- CHANGED
+ \printtext{%
+ \bibhyperlink{\thefield{entrykey}:%
+ \@nameuse{cbx@first@\thefield{entrykey}}}{%
+ \printtext{\bibleftparen}%
+ \bibstring{seenote}\space
+ \@nameuse{cbx@note@\thefield{entrykey}}}}}
+
+\newbibmacro*{footcite:ibid}{%
+ \printtext{%
+ \bibhyperlink{\thefield{entrykey}:%
+ \@nameuse{cbx@first@\thefield{entrykey}}}{%
+ \bibstring[\mkibid]{ibidem}}}%
+ \ifloccit
+ {\global\booltrue{cbx@loccit}}
+ {}}
+
+\newbibmacro*{footcite:shorthand}{%
+ \printtext{%
+ \bibhyperlink{\thefield{entrykey}:%
+ \@nameuse{cbx@first@\thefield{entrykey}}}{%
+ \printfield{shorthand}}}}
+
+\newbibmacro*{cite:postnote}{%
+ \ifbool{cbx@loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
+%%%%% %%%%% %%%%% %%%%% %%%%%
+%%%%% Cite commands %%%%%
+%%%%% %%%%% %%%%% %%%%% %%%%%
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \iffootnote
+ {\usebibmacro{footcite}}
+ {\usebibmacro{cite}}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \iffootnote
+ {\usebibmacro{footcite}}
+ {\usebibmacro{cite}}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\bibsentence
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{footcite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\endinput