From bee2c175a53560fe69f589ed582cdfa8ab433320 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 3 Mar 2019 16:32:01 +0100 Subject: added \SetTitleStyle --- icite.dtx | 143 ++++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file 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. \documentclass{ltxdoc} \usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry} \usepackage{dox} +\doxitem{Option}{option}{options} \usepackage{\jobname} \usepackage{metalogox} \usepackage{hyperxmp} @@ -127,6 +128,8 @@ Running "make install" installs the files in the local TeX tree. \usepackage[breakable, skins, xparse, minted]{tcolorbox} \tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm, breakable} +\newtcblisting{example}{minted options=linenos} +\newtcblisting{code}{minted options=linenos, listing only} \usepackage{etoc} \etocsettocdepth{paragraph} \newcommand{\icitetableofcontents}{% @@ -159,6 +162,41 @@ Running "make install" installs the files in the local TeX tree. % % \fi % +% \CheckSum{0} +% +% \CharacterTable +% {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 +% 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 +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \makeatletter +% \let\org@changes@\changes@ +% \def\my@changes v#1.#2.#3\@nil{% +% \org@changes@{v#1.\six@digits{#2}.#3=v#1.#2.#3}% +% }% +% \newcommand*{\six@digits}[1]{% +% \ifnum#1<100000 0\fi +% \ifnum#1<10000 0\fi +% \ifnum#1<1000 0\fi +% \ifnum#1<100 0\fi +% \two@digits{#1}% +% }% +% \renewcommand*{\changes@}[1]{% +% \my@changes#1.\@nil +% }% +% \makeatother +% % \GetFileInfo{\jobname.dtx} % \DoNotIndex{\newcommand,\newenvironment} % @@ -182,13 +220,14 @@ Running "make install" installs the files in the local TeX tree. %\changes{v1.00}{2019/02/22}{First public release} % % \begin{abstract} -% ==== Put abstract text here. ==== +% \package{biblatex} |indexing| option % \end{abstract} % % \section{Usage} % % ==== Put descriptive text here. ==== -% +% \DescribeOption{boup}\hfill\tcboxverb{default}\\ Ceci est le boup. +% % \DescribeMacro{\dummyMacro} % This macro does nothing.\index{doing nothing|usage} It is merely an % 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. %\iffalse %<*example> %\fi -\begin{tcblisting}{minted options=linenos} +\begin{example} \emph{tchic} -\end{tcblisting} +\end{example} %\iffalse % %\fi %\iffalse %<*example> %\fi -\begin{tcblisting}{minted options=linenos, listing only} +\begin{code} \vroum[tchic]{tchic} -\end{tcblisting} +\end{code} %\iffalse % %\fi @@ -272,8 +311,8 @@ Running "make install" installs the files in the local TeX tree. % \begin{macrocode} \DTLnewdb{icite@indices} % \end{macrocode} -% \DescribeMacro{\IndexSubtypeAs} \cs{IndexSubtypeAs} take two mandatory -% arguments: 1. Any given keyword used to specify an +% \DescribeMacro{\IndexSubtypeAs} \cs{IndexSubtypeAs} takes two +% mandatory arguments: 1. Any given keyword used to specify an % \enquote*{entrysubtype} in the bibliographical database and 2. The % index in which the authors matching that subtype must go. This % command is to be found in the preamble only. @@ -284,10 +323,17 @@ Running "make install" installs the files in the local TeX tree. \DTLnewdbentry{icite@indices}{index}{#2} } \@onlypreamble\IndexSubtypeAs -\AtBeginDocument{ - \DTLifdbempty{icite@indices}{\IndexSubtypeAs{\relax}{\relax}}{} +% \end{macrocode} +% \DescribeMacro{\SetTitleStyle} By default, titles are printed in +% italics. This can be changed in the preamble by \cs{SetTitleStyle}. +% \begin{macrocode} +\NewDocumentCommand{\TitleStyle}{m}{\emph{#1}} +\NewDocumentCommand{\SetTitleStyle}{m}{% + \RenewDocumentCommand{\TitleStyle}{m}{#1} } +\@onlypreamble\SetTitleStyle % \end{macrocode} +% % \DescribeMacro{\icite} \cs{icite} both inserts a formatted citation % and an entry in the \emph{index locorum citatorum}. It is to be used % 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. \def\@usetitle{\@indextitle}% \fi \ifx\@indexsorttitle\empty - \def\@sortedtitle{{\@usetitle}@\emph{\@usetitle}}% + \def\@sortedtitle{{\@usetitle}@\TitleStyle{\@usetitle}}% \else - \def\@sortedtitle{{\@indexsorttitle}@\emph{\@usetitle}}% + \def\@sortedtitle{{\@indexsorttitle}@\TitleStyle{\@usetitle}}% \fi \IfNoValueTF{#1}% - {\DTLforeach*{icite@indices}{\icite@subtype=subtype,\icite@index=index}{% - \ifx\icite@subtype\@subtype% - \index[\icite@index]{\@sortedauthor!\@sortedtitle}% - \else% - \ifno@index\else - \ifdefault@index% - \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}% - \else% - \index{\@sortedauthor!\@sortedtitle}% - \fi\fi\fi}% + {\DTLifdbempty{icite@indices}{% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}% + \else% + \index{\@sortedauthor!\@sortedtitle}% + \fi\fi% + }{% + \DTLforeach*{icite@indices}{% + \icite@subtype=subtype,\icite@index=index}{% + \ifx\@subtype\icite@subtype% + \index[\icite@index]{\@sortedauthor!\@sortedtitle}% + \dtlbreak% + \else% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}% + \else% + \index{\@sortedauthor!\@sortedtitle}% + \fi\fi% + \fi}} \csname #4\endcsname{#3}% } {\IfNoValueTF{#2}% - {\DTLforeach*{icite@indices}{\icite@subtype=subtype,\icite@index=index}{% - \ifx\icite@subtype\@subtype% - \index[\icite@index]{\@sortedauthor!\@sortedtitle!#1}% - \else% + {\DTLifdbempty{icite@indices}{% \ifno@index\else \ifdefault@index% \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#1}% \else% \index{\@sortedauthor!\@sortedtitle!#1}% - \fi\fi\fi}% + \fi\fi% + }{% + \DTLforeach*{icite@indices}{% + \icite@subtype=subtype,\icite@index=index}{% + \ifx\@subtype\icite@subtype% + \index[\icite@index]{\@sortedauthor!\@sortedtitle!#1}% + \dtlbreak% + \else% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#1}% + \else% + \index{\@sortedauthor!\@sortedtitle!#1}% + \fi\fi% + \fi}}% \csname #4\endcsname[{#1}]{#3}} - {\DTLforeach*{icite@indices}{\icite@subtype=subtype,\icite@index=index}{% - \ifx\icite@subtype\@subtype% - \index[\icite@index]{\@sortedauthor!\@sortedtitle!#2}% - \else% + {\DTLifdbempty{icite@indices}{% \ifno@index\else \ifdefault@index% \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#2}% \else% \index{\@sortedauthor!\@sortedtitle!#2}% - \fi\fi\fi}% + \fi\fi% + }{% + \DTLforeach*{icite@indices}{% + \icite@subtype=subtype,\icite@index=index}{% + \ifx\@subtype\icite@subtype% + \index[\icite@index]{\@sortedauthor!\@sortedtitle!#2}% + \dtlbreak% + \else% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#2}% + \else% + \index{\@sortedauthor!\@sortedtitle!#2}% + \fi\fi% + \fi}}% \csname #4\endcsname[#1][{#2}]{#3}}% }% } -- cgit v1.2.3