diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /fonts/variablelm/tex/variablelm.sty |
Initial commit
Diffstat (limited to 'fonts/variablelm/tex/variablelm.sty')
-rw-r--r-- | fonts/variablelm/tex/variablelm.sty | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/fonts/variablelm/tex/variablelm.sty b/fonts/variablelm/tex/variablelm.sty new file mode 100644 index 0000000000..b792666959 --- /dev/null +++ b/fonts/variablelm/tex/variablelm.sty @@ -0,0 +1,48 @@ +\ProvidesPackage{variablelm}[2018/02/13 v1.1.2 to control the scaling for Latin Modern Fonts by Yuwsuke KIEDA] + +\RequirePackage{xkeyval} +\@ifpackageloaded{lmodern}{}{\@latexerr{You must be load "lmodern" package}\@ehb} +\@ifpackageloaded{amsmath}{}{% + \@latex@warning@no@line{\noexpand\usepackage{amsmath} is effective for correct functioning of \noexpand\big, \noexpand\Big, \noexpand\bigg, etc}} + +\DeclareOptionX{scale}[1.0]{\def\alphabet@scale{#1}} +\DeclareOptionX{ttscale}[1.0]{\def\alphabet@scale@tt{#1}} +\DeclareOptionX{sfscale}[1.0]{\def\alphabet@scale@sf{#1}} +\DeclareOptionX{encoding}[T1]{\def\alphabet@scale@encoding{#1}} + +\@ifundefined{alphabet@scale}{\def\alphabet@scale{1.0}}{} +\@ifundefined{alphabet@scale@tt}{\def\alphabet@scale@tt{\alphabet@scale}}{} +\@ifundefined{alphabet@scale@sf}{\def\alphabet@scale@sf{\alphabet@scale}}{} +\@ifundefined{alphabet@scale@encoding}{\def\alphabet@scale@encoding{T1}}{} + +\renewcommand{\rmdefault}{vlmr} +\renewcommand{\sfdefault}{vlmss} +\renewcommand{\ttdefault}{vlmtt} + +\DeclareOptionX{variablett}{\renewcommand{\ttdefault}{vlmvtt}} +\DeclareOptionX{lighttt}{\let\vlmtt@use@light@as@normal\@empty} + +%\ProcessOptions\relax + +\ProcessOptionsX + +\@ifpackageloaded{fontenc}{}{\RequirePackage[\alphabet@scale@encoding]{fontenc}} + +\SetSymbolFont{operators}{normal}{OT1}{vlmr}{m}{n} +\SetSymbolFont{letters}{normal}{OML}{vlmm}{m}{it} +\SetSymbolFont{symbols}{normal}{OMS}{vlmsy}{m}{n} +\SetSymbolFont{largesymbols}{normal}{OMX}{vlmex}{m}{n} +\SetSymbolFont{operators}{bold}{OT1}{vlmr}{bx}{n} +\SetSymbolFont{letters}{bold}{OML}{vlmm}{b}{it} +\SetSymbolFont{symbols}{bold}{OMS}{vlmsy}{b}{n} +\SetSymbolFont{largesymbols}{bold}{OMX}{vlmex}{m}{n} + +\SetMathAlphabet{\mathbf}{normal}{\alphabet@scale@encoding}{vlmr}{bx}{n} +\SetMathAlphabet{\mathsf}{normal}{\alphabet@scale@encoding}{vlmss}{m}{n} +\SetMathAlphabet{\mathit}{normal}{\alphabet@scale@encoding}{vlmr}{m}{it} +\SetMathAlphabet{\mathtt}{normal}{\alphabet@scale@encoding}{vlmtt}{m}{n} +\SetMathAlphabet{\mathbf}{bold}{\alphabet@scale@encoding}{vlmr}{bx}{n} +\SetMathAlphabet{\mathsf}{bold}{\alphabet@scale@encoding}{vlmss}{bx}{n} +\SetMathAlphabet{\mathit}{bold}{\alphabet@scale@encoding}{vlmr}{bx}{it} +\SetMathAlphabet{\mathtt}{bold}{\alphabet@scale@encoding}{vlmtt}{m}{n} +\endinput |