summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/minimalist/minimalist-classical.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-03-29 03:00:35 +0000
committerNorbert Preining <norbert@preining.info>2022-03-29 03:00:35 +0000
commitfed9dbe9efe10955aefb7687a15de45404cc76f4 (patch)
tree056a7157fcf92e74592f51aebfa3cd17da8645ca /macros/latex/contrib/minimalist/minimalist-classical.sty
parent5f80d92d8bebc775b30e2b212e33b08089517654 (diff)
CTAN sync 202203290300
Diffstat (limited to 'macros/latex/contrib/minimalist/minimalist-classical.sty')
-rw-r--r--macros/latex/contrib/minimalist/minimalist-classical.sty362
1 files changed, 225 insertions, 137 deletions
diff --git a/macros/latex/contrib/minimalist/minimalist-classical.sty b/macros/latex/contrib/minimalist/minimalist-classical.sty
index beef4ed857..11b9b94ad3 100644
--- a/macros/latex/contrib/minimalist/minimalist-classical.sty
+++ b/macros/latex/contrib/minimalist/minimalist-classical.sty
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{minimalist-classical}
- {2022/03/19} {}
+ {2022/03/28} {}
{The classical style of minimalist}
\@ifpackageloaded { minimalist } {}
@@ -113,34 +113,91 @@
\fancypagestyle { fancy }
{
- \fancyhf{}
+ \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 }}
+ \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}}
+ \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}
+ \renewcommand { \headrulewidth } { 0pt }
}
-\pagestyle{fancy}
+\pagestyle { fancy }
\fancypagestyle { plain }
{
- \fancyhf{}
+ \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 }}}
+ \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}}
+ \fancyfoot[R]
+ {
+ \small
+ \nobreakspace
+ \rlap
+ {
+ \textcolor { main-text!27!paper } { \l_minimalist_sep_bar }
+ \nobreakspace \nobreakspace
+ \thepage
+ }
+ }
\fi
- \renewcommand{\headrulewidth}{0pt}
+ \renewcommand { \headrulewidth } { 0pt }
}
\bool_if:NTF \l__minimalist_is_book_bool
@@ -150,35 +207,31 @@
\newcommand{ \minimalist_draw_help_line: }{}
}
{
- \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)$);
- }
+ \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}
+ \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
@@ -234,11 +287,11 @@
}
\AddLanguageSetting [ schinese ]
{
- \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分}
+ \renewcommand{\partstring}{第 \zhnumber{\arabic{part}} 部分}
}
\AddLanguageSetting [ tchinese ]
{
- \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分}
+ \renewcommand{\partstring}{第 \zhnumber{\arabic{part}} 部分}
}
\AddLanguageSetting [ japanese ]
{
@@ -406,7 +459,7 @@
\titlecontents{part}
[0em]
{\addvspace{1.5pc}\filcenter\normalfont}
- {\thecontentslabel\nopagebreak\\\nopagebreak\uppercase}
+ { \minimalist_apply_title_numbering_style:N { \thecontentslabel } \nopagebreak\\\nopagebreak\uppercase}
{}
{} % without page number
[\addvspace{.5pc}]
@@ -487,7 +540,20 @@
%%================================
%% Blank page
%%================================
-\newcommand{\blinkpagetext}{This~page~is~intentionally~left~blank}
+\projlib_langauge_define_multilingual_text:Nn \bl@nkpagetext
+ {
+ , EN = This~page~is~intentionally~left~blank
+ , FR = Cette~page~a~été~intentionellement~laissée~vide
+ , DE = Diese~Seite~wurde~absichtlich~leer~gelassen
+ , IT = Questa~pagina~è~stata~lasciata~vuota~intenzionalmente
+ , PT = Esta~página~foi~intencionalmente~deixada~em~branco
+ , BR = Esta~página~foi~intencionalmente~deixada~em~branco
+ , ES = Esta~página~se~ha~dejado~intencionadamente~en~blanco
+ , CN = 此页为有意留为空白
+ , TC = 此頁為有意留為空白
+ , JP = このページは意図的に空白にしてあります
+ , RU = Эта~страница~намеренно~оставлена~пустой
+ }
\renewcommand{\cleardoublepage}{
\relax
\clearpage
@@ -496,7 +562,7 @@
\hook_gput_next_code:nn { shipout/background }
{
\put(0.5\paperwidth,-0.5\paperheight){
- \makebox[0pt]{\large\color{main-text!10!paper}\blinkpagetext}}
+ \makebox[0pt]{\large\color{main-text!10!paper}\bl@nkpagetext}}
}
\null\newpage\fi\fi
}
@@ -741,104 +807,128 @@
%% 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 {
+ {
+ \hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \LocallyStopLineNumbers }
+ \hook_gput_code:nnn { cmd/printindex/after } { minimalist } { \ResumeLineNumbers }
+ }
%%================================
%% 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
-}
+\bool_if:NTF \l__minimalist_is_book_bool
+ {
+ \hook_gput_code:nnn { package/projlib-author/after } { minimalist }
+ {
+ \tl_gset:Nn \g__projlib_author_font_author_tl { \normalfont \scshape }
+ \tl_gset:Nn \g__projlib_author_font_institute_tl { \large \normalfont }
+ \tl_gset:Nn \g__projlib_author_font_address_tl { \large \normalfont \itshape }
+ \tl_gset:Nn \g__projlib_author_font_curraddr_tl { \large \normalfont \itshape }
+ \tl_gset:Nn \g__projlib_author_font_email_tl { \large \normalfont \ttfamily }
+ }
+
+ \RequirePackage { projlib-titlepage }
+ \renewcommand{\maketitle}{
+ \LocallyStopLineNumbers
+ \ProjLibTitlePage [ style = simple ]
+ {
+ , title = \@title
+ , author = \@author
+ , date = \@date
+ }
+ \ResumeLineNumbers
+ }
+ }
+ {
+ \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} }
+ \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
- }
+ \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
-}
+ \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
+ }
+ } % end of \bool_if:NTF \l__minimalist_is_book_bool
%%================================
%% Simulate features of amsart
@@ -846,8 +936,6 @@
\PassOptionsToPackage { amsfashion } { projlib-author }
\RequirePackage { projlib-author }
-}
-
\endinput
%%
%% End of file `minimalist/minimalist-classical.sty'.