diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-13 20:57:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-13 20:57:59 +0000 |
commit | ecedbcffe103deeb26a47ffac3990c8eb8a926d7 (patch) | |
tree | f8bc69730d0991dbbf4b5c9cbb73d74cd32a59a2 /Master/texmf-dist/tex | |
parent | c949589f88bf58fd53126ff26270f64ac12bb9be (diff) |
icite (13mar19)
git-svn-id: svn://tug.org/texlive/trunk@50375 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/icite/icite.sty | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/icite/icite.sty b/Master/texmf-dist/tex/latex/icite/icite.sty index 9391e6ce75d..cf0dd1a23e5 100644 --- a/Master/texmf-dist/tex/latex/icite/icite.sty +++ b/Master/texmf-dist/tex/latex/icite/icite.sty @@ -32,7 +32,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{icite} - [2019/03/07 v1.00 Make Indices locorum citatorum] + [2019/03/12 v1.1 Make Indices locorum citatorum] \RequirePackage{xkeyval} \DeclareOptionX{citecmd}[cite]{\def\ic@dfltcit{#1}} \newif\ifdefault@index @@ -47,6 +47,9 @@ \def\ic@dfltind{#1} \fi } +\newif\ifno@bibengine +\define@boolkey{icite.sty}[@pkg@]{nobibengine}[true]{% + \if@pkg@nobibengine\no@bibenginetrue\else\fi} \ExecuteOptionsX{citecmd} \ProcessOptionsX\relax \RequirePackage{xparse} @@ -60,6 +63,7 @@ \define@reuse@key{indextitle} \define@reuse@key{indexsorttitle} \define@reuse@key{entrysubtype} +\define@reuse@key{shorthand} \def\get@bibentry#1#2{\@ifundefined{reuse@#1@#2}{} {\@nameuse{reuse@#1@#2}}} \DTLnewdb{icite@indices} @@ -75,6 +79,7 @@ } \@onlypreamble\SetTitleStyle \NewDocumentCommand{\icite}{o o m O{\ic@dfltcit}}{% + \edef\@shorthand{\get@bibentry{#3}{shorthand}}% \edef\@subtype{\get@bibentry{#3}{entrysubtype}}% \edef\@author{\get@bibentry{#3}{author}}% \edef\@indexauthor{\get@bibentry{#3}{indexauthor}}% @@ -89,10 +94,10 @@ \def\@useauthor{\@indexauthor}% \fi \ifx\@sortname\empty - \def\@sortedauthor{\@useauthor}% - \else - \def\@sortedauthor{{\@sortname}@\@useauthor}% - \fi + \def\@sortedauthor{\@useauthor}% + \else + \def\@sortedauthor{{\@sortname}@\@useauthor}% + \fi \ifx\@indextitle\empty \ifx\@shorttitle\empty \def\@usetitle{\@title}% @@ -129,7 +134,15 @@ \index{\@sortedauthor!\@sortedtitle}% \fi\fi% \fi}} + \ifno@bibengine + \ifx\@shorthand\empty% + \@useauthor, \TitleStyle{\@usetitle}% + \else% + \@shorthand% + \fi% + \else% \csname #4\endcsname{#3}% + \fi% } {\IfNoValueTF{#2}% {\DTLifdbempty{icite@indices}{% @@ -153,7 +166,16 @@ \index{\@sortedauthor!\@sortedtitle!#1}% \fi\fi% \fi}}% - \csname #4\endcsname[{#1}]{#3}} + \ifno@bibengine + \ifx\@shorthand\empty% + \@useauthor, \TitleStyle{\@usetitle}, {#1}% + \else% + \@shorthand, {#1}% + \fi% + \else% + \csname #4\endcsname[{#1}]{#3}% + \fi% + } {\DTLifdbempty{icite@indices}{% \ifno@index\else \ifdefault@index% @@ -175,7 +197,16 @@ \index{\@sortedauthor!\@sortedtitle!#2}% \fi\fi% \fi}}% - \csname #4\endcsname[#1][{#2}]{#3}}% + \ifno@bibengine + \ifx\@shorthand\empty% + #1 \@useauthor, \TitleStyle{\@usetitle}, {#2}% + \else% + #1 \@shorthand, {#2}% + \fi + \else% + \csname #4\endcsname[#1][{#2}]{#3}% + \fi% + }% }% } \endinput |