diff options
author | Norbert Preining <norbert@preining.info> | 2022-06-17 03:01:24 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-06-17 03:01:24 +0000 |
commit | f9418ac1e9385653cfa09da311bb2d405a936334 (patch) | |
tree | 764fc072c0bea51901ba3ef3a6dd915400df47c5 /macros/latex/contrib/colorist | |
parent | b83d15e1ff2e551eb7391d45becd87dce59d39b8 (diff) |
CTAN sync 202206170301
Diffstat (limited to 'macros/latex/contrib/colorist')
-rw-r--r-- | macros/latex/contrib/colorist/colorart.cls | 22 | ||||
-rw-r--r-- | macros/latex/contrib/colorist/colorbook.cls | 22 | ||||
-rw-r--r-- | macros/latex/contrib/colorist/colorist-doc.pdf | bin | 102695 -> 102866 bytes | |||
-rw-r--r-- | macros/latex/contrib/colorist/colorist-doc.tex | 6 | ||||
-rw-r--r-- | macros/latex/contrib/colorist/colorist-fancy.sty | 58 | ||||
-rw-r--r-- | macros/latex/contrib/colorist/colorist.sty | 27 |
6 files changed, 80 insertions, 55 deletions
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls index b347658bbb..9c838e534d 100644 --- a/macros/latex/contrib/colorist/colorart.cls +++ b/macros/latex/contrib/colorist/colorart.cls @@ -1,7 +1,7 @@ %% %% This is file `colorist/colorart.cls', %% generated with the docstrip utility. - +%% %% Copyright (C) 2021-2022 by Jinwen XU %% %% This is part of the colorist class series. @@ -19,7 +19,7 @@ \RequirePackage{l3keys2e} \ProvidesExplClass {colorart} - {2022/04/24} {} + {2022/06/16} {} {A colorful article style} \tl_const:Nn \l__colorclass_base_class_tl { article } @@ -169,21 +169,25 @@ } } + \PassOptionsToPackage { all } { nowidow } \RequirePackage { nowidow } -\RequirePackage { regexpatch } -\skip_new:N \g_colorclass_parfillskip_skip -\xpatchcmd{\@trivlist}{\@flushglue}{\g_colorclass_parfillskip_skip}{}{} -\hook_gput_code:nnn { begindocument } { colorclass } +\sys_if_engine_xetex:T { - \skip_gset:Nn \g_colorclass_parfillskip_skip { 0pt plus \dim_eval:n { \linewidth - 2\parindent } } - \skip_gset_eq:NN \parfillskip \g_colorclass_parfillskip_skip + \RequirePackage { regexpatch } + \skip_new:N \g_colorclass_parfillskip_skip + \xpatchcmd{\@trivlist}{\@flushglue}{\g_colorclass_parfillskip_skip}{}{} + \hook_gput_code:nnn { begindocument } { colorclass } + { + \skip_gset:Nn \g_colorclass_parfillskip_skip { 0pt plus \dim_eval:n { \linewidth - 3em } } + \skip_gset_eq:NN \parfillskip \g_colorclass_parfillskip_skip + } } \hook_gput_code:nnn { begindocument/before } { colorclass } { - \@ifpackageloaded { biblatex } + \IfPackageLoadedTF { biblatex } { \PassOptionsToPackage { biblatex } { embrac } } {} diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls index 2fe78fc5f3..877f6d9cf0 100644 --- a/macros/latex/contrib/colorist/colorbook.cls +++ b/macros/latex/contrib/colorist/colorbook.cls @@ -1,7 +1,7 @@ %% %% This is file `colorist/colorbook.cls', %% generated with the docstrip utility. - +%% %% Copyright (C) 2021-2022 by Jinwen XU %% %% This is part of the colorist class series. @@ -19,7 +19,7 @@ \RequirePackage{l3keys2e} \ProvidesExplClass {colorbook} - {2022/04/24} {} + {2022/06/16} {} {A colorful book style} \tl_const:Nn \l__colorclass_base_class_tl { book } @@ -169,21 +169,25 @@ } } + \PassOptionsToPackage { all } { nowidow } \RequirePackage { nowidow } -\RequirePackage { regexpatch } -\skip_new:N \g_colorclass_parfillskip_skip -\xpatchcmd{\@trivlist}{\@flushglue}{\g_colorclass_parfillskip_skip}{}{} -\hook_gput_code:nnn { begindocument } { colorclass } +\sys_if_engine_xetex:T { - \skip_gset:Nn \g_colorclass_parfillskip_skip { 0pt plus \dim_eval:n { \linewidth - 2\parindent } } - \skip_gset_eq:NN \parfillskip \g_colorclass_parfillskip_skip + \RequirePackage { regexpatch } + \skip_new:N \g_colorclass_parfillskip_skip + \xpatchcmd{\@trivlist}{\@flushglue}{\g_colorclass_parfillskip_skip}{}{} + \hook_gput_code:nnn { begindocument } { colorclass } + { + \skip_gset:Nn \g_colorclass_parfillskip_skip { 0pt plus \dim_eval:n { \linewidth - 3em } } + \skip_gset_eq:NN \parfillskip \g_colorclass_parfillskip_skip + } } \hook_gput_code:nnn { begindocument/before } { colorclass } { - \@ifpackageloaded { biblatex } + \IfPackageLoadedTF { biblatex } { \PassOptionsToPackage { biblatex } { embrac } } {} diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf Binary files differindex 017bc0e7d3..0a4331190f 100644 --- a/macros/latex/contrib/colorist/colorist-doc.pdf +++ b/macros/latex/contrib/colorist/colorist-doc.pdf diff --git a/macros/latex/contrib/colorist/colorist-doc.tex b/macros/latex/contrib/colorist/colorist-doc.tex index d52ff27fdc..4f6c342273 100644 --- a/macros/latex/contrib/colorist/colorist-doc.tex +++ b/macros/latex/contrib/colorist/colorist-doc.tex @@ -1,4 +1,4 @@ -\documentclass[English,Chinese,French,use boldface,simple name]{colorart} +\documentclass[title in boldface, title in scshape, simple name]{colorart} %%================================ %% Import toolkit @@ -8,8 +8,6 @@ \usepackage{hologo} % more TeX logo \usetikzlibrary{calc} -\usepackage{relsize} - \usepackage{blindtext} \UseLanguage{English} @@ -93,7 +91,7 @@ %%================================ \begin{document} -\def\PackageVersion{2022/04/24} +\def\PackageVersion{2022/06/16} \title{{\normalfont\bfseries\color{main-text}\colorist{}}\\write your articles or books in a colorful way} \author{Jinwen XU} diff --git a/macros/latex/contrib/colorist/colorist-fancy.sty b/macros/latex/contrib/colorist/colorist-fancy.sty index 8f0d97307a..cc3db07f88 100644 --- a/macros/latex/contrib/colorist/colorist-fancy.sty +++ b/macros/latex/contrib/colorist/colorist-fancy.sty @@ -1,7 +1,7 @@ %% %% This is file `colorist/colorist-fancy.sty', %% generated with the docstrip utility. - +%% %% Copyright (C) 2021-2022 by Jinwen XU %% %% This is part of the colorist class series. @@ -19,10 +19,10 @@ \RequirePackage{l3keys2e} \ProvidesExplPackage {colorist-fancy} - {2022/04/24} {} + {2022/06/16} {} {The fancy style of colorist} -\@ifpackageloaded { colorist } {} +\IfPackageLoadedTF { colorist } {} { \msg_new:nnn { \@currname } { colorist-not-loaded } @@ -34,6 +34,7 @@ %%================================ %% Title fonts %%================================ +\RequirePackage { relsize } \RequirePackage { anyfontsize } \NewCommandCopy \colorist_original_bfseries: \bfseries @@ -57,6 +58,14 @@ \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 @@ -211,7 +220,7 @@ %%================================ %% Title format %%================================ -\RequirePackage [ explicit, newparttoc, nobottomtitles* ] { titlesec } +\RequirePackage [ explicit, newparttoc ] { titlesec } \PassOptionsToPackage { normalem } { ulem } \RequirePackage { ulem } @@ -254,7 +263,7 @@ \end{tikzpicture} } {1em} - {\fontsize{20}{0}\selectfont\MakeUppercase{#1}} + {\fontsize{20}{24}\selectfont\MakeUppercase{#1}} \titleformat{name=\part,numberless}[display] {% \phantomsection\addcontentsline{toc}{part}{#1}% \g_colorist_title_font_part_tl \filleft} @@ -266,7 +275,7 @@ \end{tikzpicture} } {1em} - {\fontsize{20}{0}\selectfont\MakeUppercase{#1}} + {\fontsize{20}{24}\selectfont\MakeUppercase{#1}} \titlespacing*{\part}{0pt}{5em}{6em} %% Text after part \newcommand{\parttext}[1]{ @@ -315,7 +324,7 @@ } \titleformat{name=\chapter} - { \g_colorist_title_font_chapter_tl \scshape\huge} % Format + { \g_colorist_title_font_chapter_tl \colorist_scshape:\huge} % Format {} % Label {0mm} % Sep { \colorist_chapter_inner:nn { \thechapter } { #1 } } % Before-code @@ -323,7 +332,7 @@ {0em}{*2}{0em} % {left}{before-sep}{after-sep} \titleformat{name=\chapter, numberless} - {\filcenter \g_colorist_title_font_chapter_tl \scshape\huge} + {\filcenter \g_colorist_title_font_chapter_tl \colorist_scshape:\huge} {} {0mm} { \colorist_chapter_inner:n { #1 } } @@ -366,7 +375,7 @@ %% Section \titleformat{\section} {\color{maintheme} \g_colorist_title_font_section_tl \large} - {\thesection}{.75em}{\scshape #1} + {\thesection}{.75em}{\colorist_scshape: #1} %% Subsection \titleformat{\subsection} @@ -416,7 +425,7 @@ { \titlecontents{chapter} [2em] % i.e., 0em (part) + 2em - {\addvspace{1pc} \color{maintheme} \normalfont \sffamily \colorist_bfseries: \scshape } + {\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} @@ -442,7 +451,7 @@ { \titlecontents{section} [2em] % i.e., 0em (part) + 2em - {\addvspace{.3pc} \color{maintheme} \normalfont \sffamily \scshape } + {\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} @@ -465,7 +474,7 @@ %%================================ \RequirePackage { enumitem } \setlistdepth{10} -\setlist{noitemsep, topsep=.33\topsep} +\setlist{noitemsep, topsep=.33\topsep-.5\parskip} \setlist[enumerate]{labelsep=*, leftmargin=*} \setlist[enumerate,1]{label=\arabic*$)$, ref = \arabic*$)$} @@ -478,8 +487,8 @@ \renewlist{itemize}{itemize}{10} \setlist[itemize]{leftmargin=*,label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\cdot$}} \AddLanguageSetting { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\bullet$}} } -\AddLanguageSetting [french] { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{---}} } -\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{--}} +\AddLanguageSetting [french] { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\rule[.2\baselineskip]{.8em}{.75pt}}} } +\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\rule[.2\baselineskip]{.5em}{.75pt}}} \setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\circ$}} \setlist[itemize,4]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\ast$}} @@ -548,9 +557,7 @@ heading_suffix "}\n" \newcommand*{\IndexDotfill} { - \nobreakspace\nobreakspace - \titlerule*[.67em]{\textcolor{main-text!15!paper}{.}} - \nobreakspace\nobreakspace + \leaders \hbox to .67em {\hss \textcolor{main-text!15!paper}{.} \hss} \hfill } \newcommand*{\IndexHeading}[1] { @@ -658,7 +665,7 @@ heading_suffix "}\n" \rlap{\vbox{\hbox{\parbox{\linewidth}{ {\thmname{#1}\thmnumber{\nobreakspace #2}} {\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}} - }}\hbox{\strut}\vspace{-2\parskip}}} + }}\hbox{\strut}\vspace{0pt}}} } } { @@ -686,7 +693,7 @@ heading_suffix "}\n" \rlap{\vbox{\hbox{\parbox{\linewidth}{ {\thmname{#1}\nobreakspace\thmnumber{\textup{#2}}} \thmnote{\normalfont\sffamily\color{main-text}\nobreakspace(#3)} - }}\hbox{\strut}\vspace{-2\parskip}}} + }}\hbox{\strut}\vspace{0pt}}} } } { @@ -744,7 +751,7 @@ heading_suffix "}\n" \tl_gset:Nn \g_crthm_combined_name_sep_tl { \textcolor{main-text}{-} } -\SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, definition-theorem, definition-proposition } +\SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, definition-theorem, definition-proposition, theorem-with-name } { name style = { heading style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } @@ -774,7 +781,7 @@ heading_suffix "}\n" \bool_if:NF \l__projlib_theorem_complexname_bool { - \SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, definition-theorem, definition-proposition } + \SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, definition-theorem, definition-proposition, theorem-with-name } { name style = { , crefname style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc } @@ -916,7 +923,7 @@ heading_suffix "}\n" \tcolorboxenvironment { #1 } { #2 } } -\colorist_add_colorbox:nn { theorem, lemma, proposition, corollary, property, axiom, construction, definition-proposition, definition-theorem } +\colorist_add_colorbox:nn { theorem, lemma, proposition, corollary, property, axiom, construction, definition-proposition, definition-theorem, theorem-with-name } { enhanced~jigsaw, breakable, lines~before~break=3, left=3.5mm, right=3.5mm, @@ -1070,7 +1077,7 @@ heading_suffix "}\n" { \hook_gput_code:nnn { package/projlib-author/after } { colorist } { - \tl_gset:Nn \g__projlib_author_font_author_tl { \normalfont \scshape } + \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 } @@ -1094,12 +1101,11 @@ heading_suffix "}\n" { \begin{center} \color{maintheme} - {\Large\sffamily\scshape \colorist_bfseries: \@title}\\\bigskip + {\Large\sffamily\colorist_scshape: \colorist_bfseries: \@title}\\\bigskip \color{main-text!80!paper} - {\scshape\@author}\par\smallskip + {\colorist_scshape:\@author}\par\smallskip {\@date} \end{center} - \ifx\@date\@empty\bigskip\fi \medskip } diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty index 24f6910e3f..9e7c85109c 100644 --- a/macros/latex/contrib/colorist/colorist.sty +++ b/macros/latex/contrib/colorist/colorist.sty @@ -1,7 +1,7 @@ %% %% This is file `colorist/colorist.sty', %% generated with the docstrip utility. - +%% %% Copyright (C) 2021-2022 by Jinwen XU %% %% This is part of the colorist class series. @@ -19,7 +19,7 @@ \RequirePackage{l3keys2e} \ProvidesExplPackage {colorist} - {2022/04/24} {} + {2022/06/16} {} {A colorful style for articles and books} \keys_define:nn { colorist } @@ -30,17 +30,30 @@ , style .str_set:N = \l__colorist_style_str , style .initial:n = { fancy } + , use-style .str_set:N = \l__colorist_style_str + , use~style .str_set:N = \l__colorist_style_str + , use style .str_set:N = \l__colorist_style_str , fancy .meta:n = { style = fancy } , use-boldface .bool_set:N = \l__colorist_use_boldface_bool , use-boldface .initial:n = { false } , use~boldface .bool_set:N = \l__colorist_use_boldface_bool , use boldface .bool_set:N = \l__colorist_use_boldface_bool - , usebf .bool_set:N = \l__colorist_use_boldface_bool - , allow-boldface .bool_set:N = \l__colorist_use_boldface_bool - , allow~boldface .bool_set:N = \l__colorist_use_boldface_bool - , allow boldface .bool_set:N = \l__colorist_use_boldface_bool - , allowbf .bool_set:N = \l__colorist_use_boldface_bool + , title-in-boldface .bool_set:N = \l__colorist_use_boldface_bool + , title~in~boldface .bool_set:N = \l__colorist_use_boldface_bool + , title in boldface .bool_set:N = \l__colorist_use_boldface_bool + , title-in-bold .bool_set:N = \l__colorist_use_boldface_bool + , title~in~bold .bool_set:N = \l__colorist_use_boldface_bool + , title in bold .bool_set:N = \l__colorist_use_boldface_bool + + , use-scshape .bool_set:N = \l__colorist_use_scshape_bool + , use-scshape .initial:n = { false } + , use~scshape .bool_set:N = \l__colorist_use_scshape_bool + , use scshape .bool_set:N = \l__colorist_use_scshape_bool + , title-in-scshape .bool_set:N = \l__colorist_use_scshape_bool + , title~in~scshape .bool_set:N = \l__colorist_use_scshape_bool + , title in scshape .bool_set:N = \l__colorist_use_scshape_bool + , runin .bool_set:N = \l__colorist_runin_bool , runin .initial:n = { false } |