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.sty126
1 files changed, 82 insertions, 44 deletions
diff --git a/macros/latex/contrib/minimalist/minimalist-classical.sty b/macros/latex/contrib/minimalist/minimalist-classical.sty
index 11b9b94ad3..8da62f16f6 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/03/28} {}
+ {2022/04/03} {}
{The classical style of minimalist}
\@ifpackageloaded { minimalist } {}
@@ -249,24 +249,6 @@
}
%%================================
-%% Line numbers
-%%================================
-\PassOptionsToPackage { pagewise,mathlines } { lineno }
-\RequirePackage { linenoamsmath }
-\renewcommand{\linenumberfont}{\ttfamily\color{main-text!7!paper}\footnotesize}
-\setlength{\linenumbersep}{1em}
-
-\newif\ifLNturnsON
-\def\LocallyStopLineNumbers{\LNturnsONfalse
- \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers}
-\def\ResumeLineNumbers{\ifLNturnsON\linenumbers\fi}
-
-\hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist } { \LocallyStopLineNumbers }
-\hook_gput_code:nnn { cmd/tableofcontents/after } { minimalist } { \ResumeLineNumbers }
-\hook_gput_code:nnn { env/bibliography/before } { minimalist } { \LocallyStopLineNumbers }
-\hook_gput_code:nnn { env/bibliography/after } { minimalist } { \ResumeLineNumbers }
-
-%%================================
%% Title format
%%================================
\RequirePackage [ explicit, newparttoc ] { titlesec }
@@ -274,7 +256,7 @@
\RequirePackage { ulem }
\cs_generate_variant:Nn \seq_set_split:Nnn { Nnx }
-\cs_new:Nn \minimalist_apply_title_numbering_style:N
+\cs_new:Nn \minimalist_apply_title_numbering_style:n
{
#1
}
@@ -459,7 +441,7 @@
\titlecontents{part}
[0em]
{\addvspace{1.5pc}\filcenter\normalfont}
- { \minimalist_apply_title_numbering_style:N { \thecontentslabel } \nopagebreak\\\nopagebreak\uppercase}
+ { \minimalist_apply_title_numbering_style:n { \thecontentslabel } \nopagebreak\\\nopagebreak\uppercase}
{}
{} % without page number
[\addvspace{.5pc}]
@@ -469,25 +451,25 @@
\titlecontents{chapter}
[2em] % i.e., 0em (part) + 2em
{\addvspace{.5pc}\normalfont}
- {\contentslabel[ \minimalist_apply_title_numbering_style:N { \thecontentslabel } ]{2em}}
+ {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{2em}}
{\hspace*{-2em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
\titlecontents{section}
[4em] % i.e., 2em (chapter) + 2em
{\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}}
+ {\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}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
\titlecontents{subsection}
[7em] % i.e., 4em (section) + 3em
{\normalfont}
- {\contentslabel[ \minimalist_apply_title_numbering_style:N { \thecontentslabel } ]{2.75em}}
+ {\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
{\normalfont}
- {\contentslabel[ \minimalist_apply_title_numbering_style:N { \thecontentslabel } ]{3.25em}}
+ {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{3.25em}}
{\hspace*{-3.25em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
}
@@ -495,19 +477,19 @@
\titlecontents{section}
[2em] % i.e., 0em (part) + 2em
{\normalfont}
- {\contentslabel[ \minimalist_apply_title_numbering_style:N { \thecontentslabel } ]{1.75em}}
+ {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{1.75em}}
{\hspace*{-1.75em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
\titlecontents{subsection}
[4.5em] % i.e., 2em (section) + 2.5em
{\normalfont}
- {\contentslabel[ \minimalist_apply_title_numbering_style:N { \thecontentslabel } ]{2.25em}}
+ {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{2.25em}}
{\hspace*{-2.25em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
\titlecontents{subsubsection}
[7.5em] % i.e., 4.5em (subsection) + 3em
{\normalfont}
- {\contentslabel[ \minimalist_apply_title_numbering_style:N { \thecontentslabel } ]{2.75em}}
+ {\contentslabel[ \minimalist_apply_title_numbering_style:n { \thecontentslabel } ]{2.75em}}
{\hspace*{-2.75em}}
{\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
}
@@ -549,8 +531,8 @@
, PT = Esta~página~foi~intencionalmente~deixada~em~branco
, BR = Esta~página~foi~intencionalmente~deixada~em~branco
, ES = Esta~página~se~ha~dejado~intencionadamente~en~blanco
- , CN = 此页为有意留为空白
- , TC = 此頁為有意留為空白
+ , CN = \ziju{0.2} 此页为有意留为空白
+ , TC = \ziju{0.2} 此頁為有意留為空白
, JP = このページは意図的に空白にしてあります
, RU = Эта~страница~намеренно~оставлена~пустой
}
@@ -562,12 +544,73 @@
\hook_gput_next_code:nn { shipout/background }
{
\put(0.5\paperwidth,-0.5\paperheight){
- \makebox[0pt]{\large\color{main-text!10!paper}\bl@nkpagetext}}
+ \makebox[0pt]{\large\color{main-text!10!paper}\g_minimalist_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}
+ {
+ \nobreakspace\nobreakspace
+ \titlerule*[.67em]{\textcolor{main-text!15!paper}{.}}
+ \nobreakspace\nobreakspace
+ }
+\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 } }
+ \centerline{ \g_minimalist_title_font_common_tl \minimalist_apply_title_numbering_style:n { \l_tmpa_tl } }
+ \nopagebreak
+ \par
+ \vspace{.3\baselineskip}
+ }
+\renewcommand*{\indexspace}
+ {
+ \par
+ \vspace{2pc~plus~.5pc~minus~.3pc}
+ }
+
+\hook_gput_code:nnn { begindocument/before } { minimalist }
+ {
+ \hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \LocallyStopLineNumbers }
+ \hook_gput_code:nnn { cmd/printindex/after } { minimalist } { \ResumeLineNumbers }
+ }
+
+%%================================
%% Draft mark
%%================================
\RequirePackage { projlib-draft }
@@ -621,12 +664,15 @@
{
\providecommand{\phantomsection}{}
\RequirePackage { url }
- \newcommand{\href}[2]{#2}
+ \providecommand{\href}[2]{#2}
+ \providecommand{\texorpdfstring}[2]{#1}
}
{
- \PassOptionsToPackage { hidelinks,linktoc=all } { hyperref }
- \RequirePackage { bookmark }
\RequirePackage { hyperref }
+ \RequirePackage { bookmark }
+ \hypersetup{ hidelinks, linktoc = all }
+ \bookmarksetup{ numbered }
+ \renewcommand\Hy@numberline[1]{#1.~}
}
\RequirePackage { projlib-theorem }
@@ -784,8 +830,8 @@
top = 0pt, bottom = 0pt,
left = 0pt, right = 0pt,
boxrule = 0pt, boxsep = 0pt,
- before~skip = 1em+\parskip,
- after~skip = 1.2em+\parskip,
+ before~skip = \parskip+\topsep+.25\baselineskip,
+ after~skip = \parskip+\topsep+.25\baselineskip,
breakable, lines~before~break=3,
]
}
@@ -803,14 +849,6 @@
}
}
-%%================================
-%% Index
-%%================================
-\hook_gput_code:nnn { begindocument/before } { minimalist }
- {
- \hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \LocallyStopLineNumbers }
- \hook_gput_code:nnn { cmd/printindex/after } { minimalist } { \ResumeLineNumbers }
- }
%%================================
%% Title block style