diff options
author | Karl Berry <karl@freefriends.org> | 2022-06-16 20:21:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-06-16 20:21:36 +0000 |
commit | e69119d55d51d7fae1816c0e872d57c62694b3cb (patch) | |
tree | 794c1f7c078c28f126ed58422c684cae64aaae0f /Master/texmf-dist/tex/latex/simplivre/simplivre.cls | |
parent | 1f9af4111f133e2a9a62e36bd20422ca1d5ac470 (diff) |
jxu (16jun22)
git-svn-id: svn://tug.org/texlive/trunk@63612 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/simplivre/simplivre.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/simplivre/simplivre.cls | 126 |
1 files changed, 74 insertions, 52 deletions
diff --git a/Master/texmf-dist/tex/latex/simplivre/simplivre.cls b/Master/texmf-dist/tex/latex/simplivre/simplivre.cls index 07780bdd10d..25377b24b8e 100644 --- a/Master/texmf-dist/tex/latex/simplivre/simplivre.cls +++ b/Master/texmf-dist/tex/latex/simplivre/simplivre.cls @@ -1,7 +1,7 @@ %% %% This is file `simplivre/simplivre.cls', %% generated with the docstrip utility. - +%% %% Copyright (C) 2021-2022 by Jinwen XU %% %% This is part of the minimalist class series. @@ -19,7 +19,7 @@ \RequirePackage{l3keys2e} \ProvidesExplClass {simplivre} - {2022/04/24} {} + {2022/06/16} {} {A simple and clear book style} \tl_const:Nn \l__minimclass_base_class_tl { book } @@ -250,43 +250,39 @@ \__minimclass_load_file_or_config:Nnn \l__minimclass_load_custom_font_file_latin_bool { \l__minimclass_custom_font_file_latin_str } { - \__minimclass_if_font_exist:nnn { Palatino~Linotype } + \bool_if:NTF \l__projlib_font_useosf_bool { - \bool_if:NTF \l__projlib_font_useosf_bool - { - \setmainfont { Palatino~Linotype } [ Numbers = OldStyle ] - } - { - \setmainfont { Palatino~Linotype } - } + \setmainfont { TeXGyrePagellaX-Regular.otf } + [ + BoldFont = TeXGyrePagellaX-Bold.otf , + ItalicFont = TeXGyrePagellaX-Italic.otf , + BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf , + Numbers = OldStyle , + ] + \setsansfont { SourceSansPro-Regular.otf } + [ + Scale = 1.05 , + BoldFont = SourceSansPro-Semibold.otf , + ItalicFont = SourceSansPro-RegularIt.otf , + BoldItalicFont = SourceSansPro-SemiboldIt.otf , + Numbers = OldStyle , + ] } { - \bool_if:NTF \l__projlib_font_useosf_bool - { - \setmainfont { TeXGyrePagellaX-Regular.otf } - [ - BoldFont = TeXGyrePagellaX-Bold.otf , - ItalicFont = TeXGyrePagellaX-Italic.otf , - BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf , - Numbers = OldStyle , - ] - } - { - \setmainfont { TeXGyrePagellaX-Regular.otf } - [ - BoldFont = TeXGyrePagellaX-Bold.otf , - ItalicFont = TeXGyrePagellaX-Italic.otf , - BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf , - ] - } + \setmainfont { TeXGyrePagellaX-Regular.otf } + [ + BoldFont = TeXGyrePagellaX-Bold.otf , + ItalicFont = TeXGyrePagellaX-Italic.otf , + BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf , + ] + \setsansfont { SourceSansPro-Regular.otf } + [ + Scale = 1.05 , + BoldFont = SourceSansPro-Semibold.otf , + ItalicFont = SourceSansPro-RegularIt.otf , + BoldItalicFont = SourceSansPro-SemiboldIt.otf , + ] } - \setsansfont { SourceSansPro-Regular.otf } - [ - Scale = 1.05 , - BoldFont = SourceSansPro-Bold.otf , - ItalicFont = SourceSansPro-RegularIt.otf , - BoldItalicFont = SourceSansPro-BoldIt.otf , - ] \setmonofont { NewCMMono10-Regular.otf } [ Scale = 1.05 , @@ -567,10 +563,8 @@ { \bool_if:NF \g_projlib_font_already_set_bool { - \bool_if:NTF \l__minimclass_fast_bool - { - \RequirePackage { amssymb } - } + \RequirePackage { amssymb } + \bool_if:NF \l__minimclass_fast_bool { \PassOptionsToPackage { warnings-off = { mathtools-colon, mathtools-overbracket } } { unicode-math } \RequirePackage { unicode-math } @@ -582,6 +576,11 @@ ] \setmathfont { latinmodern-math.otf } [ + range = { \ast } , + Scale = 1.10 + ] + \setmathfont { latinmodern-math.otf } + [ range = { frak, bffrak } ] \DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n} @@ -594,17 +593,34 @@ [ range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num } ] + \setmathfont { KpMath-Regular.otf } [ range = {} ] + + \sys_if_engine_luatex:T + { + \mathitalicsmode=1 + } \hook_gput_code:nnn { begindocument } { minimclass } { - \NewCommandCopy \minimclass_backup_mid: \mid - \RenewDocumentCommand \mid {} - { \skip_horizontal:n {-.1em} \minimclass_backup_mid: \skip_horizontal:n {-.1em} } - \NewCommandCopy \minimclass_backup_nmid: \nmid - \RenewDocumentCommand \nmid {} - { \skip_horizontal:n {-.1em} \minimclass_backup_nmid: \skip_horizontal:n {-.1em} } + \cs_gset_eq:NN \overline \wideoverbar + \cs_gset_eq:NN \square \mdwhtsquare } + % A temporary hack proposed in https://tex.stackexchange.com/a/647789 + \hook_gput_code:nnn { begindocument } { minimclass } + { + \NewCommandCopy\unicodevdots\vdots + \RenewDocumentCommand{\vdots}{}{\mathrel{\loweredvdots}} + } + \newcommand{\loweredvdots}{\mathpalette\loweredvdots@\relax} + \newcommand{\loweredvdots@}[2]{% + \begingroup + \sbox\z@{$\m@th#1\unicodevdots$}% + \vrule width \z@ height 2.25\ht\z@ depth 0.012\ht\z@ + \raisebox{0.25\height}{\usebox\z@}% + \endgroup + } + \RequirePackage { tikz-cd } \tikzcdset { arrow~style = tikz, diagrams = { >={Stealth[round,length=3.4pt,width=6.15pt,inset=2.25pt]} } } @@ -673,21 +689,27 @@ } } +\char_set_catcode_active:n { `\· } +\cs_new_protected:Npn · { \ensuremath\cdot } + \PassOptionsToPackage { all } { nowidow } \RequirePackage { nowidow } -\RequirePackage { regexpatch } -\skip_new:N \g_minimclass_parfillskip_skip -\xpatchcmd{\@trivlist}{\@flushglue}{\g_minimclass_parfillskip_skip}{}{} -\hook_gput_code:nnn { begindocument } { minimclass } +\sys_if_engine_xetex:T { - \skip_gset:Nn \g_minimclass_parfillskip_skip { 0pt plus \dim_eval:n { \linewidth - 2\parindent } } - \skip_gset_eq:NN \parfillskip \g_minimclass_parfillskip_skip + \RequirePackage { regexpatch } + \skip_new:N \g_minimclass_parfillskip_skip + \xpatchcmd{\@trivlist}{\@flushglue}{\g_minimclass_parfillskip_skip}{}{} + \hook_gput_code:nnn { begindocument } { minimclass } + { + \skip_gset:Nn \g_minimclass_parfillskip_skip { 0pt plus \dim_eval:n { \linewidth - 3em } } + \skip_gset_eq:NN \parfillskip \g_minimclass_parfillskip_skip + } } \hook_gput_code:nnn { begindocument/before } { minimclass } { - \@ifpackageloaded { biblatex } + \IfPackageLoadedTF { biblatex } { \PassOptionsToPackage { biblatex } { embrac } } {} |