summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-20 23:32:55 +0000
committerKarl Berry <karl@freefriends.org>2010-03-20 23:32:55 +0000
commit1080eb42d3947b4414c2bda84c4d0c0b809c4e16 (patch)
treed5e2f1893ee3a1f85c1b0d195db8ba0a8c28ff60 /Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx
parent6861935735f4cbecd9f2772a4123b3fb07d6ffc2 (diff)
biblatex 0.9a (19mar10)
git-svn-id: svn://tug.org/texlive/trunk@17511 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx49
1 files changed, 26 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx
index d1f9cd8e111..11b3729dd0b 100644
--- a/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx
@@ -1,7 +1,7 @@
-% $Id: numeric-comp.cbx,v 0.9 2010/02/14 15:42:33 lehman beta $
+% $Id: numeric-comp.cbx,v 0.9a 2010/03/19 19:52:15 lehman beta $
\ProvidesFile{numeric-comp.cbx}
-[\abx@cbxid $Id: numeric-comp.cbx,v 0.9 2010/02/14 15:42:33 lehman beta $]
+[\abx@cbxid $Id: numeric-comp.cbx,v 0.9a 2010/03/19 19:52:15 lehman beta $]
\ExecuteBibliographyOptions{labelnumber,sortcites,autocite=inline}
\renewcommand*{\multicitedelim}{\addcomma\space}
@@ -69,16 +69,30 @@
\global\defcounter{cbx@tempcnta}{0}}
{}}
-\DeclareCiteCommand{\cite}
+\newbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\usebibmacro{cite:comp}}
+ {\usebibmacro{cite:dump}\cbx@tempa
+ \usebibmacro{cite:init}%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}%
+ \addspace\bibopenbracket
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite:comp}}%
+ \savefield{namehash}{\cbx@lasthash}%
+ \gdef\cbx@tempa{\bibclosebracket\multicitedelim}}
+
+\DeclareCiteCommand{\cite}[\mkbibbrackets]
{\usebibmacro{cite:init}%
- \usebibmacro{prenote}%
- \bibleftbracket}
+ \usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}%
- \usebibmacro{postnote}%
- \bibrightbracket}
+ \usebibmacro{postnote}}
\DeclareCiteCommand{\parencite}[\mkbibbrackets]
{\usebibmacro{cite:init}%
@@ -108,23 +122,12 @@
\usebibmacro{postnote}}
\DeclareCiteCommand{\textcite}
- {\usebibmacro{cite:init}%
- \usebibmacro{prenote}}
+ {\usebibmacro{cite:init}}
{\usebibmacro{citeindex}%
- \iffieldequals{namehash}{\cbx@lasthash}
- {\usebibmacro{cite:comp}}
- {\usebibmacro{cite:dump}\cbx@tempa
- \usebibmacro{cite:init}%
- \ifnameundef{labelname}
- {\printfield[citetitle]{labeltitle}}
- {\printnames{labelname}}%
- \addspace\bibleftbracket
- \usebibmacro{cite:comp}}%
- \savefield{namehash}{\cbx@lasthash}%
- \gdef\cbx@tempa{\bibrightbracket\multicitedelim}}
+ \usebibmacro{textcite}}
{}
- {\usebibmacro{cite:dump}%
- \usebibmacro{postnote}\bibrightbracket}
+ {\usebibmacro{postnote}%
+ \bibclosebracket}
\DeclareCiteCommand{\supercite}[\mkbibsuperscript]
{\usebibmacro{cite:init}%
@@ -140,7 +143,7 @@
{}
{\usebibmacro{cite:dump}}
-\DeclareMultiCiteCommand{\cites}[\mkbibbrackets]{\parencite}{\multicitedelim}
+\DeclareMultiCiteCommand{\cites}[\mkbibbrackets]{\cite}{\multicitedelim}
\DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim}
\endinput