summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx91
1 files changed, 79 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx
index c87aa5f6623..088d37dfa13 100644
--- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx
@@ -2,15 +2,22 @@
[\abx@cbxid]
\InitializeCitationStyle{\numgdef{\cbx@resetcount}{\cbx@resetcount+1}}
+
\DeclareFieldFormat{bibhyperlink}{%
\bibhyperlink{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+
\DeclareFieldFormat{bibhypertarget}{%
\bibhypertarget{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+
\newcommand*{\cbx@resetcount}{0}
\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
\newtoggle{cbx:fullcite}
\newtoggle{cbx:loccit}
\newbool{cbx:noidem}
+
\newbibmacro*{cite:citepages}{}
\newbibmacro*{cite:full:citepages}{}
\newbibmacro*{cite:postnote}{}
@@ -93,8 +100,7 @@
\printfield{postnote}}}
\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,
- idemtracker=constrict,autocite=footnote,
- citepages=permit}
+ idemtracker=constrict,autocite=footnote,citepages=permit}
\newbibmacro*{cite:save}{%
\csxdef{cbx@lastcite@\thefield{entrykey}}{\the\value{instcount}}%
@@ -193,17 +199,78 @@
{\multicitedelim}
{\usebibmacro{cite:postnote}}
-\DeclareCiteCommand{\textcite}[\cbx@textcite\footcite]
- {\gdef\cbx@savedkeys{}}
- {\printnames{labelname}%
- \xappto\cbx@savedkeys{\thefield{entrykey},}}
- {\multinamedelim}
- {\protected@xappto\cbx@savedcites{%
- [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}}
+
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\global\undef\cbx@lasthash}
+ {}}
+
+\newbibmacro*{textcite:count}{%
+ \stepcounter{textcitetotal}%
+ \ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{labelname}}}
+ {}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]
+ {\usebibmacro{textcite:init}%
+ \gdef\cbx@savedkeys{}%
+ \DeferNextCitekeyHook}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@footcite@args{%
+ (\thefield{multiprenote})(\thefield{multipostnote})}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\usebibmacro{textcite:count}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{\value{citetotal}}
+ {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
+ \protected@xappto\cbx@footcite@args{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
+ \iflastcitekey
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}%
+ \protected@xappto\cbx@footcite@args{\nopunct}}
+ {}}
+ {}}
+ {}
+ {}
+
+\newrobustcmd{\cbx@textcite@init}[3]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \setcounter{textcitemaxnames}{0}%
+ \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3%
+ \cbx@textcite@args\empty\cbx@footcite@args\empty}
-\newrobustcmd{\cbx@textcite}[2]{%
- \def\cbx@savedcites{#1}#2\cbx@savedcites}
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}
-\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\footcites]{\textcite}{\multinamedelim}
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
\endinput