diff options
Diffstat (limited to 'macros/latex/contrib/colorist/colorist-fancy.sty')
-rw-r--r-- | macros/latex/contrib/colorist/colorist-fancy.sty | 65 |
1 files changed, 41 insertions, 24 deletions
diff --git a/macros/latex/contrib/colorist/colorist-fancy.sty b/macros/latex/contrib/colorist/colorist-fancy.sty index f604f3ff47..8f0d97307a 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/04/17} {} + {2022/04/24} {} {The fancy style of colorist} \@ifpackageloaded { colorist } {} @@ -211,7 +211,7 @@ %%================================ %% Title format %%================================ -\RequirePackage [ explicit, newparttoc, nobottomtitles ] { titlesec } +\RequirePackage [ explicit, newparttoc, nobottomtitles* ] { titlesec } \PassOptionsToPackage { normalem } { ulem } \RequirePackage { ulem } @@ -394,7 +394,7 @@ %% Paragraph \titleformat{\paragraph}[runin] - { \g_colorist_title_font_paragraph_tl }{\theparagraph}{1em}{#1} + {\color{main-text!50!paper} \g_colorist_title_font_paragraph_tl }{\theparagraph}{1em}{#1} \titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip} \titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip} @@ -653,9 +653,13 @@ heading_suffix "}\n" {}{} {\normalfont}{} {\normalfont}{} - {\newline} - {{\thmname{#1}\nobreakspace\thmnumber{#2}} - {\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}}\smallskip} + {0pt} + { + \rlap{\vbox{\hbox{\parbox{\linewidth}{ + {\thmname{#1}\thmnumber{\nobreakspace #2}} + {\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}} + }}\hbox{\strut}\vspace{-2\parskip}}} + } } { \newtheoremstyle{simple} @@ -674,10 +678,16 @@ heading_suffix "}\n" \bool_if:NTF \l__colorist_theorem_in_new_line_bool { \newtheoremstyle{basic} - {0pt}{0pt}{\normalfont}{0pt} - {}{\;}{\newline} - {{\thmname{#1}\nobreakspace\thmnumber{\textup{#2}}} - \thmnote{\normalfont\sffamily\color{main-text}\nobreakspace(#3)}\smallskip} + {}{} + {\normalfont}{} + {}{} + {0pt} + { + \rlap{\vbox{\hbox{\parbox{\linewidth}{ + {\thmname{#1}\nobreakspace\thmnumber{\textup{#2}}} + \thmnote{\normalfont\sffamily\color{main-text}\nobreakspace(#3)} + }}\hbox{\strut}\vspace{-2\parskip}}} + } } { \newtheoremstyle{basic} @@ -734,7 +744,7 @@ heading_suffix "}\n" \tl_gset:Nn \g_crthm_combined_name_sep_tl { \textcolor{main-text}{-} } -\SetTheorem { theorem, lemma, proposition, corollary, property, axiom, definition-theorem, definition-proposition } +\SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, definition-theorem, definition-proposition } { name style = { heading style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } @@ -748,7 +758,7 @@ heading_suffix "}\n" } } -\SetTheorem { application, fact, example, problem, question, exercise } +\SetTheorem { application, claim, example, exercise, fact, problem, question, recall } { name style = { heading style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } @@ -764,7 +774,7 @@ heading_suffix "}\n" \bool_if:NF \l__projlib_theorem_complexname_bool { - \SetTheorem { theorem, lemma, proposition, corollary, property, axiom, definition-theorem, definition-proposition } + \SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, definition-theorem, definition-proposition } { name style = { , crefname style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } @@ -782,7 +792,7 @@ heading_suffix "}\n" } } - \SetTheorem { application, fact, example, problem, question, exercise } + \SetTheorem { application, claim, example, exercise, fact, problem, question, recall } { name style = { , crefname style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } @@ -803,11 +813,10 @@ heading_suffix "}\n" \RequirePackage { marginnote } \RequirePackage { ifoddpage } -\newcommand{\mparadjust}[1]{\renewcommand*{\marginnotevadjust}{#1}} -\hook_gput_code:nnn { begindocument/before } { colorist } -{ - % -} +\cs_new_protected:Nn \colorist_mpar_adjust:n + { + \renewcommand* { \marginnotevadjust } { #1 } + } \hook_gput_code:nnn { env/remark/begin } { colorist } { \if@twoside\checkoddpage @@ -815,7 +824,7 @@ heading_suffix "}\n" \else \reversemarginpar \fi - \mparadjust{-.25em} + \colorist_mpar_adjust:n {-.25em} \marginnote{ \colorist_icon_ideabulb:w [0.3] {orange} \bool_if:NTF \l__colorist_is_book_bool @@ -835,7 +844,14 @@ heading_suffix "}\n" \else \reversemarginpar \fi - \mparadjust{-.25em} + \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 @@ -900,7 +916,7 @@ heading_suffix "}\n" \tcolorboxenvironment { #1 } { #2 } } -\colorist_add_colorbox:nn { theorem, lemma, proposition, corollary, property, axiom, definition-proposition, definition-theorem } +\colorist_add_colorbox:nn { theorem, lemma, proposition, corollary, property, axiom, construction, definition-proposition, definition-theorem } { enhanced~jigsaw, breakable, lines~before~break=3, left=3.5mm, right=3.5mm, @@ -916,7 +932,7 @@ heading_suffix "}\n" borderline~west={1.5mm}{0mm}{forestgreen}, arc=.7mm } -\colorist_add_colorbox:nn { application, fact, example } +\colorist_add_colorbox:nn { application, claim, example, fact, recall } { enhanced~jigsaw, breakable, lines~before~break=3, colback=main-text!5!paper, @@ -1037,7 +1053,8 @@ heading_suffix "}\n" % nobeforeafter, left = 1em, right=0mm, top=.5mm, bottom=0mm, boxrule=0pt, colback=maintheme!3!paper, frame ~ hidden, - borderline ~ west = {.3em} {0mm} {maintheme!90!paper}, arc = 0.2mm, + borderline ~ west = {.15em} {0mm} {maintheme, double, double ~ distance=.12em}, + arc = 0.2mm, ] } { |