From a4e931576165d0a4a143915f4725399272e06fee Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 5 Apr 2022 03:01:24 +0000 Subject: CTAN sync 202204050301 --- macros/latex/contrib/colorist/colorist-fancy.sty | 113 +++++++++++++++++++---- 1 file changed, 94 insertions(+), 19 deletions(-) (limited to 'macros/latex/contrib/colorist/colorist-fancy.sty') diff --git a/macros/latex/contrib/colorist/colorist-fancy.sty b/macros/latex/contrib/colorist/colorist-fancy.sty index cb625ce8ac..5f69f0857a 100644 --- a/macros/latex/contrib/colorist/colorist-fancy.sty +++ b/macros/latex/contrib/colorist/colorist-fancy.sty @@ -19,7 +19,7 @@ \RequirePackage{l3keys2e} \ProvidesExplPackage {colorist-fancy} - {2022/03/28} {} + {2022/04/03} {} {The fancy style of colorist} \@ifpackageloaded { colorist } {} @@ -403,10 +403,10 @@ { \titlecontents{chapter} [2em] % i.e., 0em (part) + 2em - {\addvspace{1pc}\normalfont\color{maintheme}\sffamily \colorist_bfseries: } - {\contentslabel{2em}} - {\scshape\hspace*{-2em}} - {\titlerule*[10pt]{\parbox{3pt}{\hspace*{-.25pt}\textcolor{main-text!15!paper}{.}}}\color{maintheme}\contentspage} + {\addvspace{1pc} \color{maintheme} \normalfont \sffamily \colorist_bfseries: \scshape } + {\contentslabel[ \raisebox{-.03\baselineskip}{ \large \normalfont \sffamily \colorist_bfseries: \thecontentslabel } ]{2em}} + {\hspace*{-2em}} + {\titlerule*[10pt]{\parbox{3pt}{\hspace*{-.25pt}\textcolor{main-text!15!paper}{.}}}\color{maintheme}\normalfont\sffamily\contentspage} \titlecontents{section} [4em] % i.e., 2em (chapter) + 2em {\addvspace{.3pc}\normalfont\color{maintheme}\sffamily} @@ -429,10 +429,10 @@ { \titlecontents{section} [2em] % i.e., 0em (part) + 2em - {\addvspace{.3pc}\normalfont\color{maintheme}\sffamily} - {\contentslabel{1.75em}} + {\addvspace{.3pc} \color{maintheme} \normalfont \sffamily \scshape } + {\contentslabel[ { \normalfont \sffamily \thecontentslabel } ]{1.75em}} {\hspace*{-1.75em}} - {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{maintheme}\contentspage} + {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{maintheme}\normalfont\sffamily\contentspage} \titlecontents{subsection} [4.5em] % i.e., 2em (section) + 2.5em {\addvspace{.15pc}\normalfont\sffamily} @@ -479,8 +479,8 @@ , PT = Esta~página~foi~intencionalmente~deixada~em~branco , BR = Esta~página~foi~intencionalmente~deixada~em~branco , ES = Esta~página~se~ha~dejado~intencionadamente~en~blanco - , CN = 此页为有意留为空白 - , TC = 此頁為有意留為空白 + , CN = \ziju{0.2} 此页为有意留为空白 + , TC = \ziju{0.2} 此頁為有意留為空白 , JP = このページは意図的に空白にしてあります , RU = Эта~страница~намеренно~оставлена~пустой } @@ -492,11 +492,75 @@ \hook_gput_next_code:nn { shipout/background } { \put(0.5\paperwidth,-0.5\paperheight){ - \makebox[0pt]{\large\color{main-text!10!paper}\bl@nkpagetext}} + \makebox[0pt]{\large\color{main-text!10!paper}\g_colorist_title_font_common_tl\bl@nkpagetext}} } \null\newpage\fi\fi } +%%================================ +%% Index +%%================================ +\RequirePackage { imakeidx } +\makeindex[intoc] + +\RequirePackage { silence } +\ExplSyntaxOff +\WarningFilter{latex}{Writing or overwriting file} +\begin{filecontents*}[overwrite]{\jobname.mst} +delim_0 "\\IndexDotfill " % Filler between section heading and page number +delim_1 "\\IndexDotfill " % Filler between subsection heading and page number +headings_flag 1 +heading_prefix "\\IndexHeading{" +heading_suffix "}\n" +\end{filecontents*} +\ExplSyntaxOn + +\projlib_langauge_define_multilingual_text:Nn \index_symbols_name + { + , EN = Symbols + , FR = Symboles + , DE = Symbole + , IT = Simboli + , PT = Símbolos + , BR = Símbolos + , ES = Símbolos + , CN = 符号 + , TC = 符號 + , JP = 記号 + , RU = Символы + } + +\newcommand*{\IndexDotfill} + { + \nobreakspace\nobreakspace + \titlerule*[.67em]{\textcolor{main-text!15!paper}{.}} + \nobreakspace\nobreakspace + } +\newcommand*{\IndexHeading}[1] + { + \str_if_eq:nnTF { #1 } { Symbols } + { \tl_set:Nn \l_tmpa_tl { \index_symbols_name } } + { \tl_set:Nn \l_tmpa_tl { #1 } } + \tikz\node[ + rounded~corners=5pt, + draw=maintheme, + fill=maintheme!10, + line~width=1pt, + inner~sep=5pt, + align=center, + font=\large\sffamily\colorist_bfseries:, + minimum~width=\linewidth-\pgflinewidth, + ] { \l_tmpa_tl }; + \nopagebreak + \par + \vspace{.3\baselineskip} + } +\renewcommand*{\indexspace} + { + \par + \vspace{2pc~plus~.5pc~minus~.3pc} + } + %%================================ %% Draft mark %%================================ @@ -505,8 +569,10 @@ %%================================ %% Icons %%================================ -\RequirePackage{tikz} -\newcommand{\ideabulb}[2][0.15] +\RequirePackage { tikz } +\NewDocumentCommand \colorist_icon_ideabulb:w { O{0.15} m } + % #1 = scale + % #2 = color { \scalebox{#1}{ \begin{tikzpicture} @@ -523,7 +589,9 @@ \end{tikzpicture}} } -\newcommand{\questionmark}[2][0.15] +\NewDocumentCommand \colorist_icon_questionmark:w { O{0.15} m } + % #1 = scale + % #2 = color { \scalebox{#1}{ \begin{tikzpicture} @@ -607,12 +675,15 @@ { \providecommand{\phantomsection}{} \RequirePackage { url } - \newcommand{\href}[2]{#2} + \providecommand{\href}[2]{#2} + \providecommand{\texorpdfstring}[2]{#1} } { - \PassOptionsToPackage { hidelinks,linktoc=all } { hyperref } - \RequirePackage { bookmark } \RequirePackage { hyperref } + \RequirePackage { bookmark } + \hypersetup{ hidelinks, linktoc = all } + \bookmarksetup{ numbered } + \renewcommand\Hy@numberline[1]{#1.~} } @@ -811,7 +882,8 @@ \reversemarginpar \fi \mparadjust{-.25em} - \marginnote{\ideabulb[0.3]{orange} + \marginnote{ + \colorist_icon_ideabulb:w [0.3] {orange} \bool_if:NTF \l__colorist_is_book_bool { \hspace*{-.2em} @@ -830,7 +902,8 @@ \reversemarginpar \fi \mparadjust{-.25em} - \marginnote{\questionmark[0.3]{purple} + \marginnote{ + \colorist_icon_questionmark:w [0.3] {purple} \bool_if:NTF \l__colorist_is_book_bool { \hspace*{-.2em} @@ -1027,6 +1100,8 @@ \theoremstyle{simple} +\hook_gput_code:nnn { env/quote/begin } { colorist } { \small } + %%================================ %% Title block style %%================================ -- cgit v1.2.3