summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/minimalist/minimalist.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/minimalist/minimalist.sty')
-rw-r--r--macros/latex/contrib/minimalist/minimalist.sty653
1 files changed, 653 insertions, 0 deletions
diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty
new file mode 100644
index 0000000000..2648a34701
--- /dev/null
+++ b/macros/latex/contrib/minimalist/minimalist.sty
@@ -0,0 +1,653 @@
+%%
+%% This is file `minimalist/minimalist.sty',
+%% generated with the docstrip utility.
+
+%% Copyright (C) 2021 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]
+\ProvidesPackage{minimalist}
+ [2021/03/15 A simple and clear style for articles and books]
+\RequirePackage{etoolbox}
+\RequirePackage{kvoptions}
+\SetupKeyvalOptions{%
+ family = @minimalist,
+ prefix = @minimalist@
+}
+\DeclareBoolOption[false]{draft}
+\DeclareBoolOption[false]{fast}
+\DeclareBoolOption[false]{polyglossia}
+\ProcessKeyvalOptions*\relax
+
+\if@minimalist@draft
+ \@minimalist@fasttrue
+\fi
+
+\newif\ifIsBook
+\ifdefined\chapter\IsBooktrue\else\IsBookfalse\fi
+
+%%================================
+%% Title fonts
+%%================================
+\RequirePackage{anyfontsize}
+\newcommand{\partfont}{\sffamily}
+\newcommand{\chapfont}{\sffamily}
+\newcommand{\secfont}{}
+\newcommand{\subsecfont}{}
+\newcommand{\subsubsecfont}{}
+
+%%================================
+%% Color
+%%================================
+\RequirePackage{xcolor}
+\definecolor{paper}{RGB}{255,255,255}
+
+%%================================
+%% Footer
+%%================================
+\RequirePackage{geometry}
+\RequirePackage{fancyhdr}
+\RequirePackage{extramarks}
+\fancypagestyle{fancy}{
+ \fancyhf{}
+ \if@twoside
+ \fancyfoot[RO]{\small\textcolor{black!30!paper}{\lastrightmark}%
+ ~~\rlap{\textcolor{gray!55!paper}{$|$}~~\thepage}}
+ \fancyfoot[LE]{\small\leavevmode\llap{\thepage%
+ ~~\textcolor{gray!55!paper}{$|$}}%
+ ~~\textcolor{black!30!paper}{\lastleftmark}}
+ \else
+ \fancyfoot[R]{\small\textcolor{black!30!paper}{\lastrightmark}%
+ ~~\rlap{\textcolor{gray!55!paper}{$|$}~~\thepage}}
+ \fi
+ \renewcommand{\headrulewidth}{0pt}
+}
+\pagestyle{fancy}
+\fancypagestyle{plain}{
+ \fancyhf{}
+ \if@twoside
+ \fancyfoot[RO]{\small%
+ ~\rlap{\textcolor{gray!55!paper}{$|$}~~\thepage}}
+ \fancyfoot[LE]{\small\leavevmode\llap{\thepage%
+ ~~\textcolor{gray!55!paper}{$|$}}}
+ \else
+ \fancyfoot[R]{\small%
+ ~\rlap{\textcolor{gray!55!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=black,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=black,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{\raisebox{.03em}{\footnotesize/}%
+ ~\thesection~\raisebox{.03em}{\footnotesize/}~~~#1}}
+}{
+ \if@twoside
+ \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{}}
+ \else
+ \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
+ \fi
+}
+%%===============================
+%% Line spacing
+%%================================
+\RequirePackage{setspace}
+\setstretch{1.07}
+\raggedbottom
+
+%%================================
+%% Line numbers
+%%================================
+\PassOptionsToPackage{pagewise,mathlines}{lineno}
+\RequirePackage{lineno}
+\renewcommand\linenumberfont{\ttfamily\color{gray!15!paper}\footnotesize}
+\setlength\linenumbersep{1em}
+
+\RequirePackage{mathtools}
+
+\newcommand*\linenomathpatch[1]{%
+ \cspreto{#1}{\linenomath}%
+ \cspreto{#1*}{\linenomath}%
+ \cspreto{end#1}{\endlinenomath}%
+ \cspreto{end#1*}{\endlinenomath}%
+}
+\newcommand*\linenomathpatchAMS[1]{%
+ \cspreto{#1}{\linenomathAMS}%
+ \cspreto{#1*}{\linenomathAMS}%
+ \csappto{end#1}{\endlinenomath}%
+ \csappto{end#1*}{\endlinenomath}%
+}
+\expandafter\ifx\linenomath\linenomathWithnumbers
+ \let\linenomathAMS\linenomathWithnumbers
+ \patchcmd\linenomathAMS{\advance\postdisplaypenalty\linenopenalty}{}{}{}
+\else
+ \let\linenomathAMS\linenomathNonumbers
+\fi
+
+\linenomathpatch{equation}
+\linenomathpatchAMS{gather}
+\linenomathpatchAMS{multline}
+\linenomathpatchAMS{align}
+\linenomathpatchAMS{alignat}
+\linenomathpatchAMS{flalign}
+
+\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}
+
+\ifbool{IsBook}{
+ %% Part
+ \titleclass{\part}{top} % make part like a chapter
+ \titleformat{\part}[display]
+ {\thispagestyle{part}%
+ \LocallyStopLineNumbers%
+ \partfont\filleft}
+ {\MakeUppercase{\partname~\protect\thepart}}
+ {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{black!80!paper}\raggedleft#1%
+ \end{minipage}%
+ \end{flushright}%
+ \ResumeLineNumbers%
+ \vfill\vfill%
+ \cleardoublepage%
+ }
+
+ %% Chapter
+ \titleformat{\chapter}
+ {\thispagestyle{fancy}%
+ \LocallyStopLineNumbers%
+ \color{black!80!paper}\chapfont\fontsize{16}{0}\selectfont}{}{0em}
+ {\rlap{\hspace*{-.5em}{\color{gray!25!paper}%
+ \fontsize{80}{0}\selectfont\raisebox{-7pt}{\thechapter}}}#1}
+ [\ResumeLineNumbers]
+ \titleformat{name=\chapter,numberless}
+ {\thispagestyle{fancy}%
+ \LocallyStopLineNumbers%
+ % \phantomsection\addcontentsline{toc}{chapter}{#1}%
+ \color{black!80!paper}\chapfont\fontsize{16}{0}\selectfont}{}{0em}
+ {\rlap{\hspace*{-.5em}{\color{gray!25!paper}%
+ \fontsize{80}{0}\selectfont\normalfont\raisebox{-7pt}{*}}}#1}
+ [\ResumeLineNumbers]
+}{
+ %% Part
+ \titleformat{\part}[display]
+ {\LocallyStopLineNumbers%
+ \partfont\filleft}
+ {\MakeUppercase{\partname~\protect\thepart}}
+ {.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{black!80!paper}\raggedleft#1%
+ \end{minipage}%
+ \end{flushright}%
+ \ResumeLineNumbers%
+ }
+}
+
+%% Section
+\newcommand\seculine{\bgroup\markoverwith{\color{gray!55!paper}%
+ \rule[-0.9ex]{2pt}{.6pt}\hspace{-2pt}\rule[-1.2ex]{2pt}{.6pt}}\ULon}
+\renewcommand\thesection{\arabic{section}}
+\titleformat{\section}
+ {\LocallyStopLineNumbers%
+ \secfont\centering}{}{0em}
+ {{\small\textcolor{gray!55!paper}{\raisebox{.03em}{\footnotesize/}}%
+ \,\,\textcolor{black!80!paper}{\arabic{section}}%
+ \,\,\textcolor{gray!55!paper}{\raisebox{.03em}{\footnotesize/}}}\\
+ \seculine{#1}}
+ [\ResumeLineNumbers]
+\titleformat{name=\section,numberless}
+ {\LocallyStopLineNumbers%
+ % \phantomsection\addcontentsline{toc}{section}{#1}%
+ \secfont\centering}{}{0em}
+ {\seculine{#1}}
+ [\ResumeLineNumbers]
+
+%% Subsection
+\newcommand\subseculine{\bgroup\markoverwith{\color{gray!55!paper}%
+ \rule[-1ex]{2pt}{.75pt}}\ULon}
+\renewcommand\thesubsection{%
+ \ifnum\c@section=0\else\arabic{section}.\fi\arabic{subsection}}
+\titleformat{\subsection}
+ {\LocallyStopLineNumbers%
+ \subsecfont}{}{0em}
+ {\subseculine{\thesubsection~\textcolor{gray!55!paper}{$|$}~#1}}
+ [\ResumeLineNumbers]
+\titleformat{name=\subsection,numberless}
+ {\LocallyStopLineNumbers%
+ \subsecfont}{}{0em}
+ {\subseculine{#1}}
+ [\ResumeLineNumbers]
+
+%% Subsubsection
+\titleformat{\subsubsection}
+ {\LocallyStopLineNumbers%
+ \subsubsecfont}{\thesubsubsection}{1em}
+ {#1}
+ [\ResumeLineNumbers]
+\titlespacing{\subsubsection}{0pt}{.8\baselineskip}{.5\baselineskip}
+
+%%================================
+%% TOC format
+%%================================
+\RequirePackage{titletoc}
+\titlecontents{part}
+ [0em]
+ {\addvspace{1.5pc}\filcenter\partfont}
+ {\thecontentslabel\\\uppercase}
+ {}
+ {} % without page number
+ [\addvspace{.5pc}]
+\ifbool{IsBook}{
+ \titlecontents{chapter}
+ [2em] % i.e., 0em (part) + 2em
+ {\addvspace{.5pc}\chapfont}
+ {\contentslabel{2em}}
+ {\hspace*{-2em}}
+ {\normalfont\titlerule*[1em]{\textcolor{gray!30!paper}{.}}\contentspage}
+ \titlecontents{section}
+ [4em] % i.e., 2em (chapter) + 2em
+ {\secfont}
+ {\contentslabel{1.75em}}
+ {\hspace*{-1.75em}}
+ {\titlerule*[1em]{\textcolor{gray!30!paper}{.}}\contentspage}
+ \titlecontents{subsection}
+ [7em] % i.e., 4em (section) + 3em
+ {\subsecfont}
+ {\contentslabel{2.75em}}
+ {\hspace*{-2.75em}}
+ {\titlerule*[1em]{\textcolor{gray!30!paper}{.}}\contentspage}
+}{
+ \titlecontents{section}
+ [2em] % i.e., 0em (part) + 2em
+ {\secfont}
+ {\contentslabel{1.75em}}
+ {\hspace*{-1.75em}}
+ {\titlerule*[1em]{\textcolor{gray!30!paper}{.}}\contentspage}
+ \titlecontents{subsection}
+ [5em] % i.e., 2em (section) + 3em
+ {\subsecfont}
+ {\contentslabel{2.75em}}
+ {\hspace*{-2.75em}}
+ {\titlerule*[1em]{\textcolor{gray!30!paper}{.}}\contentspage}
+}
+
+%%================================
+%% Lists
+%%================================
+\RequirePackage{enumitem}
+\setlist{noitemsep,leftmargin=2em}
+\renewcommand\labelitemi{\color{gray!50}$\bullet$}
+
+%%================================
+%% 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{gray!20!paper}\blinkpagetext}}}
+ \null\newpage\fi\fi}
+
+%%================================
+%% Theorems
+%%================================
+\RequirePackage{amsthm}
+\newtheoremstyle{simple}%
+ {}{}%
+ {\normalfont}{}%
+ {\normalfont}{}%
+ {0pt}%
+ {\thmname{\textsc{#1}}\thmnumber{ #2}\hspace{.4em}%
+ \textcolor{gray!55!paper}{$|$}\hspace{.4em}%
+ \color{gray}\thmnote{\ensuremath{(\text{#3})}~~}\pushQED{\qed}}
+\def\@endtheorem{\popQED\endtrivlist\@endpefalse }
+
+\renewcommand{\qedsymbol}{%
+ \makebox[1em]{\color{gray!55!paper}\rule[-0.1em]{.95em}{.95em}}}
+
+\if@minimalist@fast\else
+ \PassOptionsToPackage{hidelinks,linktoc=all}{hyperref}
+ \RequirePackage{bookmark}
+ \RequirePackage{hyperref}
+\fi
+\RequirePackage{aliascnt}
+\PassOptionsToPackage{nameinlink}{cleveref}
+\RequirePackage{cleveref}
+
+\newcommand\englishABBR{EN}
+\newcommand\frenchABBR{FR}
+\newcommand\chineseABBR{CN}
+
+\RequirePackage{xstring}
+\newcommand\PassFirstToSecond[2]{#2{#1}}%
+\NewDocumentCommand{\CreateTheorem}{sm}{%
+ \begingroup
+ \protected@edef\temp{#2}%
+ \expandafter\IfEndWith\expandafter{\temp}{*}{%
+ \expandafter\StrGobbleRight\expandafter{\temp}{1}[\temp]%
+ \PassFirstToSecond{*}%
+ }{%
+ \PassFirstToSecond{}%
+ }%
+ {\expandafter\PassFirstToSecond%
+ \expandafter{\temp}{\endgroup\InnerCreateTheorem{#1}}}%
+}%
+\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>}{%
+ \IfBooleanTF{#1}{%
+ \IfValueTF{#4}
+ {\@firstoftwo}
+ {\IfValueTF{#5}{\@firstoftwo}{\@secondoftwo}}%
+ }{%
+ \IfValueTF{#4}
+ {\IfValueTF{#5}{\@firstoftwo}{\@secondoftwo}}{
+ \@secondoftwo}
+ }%
+ {%
+ \GenericError{}%
+ {\string\CreateTheorem\space syntax error\on@line}{%
+ You cannot call the starred variant with optional argument,\MessageBreak
+ nor call the unstarred variant with several optional arguments.}%
+ {}%
+ }{%
+ \IfBooleanTF{#1}{%
+ \newtheorem*{#2EN#3}{\csname#2nameEN\endcsname}
+ \newtheorem*{#2FR#3}{\csname#2nameFR\endcsname}
+ \newtheorem*{#2CN#3}{\csname#2nameCN\endcsname}
+ }{%
+ \IfValueTF{#5}{%
+ \newcounter{#2#3}[{#5}]%
+ \expandafter\renewcommand\expandafter*%
+ \csname the#2#3\expandafter\endcsname%
+ \expandafter{\csname the#5\endcsname.\arabic{#2#3}}%
+ }{%
+ \IfValueTF{#4}
+ {\newaliascnt{#2#3}{#4}}
+ {\newcounter{#2#3}}%
+ }%
+ %-------------------------------------------------------------------
+ \CreateTheoremNumberedLikeAliasCounter{#2}{EN}{#3}%
+ \CreateTheoremNumberedLikeAliasCounter{#2}{FR}{#3}%
+ \CreateTheoremNumberedLikeAliasCounter{#2}{CN}{#3}%
+ %-------------------------------------------------------------------
+ }%
+ \NewDocumentEnvironment{#2#3}{}
+ {\csname#2\csname\languagename ABBR\endcsname#3\endcsname}%
+ {\csname end#2\csname\languagename ABBR\endcsname#3\endcsname}%
+ }%
+}%
+\NewDocumentCommand{\CreateTheoremNumberedLikeAliasCounter}{mmm}{%
+ \newaliascnt{#1#2#3}{#1#3}%
+ \newtheorem{#1#2#3}[{#1#2#3}]{\csname#1name#2\endcsname}%
+ \aliascntresetthe{#1#2#3}%
+ \crefname{#1#2#3}%
+ {\csname#1name#2\endcsname}%
+ {\csname#1name#2\endcsname}%
+}%
+
+%% English theorems names
+\def\theoremnameEN{\textsc{Theorem}}
+\def\lemmanameEN{\textsc{Lemma}}
+\def\propositionnameEN{\textsc{Proposition}}
+\def\corollarynameEN{\textsc{Corollary}}
+\def\factnameEN{\textsc{Fact}}
+\def\conjecturenameEN{\textsc{Conjecture}}
+\def\definitionnameEN{\textsc{Definition}}
+\def\examplenameEN{\textsc{Example}}
+\def\problemnameEN{\textsc{Problem}}
+\def\remarknameEN{\textsc{Remark}}
+
+%% French theorems names
+\def\theoremnameFR{\textsc{Théorème}}
+\def\lemmanameFR{\textsc{Lemme}}
+\def\propositionnameFR{\textsc{Proposition}}
+\def\corollarynameFR{\textsc{Corollaire}}
+\def\factnameFR{\textsc{Fait}}
+\def\conjecturenameFR{\textsc{Conjecture}}
+\def\definitionnameFR{\textsc{Définition}}
+\def\examplenameFR{\textsc{Exemple}}
+\def\problemnameFR{\textsc{Problème}}
+\def\remarknameFR{\textsc{Remarque}}
+
+%% Chinese theorems names
+\def\theoremnameCN{定理}
+\def\lemmanameCN{引理}
+\def\propositionnameCN{命题}
+\def\corollarynameCN{推论}
+\def\factnameCN{事实}
+\def\conjecturenameCN{猜想}
+\def\definitionnameCN{定义}
+\def\examplenameCN{例}
+\def\problemnameCN{问题}
+\def\remarknameCN{备注}
+
+%% Theorem environments
+\theoremstyle{simple}
+\ifbool{IsBook}{
+ \newaliascnt{highest}{chapter}
+}{
+ \newaliascnt{highest}{section}
+}
+\CreateTheorem{theorem}<highest>
+\CreateTheorem{lemma}[theorem]
+\CreateTheorem{proposition}[theorem]
+\CreateTheorem{corollary}[theorem]
+\CreateTheorem{fact}[theorem]
+\CreateTheorem{conjecture}<highest>
+\CreateTheorem*{theorem*}
+\CreateTheorem*{lemma*}
+\CreateTheorem*{proposition*}
+\CreateTheorem*{corollary*}
+\CreateTheorem*{fact*}
+\CreateTheorem*{conjecture*}
+\CreateTheorem{definition}[theorem]
+\CreateTheorem{example}<highest>
+\CreateTheorem{problem}<highest>
+\CreateTheorem*{definition*}
+\CreateTheorem*{example*}
+\CreateTheorem*{problem*}
+\CreateTheorem{remark}<highest>
+\CreateTheorem*{remark*}
+
+%%================================
+%% Language configuration
+%%================================
+\if@minimalist@polyglossia
+ \RequirePackage{polyglossia}
+ \setdefaultlanguage{english}
+ \setotherlanguage[frenchpart=false]{french}
+\else
+ \PassOptionsToPackage{french,english}{babel}
+ \RequirePackage{babel}
+ \frenchsetup{PartNameFull=false}
+\fi
+\newcommand{\minimalist@langconfig@chinese}{%
+ \def\abstractname{摘要}%
+ \def\proofname{证明}%
+ \def\contentsname{目录}%
+ \def\listfigurename{插图}%
+ \def\listtablename{表格}%
+ \def\figurename{图}%
+ \def\tablename{表}%
+ \def\indexname{索引}%
+ \def\appendixname{附录}%
+ \def\bibname{参考文献}%
+ \renewcommand{\languagename}{chinese}%
+}
+\newcommand{\minimalist@langconfig@english}{%
+ \selectlanguage{english}%
+}
+\newcommand{\minimalist@langconfig@french}{%
+ \selectlanguage{french}%
+ \def\frenchpartname{Partie}%
+}
+\newcommand{\UseLanguageCORE}[1]{%
+ \ifstrequal{#1}{chinese}{\onehalfspacing\minimalist@langconfig@chinese}{}%
+ \ifstrequal{#1}{Chinese}{\onehalfspacing\minimalist@langconfig@chinese}{}%
+ \ifstrequal{#1}{english}{\setstretch{1.07}\minimalist@langconfig@english}{}%
+ \ifstrequal{#1}{English}{\setstretch{1.07}\minimalist@langconfig@english}{}%
+ \ifstrequal{#1}{french}{\setstretch{1.07}\minimalist@langconfig@french}{}%
+ \ifstrequal{#1}{French}{\setstretch{1.07}\minimalist@langconfig@french}{}%
+}
+\newcommand{\UseLanguage}[1]{%
+ \ifx\@onlypreamble\@notprerr%
+ \UseLanguageCORE{#1}%
+ \else%
+ \AfterEndPreamble{\UseLanguageCORE{#1}}%
+ \fi%
+}
+\newcommand{\UseOtherLanguage}[2]{%
+\begingroup%
+ \ifstrequal{#1}{chinese}{\minimalist@langconfig@chinese}{}%
+ \ifstrequal{#1}{Chinese}{\minimalist@langconfig@chinese}{}%
+ \ifstrequal{#1}{english}{\minimalist@langconfig@english}{}%
+ \ifstrequal{#1}{English}{\minimalist@langconfig@english}{}%
+ \ifstrequal{#1}{french}{\minimalist@langconfig@french}{}%
+ \ifstrequal{#1}{French}{\minimalist@langconfig@french}{}%
+ #2%
+\endgroup%
+}
+
+\ifbool{IsBook}{}{
+
+%%================================
+%% Title block style
+%%================================
+\renewcommand{\@maketitle}{%
+ \LocallyStopLineNumbers%
+ \noindent%
+ {\textcolor{gray!55!paper}{\rule{\textwidth}{0.75pt}}}%
+ \vspace{-\parskip}%
+ \begin{flushright}%
+ {\@title}\\\medskip%
+ \color{black!80!paper}%
+ {\small\scshape\@author}\\[2pt]%
+ {\small\@date}%
+ \end{flushright}%
+ \vspace{-\parskip}%
+ \vspace{-.5\baselineskip}%
+ {\textcolor{gray!55!paper}{\rule{\textwidth}{0.75pt}}\par}%
+ \ResumeLineNumbers%
+}
+\apptocmd{\maketitle}{\thispagestyle{fancy}}{}{\FAIL}
+
+%%================================
+%% Abstract style
+%%================================
+\renewenvironment{abstract}{%
+ \LocallyStopLineNumbers%
+ \begin{flushright}%
+ \textsc{\small\abstractname}\par%
+ \vspace{-.75\baselineskip}%
+ \begin{minipage}[t]{.833\textwidth}%
+ \vspace{0pt}%
+ \color{black!80!paper}%
+ \footnotesize%
+ \parindent=2em
+}{%
+ \end{minipage}%
+ \end{flushright}%
+ \ResumeLineNumbers%
+}
+
+}
+
+\endinput
+%%
+%% End of file `minimalist/minimalist.sty'.