summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-11-02 22:01:53 +0000
committerKarl Berry <karl@freefriends.org>2022-11-02 22:01:53 +0000
commit6eb8225de0d14d6df99cf343ca206644a111bf85 (patch)
tree491790e3bf4224ae54794f6034b9624bd337b9d0 /Master/texmf-dist/tex
parent3f1026bdc52825d68d83555c8d4cdc31a41f7687 (diff)
hep-font (2nov22)
git-svn-id: svn://tug.org/texlive/trunk@64900 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/hep-font/hep-font.sty113
1 files changed, 73 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/latex/hep-font/hep-font.sty b/Master/texmf-dist/tex/latex/hep-font/hep-font.sty
index 3cd4fb3e68c..fe6749cdd4a 100644
--- a/Master/texmf-dist/tex/latex/hep-font/hep-font.sty
+++ b/Master/texmf-dist/tex/latex/hep-font/hep-font.sty
@@ -15,16 +15,25 @@
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{hep-font}[2021/09/01 v1.0 hep-font]
+\ProvidesPackage{hep-font}[2022/11/01 v1.1 hep-font]
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=hepfont,
prefix=hepfont@
}
+\DeclareStringOption[11pt]{size}
+\DeclareBoolOption[false]{sans}
+\DeclareComplementaryOption{serif}{sans}
\DeclareBoolOption[true]{lining}
\DeclareComplementaryOption{oldstyle}{lining}
\ProcessKeyvalOptions*
+\def\hepfont@get@class#1.cls#2\relax{\def\hepfont@class{#1}}
+\def\hepfont@getclass{\expandafter\hepfont@get@class\@filelist\relax}
+\hepfont@getclass
+\@ifclasswith{\hepfont@class}{10pt}{\setkeys{hepfont}{size=10pt}}{}
+\@ifclasswith{\hepfont@class}{11pt}{\setkeys{hepfont}{size=11pt}}{}
+\@ifclasswith{\hepfont@class}{12pt}{\setkeys{hepfont}{size=12pt}}{}
\RequirePackage{ifluatex}
\RequirePackage{ifxetex}
\newif\ifxetexorluatex
@@ -32,8 +41,27 @@
\else\ifluatex\xetexorluatextrue
\else\xetexorluatexfalse\fi
\fi
-\def\hep@encoding{T\ifxetexorluatex U\else 1\fi}
-\RequirePackage[\hep@encoding]{fontenc}
+\def\hepfont@encoding{T\ifxetexorluatex U\else 1\fi}
+\PassOptionsToPackage{\hepfont@encoding}{fontenc}
+\RequirePackage{fontenc}
+\RequirePackage{pdftexcmds}
+\ifnum\pdf@strcmp{\hepfont@size}{default}=0\else
+ \def\hepfont@remove@pt#1pt{#1}
+ \edef\hepfont@pt@size{\expandafter\hepfont@remove@pt\hepfont@size}
+ \let\small\relax
+ \let\footnotesize\relax
+ \let\scriptsize\relax
+ \let\tiny\relax
+ \let\large\relax
+ \let\Large\relax
+ \let\LARGE\relax
+ \let\huge\relax
+ \let\Huge\relax
+ \input{size\hepfont@pt@size.clo}
+\fi
+\ifhepfont@sans
+ \renewcommand{\familydefault}{\sfdefault}
+\fi
\RequirePackage{fix-cm}
\RequirePackage{microtype}
\ifxetexorluatex
@@ -41,17 +69,19 @@
\RequirePackage{lmodern}
\else
\ifhepfont@lining
- \RequirePackage[rm={lining},sf={lining},tt={lining}]{cfr-lm}
- \else
- \RequirePackage{cfr-lm}
+ \PassOptionsToPackage{rm={lining},sf={lining},tt={lining}}{cfr-lm}
\fi
+ \RequirePackage{cfr-lm}
\fi
+\let\verbatim@font\tmstyle
+\RequirePackage{xparse}
+\ProvideDocumentCommand{\code}{v}{{\tmstyle #1}}
\RequirePackage{textcomp}
-\newcommand{\hep@sf@fontshape}[3]{%
- \DeclareFontShape{\hep@encoding}{\sfdefault}{#1}{#2}{#3}{}%
+\newcommand{\hepfont@sf@shape}[3]{%
+ \DeclareFontShape{\hepfont@encoding}{\sfdefault}{#1}{#2}{#3}{}%
}
-\newcommand{\hep@rm@fontshape}[3]{%
- \DeclareFontShape{\hep@encoding}{\rmdefault}{#1}{#2}{#3}{}%
+\newcommand{\hepfont@rm@shape}[3]{%
+ \DeclareFontShape{\hepfont@encoding}{\rmdefault}{#1}{#2}{#3}{}%
}
\ifxetexorluatex
\RequirePackage{fontspec}
@@ -62,52 +92,55 @@
SmallCapsFont={[cmunbx.otf]}
}
]
- \hep@sf@fontshape{bx}{sc}{<->cmssbxcsc10}{}
- \hep@sf@fontshape{b}{sc}{<->cmssbxcsc10}{}
- \hep@sf@fontshape{m}{scit}{<->cmsscsci10}{}
- \hep@sf@fontshape{m}{sc}{%
+ \hepfont@sf@shape{bx}{sc}{<->cmssbxcsc10}{}
+ \hepfont@sf@shape{b}{sc}{<->cmssbxcsc10}{}
+ \hepfont@sf@shape{m}{scit}{<->cmsscsci10}{}
+ \hepfont@sf@shape{m}{sc}{%
<-9>cmsscsc8<9-10>cmsscsc9<10->cmsscsc10%
}{}
\else
\rmfamily
\ifhepfont@lining
\RequirePackage{slantsc}
- \hep@rm@fontshape{b}{sc}{<->ssub*cmr/bx/sc}{}
- \hep@rm@fontshape{bx}{sc}{<->ssub*cmr/bx/sc}{}
- \hep@rm@fontshape{b}{scsl}{<->ssub*cmr/bx/scsl}{}
- \hep@rm@fontshape{bx}{scsl}{<->ssub*cmr/bx/scit}{}
- \hep@rm@fontshape{b}{scit}{<->ssub*cmr/bx/scsl}{}
- \hep@rm@fontshape{bx}{scit}{<->ssub*cmr/bx/scit}{}
+ \hepfont@rm@shape{b}{sc}{<->ssub*cmr/bx/sc}{}
+ \hepfont@rm@shape{bx}{sc}{<->ssub*cmr/bx/sc}{}
+ \hepfont@rm@shape{b}{scsl}{<->ssub*cmr/bx/scsl}{}
+ \hepfont@rm@shape{bx}{scsl}{<->ssub*cmr/bx/scit}{}
+ \hepfont@rm@shape{b}{scit}{<->ssub*cmr/bx/scsl}{}
+ \hepfont@rm@shape{bx}{scit}{<->ssub*cmr/bx/scit}{}
\else
- \DeclareFontFamily{\hep@encoding}{hfor}{}
- \DeclareFontShape{\hep@encoding}{hfor}{bx}{sc}{
+ \DeclareFontFamily{\hepfont@encoding}{hfor}{}
+ \DeclareFontShape{\hepfont@encoding}{hfor}{bx}{sc}{
<-6>hfoxc0500<6-7>hfoxc0600<7-8>hfoxc0700<8-9>hfoxc0800
<9-10>hfoxc0900<10-12>hfoxc1000<12-17>hfoxc1200<17->hfoxc1728
}{}
- \DeclareFontShape{\hep@encoding}{hfor}{bx}{scsl}{
+ \DeclareFontShape{\hepfont@encoding}{hfor}{bx}{scsl}{
<-6>hfooc0500<6-7>hfooc0600<7-8>hfooc0700<8-9>hfooc0800
<9-10>hfooc0900<10-12>hfooc1000<12-17>hfooc1200<17->hfooc1728
}{}
- \hep@rm@fontshape{b}{sc}{<->ssub*hfor/bx/sc}{}
- \hep@rm@fontshape{bx}{sc}{<->ssub*hfor/bx/sc}{}
- \hep@rm@fontshape{bx}{scsl}{<->ssub*hfor/bx/scsl}{}
- \hep@rm@fontshape{b}{scit}{<->ssub*hfor/bx/scsl}{}
- \hep@rm@fontshape{bx}{scit}{<->ssub*hfor/bx/scsl}{}
- \hep@rm@fontshape{b}{scsl}{<->ssub*hfor/bx/scsl}{}
+ \hepfont@rm@shape{b}{sc}{<->ssub*hfor/bx/sc}{}
+ \hepfont@rm@shape{bx}{sc}{<->ssub*hfor/bx/sc}{}
+ \hepfont@rm@shape{bx}{scsl}{<->ssub*hfor/bx/scsl}{}
+ \hepfont@rm@shape{b}{scit}{<->ssub*hfor/bx/scsl}{}
+ \hepfont@rm@shape{bx}{scit}{<->ssub*hfor/bx/scsl}{}
+ \hepfont@rm@shape{b}{scsl}{<->ssub*hfor/bx/scsl}{}
\fi
\sffamily
- \hep@sf@fontshape{m}{sc}{<->ssub*xcmss/m/sc}{}
- \hep@sf@fontshape{b}{sc}{<->ssub*xcmss/bx/sc}{}
- \hep@sf@fontshape{bx}{sc}{<->ssub*xcmss/bx/sc}{}
- \hep@sf@fontshape{m}{scit}{<->ssub*xcmss/m/scit}{}
- \hep@sf@fontshape{b}{scit}{<->ssub*xcmss/bx/scit}{}
- \hep@sf@fontshape{bx}{scit}{<->ssub*xcmss/bx/scit}{}
- \hep@sf@fontshape{m}{scsl}{<->ssub*xcmss/m/scit}{}
- \hep@sf@fontshape{b}{scsl}{<->ssub*xcmss/bx/scit}{}
- \hep@sf@fontshape{bx}{scsl}{<->ssub*xcmss/bx/scit}{}
- \hep@sf@fontshape{m}{ui}{<->cmssu10}{}
+ \hepfont@sf@shape{m}{sc}{<->ssub*xcmss/m/sc}{}
+ \hepfont@sf@shape{b}{sc}{<->ssub*xcmss/bx/sc}{}
+ \hepfont@sf@shape{bx}{sc}{<->ssub*xcmss/bx/sc}{}
+ \hepfont@sf@shape{m}{scit}{<->ssub*xcmss/m/scit}{}
+ \hepfont@sf@shape{b}{scit}{<->ssub*xcmss/bx/scit}{}
+ \hepfont@sf@shape{bx}{scit}{<->ssub*xcmss/bx/scit}{}
+ \hepfont@sf@shape{m}{scsl}{<->ssub*xcmss/m/scit}{}
+ \hepfont@sf@shape{b}{scsl}{<->ssub*xcmss/bx/scit}{}
+ \hepfont@sf@shape{bx}{scsl}{<->ssub*xcmss/bx/scit}{}
+ \hepfont@sf@shape{m}{ui}{<->cmssu10}{}
+\fi
+\ifxetexorluatex\else
+ \PassOptionsToPackage{utf8}{inputenc}
+ \RequirePackage{inputenc}
\fi
-\ifxetexorluatex\else\RequirePackage[utf8]{inputenc}\fi
\ifhepfont@lining\else
\RequirePackage{units}
\RequirePackage{xpatch}