%% %% This is file `colorist/colorist-fancy.sty', %% generated with the docstrip utility. %% %% Copyright (C) 2021-2024 by Jinwen XU %% %% This is part of the colorist class series. %% %% This work may be distributed and/or modified under the conditions of the %% LaTeX Project Public License, either version 1.3c of this license or (at %% your option) any later version. The latest version of this license is in %% %% http://www.latex-project.org/lppl.txt %% %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[2022-06-01] \ProvidesExplPackage {colorist-fancy} {2024/02/23} {} {The fancy style of colorist} \IfPackageLoadedTF { colorist } {} { \msg_new:nnn { \@currname } { colorist-not-loaded } { "#1"~is~an~internal~style~of~"colorist".~To~use~it,~you~must~load~the~package~"colorist"~first. } \msg_warning:nnx { \@currname } { colorist-not-loaded } { \@currname } \endinput } %%================================ %% Title fonts %%================================ \RequirePackage { relsize } \RequirePackage { anyfontsize } \NewCommandCopy \colorist_original_bfseries: \bfseries \bool_new:N \l_colorist_is_under_bfseries_bool \bool_set_false:N \l_colorist_is_under_bfseries_bool \RenewDocumentCommand \bfseries { } { \bool_if:NF \l_colorist_is_under_bfseries_bool { \colorlet{colorist-temp-color}{.} \color{colorist-temp-color!90!paper} } \colorist_original_bfseries: \bool_set_true:N \l_colorist_is_under_bfseries_bool } \bool_if:NTF \l__colorist_use_boldface_bool { \cs_new:Nn \colorist_bfseries: { \bfseries } } { \cs_new:Nn \colorist_bfseries: {} } \bool_if:NTF \l__colorist_use_scshape_bool { \cs_new:Nn \colorist_scshape: { \scshape } } { \cs_new:Nn \colorist_scshape: {} } \tl_new:N \g_colorist_title_font_common_tl \tl_new:N \g_colorist_title_font_part_tl \tl_new:N \g_colorist_title_font_chapter_tl \tl_new:N \g_colorist_title_font_section_tl \tl_new:N \g_colorist_title_font_subsection_tl \tl_new:N \g_colorist_title_font_subsubsection_tl \tl_new:N \g_colorist_title_font_paragraph_tl \tl_gset:Nn \g_colorist_title_font_common_tl { \sffamily } \tl_gset:Nn \g_colorist_title_font_part_tl { \colorist_bfseries: \g_colorist_title_font_common_tl } \tl_gset:Nn \g_colorist_title_font_chapter_tl { \colorist_bfseries: \g_colorist_title_font_common_tl } \tl_gset:Nn \g_colorist_title_font_section_tl { \colorist_bfseries: \g_colorist_title_font_common_tl } \tl_gset:Nn \g_colorist_title_font_subsection_tl { \colorist_bfseries: \g_colorist_title_font_common_tl } \tl_gset:Nn \g_colorist_title_font_subsubsection_tl { \colorist_bfseries: \g_colorist_title_font_common_tl } \tl_gset:Nn \g_colorist_title_font_paragraph_tl { \colorist_bfseries: \g_colorist_title_font_common_tl } %%================================ %% Color %%================================ \definecolor{maintheme}{RGB}{70,130,180} \definecolor{forestgreen}{RGB}{21,122,81} \definecolor{lightorange}{RGB}{255,185,88} %%================================ %% Footer %%================================ \RequirePackage { geometry } \RequirePackage { fancyhdr } \RequirePackage { extramarks } \hook_gput_code:nnn { begindocument/before } { colorist } { \fancyhfoffset { 0pt } } \tl_new:N \l_colorist_leftmark_tl \tl_new:N \l_colorist_rightmark_tl \tl_set:Nn \l_colorist_leftmark_tl { \begin{minipage}[t]{.833\textwidth} \lastleftmark \end{minipage} } \tl_set:Nn \l_colorist_rightmark_tl { \begin{minipage}[t]{.833\textwidth} \filleft \lastrightmark \end{minipage} } \fancypagestyle { fancy } { \fancyhf { } \if@twoside \fancyfoot[RO] { \sffamily \textcolor { main-text!30!paper } { \small \l_colorist_rightmark_tl } \rlap { \nobreakspace \nobreakspace \nobreakspace \nobreakspace \textcolor { main-text!75!paper } { \colorist_bfseries: \thepage } } } \fancyfoot[LE] { \leavevmode \sffamily \llap { \textcolor { main-text!75!paper } { \colorist_bfseries: \thepage } \nobreakspace \nobreakspace \nobreakspace \nobreakspace } \textcolor { main-text!30!paper } { \l_colorist_leftmark_tl } } \else \fancyfoot[R] { \sffamily \textcolor { main-text!30!paper } { \small \l_colorist_rightmark_tl } \rlap { \nobreakspace \nobreakspace \nobreakspace \nobreakspace \textcolor { main-text!75!paper } { \colorist_bfseries: \thepage } } } \fi \renewcommand { \headrulewidth } { 0pt } } \pagestyle { fancy } \fancypagestyle { plain } { \fancyhf { } \if@twoside \fancyfoot[RO] { \sffamily \nobreakspace \rlap { \nobreakspace \nobreakspace \nobreakspace \nobreakspace \textcolor { main-text!75!paper } { \colorist_bfseries: \thepage } } } \fancyfoot[LE] { \leavevmode \sffamily \llap { \textcolor { main-text!75!paper } { \colorist_bfseries: \thepage } \nobreakspace \nobreakspace \nobreakspace \nobreakspace } } \else \fancyfoot[R] { \sffamily \nobreakspace \rlap { \nobreakspace \nobreakspace \nobreakspace \nobreakspace \textcolor { main-text!75!paper } { \colorist_bfseries: \thepage } } } \fi \renewcommand { \headrulewidth } { 0pt } } \bool_if:NTF \l__colorist_is_book_bool { \if@twoside \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}} \else \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}} \fi \renewcommand*{\sectionmark}[1]{ \markright{\thesection\nobreakspace\nobreakspace#1}} } { \if@twoside \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{}} \else \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}} \fi } \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}} \bool_if:NT \l__colorist_is_book_bool { \hook_gput_code:nnn { cmd/frontmatter/before } { colorist } { \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\fnsymbol{footnote}}} } \hook_gput_code:nnn { cmd/mainmatter/before } { colorist } { \setcounter{footnote}{0} \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}} } } %%================================ %% Title format %%================================ \RequirePackage [ explicit, newparttoc ] { titlesec } \PassOptionsToPackage { normalem } { ulem } \RequirePackage { ulem } \PassOptionsToPackage { many } { tcolorbox } \RequirePackage { tcolorbox } \bool_if:NT \l__colorist_fast_bool { \tcbstartdraftmode } \newcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}} \AddLanguageSetting { \renewcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}} } \AddLanguageSetting [ schinese ] { \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分} } \AddLanguageSetting [ tchinese ] { \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分} } \AddLanguageSetting [ japanese ] { \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部} } \bool_if:NTF \l__colorist_is_book_bool { \setcounter{secnumdepth}{3} %% Part \titleclass{\part}{top} % make part like a chapter \titleformat{\part}[display] { \g_colorist_title_font_part_tl \filleft} { \thispagestyle{empty} \begin{tikzpicture}[remember~picture,overlay] \fill[maintheme!10!paper] (current~page.north~west) rectangle (current~page.south~east); \node at ($(current~page.north~west)+(15em,-15em)$) {\normalfont\textcolor{maintheme}{\scalebox{12}{\thepart}}}; \end{tikzpicture} } {1em} {\fontsize{20}{24}\selectfont\MakeUppercase{#1}} \titleformat{name=\part,numberless}[display] {% \phantomsection\addcontentsline{toc}{part}{#1}% \g_colorist_title_font_part_tl \filleft} { \thispagestyle{empty} \begin{tikzpicture}[remember~picture,overlay] \fill[maintheme!10!paper] (current~page.north~west) rectangle (current~page.south~east); \node at ($(current~page.north~west)+(15em,-15em)$) {\normalfont\textcolor{maintheme}{\scalebox{12}{$*$}}}; \end{tikzpicture} } {1em} {\fontsize{20}{24}\selectfont\MakeUppercase{#1}} \titlespacing*{\part}{0pt}{5em}{6em} %% Text after part \newcommand{\parttext}[1]{ \vfill \begin{flushright} \begin{minipage}{0.833\textwidth} \color{main-text!80!paper}\raggedleft#1 \end{minipage} \end{flushright} \vfill\vfill \cleardoublepage } %% Chapter % Numbered chapter title \cs_new_protected:Nn \colorist_chapter_inner:nn % #1 = number % #2 = title { \tcbsidebyside[enhanced,sidebyside~adapt=right,sidebyside~align=bottom, colback=paper,frame~hidden, segmentation~code={ \filldraw[maintheme] (segmentation.north) -- ($(segmentation.east)-(12pt,0)$) -- ($(segmentation.west)+(12pt,0)$) -- (segmentation.south);} ]{\filleft#2}{\normalfont\textcolor{maintheme}{\scalebox{4}{#1}}} } % Numberless chapter title \cs_new_protected:Nn \colorist_chapter_inner:n % #1 = title { \begin{tcolorbox}[ enhanced, width = 0.67\textwidth, colback=paper,frame~hidden, halign=center] #1 \vspace{-.6em} \begin{center} \begin{tikzpicture} \filldraw[maintheme] (-4em,0) -- (4em,0) -- (0,-.1em) -- (0,.1em); \end{tikzpicture} \end{center} \end{tcolorbox} } \titleformat{name=\chapter} { \g_colorist_title_font_chapter_tl \colorist_scshape:\huge} % Format {} % Label {0mm} % Sep { \colorist_chapter_inner:nn { \thechapter } { #1 } } % Before-code \titlespacing*{name=\chapter} {0em}{*2}{0em} % {left}{before-sep}{after-sep} \titleformat{name=\chapter, numberless} {\filcenter \g_colorist_title_font_chapter_tl \colorist_scshape:\huge} {} {0mm} { \colorist_chapter_inner:n { #1 } } \titlespacing*{name=\chapter, numberless} {0em}{*2}{0em} %% Section \titleformat{\section} {\color{maintheme} \g_colorist_title_font_section_tl \large} {\thesection}{.75em}{#1} %% Subsection \titleformat{\subsection} { \g_colorist_title_font_subsection_tl }{\thesubsection}{.75em} {#1} } { %% Part \titleformat{\part}[display] { \g_colorist_title_font_part_tl \filleft} {\partstring} {.3em} {\fontsize{16}{0}\selectfont\MakeUppercase{#1}} \titleformat{name=\part,numberless}[display] {% \phantomsection\addcontentsline{toc}{part}{#1} \g_colorist_title_font_part_tl \filleft} {\phantom{\MakeUppercase{\partname}}} {.3em} {\fontsize{16}{0}\selectfont\MakeUppercase{#1}} %% Text after part \newcommand{\parttext}[1] { \begin{flushright} \begin{minipage}{0.833\textwidth} \color{main-text!80!paper}\raggedleft#1 \end{minipage} \end{flushright} } %% Section \titleformat{\section} {\color{maintheme} \g_colorist_title_font_section_tl \large} {\thesection}{.75em}{\colorist_scshape: #1} %% Subsection \titleformat{\subsection} { \g_colorist_title_font_subsection_tl }{\thesubsection}{.75em} {#1} } %% Subsubsection \bool_if:NTF \l__colorist_runin_bool { \titleformat{\subsubsection}[runin] {\color{main-text!70!paper} \g_colorist_title_font_subsubsection_tl } {\thesubsubsection} {.5em} {#1.} [\hspace*{.3em}] } { \titleformat{\subsubsection} {\color{main-text!70!paper} \g_colorist_title_font_subsubsection_tl } {\thesubsubsection} {.5em} {#1} } %% Paragraph \titleformat{\paragraph}[runin] {\color{main-text!50!paper} \g_colorist_title_font_paragraph_tl }{\theparagraph}{1em}{#1} \titlespacing{\section}{0pt}{1\baselineskip plus .5\baselineskip minus .2\baselineskip}{.6\baselineskip plus .3\baselineskip minus .2\baselineskip} \titlespacing{\subsection}{0pt}{.75\baselineskip plus .3\baselineskip minus .2\baselineskip}{.4\baselineskip plus .2\baselineskip minus .1\baselineskip} \bool_if:NTF \l__colorist_runin_bool { \titlespacing{\subsubsection}{0pt}{.5\baselineskip plus .2\baselineskip minus .1\baselineskip}{0pt} } { \titlespacing{\subsubsection}{0pt}{.5\baselineskip plus .2\baselineskip minus .1\baselineskip}{.3\baselineskip plus .2\baselineskip minus .1\baselineskip} } %%================================ %% ToC format %%================================ \RequirePackage { titletoc } \titlecontents{part} [0em] {\addvspace{1.5pc}\large\filcenter\sffamily \colorist_bfseries: } {\textcolor{maintheme}{\bfseries\thecontentslabel}\nopagebreak\\\nopagebreak\uppercase} {} {} % without page number [\addvspace{.5pc}] \bool_if:NTF \l__colorist_is_book_bool { \titlecontents{chapter} [2em] % i.e., 0em (part) + 2em {\addvspace{1pc} \color{maintheme} \normalfont \sffamily \colorist_bfseries: \colorist_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} [5.25em] % i.e., 2em (chapter) + 2.75em + 0.5em {\addvspace{.3pc}\normalfont\color{main-text}\sffamily} {\contentslabel{2.75em}} {\hspace*{-2.75em}} {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text}\contentspage} \titlecontents{subsection} [9em] % i.e., 5.25em (section) + 3.5em + 0.25em {\addvspace{.15pc}\normalfont\color{main-text!60!paper}\sffamily} {\contentslabel{3.50em}} {\hspace*{-3.50em}} {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!60!paper}\contentspage} \titlecontents{subsubsection} [13em] % i.e., 9em (subsection) + 3.75em + 0.25em {\normalfont\color{main-text!45!paper}\sffamily} {\contentslabel{3.75em}} {\hspace*{-3.75em}} {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!45!paper}\contentspage} } { \titlecontents{section} [2em] % i.e., 0em (part) + 2em {\addvspace{.3pc} \color{maintheme} \normalfont \sffamily \colorist_scshape: } {\contentslabel[ { \normalfont \sffamily \thecontentslabel } ]{1.75em}} {\hspace*{-1.75em}} {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{maintheme}\normalfont\sffamily\contentspage} \titlecontents{subsection} [5em] % i.e., 2em (section) + 2.5em + 0.5em {\addvspace{.15pc}\normalfont\sffamily} {\contentslabel{2.5em}} {\hspace*{-2.5em}} {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!45!paper}\contentspage} \titlecontents{subsubsection} [9em] % i.e., 5em (subsection) + 3.25em + 0.75em {\normalfont\sffamily} {\contentslabel{3.25em}} {\hspace*{-3.25em}} {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!45!paper}\contentspage} } %%================================ %% Lists %%================================ \PassOptionsToPackage { inline } { enumitem } \RequirePackage { enumitem } \setlistdepth{10} \setlist{noitemsep, topsep=.33\topsep-.5\parskip} \setlist[enumerate]{labelsep=*, leftmargin=*} \setlist[enumerate,1]{label = \normalfont\arabic*$\mskip-.5mu\big)$, ref = \normalfont\color{.!45!paper}\arabic*$\mskip-.5mu\big)$, leftmargin= \l__colorist_item_indentation_dim + \maxof{\parindent}{1.5em} } % labelindent= \l__colorist_item_indentation_dim } \setlist[enumerate,2]{label = \normalfont\roman*$\mskip-.5mu\big)$, ref = \normalfont\color{.!45!paper}\arabic{enumi}.\roman*$\mskip-.5mu\big)$} \setlist[enumerate,3]{label = \normalfont\emph{\alph*}$\mskip-.5mu\big)$, ref = \normalfont\color{.!45!paper}\arabic{enumi}.\roman{enumii}.\emph{\alph*}$\mskip-.5mu\big)$} \setlist[description]{font=\normalfont\colorist_bfseries: , labelindent= \l__colorist_item_indentation_dim } \renewlist{itemize}{itemize}{10} \setlist[itemize]{leftmargin=*,label=\textcolor{.!27!paper}{$\cdot$}} \AddLanguageSetting { \setlist[itemize,1]{label=\textcolor{.!27!paper}{$\bullet$},leftmargin= \l__colorist_item_indentation_dim + \maxof{\parindent}{1.5em}} } \AddLanguageSetting [french] { \setlist[itemize,1]{label=\textcolor{.!39!paper}{\rule[.2\baselineskip]{.8em}{.75pt}},leftmargin= \l__colorist_item_indentation_dim + \maxof{\parindent}{1.5em} } } \setlist[itemize,2]{label=\textcolor{.!27!paper}{\rule[.2\baselineskip]{.55em}{.75pt}}} \setlist[itemize,3]{label=\textcolor{.!27!paper}{$\circ$}} \setlist[itemize,4]{label=\textcolor{.!27!paper}{$\ast$}} %%================================ %% Blank page %%================================ \projlib_langauge_define_multilingual_text:Nn \bl@nkpagetext { , EN = This~page~is~intentionally~left~blank , FR = Cette~page~est~intentionnellement~laissée~vide , DE = Diese~Seite~wurde~absichtlich~leer~gelassen , IT = Questa~pagina~è~stata~lasciata~vuota~intenzionalmente , PT = Esta~página~foi~intencionalmente~deixada~em~branco , BR = Esta~página~foi~intencionalmente~deixada~em~branco , ES = Esta~página~ha~sido~intencionalmente~dejada~en~blanco , CN = \ziju{0.2} 此页为有意留为空白 , TC = \ziju{0.2} 此頁為有意留為空白 , JP = このページは意図的に空白にしてあります , RU = Эта~страница~намеренно~оставлена~пустой } \renewcommand{\cleardoublepage}{ \relax \clearpage \if@twoside\ifodd\c@page\relax\else \thispagestyle{empty} \hook_gput_next_code:nn { shipout/background } { \put(0.5\paperwidth,-0.5\paperheight){ \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} { \null\nobreak \leaders \hbox to .67em {\hss \textcolor{main-text!15!paper}{.} \hss} \hskip1em plus1fill } \newcommand*{\IndexLinebreak} { \nobreakspace\textcolor{main-text!45!paper}{\raisebox{.4ex}{.}\raisebox{.2ex}{.}} \item\hspace*{\hangindent} \textcolor{main-text!45!paper}{\raisebox{.45ex}{.}\raisebox{.25ex}{.}}\: \unskip } \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} } %% Prevent column break before the first sub-entry in the index \bool_new:N \l__colorist_if_first_subitem_bool \renewcommand*{\@idxitem} { \par\hangindent40\p@ \bool_set_true:N \l__colorist_if_first_subitem_bool } \renewcommand*{\subitem} { \par\hangindent40\p@ \bool_if:NT \l__colorist_if_first_subitem_bool { \nobreak \bool_set_false:N \l__colorist_if_first_subitem_bool } \hspace*{20\p@} } \hook_gput_code:nnn { begindocument/before } { colorist } { \bool_if:NF \l__colorist_fast_bool { \hook_gput_code:nnn { cmd/printindex/before } { colorist } { \bookmarksetup{startatroot} } } } %%================================ %% Draft mark %%================================ \RequirePackage { projlib-draft } %%================================ %% Icons %%================================ \RequirePackage { tikz } \NewDocumentCommand \colorist_icon_ideabulb:w { O{0.15} m } % #1 = scale % #2 = color { \scalebox{#1}{ \begin{tikzpicture} \filldraw[draw=#2,fill=#2] (0,0) circle [radius=1cm]; \filldraw[draw=paper,fill=paper,rounded~corners=0.8pt] [rotate=20] (-0.26,-0.66) rectangle (-0.06,-0.6) [xshift=-0.4mm,yshift=1mm] (-0.26,-0.66) rectangle (0.02,-0.6) [xshift=0.4mm,yshift=1mm] (-0.26,-0.66) rectangle (-0.06,-0.6); \draw[draw=paper,line~width=0.7mm] (-0.18,-0.46) .. controls (-0.18,-0.28) and (-0.28,-0.12) ..(-0.4,0.1) .. controls (-0.55,0.4) and (-0.3,0.64) ..(0,0.64) .. controls (0.3,0.64) and (0.55,0.4) ..(0.4,0.1) .. controls (0.28,-0.12) and (0.18,-0.28) ..(0.18,-0.46); \end{tikzpicture}} } \NewDocumentCommand \colorist_icon_questionmark:w { O{0.15} m } % #1 = scale % #2 = color { \scalebox{#1}{ \begin{tikzpicture} \filldraw[draw=#2,fill=#2] (0,0) circle [radius=1cm]; \filldraw[paper,yshift=0.5mm,scale=0.9] (-0.4,0.1) circle [radius=0.77mm]; \draw[draw=paper,line~width=1.5mm,yshift=0.5mm,scale=0.9] (-0.4,0.1) .. controls (-0.55,0.4) and (-0.3,0.64) ..(0,0.64) .. controls (0.3,0.64) and (0.55,0.4) ..(0.4,0.1) .. controls (0.28,-0.12) and (0.05,-0.28) ..(0.05,-0.3) .. controls (0,-0.36) and (0.0,-0.45) ..(0.0,-0.5); \fill[fill=paper,rounded~corners=0.6mm] (-0.09,-0.75) rectangle (0.09,-0.53); \end{tikzpicture}} } %%================================ %% Theorems %%================================ \RequirePackage { mathtools } \RequirePackage { amsthm } \tl_const:Nn \c_colorist_l_mathparen_latin_tl { $($ } \tl_const:Nn \c_colorist_r_mathparen_latin_tl { $)$ } \tl_const:Nn \c_colorist_l_mathparen_cjk_tl { \!\,( } \tl_const:Nn \c_colorist_r_mathparen_cjk_tl { )\!\, } \cs_new:Nn \colorist_insert_l_mathparen: { \tl_use:c { c_colorist_l_mathparen_ \l_projlib_language_current_languagetype_tl _tl } } \cs_new:Nn \colorist_insert_r_mathparen: { \tl_use:c { c_colorist_r_mathparen_ \l_projlib_language_current_languagetype_tl _tl } } %% Change equation numbers to gray \def\tagform@#1{\maketag@@@{\textcolor{.!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}} \PassOptionsToPackage { nopatch = eqnum } { microtype } \bool_if:NTF \l__colorist_theorem_in_new_line_bool { \newtheoremstyle{simple} {}{} {\normalfont}{} {\normalfont}{} {0pt} { \rlap{\vbox{\hbox{\parbox{\linewidth}{ {\thmname{#1}\thmnumber{\nobreakspace #2}} {\color{main-text!50!paper}\thmnote{\hspace{.4em} \colorist_insert_l_mathparen: #3 \colorist_insert_r_mathparen: }} }}\hbox{\strut}\vspace{0pt}}} } \newtheoremstyle{simple-var} {}{} { \bool_if:NTF \l__colorist_emphasize_theorem_bool { \itshape } { \normalfont } }{} {\normalfont}{} {0pt} { \rlap{\vbox{\hbox{\parbox{\linewidth}{ {\thmname{#1}\thmnumber{\nobreakspace #2}} {\color{main-text!50!paper}\thmnote{\hspace{.4em} \colorist_insert_l_mathparen: #3 \colorist_insert_r_mathparen: }} }}\hbox{\strut}\vspace{0pt}}} } } { \newtheoremstyle{simple} {}{} {\normalfont}{} {\normalfont}{} {0pt} {{\thmname{#1}\nobreakspace\thmnumber{#2}} {\color{main-text!50!paper}\thmnote{\hspace{.4em} \colorist_insert_l_mathparen: #3 \colorist_insert_r_mathparen: }}\nobreakspace\nobreakspace{\normalfont\textcolor{main-text!27!paper}{---}}\nobreakspace\nobreakspace} \newtheoremstyle{simple-var} {}{} { \bool_if:NTF \l__colorist_emphasize_theorem_bool { \itshape } { \normalfont } }{} {\normalfont}{} {0pt} {{\thmname{#1}\nobreakspace\thmnumber{#2}} {\color{main-text!50!paper}\thmnote{\hspace{.4em} \colorist_insert_l_mathparen: #3 \colorist_insert_r_mathparen: }}\nobreakspace\nobreakspace{\normalfont\textcolor{main-text!27!paper}{---}}\nobreakspace\nobreakspace} } \def\@endtheorem{\popQED\endtrivlist\@endpefalse} \newcommand{\customqedsymbol}{ \makebox[1em]{\color{.!27!paper}\rule[-0.1em]{.95em}{.95em}}} \let\qedsymbol\customqedsymbol %% Special treatments for the Q.E.D. symbol \def\noQED{\let\popQED\relax} \let\noqed\noQED \def\proofless{\pushQED{\qed}} %% The style of the theorem-type environment that will be wrapped into the color box \bool_if:NTF \l__colorist_theorem_in_new_line_bool { \newtheoremstyle{basic} {}{} {\normalfont}{} {}{} {0pt} { \rlap{\vbox{\hbox{\parbox{\linewidth}{ {\thmname{#1}\nobreakspace\thmnumber{\textup{#2}}} \thmnote{\normalfont\sffamily\color{main-text}\nobreakspace \colorist_insert_l_mathparen: #3 \colorist_insert_r_mathparen: } }}\hbox{\strut}\vspace{0pt}}} } \newtheoremstyle{basic-var} {}{} { \bool_if:NTF \l__colorist_emphasize_theorem_bool { \itshape } { \normalfont } }{} {}{} {0pt} { \rlap{\vbox{\hbox{\parbox{\linewidth}{ {\thmname{#1}\nobreakspace\thmnumber{\textup{#2}}} \thmnote{\normalfont\sffamily\color{main-text}\nobreakspace \colorist_insert_l_mathparen: #3 \colorist_insert_r_mathparen: } }}\hbox{\strut}\vspace{0pt}}} } } { \newtheoremstyle{basic} {0pt}{0pt} {\normalfont}{0pt} {}{\;}{0.25em} {{\thmname{#1}\nobreakspace\thmnumber{\textup{#2}}} \thmnote{\normalfont\sffamily\color{main-text}\nobreakspace \colorist_insert_l_mathparen: #3 \colorist_insert_r_mathparen: }} \newtheoremstyle{basic-var} {0pt}{0pt} { \bool_if:NTF \l__colorist_emphasize_theorem_bool { \itshape } { \normalfont } }{0pt} {}{\;}{0.25em} {{\thmname{#1}\nobreakspace\thmnumber{\textup{#2}}} \thmnote{\normalfont\sffamily\color{main-text}\nobreakspace \colorist_insert_l_mathparen: #3 \colorist_insert_r_mathparen: }} } \theoremstyle{basic} %% The style of remark-type environments \newtheoremstyle{emphasis} {0pt}{0pt}{\itshape}{0pt}{}{}{0pt} {\thmnote{\normalfont\sffamily\color{main-text}#3\hspace*{0.5em}}} %% Custom proof style \renewenvironment{proof}[1][\proofname]{\par \pushQED{\qed} \normalfont \topsep6\p@\@plus6\p@\relax \trivlist \item[\hskip\labelsep \itshape \sffamily \colorist_bfseries: #1\hspace{.4em} \textcolor{main-text!27!paper}{$|$}]\ignorespaces }{% \popQED\endtrivlist\@endpefalse } \bool_if:NTF \l__colorist_fast_bool { \RequirePackage { hyperref } \hypersetup { draft } } { \RequirePackage { hyperref } \RequirePackage { bookmark } \hypersetup{ hidelinks, linktoc = all } \bookmarksetup{ numbered } \renewcommand\Hy@numberline[1]{#1.~} % https://tex.stackexchange.com/a/1821 % Add the bookmark of ToC \bool_if:NTF \l__colorist_is_book_bool { \hook_gput_code:nnn { cmd/tableofcontents/before } { colorist } { \if@openright\cleardoublepage\else\clearpage\fi \pdfbookmark[0]{\contentsname}{toc} } } { \hook_gput_code:nnn { cmd/tableofcontents/before } { colorist } { \pdfbookmark[1]{\contentsname}{toc} } } } \PassOptionsToPackage { theorem style = { , remark = emphasis, observation = emphasis, commentary = emphasis, motivation = emphasis , remarks = emphasis, observations = emphasis, commentaries = emphasis, motivations = emphasis , theorem = basic-var, lemma = basic-var, proposition = basic-var, corollary = basic-var, property = basic-var, axiom = basic-var, construction = basic-var , theorems = basic-var, lemmas = basic-var, propositions = basic-var, corollaries = basic-var, properties = basic-var, axioms = basic-var, constructions = basic-var , theorem-with-name = basic-var } } { projlib-theorem } \RequirePackage { projlib-theorem } \tl_gset:Nn \g_crthm_combined_name_sep_tl { \textcolor{main-text}{-} } \SetTheorem { proof, proof* } { qed-symbol = { \customqedsymbol } } \SetTheorem { theorem, theorems, lemma, lemmas, proposition, propositions, corollary, corollaries, property, properties, axiom, axioms, construction, constructions, theorem-with-name } { name style = { heading style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } } } \SetTheorem { definition, definitions, assumption, assumptions, convention, conventions, hypothesis, hypotheses, notation, notations } { name style = { heading style = { \color{forestgreen}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } } } \SetTheorem { application, applications, claim, claims, example, examples, fact, facts, recall, recalls, problem, problems, question, questions } { name style = { heading style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } } } \SetTheorem { conjecture, conjectures } { name style = { heading style = { \color{purple}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } } } \bool_if:NF \l__projlib_theorem_complexname_bool { \SetTheorem { theorem, theorems, lemma, lemmas, proposition, propositions, corollary, corollaries, property, properties, axiom, axioms, construction, constructions, theorem-with-name } { name style = { , crefname style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } , Crefname style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } , numbering style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl } } } \SetTheorem { definition, definitions, assumption, assumptions, convention, conventions, hypothesis, hypotheses, notation, notations } { name style = { , crefname style = { \color{forestgreen}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } , Crefname style = { \color{forestgreen}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } , numbering style = { \color{forestgreen}\colorist_bfseries:\g_colorist_title_font_common_tl } } } \SetTheorem { application, applications, claim, claims, example, examples, fact, facts, recall, recalls, problem, problems, question, questions } { name style = { , crefname style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } , Crefname style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } , numbering style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl } } } \SetTheorem { conjecture, conjectures } { name style = { , crefname style = { \color{purple}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } , Crefname style = { \color{purple}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } , numbering style = { \color{purple}\colorist_bfseries:\g_colorist_title_font_common_tl } } } } \RequirePackage { marginnote } \RequirePackage { ifoddpage } \cs_new_protected:Nn \colorist_mpar_adjust:n { \renewcommand* { \marginnotevadjust } { #1 } } \clist_map_inline:nn { remark, remark*, observation, observation*, commentary, commentary*, motivation, motivation* } { \hook_gput_code:nnn { env/#1/begin } { colorist } { \if@twoside\checkoddpage \ifoddpage\reversemarginpar\fi \else \reversemarginpar \fi \colorist_mpar_adjust:n {\dimexpr.5em-8pt\relax} \marginnote{ \colorist_icon_ideabulb:w [0.3] {orange} \bool_if:NTF \l__colorist_is_book_bool { \hspace*{-2pt} } { \hspace*{-5pt} } } \normalmarginpar } } \hook_gput_code:nnn { env/conjecture/begin } { colorist } { \if@twoside\checkoddpage \ifoddpage\reversemarginpar\fi \else \reversemarginpar \fi \bool_if:NTF \l__colorist_theorem_in_new_line_bool { \colorist_mpar_adjust:n {-.75em} \null } { \colorist_mpar_adjust:n {-.25em} } \marginnote{ \colorist_icon_questionmark:w [0.3] {purple} \bool_if:NTF \l__colorist_is_book_bool { \hspace*{-.2em} } { \hspace*{-.5em} } } \normalmarginpar } \ExplSyntaxOff \RequirePackage{iftex} \ifXeTeX \def\pgfsys@hboxsynced#1{% {% \pgfsys@beginscope% \setbox\pgf@hbox=\hbox{% \hskip\pgf@pt@x% \raise\pgf@pt@y\hbox{% \pgf@pt@x=0pt% \pgf@pt@y=0pt% \special{pdf: content q}% \pgflowlevelsynccm% \pgfsys@invoke{q -1 0 0 -1 0 0 cm}% \special{pdf: content -1 0 0 -1 0 0 cm q} % translate to original coordinate system \pgfsys@invoke{0 J [] 0 d}% reset line cap and dash \wd#1=0pt% \ht#1=0pt% \dp#1=0pt% \box#1% \pgfsys@invoke{n Q Q Q}% }% \hss% }% \wd\pgf@hbox=0pt% \ht\pgf@hbox=0pt% \dp\pgf@hbox=0pt% \pgfsys@hbox\pgf@hbox% \pgfsys@endscope% }} \fi \ExplSyntaxOn \cs_new_protected:Nn \colorist_add_colorbox:nn % #1 = list of environments % #2 = settings of tcolorbox { \clist_map_inline:nn { #1 } { \__colorist_add_colorbox_do:nn { ##1 } { #2 } \__colorist_add_colorbox_do:nn { ##1* } { #2 } } } \cs_new_protected:Nn \__colorist_add_colorbox_do:nn % #1 = name of environment % #2 = settings of tcolorbox { \tcolorboxenvironment { #1 } { #2 } } \colorist_add_colorbox:nn { theorem, theorems, lemma, lemmas, proposition, propositions, corollary, corollaries, property, properties, axiom, axioms, construction, constructions, definition-corollary, definition-proposition, definition-theorem, theorem-with-name } { enhanced~jigsaw, breakable, lines~before~break=3, left=3.5mm, right=3.5mm, colback=main-text!3!paper, opacityframe=0.9, colframe=orange, arc=.7mm } \colorist_add_colorbox:nn { definition, definitions, assumption, assumptions, convention, conventions, hypothesis, hypotheses, notation, notations, corollary-definition, proposition-definition, theorem-definition } { enhanced~jigsaw, breakable, lines~before~break=3, left=4mm, right=4mm, top=1mm, bottom=1mm, colback=lightorange!10!paper, boxrule=0pt, frame~hidden, borderline~west={1.5mm}{0mm}{forestgreen}, arc=.7mm } \colorist_add_colorbox:nn { application, applications, claim, claims, example, examples, fact, facts, recall, recalls } { enhanced~jigsaw, breakable, lines~before~break=3, colback=main-text!5!paper, boxrule=0pt, frame~hidden, arc=.7mm } \colorist_add_colorbox:nn { conjecture, conjectures } { enhanced~jigsaw, breakable, lines~before~break=3, left=3.5mm, right=3.5mm, colback=main-text!3!paper, opacityframe=0.7, colframe=purple, arc=.7mm } \colorist_add_colorbox:nn { problem, problems } { enhanced~jigsaw, breakable, lines~before~break=3, colback=yellow!25!paper, boxrule=0pt, frame~hidden, arc=.7mm } \colorist_add_colorbox:nn { question, questions, exercise, exercises, remark, remarks, observation, observations, commentary, commentaries, motivation, motivations } { enhanced~jigsaw, breakable, lines~before~break=3, oversize, top=0mm, bottom=0mm, opacityframe=0, opacityback=0 } %% Connect adjacent definition-type environments \NewDocumentCommand \AfterEnvEnd { +m } { \colorist_after_env_end:nw { #1 } } \cs_new_protected:Npn \colorist_after_env_end:nw #1 #2 \if@ignore\@ignorefalse\ignorespaces\fi { #2 \if@ignore\@ignorefalse\ignorespaces\fi #1 } \NewDocumentCommand \ScanEnv { s m +m +m } { \IfBooleanTF { #1 } { \colorist_scan_env_ignore_par:nTF } { \colorist_scan_env:nTF } { #2 } { #3 } { #4 } } \cs_new_protected:Npn \colorist_scan_env:nTF { \__colorist_scan_env:NnTF \c_false_bool } \cs_new_protected:Npn \colorist_scan_env_ignore_par:nTF { \__colorist_scan_env:NnTF \c_true_bool } \tl_new:N \l__colorist_collected_tl \cs_new_protected:Npn \__colorist_scan_env:NnTF #1 #2 #3 #4 { \tl_clear:N \l__colorist_collected_tl \peek_analysis_map_inline:n { \tl_put_right:Nn \l__colorist_collected_tl { ##1 } \int_compare:nNnTF { "##3 } = { 0 } { \exp_args:No \token_if_eq_meaning:NNTF { ##1 } \begin { \peek_analysis_map_break:n { \__colorist_chk_env:nTFn { #2 } { #3 } { #4 } } } { \bool_lazy_and:nnF { #1 } { \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \par } { \__colorist_scan_env_end:n { #4 } } } } { \int_compare:nNnF { "##3 } = { 10 } { \__colorist_scan_env_end:n { #4 } } } } } \cs_new_protected:Npn \__colorist_scan_env_end:n #1 { \peek_analysis_map_break:n { \__colorist_reinsert_tokens:nn { #1 } { } } } \cs_new_protected:Npn \__colorist_reinsert_tokens:nn #1 #2 { \use:x { \tl_clear:N \exp_not:N \l__colorist_collected_tl \exp_not:n { #1 } \l__colorist_collected_tl #2 } } \cs_new_protected:Npn \__colorist_chk_env:nTFn #1 #2 #3 #4 { \exp_args:Nx \__colorist_reinsert_tokens:nn { \str_if_eq:nnTF { #1 } { #4 } { \exp_not:n { #2 } } { \exp_not:n { #3 } } } { { #4 } } } \cs_new_protected:Nn \colorist_add_scan_env:n { \clist_map_inline:nn { #1 } { \__colorist_add_scan_env_do:n { ##1 } } } \cs_new_protected:Nn \__colorist_add_scan_env_do:n { \tl_const:cn { l__colorist_scan_env_ #1 _tl } { \AfterEnvEnd { \ScanEnv* { #1 } { \vspace { -1.15\baselineskip } } { \ScanEnv* { #1* } { \vspace { -1.15\baselineskip } } {} } } } \hook_gput_code:nnn { env/#1/end } { colorist } { \tl_use:c { l__colorist_scan_env_ #1 _tl } } \hook_gput_code:nnn { env/#1*/end } { colorist } { \tl_use:c { l__colorist_scan_env_ #1 _tl } } } \colorist_add_scan_env:n { definition, assumption, convention, hypothesis, notation } \theoremstyle{simple} \NewDocumentEnvironment { emphasis } { } { \enlargethispage{2mm} \begin{tcolorbox} [ enhanced ~ jigsaw, enforce~breakable, oversize, % nobeforeafter, left = 1em, right=0mm, top=.5mm, bottom=0mm, boxrule=0pt, colback=maintheme!3!paper, frame ~ hidden, borderline ~ west = {.15em} {0mm} {maintheme, double, double ~ distance=.12em}, arc = 0.2mm, ] } { \end{tcolorbox} } \hook_gput_code:nnn { env/quote/begin } { colorist } { \small } %%================================ %% Title block style %%================================ \bool_if:NTF \l__colorist_is_book_bool { \hook_gput_code:nnn { package/projlib-author/after } { colorist } { \tl_gset:Nn \g__projlib_author_font_author_tl { \normalfont \colorist_scshape: } \tl_gset:Nn \g__projlib_author_font_institute_tl { \large \normalfont } \tl_gset:Nn \g__projlib_author_font_address_tl { \large \normalfont \itshape } \tl_gset:Nn \g__projlib_author_font_curraddr_tl { \large \normalfont \itshape } \tl_gset:Nn \g__projlib_author_font_email_tl { \large \normalfont \ttfamily } } \RequirePackage { projlib-titlepage } \RenewDocumentCommand \maketitle { O{} } { \ProjLibTitlePage[#1] { , title = \@title , author = \@author , date = \@date } } } { \renewcommand{\@maketitle} { \begin{center} \color{maintheme} {\Large\sffamily\colorist_scshape: \colorist_bfseries: \@title}\\\bigskip \color{main-text!80!paper} {\colorist_scshape:\@author}\par\smallskip {\@date} \end{center} \medskip } \hook_gput_code:nnn { cmd/maketitle/after } { colorist } { \thispagestyle{fancy} } %%================================ %% Abstract style %%================================ \renewenvironment{abstract} {\small{\centerline{\textsc{ \colorist_bfseries: \sffamily\abstractname}}\vspace{-0.3\baselineskip}} \color{main-text!80!paper}\begin{quotation}} {\end{quotation}\medskip} %%================================ %% Keyword environment %%================================ \DefineMultilingualText { \keywordname } { EN = Keywords , FR = Mots~clés , DE = Schlüsselwörter , IT = Parole~chiave , PT = Palavras~chave , BR = Palavras~chave , ES = Palabras~clave , CN = 关键词 , TC = 關鍵詞 , JP = キーワード , RU = Ключевые~слова , } \newenvironment{keyword} {\small\centerline{{ \colorist_bfseries: \sffamily\keywordname}}\vspace{-0.3\baselineskip} \color{main-text!80!paper}\begin{center}} {\end{center}\medskip} } % end of \bool_if:NTF \l__colorist_is_book_bool %%================================ %% Simulate features of amsart %%================================ \PassOptionsToPackage { amsfashion } { projlib-author } \RequirePackage { projlib-author } %%================================ %% Special adjustment %%================================ \crefformat { chapter } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \normalfont\textcolor{maintheme} {\larger #1} #3 } \labelcrefformat { chapter } { #2 \normalfont\textcolor{maintheme} {\larger #1} #3 } \crefformat { section } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \color{maintheme} \g_colorist_title_font_section_tl {#1} #3 } \labelcrefformat { section } { #2 \color{maintheme} \g_colorist_title_font_section_tl {#1} #3 } \crefformat { subsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \g_colorist_title_font_subsection_tl {#1} #3 } \labelcrefformat { subsection } { #2 \g_colorist_title_font_subsection_tl {#1} #3 } \crefformat { subsubsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \color{main-text!70!paper} \g_colorist_title_font_subsubsection_tl {#1} #3 } \labelcrefformat { subsubsection } { #2 \color{main-text!70!paper} \g_colorist_title_font_subsubsection_tl {#1} #3 } \endinput %% %% End of file `colorist/colorist-fancy.sty'.