summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.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-note.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-note.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx92
1 files changed, 80 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx
index 70d697cfeb2..cf73b4c72e9 100644
--- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx
@@ -2,10 +2,16 @@
[\abx@cbxid]
\DeclareFieldFormat{bibhyperlink}{%
- \bibhyperlink{\thefield{entrykey}:\csuse{cbx@\iffootnote{f}{t}@\thefield{entrykey}}}{#1}}
+ \bibhyperlink{%
+ \thefield{entrykey}:\csuse{cbx@\iffootnote{f}{t}@\thefield{entrykey}}}{#1}}
\DeclareFieldFormat{bibhypertarget}{%
\bibhypertarget{\thefield{entrykey}:\the\value{instcount}}{#1}}
+
\newtoggle{cbx:pageref}
+
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
\newbibmacro*{cite:citepages}{}
\newbibmacro*{cite:full:citepages}{}
\newbibmacro*{cite:postnote}{}
@@ -80,7 +86,8 @@
\setunit{\addspace}%
\printfield{postnote}}}
-\ExecuteBibliographyOptions{citetracker=context,singletitle,autocite=footnote,citepages=permit}
+\ExecuteBibliographyOptions{citetracker=context,singletitle,autocite=footnote,
+ citepages=permit}
\newbibmacro*{cite}{%
\usebibmacro{cite:citepages}%
@@ -196,17 +203,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