aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--icite.dtx22
1 files changed, 19 insertions, 3 deletions
diff --git a/icite.dtx b/icite.dtx
index e6c9b14..db2d34b 100644
--- a/icite.dtx
+++ b/icite.dtx
@@ -241,10 +241,13 @@ Running "make install" installs the files in the local TeX tree.
241% Define fields to be used by \package{icite}: 241% Define fields to be used by \package{icite}:
242% \begin{macrocode} 242% \begin{macrocode}
243\define@reuse@key{author} 243\define@reuse@key{author}
244\define@reuse@key{indexauthor}
245\define@reuse@key{sortname}
244\define@reuse@key{title} 246\define@reuse@key{title}
245\define@reuse@key{shorttitle} 247\define@reuse@key{shorttitle}
246\define@reuse@key{indextitle} 248\define@reuse@key{indextitle}
247\define@reuse@key{indexsorttitle} 249\define@reuse@key{indexsorttitle}
250\define@reuse@key{entrysubtype}
248% \end{macrocode} 251% \end{macrocode}
249% This is the same as \cs{usebibentry} from \package{ebib}, but it 252% This is the same as \cs{usebibentry} from \package{ebib}, but it
250% does not return an error if the entry field is not found: 253% does not return an error if the entry field is not found:
@@ -265,10 +268,23 @@ Running "make install" installs the files in the local TeX tree.
265% \begin{macrocode} 268% \begin{macrocode}
266\NewDocumentCommand{\icite@index}{m}{\index{#1}} 269\NewDocumentCommand{\icite@index}{m}{\index{#1}}
267\NewDocumentCommand{\icite}{o o m O{\ic@dfltcit}}{% 270\NewDocumentCommand{\icite}{o o m O{\ic@dfltcit}}{%
271 \edef\@author{\get@bibentry{#3}{author}}%
272 \edef\@indexauthor{\get@bibentry{#3}{indexauthor}}%
273 \edef\@sortname{\get@bibentry{#3}{sortname}}%
268 \edef\@indexsorttitle{\get@bibentry{#3}{indexsorttitle}}% 274 \edef\@indexsorttitle{\get@bibentry{#3}{indexsorttitle}}%
269 \edef\@indextitle{\get@bibentry{#3}{indextitle}}% 275 \edef\@indextitle{\get@bibentry{#3}{indextitle}}%
270 \edef\@shorttitle{\get@bibentry{#3}{shorttitle}}% 276 \edef\@shorttitle{\get@bibentry{#3}{shorttitle}}%
271 \edef\@title{\get@bibentry{#3}{title}}% 277 \edef\@title{\get@bibentry{#3}{title}}%
278 \ifx\@indexauthor\empty
279 \def\@useauthor{\@author}%
280 \else
281 \def\@useauthor{\@indexauthor}%
282 \fi
283 \ifx\@sortname\empty
284 \def\@sortedauthor{\@useauthor}%
285 \else
286 \def\@sortedauthor{{\@sortname}@\@useauthor}%
287 \fi
272 \ifx\@indextitle\empty 288 \ifx\@indextitle\empty
273 \ifx\@shorttitle\empty 289 \ifx\@shorttitle\empty
274 \def\@usetitle{\@title}% 290 \def\@usetitle{\@title}%
@@ -284,12 +300,12 @@ Running "make install" installs the files in the local TeX tree.
284 \def\@sortedtitle{{\@indexsorttitle}@\@usetitle}% 300 \def\@sortedtitle{{\@indexsorttitle}@\@usetitle}%
285 \fi 301 \fi
286 \IfNoValueTF{#1}% 302 \IfNoValueTF{#1}%
287 {\index{\get@bibentry{#3}{author}!\@sortedtitle}% 303 {\index{\@sortedauthor!\@sortedtitle}%
288 \csname #4\endcsname{#3}} 304 \csname #4\endcsname{#3}}
289 {\IfNoValueTF{#2}% 305 {\IfNoValueTF{#2}%
290 {\index{\get@bibentry{#3}{author}!\@sortedtitle!#1}% 306 {\index{\@sortedauthor!\@sortedtitle!#1}%
291 \csname #4\endcsname[{#1}]{#3}} 307 \csname #4\endcsname[{#1}]{#3}}
292 {\index{\get@bibentry{#3}{author}!\@sortedtitle!#2}% 308 {\index{\@sortedauthor!\@sortedtitle!#2}%
293 \csname #4\endcsname[#1][{#2}]{#3}}% 309 \csname #4\endcsname[#1][{#2}]{#3}}%
294 }% 310 }%
295} 311}