summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx112
1 files changed, 91 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx
index 9dca13b35df..1401d38f024 100644
--- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx
@@ -1,28 +1,95 @@
-% $Id: verbose-inote.cbx,v 0.9 2010/02/14 15:42:33 lehman beta $
+% $Id: verbose-inote.cbx,v 0.9d 2010/09/03 20:11:58 lehman beta $
\ProvidesFile{verbose-inote.cbx}
-[\abx@cbxid $Id: verbose-inote.cbx,v 0.9 2010/02/14 15:42:33 lehman beta $]
-
-\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,
- singletitle,pagetracker,autocite=footnote}
-\providecommand*{\mkibid}[1]{#1}
-\newbool{cbx:loccit}
-\newbool{cbx:pageref}
+[\abx@cbxid $Id: verbose-inote.cbx,v 0.9d 2010/09/03 20:11:58 lehman beta $]
\DeclareFieldFormat{bibhyperlink}{%
\bibhyperlink{\thefield{entrykey}:\csuse{cbx@\iffootnote{f}{t}@\thefield{entrykey}}}{#1}}
\DeclareFieldFormat{bibhypertarget}{%
\bibhypertarget{\thefield{entrykey}:\the\value{instcount}}{#1}}
+\providecommand*{\mkibid}[1]{#1}
+\newtoggle{cbx:loccit}
+\newtoggle{cbx:pageref}
+\newbibmacro*{cite:citepages}{}
+\newbibmacro*{cite:full:citepages}{}
+\newbibmacro*{cite:postnote}{}
\DeclareBibliographyOption{ibidpage}[true]{%
\ifstrequal{#1}{true}
{\ExecuteBibliographyOptions{loccittracker=constrict}}
{\ExecuteBibliographyOptions{loccittracker=false}}}
\DeclareBibliographyOption{pageref}[true]{%
- \setbool{cbx:pageref}{#1}}
+ \settoggle{cbx:pageref}{#1}}
+
+\DeclareBibliographyOption{citepages}[permit]{%
+ \ifcsdef{cbx@opt@citepages@#1}
+ {\csuse{cbx@opt@citepages@#1}}
+ {\PackageError{biblatex}
+ {Invalid option 'citepages=#1'}
+ {Valid values are 'permit', 'suppress', 'omit', 'separate'.}}}
+
+\def\cbx@opt@citepages@permit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@suppress{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \clearfield{pages}%
+ \clearfield{pagetotal}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@omit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ test {\iffieldpages{postnote}}
+ }
+ {\clearfield{pages}%
+ \clearfield{pagetotal}}
+ {}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@separate{%
+ \providetoggle{cbx:fullcite}%
+ \renewbibmacro*{cite:citepages}{%
+ \global\togglefalse{cbx:fullcite}}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \global\toggletrue{cbx:fullcite}}%
+ \renewbibmacro*{cite:postnote}{%
+ \ifboolexpr{
+ togl {cbx:fullcite}
+ and
+ test {\iffieldpages{postnote}}
+ and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ (
+ not test {\iffieldundef{pages}}
+ or
+ not test {\iffieldundef{pagetotal}}
+ )
+ }
+ {\usebibmacro{cite:postnote:pages}}
+ {\usebibmacro{cite:postnote:ibidpage}}}
+ \providebibmacro*{cite:postnote:pages}{%
+ \setunit{\postnotedelim}%
+ \bibstring{thiscite}%
+ \setunit{\addspace}%
+ \printfield{postnote}}}
+
+\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,singletitle,
+ pagetracker,autocite=footnote,citepages=permit}
\newbibmacro*{cite}{%
- \global\boolfalse{cbx:loccit}%
+ \usebibmacro{cite:citepages}%
+ \global\togglefalse{cbx:loccit}%
\ifciteseen
{\iffieldundef{shorthand}
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
@@ -36,6 +103,7 @@
\csxdef{cbx@t@\thefield{entrykey}}{\the\value{instcount}}}
\newbibmacro*{cite:full}{%
+ \usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{\DeclareNameAlias{sortname}{default}}
@@ -44,7 +112,7 @@
\newbibmacro*{cite:short}{%
\printnames{labelname}%
- \setunit*{\addcomma\space}%
+ \setunit*{\nametitledelim}%
\printtext[bibhyperlink]{%
\printfield[citetitle]{labeltitle}}}
@@ -54,11 +122,17 @@
\newbibmacro*{cite:ibid}{%
\printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}%
\ifloccit
- {\global\booltrue{cbx:loccit}}
+ {\global\toggletrue{cbx:loccit}}
{}}
+\newbibmacro*{cite:postnote:ibidpage}{%
+ \iftoggle{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
\newbibmacro*{footcite}{%
- \global\boolfalse{cbx:loccit}%
+ \usebibmacro{cite:citepages}%
+ \global\togglefalse{cbx:loccit}%
\ifciteseen
{\iffieldundef{shorthand}
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
@@ -73,30 +147,26 @@
\label{cbx@\the\value{instcount}}}
\newbibmacro*{footcite:full}{%
+ \usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}
-\newbibmacro*{cite:postnote}{%
- \ifbool{cbx:loccit}
- {}
- {\usebibmacro{postnote}}}
-
\newbibmacro*{footcite:note}{%
\ifnameundef{labelname}
{\printfield{label}}
{\printnames{labelname}}%
\ifsingletitle
{}
- {\setunit*{\addcomma\space}%
+ {\setunit*{\nametitledelim}%
\printfield[title]{labeltitle}}%
\setunit*{\addcomma\space}%
\printtext{%
\bibstring{seenote}\addnbspace
\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}%
- \ifbool{cbx:pageref}
+ \iftoggle{cbx:pageref}
{\ifsamepage{\the\value{instcount}}
{\csuse{cbx@f@\thefield{entrykey}}}
{}
@@ -110,7 +180,7 @@
\newbibmacro*{footcite:ibid}{%
\printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}%
\ifloccit
- {\global\booltrue{cbx:loccit}}
+ {\global\toggletrue{cbx:loccit}}
{}}
\DeclareCiteCommand{\cite}