From a892f739b50b6ddc5321c834017cdcbc42a3f056 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 18 Mar 2022 03:01:39 +0000 Subject: CTAN sync 202203180301 --- macros/latex/contrib/minimalist/README.md | 8 +- .../contrib/minimalist/minimalist-classical.sty | 841 ++++++++++++++++++ .../latex/contrib/minimalist/minimalist-plain.sty | 786 +++++++++++++++++ macros/latex/contrib/minimalist/minimalist.sty | 972 ++------------------- macros/latex/contrib/minimalist/minimart.cls | 371 ++++---- macros/latex/contrib/minimalist/minimbook.cls | 371 ++++---- 6 files changed, 2026 insertions(+), 1323 deletions(-) create mode 100644 macros/latex/contrib/minimalist/minimalist-classical.sty create mode 100644 macros/latex/contrib/minimalist/minimalist-plain.sty (limited to 'macros/latex/contrib/minimalist') diff --git a/macros/latex/contrib/minimalist/README.md b/macros/latex/contrib/minimalist/README.md index 41144c5769..f22ee11664 100644 --- a/macros/latex/contrib/minimalist/README.md +++ b/macros/latex/contrib/minimalist/README.md @@ -1,14 +1,18 @@ - + # `minimalist` bundle: write you documents in a simple and clear way +**The whole series have been rewritten with `expl3`. Please note that the documentations are not yet up-to-date. The syntax of some commands have been changed since the last version, especially the declaration of theorem-like environments by `\CreateTheorem`. For the moment, you can refer to the documentation of the package `create-theorem`.** + ## Introduction `minimalist` is a collection of styles and classes that helps you typesetting articles and books with a simple and clear design. It mainly consists of two parts. - Main part: - - `minimalist.sty` : the main style + - `minimalist.sty` : interface of the main style + - `minimalist-plain.sty` : the plain style + - `minimalist-classical.sty` : the classical style - `minimart.cls` : class for typesetting articles - `minimbook.cls` : class for typesetting books diff --git a/macros/latex/contrib/minimalist/minimalist-classical.sty b/macros/latex/contrib/minimalist/minimalist-classical.sty new file mode 100644 index 0000000000..0e366919ba --- /dev/null +++ b/macros/latex/contrib/minimalist/minimalist-classical.sty @@ -0,0 +1,841 @@ +%% +%% This is file `minimalist/minimalist-classical.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the minimalist class series. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% +\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\RequirePackage{l3keys2e} +\ProvidesExplPackage + {minimalist-classical} + {2022/03/17} {} + {The classical style of minimalist} + +\@ifpackageloaded { minimalist } {} + { + \msg_new:nnn { \@currname } + { minimalist-not-loaded } + { "#1"~is~an~internal~style~of~"minimalist".~To~use~it,~you~must~load~the~package~"minimalist"~first. } + \msg_warning:nnx { \@currname } { minimalist-not-loaded } { \@currname } + \endinput + } + +%%================================ +%% Title fonts +%%================================ +\RequirePackage { anyfontsize } + +\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: {} + } + +\tl_new:N \g_minimalist_title_font_common_tl + +\tl_new:N \g_minimalist_title_font_part_tl +\tl_new:N \g_minimalist_title_font_chapter_tl +\tl_new:N \g_minimalist_title_font_section_tl +\tl_new:N \g_minimalist_title_font_subsection_tl +\tl_new:N \g_minimalist_title_font_subsubsection_tl +\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_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 } +\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries: \scshape } + +\bool_if:NF \l__minimalist_fast_bool + { + \RequirePackage { tikz } + \ExplSyntaxOff + \usetikzlibrary{calc,shadings} + \ExplSyntaxOn + \RequirePackage { tikzpagenodes } % For `current page text area` + } + +\bool_if:NTF \l__minimalist_fast_bool + { + \tl_const:Nn \l_minimalist_sep_bar { $|$ } + } + { + \tl_const:Nn \l_minimalist_sep_bar + { + \skip_horizontal:n { .1em } + \tikz[baseline=.125em] \draw[line~width=.9pt] (0,0) -- (0,.9em); + \skip_horizontal:n { .1em } + } + } + +%%================================ +%% Footer +%%================================ +\RequirePackage { geometry } +\RequirePackage { fancyhdr } +\RequirePackage { extramarks } + +\hook_gput_code:nnn { begindocument/before } { minimalist } + { + \fancyhfoffset { 0pt } + } + +\tl_new:N \l_minimalist_leftmark_tl +\tl_new:N \l_minimalist_rightmark_tl + +\tl_set:Nn \l_minimalist_leftmark_tl + { + \begin{minipage}[t]{.833\textwidth} + \lastleftmark + \end{minipage} + } +\tl_set:Nn \l_minimalist_rightmark_tl + { + \begin{minipage}[t]{.833\textwidth} + \filleft + \lastrightmark + \end{minipage} + } + +\fancypagestyle { fancy } + { + \fancyhf{} + \if@twoside + \fancyfoot[RO]{\small\textcolor{main-text!30!paper}{ \l_minimalist_rightmark_tl } + \nobreakspace\nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}} + \fancyfoot[LE]{\small\leavevmode\llap{\thepage + \nobreakspace\nobreakspace\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }} + \nobreakspace\nobreakspace\textcolor{main-text!30!paper}{ \l_minimalist_leftmark_tl }} + \else + \fancyfoot[R]{\small\textcolor{main-text!30!paper}{ \l_minimalist_rightmark_tl } + \nobreakspace\nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}} + \fi + \renewcommand{\headrulewidth}{0pt} + } +\pagestyle{fancy} + +\fancypagestyle { plain } + { + \fancyhf{} + \if@twoside + \fancyfoot[RO]{\small + \nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}} + \fancyfoot[LE]{\small\leavevmode\llap{\thepage + \nobreakspace\nobreakspace\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }}} + \else + \fancyfoot[R]{\small + \nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}} + \fi + \renewcommand{\headrulewidth}{0pt} + } + +\bool_if:NTF \l__minimalist_is_book_bool + { + \bool_if:NTF \l__minimalist_fast_bool + { + \newcommand{ \minimalist_draw_help_line: }{} + } + { + \newcommand{ \minimalist_draw_help_line: }{ + \begin{tikzpicture}[remember~picture,overlay] + \foreach\i in {0,1,...,5}{ + \fill[opacity=0.12-0.02*\i] + ($(current~page~text~area.north~east) + +(-\i*0.5em-.025em,-10pt+\i*1.1pt)$) + rectangle ($(current~page~text~area.south~east) + +(-\i*0.5em+.025em,10pt-\i*1.1pt)$); + \shade[top~color=paper,bottom~color=main-text,opacity=0.12-0.02*\i] + ($(current~page~text~area.north~east) + +(-\i*0.5em-.025em,2pt)$) + rectangle ($(current~page~text~area.north~east) + +(-\i*0.5em+.025em,-10pt+\i*1.1pt)$); + \shade[top~color=main-text,bottom~color=paper,opacity=0.12-0.02*\i] + ($(current~page~text~area.south~east) + +(-\i*0.5em-.025em,-2pt)$) + rectangle ($(current~page~text~area.south~east) + +(-\i*0.5em+.025em,10pt-\i*1.1pt)$); + } + \end{tikzpicture} + } + } + \fancypagestyle{part}{ + \fancyhf{} + \renewcommand{\headrulewidth}{0pt} + \fancyhead[C]{ \minimalist_draw_help_line: } + } + \addtolength{\headheight}{20pt} + \addtolength{\topmargin}{-20pt} + \if@twoside + \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}} + \else + \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}} + \fi + \renewcommand*{\sectionmark}[1]{ + \markright{\g_minimalist_section_decoration_char_tl\nobreakspace\arabic{section}\nobreakspace\g_minimalist_section_decoration_char_tl\nobreakspace\nobreakspace\nobreakspace#1}} + } + { + \if@twoside + \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{}} + \else + \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}} + \fi + } + +%%================================ +%% 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 } +\PassOptionsToPackage { normalem } { ulem } +\RequirePackage { ulem } + +\cs_generate_variant:Nn \seq_set_split:Nnn { Nnx } +\cs_new:Nn \minimalist_apply_title_numbering_style:N + { + #1 + } + +\newcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}} + +\AddLanguageSetting + { + \renewcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}} + } +\AddLanguageSetting [ schinese ] + { + \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分} + } +\AddLanguageSetting [ tchinese ] + { + \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分} + } +\AddLanguageSetting [ japanese ] + { + \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部} + } + +\bool_if:NTF \l__minimalist_is_book_bool + { + \setcounter{secnumdepth}{3} + + %% Part + \titleclass{\part}{top} % make part like a chapter + \titleformat{\part}[display] + {\thispagestyle{part} + \LocallyStopLineNumbers + \g_minimalist_title_font_part_tl\filleft} + {\partstring} + {1em} + {\fontsize{20}{0}\selectfont\MakeUppercase{#1}} + [\ResumeLineNumbers] + \titleformat{name=\part,numberless}[display] + {\thispagestyle{part} + \LocallyStopLineNumbers + % \phantomsection\addcontentsline{toc}{part}{#1} + \g_minimalist_title_font_part_tl\filleft} + {\phantom{\MakeUppercase{\partname}}} + {1em} + {\fontsize{20}{0}\selectfont\MakeUppercase{#1}} + [\ResumeLineNumbers] + \titlespacing*{\part}{0pt}{5em}{6em} + %% Text after part + \newcommand{\parttext}[1]{ + \vfill + \LocallyStopLineNumbers + \begin{flushright} + \begin{minipage}{0.833\textwidth} + \color{main-text!80!paper}\raggedleft#1 + \end{minipage} + \end{flushright} + \ResumeLineNumbers + \vfill\vfill + \cleardoublepage + } + + %% Chapter + \titleformat{\chapter} + {\thispagestyle{fancy} + \LocallyStopLineNumbers + \color{main-text!80!paper}\g_minimalist_title_font_chapter_tl\fontsize{16}{0}\selectfont}{}{0em} + {\rlap{\hspace*{-.5em}{\color{main-text!12!paper} + \fontsize{80}{0}\selectfont\raisebox{-7pt}{\thechapter}}}#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} + {\rlap{\hspace*{-.5em}{\color{main-text!12!paper} + \fontsize{80}{0}\selectfont\normalfont\raisebox{-7pt}{*}}}#1} + [\ResumeLineNumbers] + } + { + %% Part + \titleformat{\part}[display] + {\LocallyStopLineNumbers + \g_minimalist_title_font_part_tl\filleft} + {\partstring} + {.3em} + {\fontsize{16}{0}\selectfont\MakeUppercase{#1}} + [\ResumeLineNumbers] + \titleformat{name=\part,numberless}[display] + {\LocallyStopLineNumbers + % \phantomsection\addcontentsline{toc}{part}{#1} + \g_minimalist_title_font_part_tl\filleft} + {\phantom{\MakeUppercase{\partname}}} + {.3em} + {\fontsize{16}{0}\selectfont\MakeUppercase{#1}} + [\ResumeLineNumbers] + %% Text after part + \newcommand{\parttext}[1]{ + \LocallyStopLineNumbers + \begin{flushright} + \begin{minipage}{0.833\textwidth} + \color{main-text!80!paper}\raggedleft#1 + \end{minipage} + \end{flushright} + \ResumeLineNumbers + } + } + +%% Section +\renewcommand\thesection{\arabic{section}} +\newcommand\seculine{\bgroup\markoverwith{\color{main-text!27!paper} + \rule[-0.9ex]{2pt}{.6pt}\hspace{-2pt}\rule[-1.2ex]{2pt}{.6pt}}\ULon} +\bool_if:NTF \l__minimalist_fast_bool + { + \tl_gset:Nn \g_minimalist_section_decoration_char_tl { \raisebox{.03em}{\normalfont/} } + } + { + \tl_gset:Nn \g_minimalist_section_decoration_char_tl + { + \tikz[baseline=.125em] \draw[line~width=.9pt] (-.12em,0) -- (.12em,.9em); + } + } +\titleformat{\section} + {\LocallyStopLineNumbers + \g_minimalist_title_font_section_tl\centering}{}{0em} + {{\small\textcolor{main-text!27!paper}{\footnotesize \g_minimalist_section_decoration_char_tl } + \,\,\textcolor{main-text!90!paper}{\minimalist_bfseries:\arabic{section}} + \,\,\textcolor{main-text!27!paper}{\footnotesize \g_minimalist_section_decoration_char_tl }}\\ + \seculine{#1}} + [\ResumeLineNumbers] +\titleformat{name=\section,numberless} + {\LocallyStopLineNumbers + % \phantomsection\addcontentsline{toc}{section}{#1} + \g_minimalist_title_font_section_tl\centering}{}{0em} + {\seculine{#1}} + [\ResumeLineNumbers] + +%% Subsection +\renewcommand\thesubsection{ + \ifnum\c@section=0\else\arabic{section}.\fi\arabic{subsection}} +\newcommand\subseculine{\bgroup\markoverwith{\color{main-text!27!paper} + \rule[-1ex]{2pt}{.75pt}}\ULon} +\titleformat{\subsection} + {\LocallyStopLineNumbers + \g_minimalist_title_font_subsection_tl}{}{0em} + {\subseculine{\thesubsection\nobreakspace\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace #1}} + [\ResumeLineNumbers] +\titleformat{name=\subsection,numberless} + {\LocallyStopLineNumbers + \g_minimalist_title_font_subsection_tl}{}{0em} + {\subseculine{#1}} + [\ResumeLineNumbers] + +%% Subsubsection +\bool_if:NTF \l__minimalist_runin_bool + { + \titleformat{\subsubsection}[runin] + {\color{main-text!70!paper}\g_minimalist_title_font_subsubsection_tl} + {\scalebox{0.9}{\thesubsubsection}}{.33em} + {#1.}[\hspace*{.3em}] + } + { + \titleformat{\subsubsection} + {\LocallyStopLineNumbers + \color{main-text!70!paper}\g_minimalist_title_font_subsubsection_tl} + {\scalebox{0.9}{\thesubsubsection}}{.33em} + {#1} + [\ResumeLineNumbers] + } + +%% Paragraph +\titleformat{\paragraph}[runin] + { \g_minimalist_title_font_paragraph_tl }{\theparagraph}{1em}{#1} + +\titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip} +\titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip} +\titlespacing{\subsubsection}{0pt}{.5\baselineskip}{.3\baselineskip} + +%%================================ +%% ToC format +%%================================ +\RequirePackage { titletoc } +\titlecontents{part} + [0em] + {\addvspace{1.5pc}\filcenter\normalfont} + {\thecontentslabel\nopagebreak\\\nopagebreak\uppercase} + {} + {} % without page number + [\addvspace{.5pc}] + +\bool_if:NTF \l__minimalist_is_book_bool + { + \titlecontents{chapter} + [2em] % i.e., 0em (part) + 2em + {\addvspace{.5pc}\normalfont} + {\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}} + {\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}} + {\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}} + {\hspace*{-3.25em}} + {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage} + } + { + \titlecontents{section} + [2em] % i.e., 0em (part) + 2em + {\normalfont} + {\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}} + {\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}} + {\hspace*{-2.75em}} + {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage} + } + +%%================================ +%% Lists +%%================================ +\RequirePackage { enumitem } +\setlist{noitemsep} +\setlist[enumerate]{labelsep=*, leftmargin=*} +\setlist[enumerate,1]{label=\arabic*$)$, + ref = \arabic*$)$} +\setlist[enumerate,2]{label=\emph{\roman*}$)$, + ref = \arabic{enumi}.\emph{\roman*}$)$} +\setlist[enumerate,3]{label=\emph{\alph*}$)$, + ref = \arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$)$} +\setlist[description]{font=\normalfont\minimalist_bfseries:} +\newcommand\desculine{\colorlet{currentcolor}{.}\bgroup\markoverwith{\color{currentcolor!55!paper} + \rule[-.45ex]{2pt}{.75pt}}\ULon} +\renewcommand{\descriptionlabel}[1]{ + \hspace{\labelsep}\normalfont\desculine{#1} +} + +\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}{---}} } +\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{--}} +\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\texttt{*}}} + +%%================================ +%% Blank page +%%================================ +\newcommand{\blinkpagetext}{This~page~is~intentionally~left~blank} +\renewcommand{\cleardoublepage}{ + \relax + \clearpage + \if@twoside\ifodd\c@page\relax\else + \thispagestyle{empty} + \hook_gput_next_code:nn { shipout/background } + { + \put(0.5\paperwidth,-0.5\paperheight){ + \makebox[0pt]{\large\color{main-text!10!paper}\blinkpagetext}} + } + \null\newpage\fi\fi +} + +%%================================ +%% Draft mark +%%================================ +\RequirePackage { projlib-draft } + +%%================================ +%% Theorems +%%================================ +\RequirePackage { mathtools } +\RequirePackage { amsthm } + +\def\simpleqedsymbol{ + \makebox[1em]{\rlap{\textcolor{main-text!12!paper}{\rule[-0.1em]{.95em}{.95em}}}{\kern.07em\raisebox{.07em}{\textcolor{paper}{\rule[-0.1em]{.81em}{.81em}}}\kern.07em}}} +\bool_if:NTF \l__minimalist_theorem_in_new_line_bool + { + \newtheoremstyle{simple} + {.5\baselineskip}{.5\baselineskip} + {\normalfont}{} + {\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})}} + \smallskip + \pushQED{\qed} + } + } + { + \newtheoremstyle{simple} + {.5\baselineskip}{.5\baselineskip} + {\normalfont}{} + {\normalfont}{} + {0pt} + { \global\let\qedsymbol\simpleqedsymbol + {\thmname{#1}\nobreakspace\thmnumber{#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} + \pushQED{\qed} + } + } +\def\@endtheorem{\global\let\qedsymbol\simpleqedsymbol + \popQED\endtrivlist\@endpefalse + \global\let\qedsymbol\qedsymbolOriginal} + +\theoremstyle{simple} + +\renewcommand{\qedsymbol}{ + \makebox[1em]{\color{main-text!27!paper}\rule[-0.1em]{.95em}{.95em}}} +\let\qedsymbolOriginal\qedsymbol + +\bool_if:NTF \l__minimalist_fast_bool + { + \providecommand{\phantomsection}{} + \RequirePackage { url } + \newcommand{\href}[2]{#2} + } + { + \PassOptionsToPackage { hidelinks,linktoc=all } { hyperref } + \RequirePackage { bookmark } + \RequirePackage { hyperref } + } + +\RequirePackage { projlib-theorem } + +\bool_if:NF \l__projlib_theorem_complexname_bool + { + \exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist } + { + name style = { + , heading style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , crefname style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , Crefname style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , numbering style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + } + } + + \SetTheorem { remark } + { + name style = { + , heading style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , crefname style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , crefname style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , numbering style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + } + } + } + +\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 } + { + \LocallyStopLineNumbers + \begin { tcolorbox } + [ + enhanced~jigsaw, + frame~hidden, + interior~hidden, + top = 0pt, bottom = 0pt, + left = 0pt, right = 0pt, + boxrule = 0pt, boxsep = 0pt, + before~skip = 1em+\parskip, + after~skip = 1.2em+\parskip, + breakable, lines~before~break=3, + ] + } + \hook_gput_code:nnn { env/#1/after } { minimalist } + { + \end { tcolorbox } + \ResumeLineNumbers + } + } + \exp_args:No \clist_map_inline:nn { \c_projlib_theorem_supported_clist } + { + \minimclass_box_environment:n { #1 } + \minimclass_box_environment:n { #1 * } + } + } + } + +%%================================ +%% 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 } +} + +\bool_if:NF \l__minimalist_is_book_bool { + +%%================================ +%% Title block style +%%================================ +\renewcommand{\@maketitle}{ + \LocallyStopLineNumbers + \noindent + {\textcolor{main-text!27!paper}{\rule{\textwidth}{0.75pt}}} + % \vspace{-\parskip} + \vspace{-.5\baselineskip} + \begin{flushright} + \let\footnote\thanks + {\minimalist_bfseries:\@title}\\\medskip + \color{main-text!80!paper} + {\small\scshape\@author} + \par\vspace{-\parskip}\vspace{2pt} + {\small\@date} + \end{flushright} + % \vspace{-\parskip} + \vspace{-.5\baselineskip} + \ifx\@date\@empty + \vspace{\baselineskip} + \vspace{1.2\parskip} + \else + \vspace{-.5\baselineskip} + \fi + {\textcolor{main-text!27!paper}{\rule{\textwidth}{0.75pt}}\par} + \ResumeLineNumbers +} + +\hook_gput_code:nnn { cmd/maketitle/after } { minimalist } { \thispagestyle{fancy} } + +%%================================ +%% Abstract style +%%================================ +\renewenvironment{abstract} + { + \LocallyStopLineNumbers + \begin{flushright} + { \g_minimalist_title_font_section_tl \scshape \small\abstractname}\par + \vspace{-\parskip} + \vspace{-.25\baselineskip} + \begin{minipage}[t]{.833\textwidth} + \vspace{0pt} + \color{main-text!80!paper} + \footnotesize + \parindent=2em + } + { + \end{minipage} + \end{flushright} + \bigskip + \ResumeLineNumbers + } + +%%================================ +%% Keyword environment +%%================================ +\DefineMultilingualText { \keywordname } + { + EN = Keywords , + FR = Mots~clés , + DE = Schlüsselwörter , + IT = Parole~chiave , + PT = Palavras~chave , + BR = Palavras~chave , + ES = Palabras~clave , + CN = 关键词 , + TC = 關鍵詞 , + JP = キーワード , + RU = Ключевые~слова , + } + +\newenvironment{keyword}{ + \LocallyStopLineNumbers + \vspace{-.5\baselineskip} + \begin{flushright} + {\minimalist_bfseries:\scshape\small\keywordname}\par + \vspace{-\parskip} + \vspace{-.30\baselineskip} + \begin{minipage}[t]{.833\textwidth} + \vspace{0pt} + \color{main-text!80!paper} + \footnotesize + \parindent=2em + \raggedleft +}{ + \end{minipage} + \end{flushright} + \bigskip + \ResumeLineNumbers +} + +%%================================ +%% Simulate features of amsart +%%================================ +\PassOptionsToPackage { amsfashion } { projlib-author } +\RequirePackage { projlib-author } + +} + +\endinput +%% +%% End of file `minimalist/minimalist-classical.sty'. diff --git a/macros/latex/contrib/minimalist/minimalist-plain.sty b/macros/latex/contrib/minimalist/minimalist-plain.sty new file mode 100644 index 0000000000..2bc3cd69b0 --- /dev/null +++ b/macros/latex/contrib/minimalist/minimalist-plain.sty @@ -0,0 +1,786 @@ +%% +%% This is file `minimalist/minimalist-plain.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the minimalist class series. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% +\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\RequirePackage{l3keys2e} +\ProvidesExplPackage + {minimalist-plain} + {2022/03/17} {} + {The plain style of minimalist} + +\@ifpackageloaded { minimalist } {} + { + \msg_new:nnn { \@currname } + { minimalist-not-loaded } + { "#1"~is~an~internal~style~of~"minimalist".~To~use~it,~you~must~load~the~package~"minimalist"~first. } + \msg_warning:nnx { \@currname } { minimalist-not-loaded } { \@currname } + \endinput + } + +%%================================ +%% Title fonts +%%================================ +\RequirePackage { anyfontsize } + +\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: {} + } + +\tl_new:N \g_minimalist_title_font_common_tl + +\tl_new:N \g_minimalist_title_font_part_tl +\tl_new:N \g_minimalist_title_font_chapter_tl +\tl_new:N \g_minimalist_title_font_section_tl +\tl_new:N \g_minimalist_title_font_subsection_tl +\tl_new:N \g_minimalist_title_font_subsubsection_tl +\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_section_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \scshape } +\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \scshape } +\tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl } +\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \scshape } + +\bool_if:NF \l__minimalist_fast_bool + { + \RequirePackage { tikz } + \ExplSyntaxOff + \usetikzlibrary{calc,shadings} + \ExplSyntaxOn + \RequirePackage { tikzpagenodes } % For `current page text area` + } + +\bool_if:NTF \l__minimalist_fast_bool + { + \tl_const:Nn \l_minimalist_sep_bar { $|$ } + } + { + \tl_const:Nn \l_minimalist_sep_bar + { + \skip_horizontal:n { .1em } + \tikz[baseline=.125em] \draw[line~width=.9pt] (0,0) -- (0,.9em); + \skip_horizontal:n { .1em } + } + } + +%%================================ +%% Footer +%%================================ +\RequirePackage { geometry } +\RequirePackage { fancyhdr } +\RequirePackage { extramarks } + +\hook_gput_code:nnn { begindocument/before } { minimalist } + { + \fancyhfoffset { 0pt } + } + +\tl_new:N \l_minimalist_leftmark_tl +\tl_new:N \l_minimalist_rightmark_tl + +\tl_set:Nn \l_minimalist_leftmark_tl + { + \begin{minipage}[t]{.833\textwidth} + \lastleftmark + \end{minipage} + } +\tl_set:Nn \l_minimalist_rightmark_tl + { + \begin{minipage}[t]{.833\textwidth} + \filleft + \lastrightmark + \end{minipage} + } + +\fancypagestyle { fancy } + { + \fancyhf{} + \if@twoside + \fancyfoot[RO]{\small\textcolor{main-text!30!paper}{ \l_minimalist_rightmark_tl } + \nobreakspace\nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}} + \fancyfoot[LE]{\small\leavevmode\llap{\thepage + \nobreakspace\nobreakspace\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }} + \nobreakspace\nobreakspace\textcolor{main-text!30!paper}{ \l_minimalist_leftmark_tl }} + \else + \fancyfoot[R]{\small\textcolor{main-text!30!paper}{ \l_minimalist_rightmark_tl } + \nobreakspace\nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}} + \fi + \renewcommand{\headrulewidth}{0pt} + } +\pagestyle{fancy} + +\fancypagestyle { plain } + { + \fancyhf{} + \if@twoside + \fancyfoot[RO]{\small + \nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}} + \fancyfoot[LE]{\small\leavevmode\llap{\thepage + \nobreakspace\nobreakspace\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }}} + \else + \fancyfoot[R]{\small + \nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}} + \fi + \renewcommand{\headrulewidth}{0pt} + } + +\bool_if:NTF \l__minimalist_is_book_bool + { + \bool_if:NTF \l__minimalist_fast_bool + { + \newcommand{ \minimalist_draw_help_line: }{} + } + { + \newcommand{ \minimalist_draw_help_line: }{ + \begin{tikzpicture}[remember~picture,overlay] + \foreach\i in {0,1,...,5}{ + \fill[opacity=0.12-0.02*\i] + ($(current~page~text~area.north~east) + +(-\i*0.5em-.025em,-10pt+\i*1.1pt)$) + rectangle ($(current~page~text~area.south~east) + +(-\i*0.5em+.025em,10pt-\i*1.1pt)$); + \shade[top~color=paper,bottom~color=main-text,opacity=0.12-0.02*\i] + ($(current~page~text~area.north~east) + +(-\i*0.5em-.025em,2pt)$) + rectangle ($(current~page~text~area.north~east) + +(-\i*0.5em+.025em,-10pt+\i*1.1pt)$); + \shade[top~color=main-text,bottom~color=paper,opacity=0.12-0.02*\i] + ($(current~page~text~area.south~east) + +(-\i*0.5em-.025em,-2pt)$) + rectangle ($(current~page~text~area.south~east) + +(-\i*0.5em+.025em,10pt-\i*1.1pt)$); + } + \end{tikzpicture} + } + } + \fancypagestyle{part}{ + \fancyhf{} + \renewcommand{\headrulewidth}{0pt} + \fancyhead[C]{ \minimalist_draw_help_line: } + } + \addtolength{\headheight}{20pt} + \addtolength{\topmargin}{-20pt} + \if@twoside + \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}} + \else + \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}} + \fi + \renewcommand*{\sectionmark}[1]{ + \markright{\g_minimalist_section_decoration_char_tl\nobreakspace\arabic{section}\nobreakspace\g_minimalist_section_decoration_char_tl\nobreakspace\nobreakspace\nobreakspace#1}} + } + { + \if@twoside + \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{}} + \else + \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}} + \fi + } + +%%================================ +%% 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 } +\PassOptionsToPackage { normalem } { ulem } +\RequirePackage { ulem } + +\cs_generate_variant:Nn \seq_set_split:Nnn { Nnx } +\cs_new:Nn \minimalist_apply_title_numbering_style:N + { + \seq_set_split:Nnx \l_tmpa_seq { . } { #1 } + \seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq { \usefont{U}{zeur}{b}{n} ##1 } + \textcolor{main-text!39!paper}{ \seq_use:Nn \l_tmpb_seq { $.$ } } + } + +\newcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}} + +\AddLanguageSetting + { + \renewcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}} + } +\AddLanguageSetting [ schinese ] + { + \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分} + } +\AddLanguageSetting [ tchinese ] + { + \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分} + } +\AddLanguageSetting [ japanese ] + { + \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部} + } + +\bool_if:NTF \l__minimalist_is_book_bool + { + \setcounter{secnumdepth}{3} + + %% Part + \titleclass{\part}{top} % make part like a chapter + \titleformat{\part}[display] + {\thispagestyle{part} + \LocallyStopLineNumbers + \g_minimalist_title_font_part_tl\filleft} + {\partstring} + {1em} + {\fontsize{20}{0}\selectfont\MakeUppercase{#1}} + [\ResumeLineNumbers] + \titleformat{name=\part,numberless}[display] + {\thispagestyle{part} + \LocallyStopLineNumbers + % \phantomsection\addcontentsline{toc}{part}{#1} + \g_minimalist_title_font_part_tl\filleft} + {\phantom{\MakeUppercase{\partname}}} + {1em} + {\fontsize{20}{0}\selectfont\MakeUppercase{#1}} + [\ResumeLineNumbers] + \titlespacing*{\part}{0pt}{5em}{6em} + %% Text after part + \newcommand{\parttext}[1]{ + \vfill + \LocallyStopLineNumbers + \begin{flushright} + \begin{minipage}{0.833\textwidth} + \color{main-text!80!paper}\raggedleft#1 + \end{minipage} + \end{flushright} + \ResumeLineNumbers + \vfill\vfill + \cleardoublepage + } + + %% Chapter + \titleformat{\chapter} + {\thispagestyle{fancy} + \LocallyStopLineNumbers + \color{main-text!80!paper}\g_minimalist_title_font_chapter_tl\fontsize{16}{0}\selectfont}{}{0em} + {\rlap{\hspace*{-.5em}{\color{main-text!12!paper} + \fontsize{80}{0}\selectfont\raisebox{-7pt}{\thechapter}}}#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} + {\rlap{\hspace*{-.5em}{\color{main-text!12!paper} + \fontsize{80}{0}\selectfont\normalfont\raisebox{-7pt}{*}}}#1} + [\ResumeLineNumbers] + } + { + %% Part + \titleformat{\part}[display] + {\LocallyStopLineNumbers + \g_minimalist_title_font_part_tl\filleft} + {\partstring} + {.3em} + {\fontsize{16}{0}\selectfont\MakeUppercase{#1}} + [\ResumeLineNumbers] + \titleformat{name=\part,numberless}[display] + {\LocallyStopLineNumbers + % \phantomsection\addcontentsline{toc}{part}{#1} + \g_minimalist_title_font_part_tl\filleft} + {\phantom{\MakeUppercase{\partname}}} + {.3em} + {\fontsize{16}{0}\selectfont\MakeUppercase{#1}} + [\ResumeLineNumbers] + %% Text after part + \newcommand{\parttext}[1]{ + \LocallyStopLineNumbers + \begin{flushright} + \begin{minipage}{0.833\textwidth} + \color{main-text!80!paper}\raggedleft#1 + \end{minipage} + \end{flushright} + \ResumeLineNumbers + } + } + +%% Section +\tl_gset:Nn \g_minimalist_section_decoration_char_tl {} +\titleformat{\section} + {\LocallyStopLineNumbers + \g_minimalist_title_font_section_tl\centering} + {\raisebox{-.02\baselineskip}{\large \minimalist_apply_title_numbering_style:N { \thesection } }}{1em} + {#1} + [\ResumeLineNumbers] + +%% Subsection +\titleformat{\subsection} + {\LocallyStopLineNumbers + \g_minimalist_title_font_subsection_tl} + { \minimalist_apply_title_numbering_style:N { \thesubsection } }{.75em} + {#1} + [\ResumeLineNumbers] + +%% Subsubsection +\bool_if:NTF \l__minimalist_runin_bool + { + \titleformat{\subsubsection}[runin] + {\g_minimalist_title_font_subsubsection_tl} + { \minimalist_apply_title_numbering_style:N { \thesection } }{.5em} + {#1.}[\hspace*{.3em}] + } + { + \titleformat{\subsubsection} + {\LocallyStopLineNumbers + \g_minimalist_title_font_subsubsection_tl} + { \minimalist_apply_title_numbering_style:N { \thesubsubsection } }{.5em} + {#1} + [\ResumeLineNumbers] + } + +%% Paragraph +\titleformat{\paragraph}[runin] + { \g_minimalist_title_font_paragraph_tl }{\theparagraph}{1em}{#1} + +\titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip} +\titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip} +\titlespacing{\subsubsection}{0pt}{.5\baselineskip}{.3\baselineskip} + +%%================================ +%% ToC format +%%================================ +\RequirePackage { titletoc } +\titlecontents{part} + [0em] + {\addvspace{1.5pc}\filcenter\normalfont} + {\thecontentslabel\nopagebreak\\\nopagebreak\uppercase} + {} + {} % without page number + [\addvspace{.5pc}] + +\bool_if:NTF \l__minimalist_is_book_bool + { + \titlecontents{chapter} + [2em] % i.e., 0em (part) + 2em + {\addvspace{.5pc}\normalfont} + {\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[ \minimalist_apply_title_numbering_style:N { \thecontentslabel } ]{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}} + {\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}} + {\hspace*{-3.25em}} + {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage} + } + { + \titlecontents{section} + [2em] % i.e., 0em (part) + 2em + {\normalfont} + {\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}} + {\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}} + {\hspace*{-2.75em}} + {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage} + } + +%%================================ +%% Lists +%%================================ +\RequirePackage { enumitem } +\setlist{noitemsep} +\setlist[enumerate]{labelsep=*, leftmargin=*} +\setlist[enumerate,1]{label=\arabic*$)$, + ref = \arabic*$)$} +\setlist[enumerate,2]{label=\emph{\roman*}$)$, + ref = \arabic{enumi}.\emph{\roman*}$)$} +\setlist[enumerate,3]{label=\emph{\alph*}$)$, + ref = \arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$)$} +\setlist[description]{font=\normalfont\minimalist_bfseries:} + +\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}{---}} } +\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{--}} +\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\texttt{*}}} + +%%================================ +%% Blank page +%%================================ +\newcommand{\blinkpagetext}{This~page~is~intentionally~left~blank} +\renewcommand{\cleardoublepage}{ + \relax + \clearpage + \if@twoside\ifodd\c@page\relax\else + \thispagestyle{empty} + \hook_gput_next_code:nn { shipout/background } + { + \put(0.5\paperwidth,-0.5\paperheight){ + \makebox[0pt]{\large\color{main-text!10!paper}\blinkpagetext}} + } + \null\newpage\fi\fi +} + +%%================================ +%% Draft mark +%%================================ +\RequirePackage { projlib-draft } + +%%================================ +%% Theorems +%%================================ +\RequirePackage { mathtools } +\RequirePackage { amsthm } + +\bool_if:NTF \l__minimalist_theorem_in_new_line_bool + { + \newtheoremstyle{simple} + {}{} + {\normalfont}{} + {\normalfont}{} + {\newline} + {{\thmname{#1}\nobreakspace\thmnumber{#2}} + {\color{main-text!50!paper}\thmnote{\hspace{.4em}\ensuremath{(\text{#3})}}}\smallskip} + } + { + \newtheoremstyle{simple} + {}{} + {\normalfont}{} + {\normalfont}{} + {0pt} + {{\thmname{#1}\nobreakspace\thmnumber{#2}} + {\color{main-text!50!paper}\thmnote{\hspace{.4em}\ensuremath{(\text{#3})}}}\nobreakspace\nobreakspace{\normalfont\textcolor{main-text!27!paper}{---}}\nobreakspace\nobreakspace} + } + +\theoremstyle{simple} + +\renewcommand{\qedsymbol}{ + \makebox[1em]{\color{main-text!27!paper}\rule[-0.1em]{.95em}{.95em}}} +\let\qedsymbolOriginal\qedsymbol + +\bool_if:NTF \l__minimalist_fast_bool + { + \providecommand{\phantomsection}{} + \RequirePackage { url } + \newcommand{\href}[2]{#2} + } + { + \PassOptionsToPackage { hidelinks,linktoc=all } { hyperref } + \RequirePackage { bookmark } + \RequirePackage { hyperref } + } + +\RequirePackage { projlib-theorem } + +\bool_if:NF \l__projlib_theorem_complexname_bool + { + \exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist } + { + name style = { + , heading style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , crefname style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , Crefname style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , numbering style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + } + } + + \SetTheorem { remark } + { + name style = { + , heading style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , crefname style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , crefname style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + , numbering style = { + , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl + , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl + } + } + } + } + +\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 } + { + \LocallyStopLineNumbers + \begin { tcolorbox } + [ + enhanced~jigsaw, + frame~hidden, + interior~hidden, + top = 0pt, bottom = 0pt, + left = 0pt, right = 0pt, + boxrule = 0pt, boxsep = 0pt, + before~skip = 1em+\parskip, + after~skip = 1.2em+\parskip, + breakable, lines~before~break=3, + ] + } + \hook_gput_code:nnn { env/#1/after } { minimalist } + { + \end { tcolorbox } + \ResumeLineNumbers + } + } + \exp_args:No \clist_map_inline:nn { \c_projlib_theorem_supported_clist } + { + \minimclass_box_environment:n { #1 } + \minimclass_box_environment:n { #1 * } + } + } + } + +%%================================ +%% 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 } +} + +\bool_if:NF \l__minimalist_is_book_bool { + +%%================================ +%% Title block style +%%================================ +\renewcommand{\@maketitle}{ + \LocallyStopLineNumbers + \begin{center} + \let\footnote\thanks + {\minimalist_bfseries:\sffamily\scshape\Large\@title}\\\bigskip + \color{main-text!80!paper} + {\small\scshape\@author} + \par\smallskip\vspace{-\parskip} + {\small\@date} + \end{center} + \ifx\@date\@empty\medskip\fi + \medskip\par + \ResumeLineNumbers +} + +\hook_gput_code:nnn { cmd/maketitle/after } { minimalist } { \thispagestyle{fancy} } + +%%================================ +%% Abstract style +%%================================ +\renewenvironment{abstract} + { + \LocallyStopLineNumbers + \vspace{-.5\baselineskip} + \begin{center} + { \g_minimalist_title_font_section_tl \scshape \small\abstractname}\\ + \vspace{-.3\baselineskip} + \begin{minipage}[t]{.833\textwidth} + \vspace{0pt} + \color{main-text!80!paper} + \footnotesize + \parindent=2em + } + { + \end{minipage} + \end{center} + \medskip + \ResumeLineNumbers + } + +%%================================ +%% Keyword environment +%%================================ +\DefineMultilingualText { \keywordname } + { + EN = Keywords , + FR = Mots~clés , + DE = Schlüsselwörter , + IT = Parole~chiave , + PT = Palavras~chave , + BR = Palavras~chave , + ES = Palabras~clave , + CN = 关键词 , + TC = 關鍵詞 , + JP = キーワード , + RU = Ключевые~слова , + } + +\newenvironment{keyword}{ + \LocallyStopLineNumbers + \vspace{-.75\baselineskip} + \begin{center} + {\minimalist_bfseries:\scshape\small\keywordname}\\ + \vspace{-.3\baselineskip} + \begin{minipage}[t]{.833\textwidth} + \vspace{0pt} + \color{main-text!80!paper} + \footnotesize + \parindent=2em + \begin{center} +}{ + \end{center} + \end{minipage} + \end{center} + \medskip + \ResumeLineNumbers +} + +%%================================ +%% Simulate features of amsart +%%================================ +\PassOptionsToPackage { amsfashion } { projlib-author } +\RequirePackage { projlib-author } + +} + +\endinput +%% +%% End of file `minimalist/minimalist-plain.sty'. diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty index 85a64926d6..176d5986e0 100644 --- a/macros/latex/contrib/minimalist/minimalist.sty +++ b/macros/latex/contrib/minimalist/minimalist.sty @@ -2,7 +2,7 @@ %% This is file `minimalist/minimalist.sty', %% generated with the docstrip utility. -%% Copyright (C) 2021 by Jinwen XU +%% Copyright (C) 2021-2022 by Jinwen XU %% %% This is part of the minimalist class series. %% @@ -16,906 +16,76 @@ %% 2005/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] -\ProvidesPackage{minimalist} - [2021/12/16 A simple and clear style for articles and books] -\RequirePackage{kvoptions} -\RequirePackage{etoolbox} -\SetupKeyvalOptions{% - family = @minimalist, - prefix = @minimalist@ -} -\DeclareBoolOption[false]{draft} -\DeclareBoolOption[false]{fast} -\DeclareBoolOption[false]{puretext} -\DeclareBoolOption[false]{nothms} -\DeclareBoolOption[false]{delaythms} -\DeclareBoolOption[false]{nothmnum} -\DeclareStringOption{thmnum}[minimalist@thmnum@default] -\DeclareBoolOption[true]{regionalref} -\DeclareBoolOption[false]{originalref} -\DeclareBoolOption[false]{allowbf} -\DeclareBoolOption[false]{classical} -\DeclareBoolOption[false]{runin} -\ProcessKeyvalOptions*\relax - -\if@minimalist@originalref - \@minimalist@regionalreffalse -\fi -\if@minimalist@draft - \@minimalist@fasttrue -\fi -\if@minimalist@puretext - \@minimalist@nothmstrue -\fi - -\if@minimalist@fast - \PassOptionsToPackage{fast}{PJLdraft} - \PassOptionsToPackage{fast}{PJLthm} -\fi -\expandafter\ifstrempty\expandafter{\@minimalist@thmnum}{}{ - \expandafter\ifstrequal\expandafter{\@minimalist@thmnum}{minimalist@thmnum@default}{ - \PassOptionsToPackage{thmnum}{PJLthm} - }{ - \PassOptionsToPackage{thmnum=\@minimalist@thmnum}{PJLthm} - } -} -\if@minimalist@regionalref\else - \PassOptionsToPackage{originalref}{PJLthm} -\fi - -\if@minimalist@allowbf - \newcommand{\conditionalbfseries}{\bfseries\colorlet{PJLtempcolor}{.}\color{PJLtempcolor!83!paper}} -\else - \newcommand{\conditionalbfseries}{} -\fi - -\newif\ifIsBook -\ifdefined\c@chapter\IsBooktrue\else\IsBookfalse\fi - -%%================================ -%% Title fonts -%%================================ -\RequirePackage{anyfontsize} - -\def\minimalist@titlefontshape{} - -\if@minimalist@classical -\newcommand{\partfont}{\conditionalbfseries\minimalist@titlefontshape} -\newcommand{\chapfont}{\conditionalbfseries\minimalist@titlefontshape} -\newcommand{\secfont}{\conditionalbfseries} -\newcommand{\subsecfont}{\conditionalbfseries} -\newcommand{\subsubsecfont}{\conditionalbfseries\itshape} -\else -\newcommand{\partfont}{\conditionalbfseries\minimalist@titlefontshape} -\newcommand{\chapfont}{\conditionalbfseries\minimalist@titlefontshape} -\newcommand{\secfont}{\conditionalbfseries\minimalist@titlefontshape} -\newcommand{\subsecfont}{\conditionalbfseries\minimalist@titlefontshape} -\newcommand{\subsubsecfont}{\conditionalbfseries\minimalist@titlefontshape} -\fi - -%%================================ -%% Paper configuration -%%================================ -\RequirePackage{PJLpaper} - -%%================================ -%% Footer -%%================================ -\RequirePackage{geometry} -\RequirePackage{fancyhdr} -\RequirePackage{extramarks} - -\AtEndPreamble{\fancyhfoffset{0pt}} - -\fancypagestyle{fancy}{ - \fancyhf{} - \if@twoside - \fancyfoot[RO]{\small\textcolor{maintext!30!paper}{\lastrightmark}% - ~~\rlap{\textcolor{maintext!27!paper}{$|$}~~\thepage}} - \fancyfoot[LE]{\small\leavevmode\llap{\thepage% - ~~\textcolor{maintext!27!paper}{$|$}}% - ~~\textcolor{maintext!30!paper}{\lastleftmark}} - \else - \fancyfoot[R]{\small\textcolor{maintext!30!paper}{\lastrightmark}% - ~~\rlap{\textcolor{maintext!27!paper}{$|$}~~\thepage}} - \fi - \renewcommand{\headrulewidth}{0pt} -} -\pagestyle{fancy} - -\fancypagestyle{plain}{ - \fancyhf{} - \if@twoside - \fancyfoot[RO]{\small% - ~\rlap{\textcolor{maintext!27!paper}{$|$}~~\thepage}} - \fancyfoot[LE]{\small\leavevmode\llap{\thepage% - ~~\textcolor{maintext!27!paper}{$|$}}} - \else - \fancyfoot[R]{\small% - ~\rlap{\textcolor{maintext!27!paper}{$|$}~~\thepage}} - \fi - \renewcommand{\headrulewidth}{0pt} -} -\ifbool{IsBook}{ - \if@minimalist@fast - \newcommand{\drawHelpLine}{} - \else - \RequirePackage{tikz} - \usetikzlibrary{calc,shadings} - \RequirePackage{tikzpagenodes}% For `current page text area` - \newcommand{\drawHelpLine}{% - \begin{tikzpicture}[remember picture,overlay] - \foreach\i in {0,1,...,5}{% - \fill[opacity=0.12-0.02*\i] - ($(current page text area.north east) - +(-\i*0.5em-.025em,-10pt+\i*1.1pt)$) - rectangle ($(current page text area.south east) - +(-\i*0.5em+.025em,10pt-\i*1.1pt)$); - \shade[top color=paper,bottom color=maintext,opacity=0.12-0.02*\i] - ($(current page text area.north east) - +(-\i*0.5em-.025em,2pt)$) - rectangle ($(current page text area.north east) - +(-\i*0.5em+.025em,-10pt+\i*1.1pt)$); - \shade[top color=maintext,bottom color=paper,opacity=0.12-0.02*\i] - ($(current page text area.south east) - +(-\i*0.5em-.025em,-2pt)$) - rectangle ($(current page text area.south east) - +(-\i*0.5em+.025em,10pt-\i*1.1pt)$); - } - \end{tikzpicture}% - } - \fi - \fancypagestyle{part}{ - \fancyhf{} - \renewcommand{\headrulewidth}{0pt} - \fancyhead[C]{\drawHelpLine} - } - \addtolength{\headheight}{20pt} - \addtolength{\topmargin}{-20pt} - \if@twoside - \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}} - \else - \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}} - \fi - \renewcommand*{\sectionmark}[1]{% - \markright{\sec@decochar~\arabic{section}~\sec@decochar~~~#1}} -}{ - \if@twoside - \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{}} - \else - \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}} - \fi -} -%%================================ -%% Languages and line spacing -%%================================ -\RequirePackage{PJLlang} -\PJLsetlinespacing{\setstretch{1.07}} -\PJLsetCJKlinespacing{\onehalfspacing} -\raggedbottom - -%%================================ -%% Line numbers -%%================================ -\PassOptionsToPackage{pagewise,mathlines}{lineno} -\RequirePackage{linenoamsmath} -\renewcommand\linenumberfont{\ttfamily\color{maintext!7!paper}\footnotesize} -\setlength\linenumbersep{1em} - -\newif\ifLNturnsON -\def\LocallyStopLineNumbers{\LNturnsONfalse% - \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers} -\def\ResumeLineNumbers{\ifLNturnsON\linenumbers\fi} - -\pretocmd{\tableofcontents}{\LocallyStopLineNumbers}{}{\FAIL} -\apptocmd{\tableofcontents}{\ResumeLineNumbers}{}{\FAIL} -\pretocmd{\thebibliography}{\LocallyStopLineNumbers}{}{\FAIL} -\apptocmd{\endthebibliography}{\ResumeLineNumbers}{}{\FAIL} - -%%================================ -%% Title format -%%================================ -\RequirePackage[explicit,newparttoc]{titlesec} -\PassOptionsToPackage{normalem}{ulem} -\RequirePackage{ulem} - -\newcommand{\partstring}{\MakeUppercase{{\partname~\protect\thepart}}} -\gappto{\PJLlang@langconfig@common}{% -\renewcommand{\partstring}{\MakeUppercase{{\partname~\protect\thepart}}}% -} -\gappto{\PJLlang@langconfig@CN}{% -\renewcommand{\partstring}{第~\thepart~部分}% -} -\gappto{\PJLlang@langconfig@TC}{% -\renewcommand{\partstring}{第~\thepart~部分}% -} -\gappto{\PJLlang@langconfig@JP}{% -\renewcommand{\partstring}{第~\thepart~部}% -} - -\ifbool{IsBook}{ - %% Part - \titleclass{\part}{top} % make part like a chapter - \titleformat{\part}[display] - {\thispagestyle{part}% - \LocallyStopLineNumbers% - \partfont\filleft} - {\partstring} - {1em} - {\fontsize{20}{0}\selectfont\MakeUppercase{#1}} - [\ResumeLineNumbers] - \titleformat{name=\part,numberless}[display] - {\thispagestyle{part}% - \LocallyStopLineNumbers% - % \phantomsection\addcontentsline{toc}{part}{#1}% - \partfont\filleft} - {\phantom{\MakeUppercase{\partname}}} - {1em} - {\fontsize{20}{0}\selectfont\MakeUppercase{#1}} - [\ResumeLineNumbers] - \titlespacing*{\part}{0pt}{5em}{6em} - %% Text after part - \newcommand{\parttext}[1]{% - \vfill% - \LocallyStopLineNumbers% - \begin{flushright}% - \begin{minipage}{0.833\textwidth}% - \color{maintext!80!paper}\raggedleft#1% - \end{minipage}% - \end{flushright}% - \ResumeLineNumbers% - \vfill\vfill% - \cleardoublepage% - } - - %% Chapter - \titleformat{\chapter} - {\thispagestyle{fancy}% - \LocallyStopLineNumbers% - \color{maintext!80!paper}\chapfont\fontsize{16}{0}\selectfont}{}{0em} - {\rlap{\hspace*{-.5em}{\color{maintext!12!paper}% - \fontsize{80}{0}\selectfont\raisebox{-7pt}{\thechapter}}}#1} - [\ResumeLineNumbers] - \titleformat{name=\chapter,numberless} - {\thispagestyle{fancy}% - \LocallyStopLineNumbers% - % \phantomsection\addcontentsline{toc}{chapter}{#1}% - \color{maintext!80!paper}\chapfont\fontsize{16}{0}\selectfont}{}{0em} - {\rlap{\hspace*{-.5em}{\color{maintext!12!paper}% - \fontsize{80}{0}\selectfont\normalfont\raisebox{-7pt}{*}}}#1} - [\ResumeLineNumbers] -}{ - %% Part - \titleformat{\part}[display] - {\LocallyStopLineNumbers% - \partfont\filleft} - {\partstring} - {.3em} - {\fontsize{16}{0}\selectfont\MakeUppercase{#1}} - [\ResumeLineNumbers] - \titleformat{name=\part,numberless}[display] - {\LocallyStopLineNumbers% - % \phantomsection\addcontentsline{toc}{part}{#1}% - \partfont\filleft} - {\phantom{\MakeUppercase{\partname}}} - {.3em} - {\fontsize{16}{0}\selectfont\MakeUppercase{#1}} - [\ResumeLineNumbers] - %% Text after part - \newcommand{\parttext}[1]{% - \LocallyStopLineNumbers% - \begin{flushright}% - \begin{minipage}{0.833\textwidth}% - \color{maintext!80!paper}\raggedleft#1% - \end{minipage}% - \end{flushright}% - \ResumeLineNumbers% - } -} - -%% Section -\if@minimalist@classical -\renewcommand\thesection{\arabic{section}} -\newcommand\seculine{\bgroup\markoverwith{\color{maintext!27!paper}% - \rule[-0.9ex]{2pt}{.6pt}\hspace{-2pt}\rule[-1.2ex]{2pt}{.6pt}}\ULon} -\newcommand\sec@decochar{\raisebox{.03em}{\normalfont/}} -\titleformat{\section} - {\LocallyStopLineNumbers% - \secfont\centering}{}{0em} - {{\small\textcolor{maintext!27!paper}{\footnotesize\sec@decochar}% - \,\,\textcolor{maintext!90!paper}{\conditionalbfseries\arabic{section}}% - \,\,\textcolor{maintext!27!paper}{\footnotesize\sec@decochar}}\\ - \seculine{#1}} - [\ResumeLineNumbers] -\titleformat{name=\section,numberless} - {\LocallyStopLineNumbers% - % \phantomsection\addcontentsline{toc}{section}{#1}% - \secfont\centering}{}{0em} - {\seculine{#1}} - [\ResumeLineNumbers] -\else -\newcommand\sec@decochar{} -\titleformat{\section} - {\LocallyStopLineNumbers% - \secfont\centering} - {\thesection}{.75em} - {#1} - [\ResumeLineNumbers] -\fi - -%% Subsection -\if@minimalist@classical -\renewcommand\thesubsection{% - \ifnum\c@section=0\else\arabic{section}.\fi\arabic{subsection}} -\newcommand\subseculine{\bgroup\markoverwith{\color{maintext!27!paper}% - \rule[-1ex]{2pt}{.75pt}}\ULon} -\titleformat{\subsection} - {\LocallyStopLineNumbers% - \subsecfont}{}{0em} - {\subseculine{\thesubsection~\textcolor{maintext!27!paper}{$|$}~#1}} - [\ResumeLineNumbers] -\titleformat{name=\subsection,numberless} - {\LocallyStopLineNumbers% - \subsecfont}{}{0em} - {\subseculine{#1}} - [\ResumeLineNumbers] -\else -\titleformat{\subsection} - {\LocallyStopLineNumbers% - \subsecfont} - {\thesubsection}{.75em} - {#1} - [\ResumeLineNumbers] -\fi - -%% Subsubsection -\if@minimalist@runin -\titleformat{\subsubsection}[runin] - {\color{maintext!70!paper}\subsubsecfont}{\thesubsubsection}{.5em} - {#1.}[\hspace*{.3em}] -\else -\titleformat{\subsubsection} - {\LocallyStopLineNumbers% - \color{maintext!70!paper}\subsubsecfont}{\thesubsubsection}{.5em} - {#1} - [\ResumeLineNumbers] -\fi - -%% Paragraph -\titleformat{\paragraph}[runin] - {\scshape}{\theparagraph}{1em}{#1} - -\titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip} -\titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip} -\titlespacing{\subsubsection}{0pt}{.5\baselineskip}{.2\baselineskip} - -%%================================ -%% ToC format -%%================================ -\RequirePackage{titletoc} -\titlecontents{part} - [0em] - {\addvspace{1.5pc}\filcenter\normalfont} - {\thecontentslabel\nopagebreak\\\nopagebreak\uppercase} - {} - {} % without page number - [\addvspace{.5pc}] -\ifbool{IsBook}{ - \titlecontents{chapter} - [2em] % i.e., 0em (part) + 2em - {\addvspace{.5pc}\normalfont} - {\contentslabel{2em}} - {\hspace*{-2em}} - {\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\contentspage} - \titlecontents{section} - [4em] % i.e., 2em (chapter) + 2em - {\normalfont} - {\contentslabel[\textcolor{maintext!27!paper}{\small\sec@decochar}\,\textcolor{maintext!90!paper}{\thecontentslabel}\,\textcolor{maintext!27!paper}{\small\sec@decochar}]{2em}} - {\hspace*{-2em}} - {\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\contentspage} - \titlecontents{subsection} - [6.5em] % i.e., 4em (section) + 2.5em - {\normalfont} - {\contentslabel{2.25em}} - {\hspace*{-2.25em}} - {\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\contentspage} - \titlecontents{subsubsection} - [8.5em] % i.e., 6.5em (subsection) + 3em - {\normalfont} - {\contentslabel{2.75em}} - {\hspace*{-2.75em}} - {\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\contentspage} -}{ - \titlecontents{section} - [2em] % i.e., 0em (part) + 2em - {\normalfont} - {\contentslabel{1.75em}} - {\hspace*{-1.75em}} - {\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\contentspage} - \titlecontents{subsection} - [4.5em] % i.e., 2em (section) + 2.5em - {\normalfont} - {\contentslabel{2.25em}} - {\hspace*{-2.25em}} - {\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\contentspage} - \titlecontents{subsubsection} - [7.5em] % i.e., 4.5em (subsection) + 3em - {\normalfont} - {\contentslabel{2.75em}} - {\hspace*{-2.75em}} - {\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\contentspage} -} - -%%================================ -%% Lists -%%================================ -\RequirePackage{enumitem} -\setlist{noitemsep} -\setlist[enumerate]{labelsep=*, leftmargin=*} -\setlist[enumerate,1]{label=\arabic*$)$, - ref = \arabic*$)$} -\setlist[enumerate,2]{label=\emph{\roman*}$)$, - ref = \arabic{enumi}.\emph{\roman*}$)$} -\setlist[enumerate,3]{label=\emph{\alph*}$)$, - ref = \arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$)$} -\setlist[description]{font=\normalfont\conditionalbfseries} -\if@minimalist@classical -\newcommand\desculine{\colorlet{currentcolor}{.}\bgroup\markoverwith{\color{currentcolor!50!paper}% - \rule[-.45ex]{2pt}{.75pt}}\ULon} -\renewcommand{\descriptionlabel}[1]{% - \hspace{\labelsep}\normalfont\desculine{#1}% -} -\fi - -\setlist[itemize]{leftmargin=*} -\gappto{\PJLlang@langconfig@common}{\setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\bullet$}}} -\gappto{\PJLlang@langconfig@FR}{\setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!50!paper}{---}}} -\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{--}} -\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\texttt{*}}} - -%%================================ -%% Blank page -%%================================ -\newcommand{\blinkpagetext}{This page is intentionally left blank} -\renewcommand{\cleardoublepage}{\relax - \clearpage - \if@twoside\ifodd\c@page\relax\else - \thispagestyle{empty} - \AddToHookNext{shipout/background} - {% - \put(0.5\paperwidth,-0.5\paperheight){% - \makebox[0pt]{\large\color{maintext!10!paper}\blinkpagetext}}} - \null\newpage\fi\fi} - -%%================================ -%% Draft mark -%%================================ -\RequirePackage{PJLdraft} - -%%================================ -%% Theorems -%%================================ -\RequirePackage{mathtools} -\RequirePackage{amsthm} -\if@minimalist@classical -\def\simpleqedsymbol{% - \makebox[1em]{\rlap{\textcolor{maintext!12!paper}{\rule[-0.1em]{.95em}{.95em}}}{\kern.07em\raisebox{.07em}{\textcolor{paper}{\rule[-0.1em]{.81em}{.81em}}}\kern.07em}}} -\newtheoremstyle{simple}% - {}{}% - {\normalfont}{}% - {\normalfont}{}% - {0pt}% - {\global\let\qedsymbol\simpleqedsymbol% - {\conditionalbfseries\thmname{#1}\thmnumber{ #2}}\hspace{.4em}% - \textcolor{maintext!27!paper}{$|$}\hspace{.4em}% - \color{maintext!50!paper}\thmnote{\ensuremath{(\text{#3})}~~}% - \pushQED{\qed}% - } -\def\@endtheorem{\global\let\qedsymbol\simpleqedsymbol% - \popQED\endtrivlist\@endpefalse - \global\let\qedsymbol\qedsymbolOriginal} -\else - \newtheoremstyle{simple}% - {}{}% - {\normalfont}{}% - {\normalfont}{}% - {0pt}% - {{\conditionalbfseries\minimalist@titlefontshape\thmname{#1}\thmnumber{ #2}}% - {\color{maintext!50!paper}\thmnote{\hspace{.4em}\ensuremath{(\text{#3})}}}~~{\normalfont---}~~} -\fi - -\renewcommand{\qedsymbol}{% - \makebox[1em]{\color{maintext!27!paper}\rule[-0.1em]{.95em}{.95em}}} -\let\qedsymbolOriginal\qedsymbol - -\if@minimalist@fast - \providecommand{\phantomsection}{} - \RequirePackage{url} - \newcommand{\href}[2]{#2} -\else - \PassOptionsToPackage{hidelinks,linktoc=all}{hyperref} - \RequirePackage{bookmark} - \RequirePackage{hyperref} -\fi - -\PassOptionsToPackage{nothms,simplename}{PJLthm} -\RequirePackage{PJLthm} - -\pretocmd{\theoremnameEN}{\textsc}{}{\FAIL} -\pretocmd{\lemmanameEN}{\textsc}{}{\FAIL} -\pretocmd{\propositionnameEN}{\textsc}{}{\FAIL} -\pretocmd{\corollarynameEN}{\textsc}{}{\FAIL} -\pretocmd{\propertynameEN}{\textsc}{}{\FAIL} -\pretocmd{\factnameEN}{\textsc}{}{\FAIL} -\pretocmd{\conjecturenameEN}{\textsc}{}{\FAIL} -\pretocmd{\definitionnameEN}{\textsc}{}{\FAIL} -\pretocmd{\axiomnameEN}{\textsc}{}{\FAIL} -\pretocmd{\assumptionnameEN}{\textsc}{}{\FAIL} -\pretocmd{\conventionnameEN}{\textsc}{}{\FAIL} -\pretocmd{\hypothesisnameEN}{\textsc}{}{\FAIL} -\pretocmd{\notationnameEN}{\textsc}{}{\FAIL} -\pretocmd{\examplenameEN}{\textsc}{}{\FAIL} -\pretocmd{\problemnameEN}{\textsc}{}{\FAIL} -\pretocmd{\questionnameEN}{\textsc}{}{\FAIL} -\pretocmd{\exercisenameEN}{\textsc}{}{\FAIL} -\pretocmd{\remarknameEN}{\itshape}{}{\FAIL} -\pretocmd{\observationnameEN}{\itshape}{}{\FAIL} - -\pretocmd{\theoremnameFR}{\textsc}{}{\FAIL} -\pretocmd{\lemmanameFR}{\textsc}{}{\FAIL} -\pretocmd{\propositionnameFR}{\textsc}{}{\FAIL} -\pretocmd{\corollarynameFR}{\textsc}{}{\FAIL} -\pretocmd{\propertynameFR}{\textsc}{}{\FAIL} -\pretocmd{\factnameFR}{\textsc}{}{\FAIL} -\pretocmd{\conjecturenameFR}{\textsc}{}{\FAIL} -\pretocmd{\definitionnameFR}{\textsc}{}{\FAIL} -\pretocmd{\axiomnameFR}{\textsc}{}{\FAIL} -\pretocmd{\assumptionnameFR}{\textsc}{}{\FAIL} -\pretocmd{\conventionnameFR}{\textsc}{}{\FAIL} -\pretocmd{\hypothesisnameFR}{\textsc}{}{\FAIL} -\pretocmd{\notationnameFR}{\textsc}{}{\FAIL} -\pretocmd{\examplenameFR}{\textsc}{}{\FAIL} -\pretocmd{\problemnameFR}{\textsc}{}{\FAIL} -\pretocmd{\questionnameFR}{\textsc}{}{\FAIL} -\pretocmd{\exercisenameFR}{\textsc}{}{\FAIL} -\pretocmd{\remarknameFR}{\itshape}{}{\FAIL} -\pretocmd{\observationnameFR}{\itshape}{}{\FAIL} - -\pretocmd{\theoremnameDE}{\textsc}{}{\FAIL} -\pretocmd{\lemmanameDE}{\textsc}{}{\FAIL} -\pretocmd{\propositionnameDE}{\textsc}{}{\FAIL} -\pretocmd{\corollarynameDE}{\textsc}{}{\FAIL} -\pretocmd{\propertynameDE}{\textsc}{}{\FAIL} -\pretocmd{\factnameDE}{\textsc}{}{\FAIL} -\pretocmd{\conjecturenameDE}{\textsc}{}{\FAIL} -\pretocmd{\definitionnameDE}{\textsc}{}{\FAIL} -\pretocmd{\axiomnameDE}{\textsc}{}{\FAIL} -\pretocmd{\assumptionnameDE}{\textsc}{}{\FAIL} -\pretocmd{\conventionnameDE}{\textsc}{}{\FAIL} -\pretocmd{\hypothesisnameDE}{\textsc}{}{\FAIL} -\pretocmd{\notationnameDE}{\textsc}{}{\FAIL} -\pretocmd{\examplenameDE}{\textsc}{}{\FAIL} -\pretocmd{\problemnameDE}{\textsc}{}{\FAIL} -\pretocmd{\questionnameDE}{\textsc}{}{\FAIL} -\pretocmd{\exercisenameDE}{\textsc}{}{\FAIL} -\pretocmd{\remarknameDE}{\itshape}{}{\FAIL} -\pretocmd{\observationnameDE}{\itshape}{}{\FAIL} - -\pretocmd{\theoremnameIT}{\textsc}{}{\FAIL} -\pretocmd{\lemmanameIT}{\textsc}{}{\FAIL} -\pretocmd{\propositionnameIT}{\textsc}{}{\FAIL} -\pretocmd{\corollarynameIT}{\textsc}{}{\FAIL} -\pretocmd{\propertynameIT}{\textsc}{}{\FAIL} -\pretocmd{\factnameIT}{\textsc}{}{\FAIL} -\pretocmd{\conjecturenameIT}{\textsc}{}{\FAIL} -\pretocmd{\definitionnameIT}{\textsc}{}{\FAIL} -\pretocmd{\axiomnameIT}{\textsc}{}{\FAIL} -\pretocmd{\assumptionnameIT}{\textsc}{}{\FAIL} -\pretocmd{\conventionnameIT}{\textsc}{}{\FAIL} -\pretocmd{\hypothesisnameIT}{\textsc}{}{\FAIL} -\pretocmd{\notationnameIT}{\textsc}{}{\FAIL} -\pretocmd{\examplenameIT}{\textsc}{}{\FAIL} -\pretocmd{\problemnameIT}{\textsc}{}{\FAIL} -\pretocmd{\questionnameIT}{\textsc}{}{\FAIL} -\pretocmd{\exercisenameIT}{\textsc}{}{\FAIL} -\pretocmd{\remarknameIT}{\itshape}{}{\FAIL} -\pretocmd{\observationnameIT}{\itshape}{}{\FAIL} - -\pretocmd{\theoremnamePT}{\textsc}{}{\FAIL} -\pretocmd{\lemmanamePT}{\textsc}{}{\FAIL} -\pretocmd{\propositionnamePT}{\textsc}{}{\FAIL} -\pretocmd{\corollarynamePT}{\textsc}{}{\FAIL} -\pretocmd{\propertynamePT}{\textsc}{}{\FAIL} -\pretocmd{\factnamePT}{\textsc}{}{\FAIL} -\pretocmd{\conjecturenamePT}{\textsc}{}{\FAIL} -\pretocmd{\definitionnamePT}{\textsc}{}{\FAIL} -\pretocmd{\axiomnamePT}{\textsc}{}{\FAIL} -\pretocmd{\assumptionnamePT}{\textsc}{}{\FAIL} -\pretocmd{\conventionnamePT}{\textsc}{}{\FAIL} -\pretocmd{\hypothesisnamePT}{\textsc}{}{\FAIL} -\pretocmd{\notationnamePT}{\textsc}{}{\FAIL} -\pretocmd{\examplenamePT}{\textsc}{}{\FAIL} -\pretocmd{\problemnamePT}{\textsc}{}{\FAIL} -\pretocmd{\questionnamePT}{\textsc}{}{\FAIL} -\pretocmd{\exercisenamePT}{\textsc}{}{\FAIL} -\pretocmd{\remarknamePT}{\itshape}{}{\FAIL} -\pretocmd{\observationnamePT}{\itshape}{}{\FAIL} - -\pretocmd{\theoremnameBR}{\textsc}{}{\FAIL} -\pretocmd{\lemmanameBR}{\textsc}{}{\FAIL} -\pretocmd{\propositionnameBR}{\textsc}{}{\FAIL} -\pretocmd{\corollarynameBR}{\textsc}{}{\FAIL} -\pretocmd{\propertynameBR}{\textsc}{}{\FAIL} -\pretocmd{\factnameBR}{\textsc}{}{\FAIL} -\pretocmd{\conjecturenameBR}{\textsc}{}{\FAIL} -\pretocmd{\definitionnameBR}{\textsc}{}{\FAIL} -\pretocmd{\axiomnameBR}{\textsc}{}{\FAIL} -\pretocmd{\assumptionnameBR}{\textsc}{}{\FAIL} -\pretocmd{\conventionnameBR}{\textsc}{}{\FAIL} -\pretocmd{\hypothesisnameBR}{\textsc}{}{\FAIL} -\pretocmd{\notationnameBR}{\textsc}{}{\FAIL} -\pretocmd{\examplenameBR}{\textsc}{}{\FAIL} -\pretocmd{\problemnameBR}{\textsc}{}{\FAIL} -\pretocmd{\questionnameBR}{\textsc}{}{\FAIL} -\pretocmd{\exercisenameBR}{\textsc}{}{\FAIL} -\pretocmd{\remarknameBR}{\itshape}{}{\FAIL} -\pretocmd{\observationnameBR}{\itshape}{}{\FAIL} - -\pretocmd{\theoremnameES}{\textsc}{}{\FAIL} -\pretocmd{\lemmanameES}{\textsc}{}{\FAIL} -\pretocmd{\propositionnameES}{\textsc}{}{\FAIL} -\pretocmd{\corollarynameES}{\textsc}{}{\FAIL} -\pretocmd{\propertynameES}{\textsc}{}{\FAIL} -\pretocmd{\factnameES}{\textsc}{}{\FAIL} -\pretocmd{\conjecturenameES}{\textsc}{}{\FAIL} -\pretocmd{\definitionnameES}{\textsc}{}{\FAIL} -\pretocmd{\axiomnameES}{\textsc}{}{\FAIL} -\pretocmd{\assumptionnameES}{\textsc}{}{\FAIL} -\pretocmd{\conventionnameES}{\textsc}{}{\FAIL} -\pretocmd{\hypothesisnameES}{\textsc}{}{\FAIL} -\pretocmd{\notationnameES}{\textsc}{}{\FAIL} -\pretocmd{\examplenameES}{\textsc}{}{\FAIL} -\pretocmd{\problemnameES}{\textsc}{}{\FAIL} -\pretocmd{\questionnameES}{\textsc}{}{\FAIL} -\pretocmd{\exercisenameES}{\textsc}{}{\FAIL} -\pretocmd{\remarknameES}{\itshape}{}{\FAIL} -\pretocmd{\observationnameES}{\itshape}{}{\FAIL} - - -\theoremstyle{simple} - -\def\minimalist@definethms{ -\if@minimalist@nothms\else -\if@minimalist@nothmnum -\CreateTheorem*{theorem} -\CreateTheorem*{lemma} -\CreateTheorem*{proposition} -\CreateTheorem*{corollary} -\CreateTheorem*{definition-proposition} -\CreateTheorem*{definition-theorem} -\CreateTheorem*{property} -\CreateTheorem*{fact} -\CreateTheorem*{conjecture} -\else -\CreateTheorem@thmnum{theorem} -\CreateTheorem{lemma}[theorem] -\CreateTheorem{proposition}[theorem] -\CreateTheorem{corollary}[theorem] -\CreateTheorem{definition-proposition}[theorem] -\CreateTheorem{definition-theorem}[theorem] -\CreateTheorem{property}[theorem] -\CreateTheorem{fact}[theorem] -\CreateTheorem{conjecture}[theorem] -\fi -\CreateTheorem*{theorem*} -\CreateTheorem*{lemma*} -\CreateTheorem*{proposition*} -\CreateTheorem*{corollary*} -\CreateTheorem*{definition-proposition*} -\CreateTheorem*{definition-theorem*} -\CreateTheorem*{property*} -\CreateTheorem*{fact*} -\CreateTheorem*{conjecture*} -\if@minimalist@nothmnum -\CreateTheorem*{definition} -\CreateTheorem*{axiom} -\CreateTheorem*{assumption} -\CreateTheorem*{convention} -\CreateTheorem*{hypothesis} -\CreateTheorem*{notation} -\CreateTheorem*{example} -\CreateTheorem*{problem} -\CreateTheorem*{question} -\CreateTheorem*{exercise} -\else -\CreateTheorem{definition}[theorem] -\CreateTheorem{axiom}[theorem] -\CreateTheorem{assumption}[theorem] -\CreateTheorem{convention}[theorem] -\CreateTheorem{hypothesis}[theorem] -\CreateTheorem{notation}[theorem] -\CreateTheorem{example}[theorem] -\CreateTheorem{problem}[theorem] -\CreateTheorem{question}[theorem] -\CreateTheorem{exercise}[theorem] -\fi -\CreateTheorem*{definition*} -\CreateTheorem*{axiom*} -\CreateTheorem*{assumption*} -\CreateTheorem*{convention*} -\CreateTheorem*{hypothesis*} -\CreateTheorem*{notation*} -\CreateTheorem*{example*} -\CreateTheorem*{problem*} -\CreateTheorem*{question*} -\CreateTheorem*{exercise*} -\if@minimalist@nothmnum -\CreateTheorem*{remark} -\CreateTheorem*{observation} -\else -\CreateTheorem@thmnum{remark} -\CreateTheorem@thmnum{observation} -\fi -\CreateTheorem*{remark*} -\CreateTheorem*{observation*} -\fi -} - -\if@minimalist@delaythms - \AtEndPreamble{\minimalist@definethms} -\else - \minimalist@definethms -\fi - -\ifbool{IsBook}{}{% - -%%================================ -%% Title block style -%%================================ -\if@minimalist@classical -\renewcommand{\@maketitle}{% - \LocallyStopLineNumbers% - \noindent% - {\textcolor{maintext!27!paper}{\rule{\textwidth}{0.75pt}}}% - % \vspace{-\parskip}% - \vspace{-.5\baselineskip}% - \begin{flushright}% - \let\footnote\thanks% - {\conditionalbfseries\@title}\\\medskip% - \color{maintext!80!paper}% - {\small\scshape\@author}% - \par\vspace{-\parskip}\vspace{2pt}% - {\small\@date}% - \end{flushright}% - % \vspace{-\parskip}% - \vspace{-.5\baselineskip}% - \ifx\@date\@empty% - \vspace{\baselineskip}% - \vspace{1.2\parskip}% - \else% - \vspace{-.5\baselineskip}% - \fi% - {\textcolor{maintext!27!paper}{\rule{\textwidth}{0.75pt}}\par}% - \ResumeLineNumbers% -} -\else -\renewcommand{\@maketitle}{% - \LocallyStopLineNumbers% - \begin{center}% - \let\footnote\thanks% - {\conditionalbfseries\minimalist@titlefontshape\large\@title}\\\bigskip% - \color{maintext!80!paper}% - {\small\scshape\@author}\\[2pt]% - {\small\@date}% - \end{center}% - \ifx\@date\@empty\bigskip\fi% - \bigskip\par% - \ResumeLineNumbers% -} -\fi -\apptocmd{\maketitle}{\thispagestyle{fancy}}{}{\FAIL} - -%%================================ -%% Abstract style -%%================================ -\if@minimalist@classical -\renewenvironment{abstract}{% - \LocallyStopLineNumbers% - \begin{flushright}% - \textsc{\conditionalbfseries\small\abstractname}\par% - \vspace{-\parskip}% - \vspace{-.25\baselineskip}% - \begin{minipage}[t]{.833\textwidth}% - \vspace{0pt}% - \color{maintext!80!paper}% - \footnotesize% - \parindent=2em -}{% - \end{minipage}% - \end{flushright}% - \bigskip% - \ResumeLineNumbers% -} -\else -\renewenvironment{abstract}{% - \LocallyStopLineNumbers% - \vspace{-\baselineskip}% - \begin{center}% - \textsc{\conditionalbfseries\minimalist@titlefontshape\small\abstractname}\\% - \vspace{-.3\baselineskip}% - \begin{minipage}[t]{.833\textwidth}% - \vspace{0pt}% - \color{maintext!80!paper}% - \footnotesize% - \parindent=2em -}{% - \end{minipage}% - \end{center}% - \medskip% - \ResumeLineNumbers% -} -\fi - -%%================================ -%% Keyword environment -%%================================ -\def\keywordnameEN{\textsc{Keywords}} -\def\keywordnameFR{\textsc{Mots clés}} -\def\keywordnameDE{\textsc{Schlüsselwörter}} -\def\keywordnameCN{关键词} -\def\keywordnameTC{關鍵詞} -\def\keywordnameJP{キーワード} -\def\keywordnameRU{Ключевые слова} - -\if@minimalist@classical -\newenvironment{keyword}{% - \LocallyStopLineNumbers% - \vspace{-.5\baselineskip}% - \begin{flushright}% - {\conditionalbfseries\small\csname keywordname\csname\languagename ABBR\endcsname\endcsname}\par% - \vspace{-\parskip}% - \vspace{-.30\baselineskip}% - \begin{minipage}[t]{.833\textwidth}% - \vspace{0pt}% - \color{maintext!80!paper}% - \footnotesize% - \parindent=2em - \raggedleft% -}{% - \end{minipage}% - \end{flushright}% - \bigskip% - \ResumeLineNumbers% -} -\else -\newenvironment{keyword}{% - \LocallyStopLineNumbers% - \vspace{-.75\baselineskip}% - \begin{center}% - {\conditionalbfseries\small\csname keywordname\csname\languagename ABBR\endcsname\endcsname}\\% - \vspace{-.3\baselineskip}% - \begin{minipage}[t]{.833\textwidth}% - \vspace{0pt}% - \color{maintext!80!paper}% - \footnotesize% - \parindent=2em - \begin{center}% -}{% - \end{center}% - \end{minipage}% - \end{center}% - \medskip% - \ResumeLineNumbers% -} -\fi - -%%================================ -%% Simulate features of amsart -%%================================ -\PassOptionsToPackage{amsfashion}{PJLauthor} -\RequirePackage{PJLauthor} - -} +\RequirePackage{l3keys2e} +\ProvidesExplPackage + {minimalist} + {2022/03/17} {} + {A simple and clear style for articles and books} + +\keys_define:nn { minimalist } + { + , draft .bool_set:N = \l__minimalist_fast_bool + , draft .initial:n = { false } + , fast .bool_set:N = \l__minimalist_fast_bool + + , style .str_set:N = \l__minimalist_style_str + , style .initial:n = { plain } + , classical .meta:n = { style = classical } + + , use-boldface .bool_set:N = \l__minimalist_use_boldface_bool + , use-boldface .initial:n = { false } + , use~boldface .bool_set:N = \l__minimalist_use_boldface_bool + , use boldface .bool_set:N = \l__minimalist_use_boldface_bool + , usebf .bool_set:N = \l__minimalist_use_boldface_bool + , allow-boldface .bool_set:N = \l__minimalist_use_boldface_bool + , allow~boldface .bool_set:N = \l__minimalist_use_boldface_bool + , allow boldface .bool_set:N = \l__minimalist_use_boldface_bool + , allowbf .bool_set:N = \l__minimalist_use_boldface_bool + , runin .bool_set:N = \l__minimalist_runin_bool + , runin .initial:n = { false } + + , theorem-in-new-line .bool_set:N = \l__minimalist_theorem_in_new_line_bool + , theorem-in-new-line .initial:n = { false } + , theorem~in~new~line .bool_set:N = \l__minimalist_theorem_in_new_line_bool + , theorem in new line .bool_set:N = \l__minimalist_theorem_in_new_line_bool + + , unknown .code:n = { + \PassOptionsToPackage { \CurrentOption } { projlib-language } + \PassOptionsToPackage { \CurrentOption } { projlib-author } + \PassOptionsToPackage { \CurrentOption } { projlib-datetime } + \PassOptionsToPackage { \CurrentOption } { projlib-draft } + \PassOptionsToPackage { \CurrentOption } { projlib-font } + \PassOptionsToPackage { \CurrentOption } { projlib-logo } + \PassOptionsToPackage { \CurrentOption } { projlib-math } + \PassOptionsToPackage { \CurrentOption } { projlib-paper } + \PassOptionsToPackage { \CurrentOption } { projlib-theorem } + } + } +\ProcessKeysOptions { minimalist } + +\bool_new:N \l__minimalist_is_book_bool +\cs_if_exist:cTF { c@chapter } + { + \bool_set_true:N \l__minimalist_is_book_bool + } + { + \bool_set_false:N \l__minimalist_is_book_bool + } + +%%================================ +%% Paper configuration +%%================================ +\RequirePackage { projlib-paper } + +%%================================ +%% Multi-language support +%%================================ +\RequirePackage { projlib-language } + +%%================================ +%% Loading the style +%%================================ +\exp_args:No \RequirePackage { minimalist- \l__minimalist_style_str } \endinput %% diff --git a/macros/latex/contrib/minimalist/minimart.cls b/macros/latex/contrib/minimalist/minimart.cls index e671b25d65..4fe51f5c4d 100644 --- a/macros/latex/contrib/minimalist/minimart.cls +++ b/macros/latex/contrib/minimalist/minimart.cls @@ -2,7 +2,7 @@ %% This is file `minimalist/minimart.cls', %% generated with the docstrip utility. -%% Copyright (C) 2021 by Jinwen XU +%% Copyright (C) 2021-2022 by Jinwen XU %% %% This is part of the minimalist class series. %% @@ -16,224 +16,175 @@ %% 2005/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] -\ProvidesClass{minimart} - [2021/12/16 A simple and clear article style] -\def\minimclass@baseclass{article} -\RequirePackage{kvoptions} -\RequirePackage{etoolbox} -\SetupKeyvalOptions{ - family = @minimclass, - prefix = @minimclass@, -} -\DeclareBoolOption[false]{draft} -\DeclareBoolOption[false]{fast} -\DeclareBoolOption[false]{classical} -\DeclareBoolOption[false]{useindent} -\DeclareBoolOption[false]{useosf} -\DeclareBoolOption[false]{lmodern} -\DeclareBoolOption[false]{palatino} -\DeclareBoolOption[false]{times} -\DeclareBoolOption[false]{garamond} -\DeclareBoolOption[false]{noto} -\DeclareBoolOption[false]{biolinum} -\DeclareBoolOption[false]{customfont} -\DeclareStringOption{thmnum}[PJL@thmnum@default] - -\newif\if@minimclass@bfivepaper\@minimclass@bfivepaperfalse -\DeclareVoidOption{b5paper}{\@minimclass@bfivepapertrue} -\newif\if@minimclass@afourpaper\@minimclass@afourpaperfalse -\DeclareVoidOption{a4paper}{\@minimclass@afourpapertrue} - -\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\minimclass@baseclass}} -\ProcessKeyvalOptions*\relax -\LoadClass{\minimclass@baseclass} - -\if@minimclass@draft - \@minimclass@fasttrue -\fi -\if@minimclass@classical\else - \@minimclass@useindenttrue -\fi -\if@minimclass@lmodern - \@minimclass@customfonttrue -\fi -\if@minimclass@palatino - \@minimclass@customfonttrue -\fi -\if@minimclass@times - \@minimclass@customfonttrue -\fi -\if@minimclass@garamond - \@minimclass@customfonttrue -\fi -\if@minimclass@noto - \@minimclass@customfonttrue -\fi -\if@minimclass@biolinum - \@minimclass@customfonttrue -\fi +\RequirePackage{l3keys2e} +\ProvidesExplClass + {minimart} + {2022/03/17} {} + {A simple and clear article style} + +\tl_const:Nn \l__minimclass_base_class_tl { article } + + +\bool_new:N \l__minimclass_load_custom_font_file_bool +\bool_set_false:N \l__minimclass_load_custom_font_file_bool + + +\keys_define:nn { minimclass } + { + , draft .bool_set:N = \l__minimclass_fast_bool + , draft .initial:n = { false } + , fast .bool_set:N = \l__minimclass_fast_bool + + , classical .bool_set:N = \l__minimclass_classical_bool + , classical .initial:n = { false } + + , use indent .bool_set:N = \l__minimclass_useindent_bool + , use indent .initial:n = { true } + , use~indent .bool_set:N = \l__minimclass_useindent_bool + , use-indent .bool_set:N = \l__minimclass_useindent_bool + + , load custom font file .code:n = { + \bool_set_true:N \l__minimclass_load_custom_font_file_bool + \str_set:Nn \l__minimclass_custom_font_file_str { #1 } + } + , load custom font file .default:n = { minimalist.font } + , load~custom~font~file .code:n = { + \bool_set_true:N \l__minimclass_load_custom_font_file_bool + \str_set:Nn \l__minimclass_custom_font_file_str { #1 } + } + , load~custom~font~file .default:n = { minimalist.font } + , load-custom-font-file .code:n = { + \bool_set_true:N \l__minimclass_load_custom_font_file_bool + \str_set:Nn \l__minimclass_custom_font_file_str { #1 } + } + , load-custom-font-file .default:n = { minimalist.font } + + + , a4paper .bool_set:N = \l__minimclass_a_four_paper_bool + , a4paper .initial:n = { false } + , b5paper .bool_set:N = \l__minimclass_b_five_paper_bool + , b5paper .initial:n = { false } + + , 11pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__minimclass_base_class_tl } } + , 12pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__minimclass_base_class_tl } } + + , unknown .code:n = { + \PassOptionsToPackage { \CurrentOption } { minimalist } + } + } +\ProcessKeysOptions { minimclass } + +\LoadClass{\l__minimclass_base_class_tl} + +\bool_if:NT \l__minimclass_classical_bool + { + \bool_set_false:N \l__minimclass_useindent_bool + } %%================================ -%% Page layout +%% Page layout %%================================ -\RequirePackage{silence} -\WarningFilter{geometry}{Over-specification in} -\RequirePackage[heightrounded]{geometry} -\geometry{ - papersize={7in,10in}, - % total={40em,60em}, - total={5.535in,8.300in}, - hmarginratio=1:1, - vmarginratio=1:1, - footnotesep=2em plus 2pt minus 2pt, -} -\if@minimclass@bfivepaper -\geometry{ - b5paper, - % total={40em,59em}, - total={5.535in,8.160in}, - hmarginratio=1:1, - vmarginratio=1:1, - footnotesep=2em plus 2pt minus 2pt, -} -\fi -\if@minimclass@afourpaper -\geometry{ - a4paper, - % total={47em,70em}, - total={6.500in,9.685in}, - hmarginratio=1:1, - vmarginratio=1:1, - footnotesep=2em plus 2pt minus 2pt, -} -\fi - -\if@minimclass@fast - \PassOptionsToPackage{fast}{minimalist} - \RequirePackage{draftwatermark} - \DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper} -\fi -\if@minimclass@useindent - \RequirePackage{indentfirst} -\else - \AtEndPreamble{\RequirePackage{parskip}} -\fi -\RequirePackage{minimalist} +\RequirePackage { silence } +\WarningFilter { geometry } { Over-specification } + +\PassOptionsToPackage { heightrounded } { geometry } +\RequirePackage { geometry } + +\geometry + { + papersize = { 7in, 10in }, + total = { 5.535in, 8.300in }, + centering, + footnotesep = 2em plus 2pt minus 2pt, + } + +\bool_if:NT \l__minimclass_b_five_paper_bool + { + \geometry + { + b5paper, + total = { 5.535in, 8.160in }, + centering, + footnotesep = 2em plus 2pt minus 2pt, + } + } + +\bool_if:NT \l__minimclass_a_four_paper_bool + { + \geometry + { + a4paper, + total = { 6.500in, 9.685in }, + centering, + footnotesep = 2em plus 2pt minus 2pt, + } + } + +\bool_if:NT \l__minimclass_fast_bool + { + \PassOptionsToPackage { fast } { minimalist } + \RequirePackage { draftwatermark } + \DraftwatermarkOptions { text = { \normalfont DRAFT }, color = paper!97!-paper } + } + +\bool_if:NTF \l__minimclass_useindent_bool + { + \RequirePackage { indentfirst } + } + { + \hook_gput_code:nnn { begindocument/before } { minimclass } + { + \RequirePackage { parskip } + } + } + +\RequirePackage { minimalist } %%================================ -%% Fonts +%% Fonts %%================================ -\RequirePackage{iftex} -\ifPDFTeX -\RequirePackage[T1]{fontenc} -\RequirePackage{inputenc} -\fi -\if@minimclass@customfont\else -\RequirePackage{mathpazo} -\RequirePackage{newpxtext} -\fi -\RequirePackage{amssymb} - -\if@minimclass@lmodern - \RequirePackage{amssymb} - \if@minimclass@useosf - \RequirePackage{cfr-lm} - \else - \RequirePackage{lmodern} - \fi - \PJLsetlinespacing{\setstretch{1.00}} -\fi - -\if@minimclass@palatino - \RequirePackage{amssymb} - \RequirePackage{mathpazo} - \PassOptionsToPackage{defaultsups}{newpxtext} - \RequirePackage{newpxtext} - % \RequirePackage{newpxmath} - \let\openbox\relax - \PJLsetlinespacing{\setstretch{1.07}} - \if@minimclass@useosf\useosf\fi -\fi - -\if@minimclass@times - \RequirePackage{amssymb} - \PassOptionsToPackage{defaultsups}{newtxtext} - \RequirePackage{newtxtext} - \RequirePackage{newtxmath} - \let\openbox\relax - \PJLsetlinespacing{\setstretch{1.00}} - \if@minimclass@useosf\useosf\fi -\fi - -\if@minimclass@garamond - \RequirePackage{amssymb} - \if@minimclass@useosf\else - \PassOptionsToPackage{lining}{ebgaramond} - \fi - \RequirePackage{ebgaramond-maths} - \RequirePackage{ebgaramond} - % \RequirePackage{garamondlibre} - \PJLsetlinespacing{\setstretch{1.00}} -\fi - -\if@minimclass@noto - \RequirePackage{amssymb} - \if@minimclass@useosf - \PassOptionsToPackage{oldstyle}{notomath} - \fi - \RequirePackage{anyfontsize} - \RequirePackage{notomath} - \PJLsetlinespacing{\setstretch{1.00}} -\fi - -\if@minimclass@biolinum - \RequirePackage{amssymb} - % \RequirePackage{mathpazo} - % \RequirePackage[sansmath]{libertinust1math} - \ifPDFTeX - \if@minimclass@useosf - \PassOptionsToPackage{osf}{biolinum} - \fi - \RequirePackage{biolinum} - \renewcommand*\familydefault{\biolinum@family} - \else - \PassOptionsToPackage{no-math}{fontspec} - \RequirePackage{fontspec} - \setmainfont{LinBiolinum_R.otf}[ - BoldFont = LinBiolinum_RB.otf , - ItalicFont = LinBiolinum_RI.otf , - BoldItalicFont = LinBiolinum_RBO.otf, - \if@minimclass@useosf Numbers = OldStyle\fi ] - \fi - \PJLsetlinespacing{\setstretch{1.05}} - \RequirePackage[italic,defaultmathsizes]{mathastext} -\fi - -\def\PJL@font@alreadyset{} - -\PassOptionsToPackage{verbose=silent}{microtype} -\RequirePackage{microtype} -\PassOptionsToPackage{all}{nowidow} -\RequirePackage{nowidow} -\RequirePackage{embrac} +\WarningFilter { latexfont } { Font~shape } +\WarningFilter { latexfont } { Some~font } + +\cs_new_protected:Nn \__minimclass_load_file_or_config:Nnn + { + \bool_if:NT #1 + { + \exp_args:Nx \file_if_exist:nT { #2 } + { + \exp_args:Nx \file_input:n { #2 } + \use_none:nn + } + } + \use:n { #3 } + } + + +\__minimclass_load_file_or_config:Nnn \l__minimclass_load_custom_font_file_bool { \l__minimclass_custom_font_file_str } + { + \RequirePackage { projlib-font } + + \bool_if:NF \g_projlib_font_already_set_bool + { + \RequirePackage { mathpazo } + \RequirePackage { newpxtext } + \RequirePackage { amssymb } + } + } + +\PassOptionsToPackage { all } { nowidow } +\RequirePackage { nowidow } +\RequirePackage { embrac } %%================================ -%% Graphics +%% Graphics %%================================ -\RequirePackage{graphicx} -\graphicspath{{images/}} -\RequirePackage{wrapfig} -\RequirePackage{float} -\RequirePackage{caption} -\captionsetup{font=small} - -%%================================ -%% Index -%%================================ -\AtEndPreamble{ -\pretocmd{\printindex}{\LocallyStopLineNumbers}{}{} -\apptocmd{\printindex}{\ResumeLineNumbers}{}{} -} +\RequirePackage { graphicx } +\graphicspath { { images/ } } +\RequirePackage { wrapfig } +\RequirePackage { float } +\RequirePackage { caption } +\captionsetup { font = small } \endinput %% diff --git a/macros/latex/contrib/minimalist/minimbook.cls b/macros/latex/contrib/minimalist/minimbook.cls index 384451f8f1..f346448d3a 100644 --- a/macros/latex/contrib/minimalist/minimbook.cls +++ b/macros/latex/contrib/minimalist/minimbook.cls @@ -2,7 +2,7 @@ %% This is file `minimalist/minimbook.cls', %% generated with the docstrip utility. -%% Copyright (C) 2021 by Jinwen XU +%% Copyright (C) 2021-2022 by Jinwen XU %% %% This is part of the minimalist class series. %% @@ -16,224 +16,175 @@ %% 2005/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] -\ProvidesClass{minimbook} - [2021/12/16 A simple and clear book style] -\def\minimclass@baseclass{book} -\RequirePackage{kvoptions} -\RequirePackage{etoolbox} -\SetupKeyvalOptions{ - family = @minimclass, - prefix = @minimclass@, -} -\DeclareBoolOption[false]{draft} -\DeclareBoolOption[false]{fast} -\DeclareBoolOption[false]{classical} -\DeclareBoolOption[false]{useindent} -\DeclareBoolOption[false]{useosf} -\DeclareBoolOption[false]{lmodern} -\DeclareBoolOption[false]{palatino} -\DeclareBoolOption[false]{times} -\DeclareBoolOption[false]{garamond} -\DeclareBoolOption[false]{noto} -\DeclareBoolOption[false]{biolinum} -\DeclareBoolOption[false]{customfont} -\DeclareStringOption{thmnum}[PJL@thmnum@default] - -\newif\if@minimclass@bfivepaper\@minimclass@bfivepaperfalse -\DeclareVoidOption{b5paper}{\@minimclass@bfivepapertrue} -\newif\if@minimclass@afourpaper\@minimclass@afourpaperfalse -\DeclareVoidOption{a4paper}{\@minimclass@afourpapertrue} - -\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\minimclass@baseclass}} -\ProcessKeyvalOptions*\relax -\LoadClass{\minimclass@baseclass} - -\if@minimclass@draft - \@minimclass@fasttrue -\fi -\if@minimclass@classical\else - \@minimclass@useindenttrue -\fi -\if@minimclass@lmodern - \@minimclass@customfonttrue -\fi -\if@minimclass@palatino - \@minimclass@customfonttrue -\fi -\if@minimclass@times - \@minimclass@customfonttrue -\fi -\if@minimclass@garamond - \@minimclass@customfonttrue -\fi -\if@minimclass@noto - \@minimclass@customfonttrue -\fi -\if@minimclass@biolinum - \@minimclass@customfonttrue -\fi +\RequirePackage{l3keys2e} +\ProvidesExplClass + {minimbook} + {2022/03/17} {} + {A simple and clear book style} + +\tl_const:Nn \l__minimclass_base_class_tl { book } + + +\bool_new:N \l__minimclass_load_custom_font_file_bool +\bool_set_false:N \l__minimclass_load_custom_font_file_bool + + +\keys_define:nn { minimclass } + { + , draft .bool_set:N = \l__minimclass_fast_bool + , draft .initial:n = { false } + , fast .bool_set:N = \l__minimclass_fast_bool + + , classical .bool_set:N = \l__minimclass_classical_bool + , classical .initial:n = { false } + + , use indent .bool_set:N = \l__minimclass_useindent_bool + , use indent .initial:n = { true } + , use~indent .bool_set:N = \l__minimclass_useindent_bool + , use-indent .bool_set:N = \l__minimclass_useindent_bool + + , load custom font file .code:n = { + \bool_set_true:N \l__minimclass_load_custom_font_file_bool + \str_set:Nn \l__minimclass_custom_font_file_str { #1 } + } + , load custom font file .default:n = { minimalist.font } + , load~custom~font~file .code:n = { + \bool_set_true:N \l__minimclass_load_custom_font_file_bool + \str_set:Nn \l__minimclass_custom_font_file_str { #1 } + } + , load~custom~font~file .default:n = { minimalist.font } + , load-custom-font-file .code:n = { + \bool_set_true:N \l__minimclass_load_custom_font_file_bool + \str_set:Nn \l__minimclass_custom_font_file_str { #1 } + } + , load-custom-font-file .default:n = { minimalist.font } + + + , a4paper .bool_set:N = \l__minimclass_a_four_paper_bool + , a4paper .initial:n = { false } + , b5paper .bool_set:N = \l__minimclass_b_five_paper_bool + , b5paper .initial:n = { false } + + , 11pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__minimclass_base_class_tl } } + , 12pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__minimclass_base_class_tl } } + + , unknown .code:n = { + \PassOptionsToPackage { \CurrentOption } { minimalist } + } + } +\ProcessKeysOptions { minimclass } + +\LoadClass{\l__minimclass_base_class_tl} + +\bool_if:NT \l__minimclass_classical_bool + { + \bool_set_false:N \l__minimclass_useindent_bool + } %%================================ -%% Page layout +%% Page layout %%================================ -\RequirePackage{silence} -\WarningFilter{geometry}{Over-specification in} -\RequirePackage[heightrounded]{geometry} -\geometry{ - papersize={7in,10in}, - % total={40em,60em}, - total={5.535in,8.300in}, - hmarginratio=1:1, - vmarginratio=1:1, - footnotesep=2em plus 2pt minus 2pt, -} -\if@minimclass@bfivepaper -\geometry{ - b5paper, - % total={40em,59em}, - total={5.535in,8.160in}, - hmarginratio=1:1, - vmarginratio=1:1, - footnotesep=2em plus 2pt minus 2pt, -} -\fi -\if@minimclass@afourpaper -\geometry{ - a4paper, - % total={47em,70em}, - total={6.500in,9.685in}, - hmarginratio=1:1, - vmarginratio=1:1, - footnotesep=2em plus 2pt minus 2pt, -} -\fi - -\if@minimclass@fast - \PassOptionsToPackage{fast}{minimalist} - \RequirePackage{draftwatermark} - \DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper} -\fi -\if@minimclass@useindent - \RequirePackage{indentfirst} -\else - \AtEndPreamble{\RequirePackage{parskip}} -\fi -\RequirePackage{minimalist} +\RequirePackage { silence } +\WarningFilter { geometry } { Over-specification } + +\PassOptionsToPackage { heightrounded } { geometry } +\RequirePackage { geometry } + +\geometry + { + papersize = { 7in, 10in }, + total = { 5.535in, 8.300in }, + centering, + footnotesep = 2em plus 2pt minus 2pt, + } + +\bool_if:NT \l__minimclass_b_five_paper_bool + { + \geometry + { + b5paper, + total = { 5.535in, 8.160in }, + centering, + footnotesep = 2em plus 2pt minus 2pt, + } + } + +\bool_if:NT \l__minimclass_a_four_paper_bool + { + \geometry + { + a4paper, + total = { 6.500in, 9.685in }, + centering, + footnotesep = 2em plus 2pt minus 2pt, + } + } + +\bool_if:NT \l__minimclass_fast_bool + { + \PassOptionsToPackage { fast } { minimalist } + \RequirePackage { draftwatermark } + \DraftwatermarkOptions { text = { \normalfont DRAFT }, color = paper!97!-paper } + } + +\bool_if:NTF \l__minimclass_useindent_bool + { + \RequirePackage { indentfirst } + } + { + \hook_gput_code:nnn { begindocument/before } { minimclass } + { + \RequirePackage { parskip } + } + } + +\RequirePackage { minimalist } %%================================ -%% Fonts +%% Fonts %%================================ -\RequirePackage{iftex} -\ifPDFTeX -\RequirePackage[T1]{fontenc} -\RequirePackage{inputenc} -\fi -\if@minimclass@customfont\else -\RequirePackage{mathpazo} -\RequirePackage{newpxtext} -\fi -\RequirePackage{amssymb} - -\if@minimclass@lmodern - \RequirePackage{amssymb} - \if@minimclass@useosf - \RequirePackage{cfr-lm} - \else - \RequirePackage{lmodern} - \fi - \PJLsetlinespacing{\setstretch{1.00}} -\fi - -\if@minimclass@palatino - \RequirePackage{amssymb} - \RequirePackage{mathpazo} - \PassOptionsToPackage{defaultsups}{newpxtext} - \RequirePackage{newpxtext} - % \RequirePackage{newpxmath} - \let\openbox\relax - \PJLsetlinespacing{\setstretch{1.07}} - \if@minimclass@useosf\useosf\fi -\fi - -\if@minimclass@times - \RequirePackage{amssymb} - \PassOptionsToPackage{defaultsups}{newtxtext} - \RequirePackage{newtxtext} - \RequirePackage{newtxmath} - \let\openbox\relax - \PJLsetlinespacing{\setstretch{1.00}} - \if@minimclass@useosf\useosf\fi -\fi - -\if@minimclass@garamond - \RequirePackage{amssymb} - \if@minimclass@useosf\else - \PassOptionsToPackage{lining}{ebgaramond} - \fi - \RequirePackage{ebgaramond-maths} - \RequirePackage{ebgaramond} - % \RequirePackage{garamondlibre} - \PJLsetlinespacing{\setstretch{1.00}} -\fi - -\if@minimclass@noto - \RequirePackage{amssymb} - \if@minimclass@useosf - \PassOptionsToPackage{oldstyle}{notomath} - \fi - \RequirePackage{anyfontsize} - \RequirePackage{notomath} - \PJLsetlinespacing{\setstretch{1.00}} -\fi - -\if@minimclass@biolinum - \RequirePackage{amssymb} - % \RequirePackage{mathpazo} - % \RequirePackage[sansmath]{libertinust1math} - \ifPDFTeX - \if@minimclass@useosf - \PassOptionsToPackage{osf}{biolinum} - \fi - \RequirePackage{biolinum} - \renewcommand*\familydefault{\biolinum@family} - \else - \PassOptionsToPackage{no-math}{fontspec} - \RequirePackage{fontspec} - \setmainfont{LinBiolinum_R.otf}[ - BoldFont = LinBiolinum_RB.otf , - ItalicFont = LinBiolinum_RI.otf , - BoldItalicFont = LinBiolinum_RBO.otf, - \if@minimclass@useosf Numbers = OldStyle\fi ] - \fi - \PJLsetlinespacing{\setstretch{1.05}} - \RequirePackage[italic,defaultmathsizes]{mathastext} -\fi - -\def\PJL@font@alreadyset{} - -\PassOptionsToPackage{verbose=silent}{microtype} -\RequirePackage{microtype} -\PassOptionsToPackage{all}{nowidow} -\RequirePackage{nowidow} -\RequirePackage{embrac} +\WarningFilter { latexfont } { Font~shape } +\WarningFilter { latexfont } { Some~font } + +\cs_new_protected:Nn \__minimclass_load_file_or_config:Nnn + { + \bool_if:NT #1 + { + \exp_args:Nx \file_if_exist:nT { #2 } + { + \exp_args:Nx \file_input:n { #2 } + \use_none:nn + } + } + \use:n { #3 } + } + + +\__minimclass_load_file_or_config:Nnn \l__minimclass_load_custom_font_file_bool { \l__minimclass_custom_font_file_str } + { + \RequirePackage { projlib-font } + + \bool_if:NF \g_projlib_font_already_set_bool + { + \RequirePackage { mathpazo } + \RequirePackage { newpxtext } + \RequirePackage { amssymb } + } + } + +\PassOptionsToPackage { all } { nowidow } +\RequirePackage { nowidow } +\RequirePackage { embrac } %%================================ -%% Graphics +%% Graphics %%================================ -\RequirePackage{graphicx} -\graphicspath{{images/}} -\RequirePackage{wrapfig} -\RequirePackage{float} -\RequirePackage{caption} -\captionsetup{font=small} - -%%================================ -%% Index -%%================================ -\AtEndPreamble{ -\pretocmd{\printindex}{\LocallyStopLineNumbers}{}{} -\apptocmd{\printindex}{\ResumeLineNumbers}{}{} -} +\RequirePackage { graphicx } +\graphicspath { { images/ } } +\RequirePackage { wrapfig } +\RequirePackage { float } +\RequirePackage { caption } +\captionsetup { font = small } \endinput %% -- cgit v1.2.3