aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2019-03-03 16:32:01 +0100
committerRobert Alessi <alessi@robertalessi.net>2019-03-03 16:32:01 +0100
commitbee2c175a53560fe69f589ed582cdfa8ab433320 (patch)
treea8ee0862e7f958a4eb5017af79b379eeff1cb40c
parenta897207bc6a042ccd59fe932ca6d2d8dd27ad1e2 (diff)
downloadicite-bee2c175a53560fe69f589ed582cdfa8ab433320.tar.gz
added \SetTitleStyle
-rw-r--r--icite.dtx143
1 files changed, 111 insertions, 32 deletions
diff --git a/icite.dtx b/icite.dtx
index d0cde96..49a2599 100644
--- a/icite.dtx
+++ b/icite.dtx
@@ -92,6 +92,7 @@ Running "make install" installs the files in the local TeX tree.
92\documentclass{ltxdoc} 92\documentclass{ltxdoc}
93\usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry} 93\usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry}
94\usepackage{dox} 94\usepackage{dox}
95\doxitem{Option}{option}{options}
95\usepackage{\jobname} 96\usepackage{\jobname}
96\usepackage{metalogox} 97\usepackage{metalogox}
97\usepackage{hyperxmp} 98\usepackage{hyperxmp}
@@ -127,6 +128,8 @@ Running "make install" installs the files in the local TeX tree.
127\usepackage[breakable, skins, xparse, minted]{tcolorbox} 128\usepackage[breakable, skins, xparse, minted]{tcolorbox}
128\tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm, 129\tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm,
129 breakable} 130 breakable}
131\newtcblisting{example}{minted options=linenos}
132\newtcblisting{code}{minted options=linenos, listing only}
130\usepackage{etoc} 133\usepackage{etoc}
131\etocsettocdepth{paragraph} 134\etocsettocdepth{paragraph}
132\newcommand{\icitetableofcontents}{% 135\newcommand{\icitetableofcontents}{%
@@ -159,6 +162,41 @@ Running "make install" installs the files in the local TeX tree.
159%</driver> 162%</driver>
160% \fi 163% \fi
161% 164%
165% \CheckSum{0}
166%
167% \CharacterTable
168% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
169% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
170% Digits \0\1\2\3\4\5\6\7\8\9
171% Exclamation \! Double quote \" Hash (number) \#
172% Dollar \$ Percent \% Ampersand \&
173% Acute accent \' Left paren \( Right paren \)
174% Asterisk \* Plus \+ Comma \,
175% Minus \- Point \. Solidus \/
176% Colon \: Semicolon \; Less than \<
177% Equals \= Greater than \> Question mark \?
178% Commercial at \@ Left bracket \[ Backslash \\
179% Right bracket \] Circumflex \^ Underscore \_
180% Grave accent \` Left brace \{ Vertical bar \|
181% Right brace \} Tilde \~}
182%
183% \makeatletter
184% \let\org@changes@\changes@
185% \def\my@changes v#1.#2.#3\@nil{%
186% \org@changes@{v#1.\six@digits{#2}.#3=v#1.#2.#3}%
187% }%
188% \newcommand*{\six@digits}[1]{%
189% \ifnum#1<100000 0\fi
190% \ifnum#1<10000 0\fi
191% \ifnum#1<1000 0\fi
192% \ifnum#1<100 0\fi
193% \two@digits{#1}%
194% }%
195% \renewcommand*{\changes@}[1]{%
196% \my@changes#1.\@nil
197% }%
198% \makeatother
199%
162% \GetFileInfo{\jobname.dtx} 200% \GetFileInfo{\jobname.dtx}
163% \DoNotIndex{\newcommand,\newenvironment} 201% \DoNotIndex{\newcommand,\newenvironment}
164% 202%
@@ -182,13 +220,14 @@ Running "make install" installs the files in the local TeX tree.
182%\changes{v1.00}{2019/02/22}{First public release} 220%\changes{v1.00}{2019/02/22}{First public release}
183% 221%
184% \begin{abstract} 222% \begin{abstract}
185% ==== Put abstract text here. ==== 223% \package{biblatex} |indexing| option
186% \end{abstract} 224% \end{abstract}
187% 225%
188% \section{Usage} 226% \section{Usage}
189% 227%
190% ==== Put descriptive text here. ==== 228% ==== Put descriptive text here. ====
191% 229% \DescribeOption{boup}\hfill\tcboxverb{default}\\ Ceci est le boup.
230%
192% \DescribeMacro{\dummyMacro} 231% \DescribeMacro{\dummyMacro}
193% This macro does nothing.\index{doing nothing|usage} It is merely an 232% This macro does nothing.\index{doing nothing|usage} It is merely an
194% example. If this were a real macro, you would put a paragraph here 233% example. If this were a real macro, you would put a paragraph here
@@ -202,18 +241,18 @@ Running "make install" installs the files in the local TeX tree.
202%\iffalse 241%\iffalse
203%<*example> 242%<*example>
204%\fi 243%\fi
205\begin{tcblisting}{minted options=linenos} 244\begin{example}
206 \emph{tchic} 245 \emph{tchic}
207\end{tcblisting} 246\end{example}
208%\iffalse 247%\iffalse
209%</example> 248%</example>
210%\fi 249%\fi
211%\iffalse 250%\iffalse
212%<*example> 251%<*example>
213%\fi 252%\fi
214\begin{tcblisting}{minted options=linenos, listing only} 253\begin{code}
215\vroum[tchic]{tchic} 254\vroum[tchic]{tchic}
216\end{tcblisting} 255\end{code}
217%\iffalse 256%\iffalse
218%</example> 257%</example>
219%\fi 258%\fi
@@ -272,8 +311,8 @@ Running "make install" installs the files in the local TeX tree.
272% \begin{macrocode} 311% \begin{macrocode}
273\DTLnewdb{icite@indices} 312\DTLnewdb{icite@indices}
274% \end{macrocode} 313% \end{macrocode}
275% \DescribeMacro{\IndexSubtypeAs} \cs{IndexSubtypeAs} take two mandatory 314% \DescribeMacro{\IndexSubtypeAs} \cs{IndexSubtypeAs} takes two
276% arguments: 1. Any given keyword used to specify an 315% mandatory arguments: 1. Any given keyword used to specify an
277% \enquote*{entrysubtype} in the bibliographical database and 2. The 316% \enquote*{entrysubtype} in the bibliographical database and 2. The
278% index in which the authors matching that subtype must go. This 317% index in which the authors matching that subtype must go. This
279% command is to be found in the preamble only. 318% command is to be found in the preamble only.
@@ -284,10 +323,17 @@ Running "make install" installs the files in the local TeX tree.
284 \DTLnewdbentry{icite@indices}{index}{#2} 323 \DTLnewdbentry{icite@indices}{index}{#2}
285} 324}
286\@onlypreamble\IndexSubtypeAs 325\@onlypreamble\IndexSubtypeAs
287\AtBeginDocument{ 326% \end{macrocode}
288 \DTLifdbempty{icite@indices}{\IndexSubtypeAs{\relax}{\relax}}{} 327% \DescribeMacro{\SetTitleStyle} By default, titles are printed in
328% italics. This can be changed in the preamble by \cs{SetTitleStyle}.
329% \begin{macrocode}
330\NewDocumentCommand{\TitleStyle}{m}{\emph{#1}}
331\NewDocumentCommand{\SetTitleStyle}{m}{%
332 \RenewDocumentCommand{\TitleStyle}{m}{#1}
289} 333}
334\@onlypreamble\SetTitleStyle
290% \end{macrocode} 335% \end{macrocode}
336%
291% \DescribeMacro{\icite} \cs{icite} both inserts a formatted citation 337% \DescribeMacro{\icite} \cs{icite} both inserts a formatted citation
292% and an entry in the \emph{index locorum citatorum}. It is to be used 338% and an entry in the \emph{index locorum citatorum}. It is to be used
293% in place of any \hologo{BibTeX} or Bib\LaTeX\ citation command the 339% in place of any \hologo{BibTeX} or Bib\LaTeX\ citation command the
@@ -328,45 +374,78 @@ Running "make install" installs the files in the local TeX tree.
328 \def\@usetitle{\@indextitle}% 374 \def\@usetitle{\@indextitle}%
329 \fi 375 \fi
330 \ifx\@indexsorttitle\empty 376 \ifx\@indexsorttitle\empty
331 \def\@sortedtitle{{\@usetitle}@\emph{\@usetitle}}% 377 \def\@sortedtitle{{\@usetitle}@\TitleStyle{\@usetitle}}%
332 \else 378 \else
333 \def\@sortedtitle{{\@indexsorttitle}@\emph{\@usetitle}}% 379 \def\@sortedtitle{{\@indexsorttitle}@\TitleStyle{\@usetitle}}%
334 \fi 380 \fi
335 \IfNoValueTF{#1}% 381 \IfNoValueTF{#1}%
336 {\DTLforeach*{icite@indices}{\icite@subtype=subtype,\icite@index=index}{% 382 {\DTLifdbempty{icite@indices}{%
337 \ifx\icite@subtype\@subtype% 383 \ifno@index\else
338 \index[\icite@index]{\@sortedauthor!\@sortedtitle}% 384 \ifdefault@index%
339 \else% 385 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}%
340 \ifno@index\else 386 \else%
341 \ifdefault@index% 387 \index{\@sortedauthor!\@sortedtitle}%
342 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}% 388 \fi\fi%
343 \else% 389 }{%
344 \index{\@sortedauthor!\@sortedtitle}% 390 \DTLforeach*{icite@indices}{%
345 \fi\fi\fi}% 391 \icite@subtype=subtype,\icite@index=index}{%
392 \ifx\@subtype\icite@subtype%
393 \index[\icite@index]{\@sortedauthor!\@sortedtitle}%
394 \dtlbreak%
395 \else%
396 \ifno@index\else
397 \ifdefault@index%
398 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}%
399 \else%
400 \index{\@sortedauthor!\@sortedtitle}%
401 \fi\fi%
402 \fi}}
346 \csname #4\endcsname{#3}% 403 \csname #4\endcsname{#3}%
347 } 404 }
348 {\IfNoValueTF{#2}% 405 {\IfNoValueTF{#2}%
349 {\DTLforeach*{icite@indices}{\icite@subtype=subtype,\icite@index=index}{% 406 {\DTLifdbempty{icite@indices}{%
350 \ifx\icite@subtype\@subtype%
351 \index[\icite@index]{\@sortedauthor!\@sortedtitle!#1}%
352 \else%
353 \ifno@index\else 407 \ifno@index\else
354 \ifdefault@index% 408 \ifdefault@index%
355 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#1}% 409 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#1}%
356 \else% 410 \else%
357 \index{\@sortedauthor!\@sortedtitle!#1}% 411 \index{\@sortedauthor!\@sortedtitle!#1}%
358 \fi\fi\fi}% 412 \fi\fi%
413 }{%
414 \DTLforeach*{icite@indices}{%
415 \icite@subtype=subtype,\icite@index=index}{%
416 \ifx\@subtype\icite@subtype%
417 \index[\icite@index]{\@sortedauthor!\@sortedtitle!#1}%
418 \dtlbreak%
419 \else%
420 \ifno@index\else
421 \ifdefault@index%
422 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#1}%
423 \else%
424 \index{\@sortedauthor!\@sortedtitle!#1}%
425 \fi\fi%
426 \fi}}%
359 \csname #4\endcsname[{#1}]{#3}} 427 \csname #4\endcsname[{#1}]{#3}}
360 {\DTLforeach*{icite@indices}{\icite@subtype=subtype,\icite@index=index}{% 428 {\DTLifdbempty{icite@indices}{%
361 \ifx\icite@subtype\@subtype%
362 \index[\icite@index]{\@sortedauthor!\@sortedtitle!#2}%
363 \else%
364 \ifno@index\else 429 \ifno@index\else
365 \ifdefault@index% 430 \ifdefault@index%
366 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#2}% 431 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#2}%
367 \else% 432 \else%
368 \index{\@sortedauthor!\@sortedtitle!#2}% 433 \index{\@sortedauthor!\@sortedtitle!#2}%
369 \fi\fi\fi}% 434 \fi\fi%
435 }{%
436 \DTLforeach*{icite@indices}{%
437 \icite@subtype=subtype,\icite@index=index}{%
438 \ifx\@subtype\icite@subtype%
439 \index[\icite@index]{\@sortedauthor!\@sortedtitle!#2}%
440 \dtlbreak%
441 \else%
442 \ifno@index\else
443 \ifdefault@index%
444 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#2}%
445 \else%
446 \index{\@sortedauthor!\@sortedtitle!#2}%
447 \fi\fi%
448 \fi}}%
370 \csname #4\endcsname[#1][{#2}]{#3}}% 449 \csname #4\endcsname[#1][{#2}]{#3}}%
371 }% 450 }%
372} 451}