summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-11 23:36:27 +0000
committerKarl Berry <karl@freefriends.org>2013-07-11 23:36:27 +0000
commit275a02abde664ff395868e975c7c06d89276ac0b (patch)
treec315179a8d6f30c65f89152a70176afa828cc7e7 /Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx
parent40e239851e66f62ec8d3092c746e61151b445b6f (diff)
biblatex (10jul13)
git-svn-id: svn://tug.org/texlive/trunk@31176 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx89
1 files changed, 78 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx
index dff768ed174..c21cc843edd 100644
--- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx
@@ -2,13 +2,19 @@
[\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:loccit}
+
\newbibmacro*{cite:citepages}{}
\newbibmacro*{cite:full:citepages}{}
\newbibmacro*{cite:postnote}{}
@@ -86,7 +92,7 @@
\printfield{postnote}}}
\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,
- pagetracker,autocite=footnote,citepages=permit}
+ pagetracker,autocite=footnote,citepages=permit}
\newbibmacro*{cite}{%
\usebibmacro{cite:citepages}%
@@ -167,17 +173,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}}}
-\newrobustcmd{\cbx@textcite}[2]{%
- \def\cbx@savedcites{#1}#2\cbx@savedcites}
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\global\undef\cbx@lasthash}
+ {}}
+
+\newbibmacro*{textcite:count}{%
+ \stepcounter{textcitetotal}%
+ \ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{labelname}}}
+ {}}
-\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\footcites]{\textcite}{\multinamedelim}
+\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}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
\endinput