summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/minimalist/minimalist-classical.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/minimalist/minimalist-classical.sty')
-rw-r--r--macros/latex/contrib/minimalist/minimalist-classical.sty122
1 files changed, 90 insertions, 32 deletions
diff --git a/macros/latex/contrib/minimalist/minimalist-classical.sty b/macros/latex/contrib/minimalist/minimalist-classical.sty
index 8da62f16f6..5851a6b92f 100644
--- a/macros/latex/contrib/minimalist/minimalist-classical.sty
+++ b/macros/latex/contrib/minimalist/minimalist-classical.sty
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{minimalist-classical}
- {2022/04/03} {}
+ {2022/04/17} {}
{The classical style of minimalist}
\@ifpackageloaded { minimalist } {}
@@ -36,9 +36,22 @@
%%================================
\RequirePackage { anyfontsize }
+\NewCommandCopy \minimalist_original_bfseries: \bfseries
+\bool_new:N \l_minimalist_is_under_bfseries_bool
+\bool_set_false:N \l_minimalist_is_under_bfseries_bool
+\RenewDocumentCommand \bfseries { }
+ {
+ \bool_if:NF \l_minimalist_is_under_bfseries_bool
+ {
+ \colorlet{minimalist-temp-color}{.}
+ \color{minimalist-temp-color!70!paper}
+ }
+ \minimalist_original_bfseries:
+ \bool_set_true:N \l_minimalist_is_under_bfseries_bool
+ }
\bool_if:NTF \l__minimalist_use_boldface_bool
{
- \cs_new:Nn \minimalist_bfseries: { \bfseries \colorlet{minimalist-temp-color}{.} \color{minimalist-temp-color!70!paper} }
+ \cs_new:Nn \minimalist_bfseries: { \bfseries }
}
{
\cs_new:Nn \minimalist_bfseries: {}
@@ -54,7 +67,7 @@
\tl_new:N \g_minimalist_title_font_paragraph_tl
\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
-\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
+\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \scshape }
\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries: }
\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries: }
\tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \minimalist_bfseries: \itshape }
@@ -251,7 +264,7 @@
%%================================
%% Title format
%%================================
-\RequirePackage [ explicit, newparttoc ] { titlesec }
+\RequirePackage [ explicit, newparttoc, nobottomtitles ] { titlesec }
\PassOptionsToPackage { normalem } { ulem }
\RequirePackage { ulem }
@@ -322,17 +335,17 @@
\titleformat{\chapter}
{\thispagestyle{fancy}
\LocallyStopLineNumbers
- \color{main-text!80!paper}\g_minimalist_title_font_chapter_tl\fontsize{16}{0}\selectfont}{}{0em}
+ \color{main-text!80!paper}\fontsize{16}{0}\selectfont}{}{0em}
{\rlap{\hspace*{-.5em}{\color{main-text!12!paper}
- \fontsize{80}{0}\selectfont\raisebox{-7pt}{\thechapter}}}#1}
+ \fontsize{80}{0}\selectfont\raisebox{-7pt}{\thechapter}}} \g_minimalist_title_font_chapter_tl #1}
[\ResumeLineNumbers]
\titleformat{name=\chapter,numberless}
{\thispagestyle{fancy}
\LocallyStopLineNumbers
% \phantomsection\addcontentsline{toc}{chapter}{#1}
- \color{main-text!80!paper}\g_minimalist_title_font_chapter_tl\fontsize{16}{0}\selectfont}{}{0em}
+ \color{main-text!80!paper}\fontsize{16}{0}\selectfont}{}{0em}
{\rlap{\hspace*{-.5em}{\color{main-text!12!paper}
- \fontsize{80}{0}\selectfont\normalfont\raisebox{-7pt}{*}}}#1}
+ \fontsize{80}{0}\selectfont\normalfont\raisebox{-7pt}{*}}} \g_minimalist_title_font_chapter_tl #1}
[\ResumeLineNumbers]
}
{
@@ -455,22 +468,22 @@
{\hspace*{-2em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
\titlecontents{section}
- [4em] % i.e., 2em (chapter) + 2em
+ [5em] % i.e., 2em (chapter) + 3em
{\normalfont}
- {\contentslabel[\textcolor{main-text!27!paper}{\small\g_minimalist_section_decoration_char_tl}\,\textcolor{main-text!90!paper}{ \minimalist_apply_title_numbering_style:n { \thecontentslabel } }\,\textcolor{main-text!27!paper}{\small\g_minimalist_section_decoration_char_tl}]{2em}}
- {\hspace*{-2em}}
+ {\contentslabel[\textcolor{main-text!27!paper}{\small\g_minimalist_section_decoration_char_tl}\,\textcolor{main-text!90!paper}{ \minimalist_apply_title_numbering_style:n { \thecontentslabel } }\,\textcolor{main-text!27!paper}{\small\g_minimalist_section_decoration_char_tl}]{2.75em}}
+ {\hspace*{-2.75em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
\titlecontents{subsection}
- [7em] % i.e., 4em (section) + 3em
+ [8em] % i.e., 5em (section) + 3em
{\normalfont}
{\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{2.75em}}
{\hspace*{-2.75em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
\titlecontents{subsubsection}
- [9.5em] % i.e., 7em (subsection) + 3.5em
+ [12em] % i.e., 8em (subsection) + 4em
{\normalfont}
- {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{3.25em}}
- {\hspace*{-3.25em}}
+ {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{3.75em}}
+ {\hspace*{-3.75em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
}
{
@@ -481,16 +494,16 @@
{\hspace*{-1.75em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
\titlecontents{subsection}
- [4.5em] % i.e., 2em (section) + 2.5em
+ [4.75em] % i.e., 2em (section) + 2.75em
{\normalfont}
- {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{2.25em}}
- {\hspace*{-2.25em}}
+ {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{2.50em}}
+ {\hspace*{-2.50em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
\titlecontents{subsubsection}
- [7.5em] % i.e., 4.5em (subsection) + 3em
+ [8.25em] % i.e., 4.75em (subsection) + 3.5em
{\normalfont}
- {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{2.75em}}
- {\hspace*{-2.75em}}
+ {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{3.25em}}
+ {\hspace*{-3.25em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
}
@@ -498,7 +511,8 @@
%% Lists
%%================================
\RequirePackage { enumitem }
-\setlist{noitemsep}
+\setlistdepth{9}
+\setlist{noitemsep, topsep=.33\topsep}
\setlist[enumerate]{labelsep=*, leftmargin=*}
\setlist[enumerate,1]{label=\arabic*$)$,
ref = \arabic*$)$}
@@ -515,9 +529,15 @@
\setlist[itemize]{leftmargin=*}
\AddLanguageSetting { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\bullet$}} }
-\AddLanguageSetting [french] { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!55!paper}{---}} }
+\AddLanguageSetting [french] { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{---}} }
\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{--}}
-\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\texttt{*}}}
+\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\circ$}}
+\setlist[itemize,4]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\ast$}}
+\setlist[itemize,5]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\cdot$}}
+\setlist[itemize,6]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\cdot$}}
+\setlist[itemize,7]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\cdot$}}
+
+\renewlist{itemize}{itemize}{9}
%%================================
%% Blank page
@@ -598,10 +618,28 @@ heading_suffix "}\n"
\par
\vspace{.3\baselineskip}
}
+
\renewcommand*{\indexspace}
{
\par
- \vspace{2pc~plus~.5pc~minus~.3pc}
+ \vspace{2pc ~ plus ~ .5pc ~ minus ~ .3pc}
+ }
+
+\bool_new:N \l__minimalist_if_first_subitem_bool
+\renewcommand*{\@idxitem}
+ {
+ \par\hangindent40\p@
+ \bool_set_true:N \l__minimalist_if_first_subitem_bool
+ }
+\renewcommand*{\subitem}
+ {
+ \par\hangindent40\p@
+ \bool_if:NT \l__minimalist_if_first_subitem_bool
+ {
+ \nobreak
+ \bool_set_false:N \l__minimalist_if_first_subitem_bool
+ }
+ \hspace*{20\p@}
}
\hook_gput_code:nnn { begindocument/before } { minimalist }
@@ -631,8 +669,8 @@ heading_suffix "}\n"
{\normalfont}{}
{\newline}
{ \global\let\qedsymbol\simpleqedsymbol
- {\thmname{#1}\nobreakspace\thmnumber{#2}}
- \thmnote{\hspace{.4em}\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\hspace{.4em}\color{main-text!50!paper}\ensuremath{(\text{#3})}}
+ {\thmname{#1}\thmnumber{\nobreakspace #2}}
+ \thmnote{\hspace{.4em}\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\hspace{.4em}\color{main-text!50!paper}$($#3$)$}
\smallskip
\pushQED{\qed}
}
@@ -644,9 +682,9 @@ heading_suffix "}\n"
{\normalfont}{}
{0pt}
{ \global\let\qedsymbol\simpleqedsymbol
- {\thmname{#1}\nobreakspace\thmnumber{#2}}\hspace{.4em}
+ {\thmname{#1}\thmnumber{\nobreakspace #2}}\hspace{.4em}
\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\hspace{.4em}
- \color{main-text!50!paper}\thmnote{\ensuremath{(\text{#3})}\nobreakspace\nobreakspace}
+ \color{main-text!50!paper}\thmnote{$($#3$)$\nobreakspace\nobreakspace}
\pushQED{\qed}
}
}
@@ -811,12 +849,14 @@ heading_suffix "}\n"
}
}
+\PassOptionsToPackage { many } { tcolorbox }
+\RequirePackage { tcolorbox }
+\bool_if:NT \l__minimalist_fast_bool { \tcbstartdraftmode }
+
\bool_if:NF \l__minimalist_fast_bool
{
\bool_if:NT \l__minimalist_theorem_in_new_line_bool
{
- \PassOptionsToPackage { many } { tcolorbox }
- \RequirePackage { tcolorbox }
\cs_new_protected:Nn \minimclass_box_environment:n
{
\hook_gput_code:nnn { env/#1/before } { minimalist }
@@ -832,7 +872,7 @@ heading_suffix "}\n"
boxrule = 0pt, boxsep = 0pt,
before~skip = \parskip+\topsep+.25\baselineskip,
after~skip = \parskip+\topsep+.25\baselineskip,
- breakable, lines~before~break=3,
+ enforce~breakable, lines~before~break=3,
]
}
\hook_gput_code:nnn { env/#1/after } { minimalist }
@@ -849,6 +889,24 @@ heading_suffix "}\n"
}
}
+\NewDocumentEnvironment { emphasis } { }
+ {
+ \LocallyStopLineNumbers
+ \enlargethispage{2mm}
+ \begin{tcolorbox}
+ [
+ enhanced ~ jigsaw, enforce~breakable, oversize,
+ % nobeforeafter,
+ left = .5em, right=0mm, top=0.5mm, bottom=0mm, boxrule=0pt,
+ colback=main-text!2!paper, frame ~ hidden,
+ borderline ~ west = {.3em} {0mm} {main-text!25!paper}, arc = 0.2mm,
+ ]
+ }
+ {
+ \end{tcolorbox}
+ \ResumeLineNumbers
+ }
+
%%================================
%% Title block style