diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx | 57 |
1 files changed, 48 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx index faec6bea6af..828d44bf526 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx @@ -3,7 +3,13 @@ \ExecuteBibliographyOptions{uniquename,uniquelist,ibidtracker=constrict, pagetracker,sortcites,autocite=footnote} + \providecommand*{\mkibid}[1]{#1} +\renewcommand*{\iffinalcitedelim}{% + \ifnameundef{labelname} + {\ifnumequal{\value{textcitecount}}{\value{textcitetotal}}} + {\ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}} + \newbool{cbx:parens} \newbool{cbx:loccit} @@ -57,6 +63,7 @@ \setunit{% \global\booltrue{cbx:parens}% \addspace\bibopenparen}}% + \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} @@ -70,7 +77,7 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}} + \textcitedelim}} \newbibmacro*{cite:title}{% \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}} @@ -109,7 +116,7 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}}} + \textcitedelim}}} \DeclareCiteCommand{\cite} {\usebibmacro{cite:init}% @@ -167,19 +174,51 @@ {} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite} +\DeclareCiteCommand{\cbx@textcite} {\usebibmacro{cite:init}} {\usebibmacro{citeindex}% \usebibmacro{textcite}} {} {\usebibmacro{textcite:postnote}} +\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite] + {\gdef\cbx@savedkeys{}% + \citetrackerfalse% + \pagetrackerfalse% + \DeferNextCitekeyHook% + \usebibmacro{cite:init}} + {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0} + {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}% + \global\clearfield{multipostnote}} + {}% + \xappto\cbx@savedkeys{\thefield{entrykey},}% + \iffieldequals{namehash}{\cbx@lasthash} + {} + {\stepcounter{textcitetotal}% + \savefield{namehash}{\cbx@lasthash}}} + {} + {\protected@xappto\cbx@savedcites{% + [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} + +\newrobustcmd{\cbx@textcite@init}[2]{% + \setcounter{textcitetotal}{0}% + \setcounter{textcitecount}{0}% + \def\cbx@savedcites{#1}#2\cbx@savedcites\empty} + +\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} +\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{} + +\let\cbx@textcites@init\cbx@textcite@init +\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{} + \DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}} -\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\setunit{\multicitedelim}} -\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}{\setunit{\multicitedelim}} -\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]{\footcitetext}{\setunit{\multicitedelim}} -\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote]{\smartcite} - {\setunit{\multicitedelim}} -\DeclareMultiCiteCommand{\textcites}{\textcite}{} +\DeclareMultiCiteCommand{\parencites}[\mkbibparens] + {\parencite}{\setunit{\multicitedelim}} +\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote] + {\footcite}{\setunit{\multicitedelim}} +\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext] + {\footcitetext}{\setunit{\multicitedelim}} +\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote] + {\smartcite}{\setunit{\multicitedelim}} \endinput |