diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-23 20:36:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-23 20:36:53 +0000 |
commit | 537acf6aa6e5afc16757144d2cfafcaab05ca5d5 (patch) | |
tree | 1af10ba9ded8446e3474e14f0d20facbb6091653 /Master/texmf-dist/tex/latex | |
parent | 370cd1eacabd95540470eeb41920e8e02b8656d6 (diff) |
simplivre (23may21)
git-svn-id: svn://tug.org/texlive/trunk@59323 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/simplivre/simplivre.cls | 156 |
1 files changed, 81 insertions, 75 deletions
diff --git a/Master/texmf-dist/tex/latex/simplivre/simplivre.cls b/Master/texmf-dist/tex/latex/simplivre/simplivre.cls index 43aec4f4620..bab668ae353 100644 --- a/Master/texmf-dist/tex/latex/simplivre/simplivre.cls +++ b/Master/texmf-dist/tex/latex/simplivre/simplivre.cls @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesClass{simplivre} - [2021/03/15 A simple and clear book style] + [2021/05/23 A simple and clear book style] \def\minimclass@baseclass{book} \RequirePackage{kvoptions} \RequirePackage{etoolbox} @@ -27,6 +27,13 @@ } \DeclareBoolOption[false]{draft} \DeclareBoolOption[false]{fast} +\DeclareBoolOption[false]{classical} + +\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} @@ -37,6 +44,8 @@ %%================================ %% Page layout %%================================ +\RequirePackage{silence} +\WarningFilter{geometry}{Over-specification in} \RequirePackage[heightrounded]{geometry} \geometry{ papersize={7in,10in}, @@ -45,15 +54,36 @@ 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},colorspec=0.95} \fi -\if@minimclass@fast - \PassOptionsToPackage{polyglossia}{minimalist} +\if@minimclass@classical + \RequirePackage{indentfirst} +\else + \AtEndPreamble{\RequirePackage{parskip}} \fi \RequirePackage{minimalist} -\AtEndPreamble{\RequirePackage{parskip}} %%================================ %% Fonts @@ -69,27 +99,32 @@ \IfFontExistsTF{Palatino Linotype}{% \setmainfont{Palatino Linotype} }{ - \setmainfont{texgyrepagella-regular.otf}[ - BoldFont = texgyrepagella-bold.otf , - ItalicFont = texgyrepagella-italic.otf , - BoldItalicFont = texgyrepagella-bolditalic.otf ] + \setmainfont{TeXGyrePagellaX-Regular.otf}[ + BoldFont = TeXGyrePagellaX-Bold.otf , + ItalicFont = TeXGyrePagellaX-Italic.otf , + BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ] } \setsansfont{SourceSansPro-Regular.otf}[ - Scale = MatchLowercase, + 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} -\IfFontExistsTF{FZYouSongS 507R}{% - \setCJKmainfont{FZYouSongS 507R}[ - BoldFont = FZYouSongS 509R , - BoldFeatures = {FakeBold=2} , +\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{% + \setCJKmainfont{FZYOUSK_507R--GBK1-0}[ + BoldFont = FZYOUSK_509R--GBK1-0 , + BoldFeatures = {FakeBold=4} , ItalicFont = * , - BoldItalicFont = FZYouSongS 509R , - BoldItalicFeatures = {FakeBold=2} , + BoldItalicFont = FZYOUSK_509R--GBK1-0 , + BoldItalicFeatures = {FakeBold=4} , SmallCapsFont = * ] }{ \setCJKmainfont{FandolSong-Regular.otf}[ @@ -99,13 +134,13 @@ BoldItalicFeatures = {FakeBold=4} , SmallCapsFont = * ] } -\IfFontExistsTF{FZYouSongS 507R}{% - \setCJKmonofont{FZYouSongS 507R}[ - BoldFont = FZYouSongS 509R , - BoldFeatures = {FakeBold=2} , +\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{% + \setCJKmonofont{FZYOUSK_507R--GBK1-0}[ + BoldFont = FZYOUSK_509R--GBK1-0 , + BoldFeatures = {FakeBold=4} , ItalicFont = * , - BoldItalicFont = FZYouSongS 509R , - BoldItalicFeatures = {FakeBold=2} , + BoldItalicFont = FZYOUSK_509R--GBK1-0 , + BoldItalicFeatures = {FakeBold=4} , SmallCapsFont = * ] }{ \setCJKmonofont{FandolFang-Regular.otf}[ @@ -116,11 +151,12 @@ BoldItalicFeatures = {FakeBold=4} , SmallCapsFont = * ] } -\IfFontExistsTF{FZYouHeiS 506L}{% - \setCJKsansfont{FZYouHeiS 506L}[ - BoldFont = FZYouHeiS 509R, +\IfFontExistsTF{FZYOUHK_506L--GBK1-0}{% + \setCJKsansfont{FZYOUHK_506L--GBK1-0}[ + BoldFont = FZYOUHK_509R--GBK1-0 , + BoldFeatures = {FakeBold=4} , ItalicFont = * , - BoldItalicFont = FZYouHeiS 509R , + BoldItalicFont = FZYOUHK_509R--GBK1-0 , SmallCapsFont = * ] }{ \setCJKsansfont{FandolHei-Regular.otf}[ @@ -131,14 +167,16 @@ } %% Math font -\if@minimclass@fast\else +\if@minimclass@fast +\RequirePackage{amssymb} +\else \PassOptionsToPackage {warnings-off={mathtools-colon,mathtools-overbracket}}{unicode-math} \RequirePackage{unicode-math} -\unimathsetup{math-style=ISO} +\unimathsetup{math-style=ISO, partial=upright, nabla=upright} \setmathfont{Asana-Math.otf} \IfFontExistsTF{Neo Euler}{% -\setmathfont{Neo Euler} % From https://tex.stackexchange.com/a/425887 +\setmathfont{Neo Euler} [range={"0000-"0001,"0020-"007E, "00A0,"00A7-"00A8,"00AC,"00AF,"00B1,"00B4-"00B5,"00B7, "00D7,"00F7, @@ -165,9 +203,22 @@ "1D507-"1D50A,"1D50D-"1D514,"1D516-"1D51C,"1D51E-"1D537, "1D56C-"1D59F,"1D6A8-"1D6B8,"1D6BA-"1D6D2,"1D6D4-"1D6DD, "1D6DF,"1D6E1,"1D7CE-"1D7D7 }] +\setmathfont[range=up/{greek,Greek}, script-features={}, sscript-features={} + ]{Neo Euler} +\setmathfont[range=up/{latin,Latin}, script-features={}, sscript-features={} + ]{Neo Euler} +\setmathfont[range={bfup/{latin, Latin, greek, Greek}, frak, bffrak, cal}, + script-features={}, sscript-features={} + ]{Neo Euler} +\setmathfont[range={up/num, bfup/num, it, bfit, scr, bfscr, + sfup, sfit, bfsfup, bfsfit, tt} + ]{Asana-Math.otf} +\setmathfont[range=bfcal, Scale=MatchUppercase, Alternate]{Asana-Math.otf} }{} \fi +\def\PJL@font@alreadyset{} + \RequirePackage[verbose=silent]{microtype} %%================================ @@ -176,7 +227,9 @@ \RequirePackage{graphicx} \graphicspath{{images/}} \RequirePackage{wrapfig} +\RequirePackage{float} \RequirePackage{caption} +\captionsetup{font=small} %%================================ %% Index @@ -185,53 +238,6 @@ \pretocmd{\printindex}{\LocallyStopLineNumbers}{}{\FAIL} \apptocmd{\printindex}{\ResumeLineNumbers}{}{\FAIL} -%%================================ -%% Draft mark -%%================================ -\def\dnfFont{\ttfamily} -\def\needgraphFont{\ttfamily} - -\def\dnfTextEN{To be finished here} -\def\needgraphTextEN{A graph is needed here} -\def\dnfTextFR{À terminer ici} -\def\needgraphTextFR{Il manque encore un graphique ici} -\def\dnfTextCN{这里的内容尚未完成} -\def\needgraphTextCN{这里需要一张图片} - -\definecolor{dnfColor}{RGB}{21,122,20} -\definecolor{needgraphColor}{RGB}{70,130,180} - -\if@minimclass@fast - \newcommand{\plainBox}[2][-paper]{\textcolor{#1}{% - \setlength{\fboxsep}{1.5pt}% - \setlength{\fboxrule}{1.2pt}% - \fbox{#2}}} -\else - \PassOptionsToPackage{many}{tcolorbox} - \RequirePackage{tcolorbox} - \newtcbox{\plainBox}[1][-paper]{enhanced jigsaw,% - on line, arc = 1.2pt, outer arc = 1pt,breakable,% - colframe = #1,colupper=#1,opacityback=0,% - boxsep = 1pt,boxrule = 1.2pt,% - left = 1pt, right = 1pt, top = 0pt, bottom = 0pt,% - } -\fi - -\NewDocumentCommand{\dnf}{d<>}{% - \noindent\plainBox[dnfColor]% - {\normalfont\dnfFont\bfseries\small% - \csname dnfText\csname\languagename ABBR\endcsname\endcsname% - \IfNoValueF{#1}{ : #1}}% -} -\NewDocumentCommand{\needgraph}{d<>}{% - \par% - \centerline{\plainBox[needgraphColor]% - {\normalfont\needgraphFont\bfseries\small% - \csname needgraphText\csname\languagename ABBR\endcsname\endcsname% - \IfNoValueF{#1}{ : #1}}}% - \par% -} - \endinput %% %% End of file `simplivre/simplivre.cls'. |