summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/colorist
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-04-26 03:02:04 +0000
committerNorbert Preining <norbert@preining.info>2022-04-26 03:02:04 +0000
commit6f7554fc6cab67e3dc397ce7a942889eedbc4967 (patch)
treecd63f9ed43b147e44b3f1981bf7bda23680416b1 /macros/latex/contrib/colorist
parent4688b855bb6f8b817901a7c777e8aecd1a189622 (diff)
CTAN sync 202204260302
Diffstat (limited to 'macros/latex/contrib/colorist')
-rw-r--r--macros/latex/contrib/colorist/colorart.cls24
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls24
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin102113 -> 102695 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex2
-rw-r--r--macros/latex/contrib/colorist/colorist-fancy.sty65
-rw-r--r--macros/latex/contrib/colorist/colorist.sty2
6 files changed, 87 insertions, 30 deletions
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index b90308c016..b347658bbb 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplClass
{colorart}
- {2022/04/17} {}
+ {2022/04/24} {}
{A colorful article style}
\tl_const:Nn \l__colorclass_base_class_tl { article }
@@ -84,6 +84,7 @@
total = { 6.500in, 9.130in },
centering,
footnotesep = 2em plus 2pt minus 2pt,
+ footskip = .5in,
}
\bool_if:NT \l__colorclass_b_five_paper_bool
@@ -94,6 +95,7 @@
total = { 5.535in, 8.160in },
centering,
footnotesep = 2em plus 2pt minus 2pt,
+ footskip = .5in,
}
}
@@ -105,6 +107,7 @@
total = { 6.500in, 9.685in },
centering,
footnotesep = 2em plus 2pt minus 2pt,
+ footskip = .5in,
}
}
@@ -168,7 +171,24 @@
\PassOptionsToPackage { all } { nowidow }
\RequirePackage { nowidow }
-\RequirePackage { embrac }
+
+\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 - 2\parindent } }
+ \skip_gset_eq:NN \parfillskip \g_colorclass_parfillskip_skip
+ }
+
+\hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \@ifpackageloaded { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
%%================================
%% Graphics
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 2e5bd693d2..2fe78fc5f3 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplClass
{colorbook}
- {2022/04/17} {}
+ {2022/04/24} {}
{A colorful book style}
\tl_const:Nn \l__colorclass_base_class_tl { book }
@@ -84,6 +84,7 @@
total = { 6.500in, 9.130in },
centering,
footnotesep = 2em plus 2pt minus 2pt,
+ footskip = .5in,
}
\bool_if:NT \l__colorclass_b_five_paper_bool
@@ -94,6 +95,7 @@
total = { 5.535in, 8.160in },
centering,
footnotesep = 2em plus 2pt minus 2pt,
+ footskip = .5in,
}
}
@@ -105,6 +107,7 @@
total = { 6.500in, 9.685in },
centering,
footnotesep = 2em plus 2pt minus 2pt,
+ footskip = .5in,
}
}
@@ -168,7 +171,24 @@
\PassOptionsToPackage { all } { nowidow }
\RequirePackage { nowidow }
-\RequirePackage { embrac }
+
+\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 - 2\parindent } }
+ \skip_gset_eq:NN \parfillskip \g_colorclass_parfillskip_skip
+ }
+
+\hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \@ifpackageloaded { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
%%================================
%% Graphics
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
index 2832b0bf7c..017bc0e7d3 100644
--- a/macros/latex/contrib/colorist/colorist-doc.pdf
+++ b/macros/latex/contrib/colorist/colorist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorist/colorist-doc.tex b/macros/latex/contrib/colorist/colorist-doc.tex
index b6b7f696fa..d52ff27fdc 100644
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ b/macros/latex/contrib/colorist/colorist-doc.tex
@@ -93,7 +93,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/04/17}
+\def\PackageVersion{2022/04/24}
\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 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,
]
}
{
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index 2e28c650ad..24f6910e3f 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{colorist}
- {2022/04/17} {}
+ {2022/04/24} {}
{A colorful style for articles and books}
\keys_define:nn { colorist }