%% %% This is file `simplivre/simplivre.cls', %% 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] \ProvidesClass{simplivre} [2021/06/30 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]{palatino} \DeclareBoolOption[false]{times} \DeclareBoolOption[false]{garamond} \DeclareBoolOption[false]{biolinum} \DeclareBoolOption[false]{customfont} \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 \@minimclass@useindenttrue \fi \if@minimclass@palatino \@minimclass@customfonttrue \fi \if@minimclass@times \@minimclass@customfonttrue \fi \if@minimclass@garamond \@minimclass@customfonttrue \fi \if@minimclass@biolinum \@minimclass@customfonttrue \fi %%================================ %% Page layout %%================================ \RequirePackage{silence} \WarningFilter{geometry}{Over-specification in} \RequirePackage[heightrounded]{geometry} \geometry{ papersize={7in,10in}, total={40em,60em}, hmarginratio=1:1, vmarginratio=1:1, footnotesep=2em plus 2pt minus 2pt, } \if@minimclass@bfivepaper \geometry{ b5paper, total={40em,59em}, hmarginratio=1:1, vmarginratio=1:1, footnotesep=2em plus 2pt minus 2pt, } \fi \if@minimclass@afourpaper \geometry{ a4paper, total={47em,70em}, 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} %%================================ %% Fonts %%================================ %% Math fonts in fast mode \if@minimclass@customfont\else \if@minimclass@fast \RequirePackage{mathpazo} \fi \fi %% English fonts \PassOptionsToPackage{no-math}{fontspec} \RequirePackage{fontspec} \IfFontExistsTF{Palatino Linotype}{% \setmainfont{Palatino Linotype} [\if@minimclass@useosf Numbers = OldStyle\fi] }{ \setmainfont{TeXGyrePagellaX-Regular.otf}[ BoldFont = TeXGyrePagellaX-Bold.otf , ItalicFont = TeXGyrePagellaX-Italic.otf , BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf, \if@minimclass@useosf Numbers = OldStyle\fi ] } \setsansfont{SourceSansPro-Regular.otf}[ Scale = MatchLowercase , BoldFont = SourceSansPro-Bold.otf , ItalicFont = SourceSansPro-RegularIt.otf , BoldItalicFont = SourceSansPro-BoldIt.otf ] \setmonofont{cmuntt.otf}[ Scale = 1.05 , BoldFont = cmuntb.otf , ItalicFont = cmunst.otf , BoldItalicFont = cmuntb.otf ] %% Chinese fonts \PassOptionsToPackage{fontset=none,scheme=plain}{ctex} \RequirePackage{ctex} \WarningFilter{everysel}{Everysel is no longer required} \IfFontExistsTF{FZYOUSK_507R--GBK1-0}{% \setCJKmainfont{FZYOUSK_507R--GBK1-0}[ BoldFont = FZYOUSK_509R--GBK1-0 , BoldFeatures = {FakeBold=4} , ItalicFont = * , BoldItalicFont = FZYOUSK_509R--GBK1-0 , BoldItalicFeatures = {FakeBold=4} , SmallCapsFont = * ] }{ \setCJKmainfont{FandolSong-Regular.otf}[ BoldFont = FandolSong-Bold.otf , ItalicFont = FandolKai-Regular.otf , BoldItalicFont = FandolKai-Regular.otf , BoldItalicFeatures = {FakeBold=4} , SmallCapsFont = * ] } \IfFontExistsTF{FZYOUSK_507R--GBK1-0}{% \setCJKmonofont{FZYOUSK_507R--GBK1-0}[ BoldFont = FZYOUSK_509R--GBK1-0 , BoldFeatures = {FakeBold=4} , ItalicFont = * , BoldItalicFont = FZYOUSK_509R--GBK1-0 , BoldItalicFeatures = {FakeBold=4} , SmallCapsFont = * ] }{ \setCJKmonofont{FandolFang-Regular.otf}[ BoldFont = * , BoldFeatures = {FakeBold=4} , ItalicFont = * , BoldItalicFont = * , BoldItalicFeatures = {FakeBold=4} , SmallCapsFont = * ] } \IfFontExistsTF{FZYOUHK_508R--GBK1-0}{% \setCJKsansfont{FZYOUHK_508R--GBK1-0}[ BoldFont = FZYOUHK_509R--GBK1-0 , BoldFeatures = {FakeBold=4} , ItalicFont = * , BoldItalicFont = FZYOUHK_509R--GBK1-0 , SmallCapsFont = * ] \setCJKfamilyfont{zhhei}{FZYOUHK_508R--GBK1-0}[ BoldFont = FZYOUHK_509R--GBK1-0 , BoldFeatures = {FakeBold=4} , ItalicFont = * , BoldItalicFont = FZYOUHK_509R--GBK1-0 , SmallCapsFont = * ] }{ \setCJKsansfont{FandolHei-Regular.otf}[ BoldFont = FandolHei-Bold.otf , ItalicFont = * , BoldItalicFont = FandolHei-Bold.otf , SmallCapsFont = * ] \setCJKfamilyfont{zhhei}{FandolHei-Regular.otf}[ BoldFont = FandolHei-Bold.otf , ItalicFont = * , BoldItalicFont = FandolHei-Bold.otf , SmallCapsFont = * ] } \def\minimalist@titlefontshape{\CJKfamily{zhhei}} %% Math font \if@minimclass@customfont\else \if@minimclass@fast \RequirePackage{amssymb} \else \PassOptionsToPackage {warnings-off={mathtools-colon,mathtools-overbracket}}{unicode-math} \RequirePackage{unicode-math} \unimathsetup{math-style=ISO, partial=upright, nabla=upright} \setmathfont{Asana-Math.otf} \IfFontExistsTF{Neo Euler}{% \setmathfont[range={up/{Latin,latin,Greek,greek}, bfup/{Latin,latin,Greek,greek}, cal, bfcal, frak, bffrak, `(,`),`[,`],`\{,`\},`:,`=,\ne,\equiv,`/,\backslash, \in,\notin,\ni,\subset,\supset,\subseteq,\supseteq, \rightarrow,\leftarrow,\mapsto,\hookrightarrow,\hookleftarrow, \sum,\prod,\coprod, \sqrt,\int,\iint,\iiint,\oint}, script-features={}, sscript-features={}, Scale = 1.05, ]{Neo Euler} }{} \setmathfont[range={\leq,\geq,\ll,\gg,\lll,\ggg,\leqslant,\geqslant}, Scale = 0.95, ]{latinmodern-math.otf} \setmathfont[range={up/num, bfup/num} ]{texgyrepagella-math.otf} \newbox\xratbelow \newbox\xratabove \renewcommand{\xrightarrow}[2][]{% \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}% \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}% \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}% \mathrel{\tikz [->, baseline=-.55ex, every node/.style={inner sep=0pt}] \draw (0,0) -- node[below=3pt] {\box\xratbelow} node[above=2pt] {\box\xratabove} (\xratlen,0) ;}} \renewcommand{\xleftarrow}[2][]{% \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}% \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}% \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}% \mathrel{\tikz [<-, baseline=-.55ex, every node/.style={inner sep=0pt}] \draw (0,0) -- node[below=3pt] {\box\xratbelow} node[above=2pt] {\box\xratabove} (\xratlen,0) ;}} \renewcommand{\xleftrightarrow}[2][]{% \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}% \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}% \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}% \mathrel{\tikz [<->, baseline=-.55ex, every node/.style={inner sep=0pt}] \draw (0,0) -- node[below=3pt] {\box\xratbelow} node[above=2pt] {\box\xratabove} (\xratlen,0) ;}} \renewcommand{\xhookrightarrow}[2][]{% \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}% \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}% \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}% \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}] \draw (0,0) edge[commutative diagrams/hookrightarrow] node[below=3pt] {\box\xratbelow} node[above=2pt] {\box\xratabove} (\xratlen,0) ;}} \renewcommand{\xhookleftarrow}[2][]{% \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}% \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}% \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}% \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}] \draw (0,0) edge[commutative diagrams/hookleftarrow] node[below=3pt] {\box\xratbelow} node[above=2pt] {\box\xratabove} (\xratlen,0) ;}} \renewcommand{\xmapsto}[2][]{% \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}% \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}% \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}% \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}] \draw (0,0) edge[commutative diagrams/mapsto] node[below=3pt] {\box\xratbelow} node[above=2pt] {\box\xratabove} (\xratlen,0) ;}} \newcommand{\xlongequal}[2][]{% \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}% \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}% \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}% \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}] \draw (0,0) edge[commutative diagrams/equal] node[below=3pt] {\box\xratbelow} node[above=2pt] {\box\xratabove} (\xratlen,0) ;}} \AtBeginDocument{ \renewcommand{\twoheadrightarrow}{% \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}] \draw (0,0) edge[commutative diagrams/twoheadrightarrow] (.8em,0) ;}} \renewcommand{\twoheadleftarrow}{% \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}] \draw (0,0) edge[commutative diagrams/twoheadleftarrow] (.8em,0) ;}} } \fi \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@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{} %% Minor improvements \PassOptionsToPackage{verbose=silent}{microtype} \RequirePackage{microtype} \PassOptionsToPackage{all}{nowidow} \RequirePackage{nowidow} \RequirePackage{embrac} %%================================ %% Graphics %%================================ \RequirePackage{graphicx} \graphicspath{{images/}} \RequirePackage{wrapfig} \RequirePackage{float} \RequirePackage{caption} \captionsetup{font=small} %%================================ %% Index %%================================ \AtEndPreamble{ \pretocmd{\printindex}{\LocallyStopLineNumbers}{}{} \apptocmd{\printindex}{\ResumeLineNumbers}{}{} } \endinput %% %% End of file `simplivre/simplivre.cls'.