diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hep-paper/hep-font.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-paper/hep-font.sty | 254 |
1 files changed, 254 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/hep-paper/hep-font.sty b/Master/texmf-dist/tex/latex/hep-paper/hep-font.sty new file mode 100644 index 00000000000..6f8dbb994f5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-font.sty @@ -0,0 +1,254 @@ +%% +%% This is file `hep-font.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hep-paper-implementation.dtx (with options: `font') +%% This is a generated file. +%% Copyright (C) 2019-2020 by Jan Hajer +%% This file 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}[2005/12/01] +\ProvidesPackage{hep-font}[2021/08/01 v1.8 Font adjustments for publications in High Energy Physics] + +\newif\ifhep@serif\hep@seriftrue +\ifhep@serif\else + \renewcommand{\familydefault}{\sfdefault} +\fi +\RequirePackage{ifluatex} +\RequirePackage{ifxetex} +\newif\ifxetexorluatex +\ifxetex\xetexorluatextrue +\else + \ifluatex\xetexorluatextrue + \else\xetexorluatexfalse + \fi +\fi +\ifxetexorluatex + \def\hep@encoding{TU} +\else + \def\hep@encoding{T1} +\fi +\RequirePackage[\hep@encoding]{fontenc} +\RequirePackage{fix-cm} +\RequirePackage{microtype} +\newif\ifhep@lining +\ifxetexorluatex + \RequirePackage{nfssext-cfr} + \RequirePackage{lmodern} +\else + \ifhep@lining + \RequirePackage[rm={lining},sf={lining},tt={lining}]{cfr-lm} + \else + \RequirePackage{cfr-lm} + \fi +\fi +\RequirePackage{etoolbox} +\RequirePackage{textcomp} +\newcommand{\hep@sf@fontshape}[3]{% + \DeclareFontShape{\hep@encoding}{\sfdefault}{#1}{#2}{#3}{}% +} +\newcommand{\hep@rm@fontshape}[3]{% + \DeclareFontShape{\hep@encoding}{\rmdefault}{#1}{#2}{#3}{}% +} +\ifxetexorluatex + \RequirePackage{fontspec} + \setmainfont{Latin Modern Roman}[ + UprightFeatures={SmallCapsFont={[lmromancaps10-regular.otf]}}, + BoldFeatures={ + SmallCapsFeatures={Letters=SmallCaps}, + 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}{% + <-9>cmsscsc8<9-10>cmsscsc9<10->cmsscsc10% + }{} +\else + \rmfamily + \ifhep@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}{} + \else + \DeclareFontFamily{\hep@encoding}{hfor}{} + \DeclareFontShape{\hep@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}{ + <-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}{} + \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}{} +\fi +\ifxetexorluatex\else + \RequirePackage[utf8]{inputenc} +\fi +\RequirePackage{pdftexcmds} +\def\hep@symbols{true} +\RequirePackage{amstext} +\newif\ifhep@symbols +\ifnum\pdf@strcmp{\hep@symbols}{false}=0\else\hep@symbolstrue\fi +\newif\ifhep@ams +\ifnum\pdf@strcmp{\hep@symbols}{ams}=0 \hep@amstrue\fi +\newif\ifhep@minion +\ifnum\pdf@strcmp{\hep@symbols}{minion}=0 \hep@miniontrue\fi +\ifhep@symbols + \RequirePackage{fixmath} + \RequirePackage{textalpha} + \def\hep@greek#1{% + \expandafter\let\csname math% + \expandafter\@gobble\string#1\endcsname=#1% + \edef#1{% + \noexpand\TextOrMath{% + \expandafter\noexpand\csname text% + \expandafter\@gobble\string#1\endcsname% + }{% + \noexpand\ifnum\noexpand\fam=0 + \noexpand\text{% + \expandafter\noexpand\csname text% + \expandafter\@gobble\string#1\endcsname% + }% + \noexpand\else + \expandafter\noexpand\csname math% + \expandafter\@gobble\string#1\endcsname% + \noexpand\fi + }% + }% + } + \hep@greek\alpha \hep@greek\beta \hep@greek\gamma + \hep@greek\delta \hep@greek\epsilon \hep@greek\zeta + \hep@greek\eta \hep@greek\theta \hep@greek\iota + \hep@greek\kappa \hep@greek\lambda \hep@greek\mu + \hep@greek\nu \hep@greek\xi \hep@greek\pi + \hep@greek\rho \hep@greek\sigma \hep@greek\tau + \hep@greek\upsilon \hep@greek\phi \hep@greek\chi + \hep@greek\psi \hep@greek\omega + \hep@greek\Gamma \hep@greek\Delta \hep@greek\Theta + \hep@greek\Lambda \hep@greek\Xi \hep@greek\Pi + \hep@greek\Sigma \hep@greek\Upsilon \hep@greek\Phi + \hep@greek\Psi \hep@greek\Omega + \ifxetexorluatex + % missing code + \else + \RequirePackage{substitutefont} + \substitutefont{LGR}{\rmdefault}{lmr} + \DeclareFontFamily{LGR}{\rmdefault}{} + \DeclareFontShape{LGR}{\rmdefault}{b}{n}{<->ssub*lmr/bx/n}{} + \DeclareFontShape{LGR}{\rmdefault}{b}{sc}{<->ssub*lmr/bx/sc}{} + \substitutefont{LGR}{\ttdefault}{lmtt} + \DeclareFontFamily{LGR}{\ttdefault}{} + \DeclareFontShape{LGR}{\ttdefault}{b}{n}{<->ssub*lmtt/bx/n}{} + \substitutefont{LGR}{\sfdefault}{lmss} + \DeclareFontFamily{LGR}{\sfdefault}{} + \DeclareFontShape{LGR}{\sfdefault}{b}{n}{<->ssub*lmss/bx/n}{} + \DeclareFontShape{LGR}{\sfdefault}{b}{sc}{<->ssub*lmss/bx/sc}{} + \fi + \ifhep@minion + \RequirePackage{MnSymbol} + \else + \RequirePackage{exscale} + \RequirePackage{amssymb} + \fi +\fi +\ifhep@serif + \newcommand\hep@font@sf{cmbrm} + \DeclareMathAlphabet{\mathsf}{OML}{\hep@font@sf}{m}{it} + \SetMathAlphabet{\mathsf}{bold}{OML}{\hep@font@sf}{b}{it} +\else + \newcommand\hep@font@sf{lmr} + \newcommand\hep@font@text{lmss} + \newcommand\hep@font@math{cmbrm} + \newcommand\hep@font@symbol{cmsssy} + \newcommand\hep@font@extra{cmssex} + \newcommand\hep@font@amsa{ssmsa} + \newcommand\hep@font@amsb{ssmsb} + \DeclareFontSubstitution{OML}{\hep@font@math}{m}{it} + \ifhep@symbols\ifhep@minion\else + \DeclareFontSubstitution{OMS}{\hep@font@symbol}{m}{n} + \DeclareFontSubstitution{OMX}{\hep@font@extra}{m}{n} + \fi\fi + \DeclareSymbolFont{operators}{OT1}{\hep@font@text}{m}{n} + \DeclareSymbolFont{letters}{OML}{\hep@font@math}{m}{it} + \ifhep@symbols\ifhep@minion\else + \DeclareSymbolFont{symbols}{OMS}{\hep@font@symbol}{m}{n} + \DeclareSymbolFont{largesymbols}{OMX}{\hep@font@extra}{m}{n} + \fi\fi + \SetSymbolFont{operators}{bold}{OT1}{\hep@font@text}{b}{n} + \SetSymbolFont{letters}{bold}{OML}{\hep@font@math}{b}{it} + \ifhep@symbols\ifhep@minion\else + \SetSymbolFont{symbols}{bold}{OMS}{\hep@font@symbol}{b}{n} + \fi\fi + \ifhep@symbols\ifhep@minion\else + \DeclareSymbolFont{AMSa}{U}{\hep@font@amsa}{m}{n} + \DeclareSymbolFont{AMSb}{U}{\hep@font@amsb}{m}{n} + \fi\fi + \AtBeginDocument{% + \@ifpackageloaded{esint}{% + \DeclareSymbolFont{largesymbolsA}{U}{ssesint}{m}{n} + }{} + } + \DeclareSymbolFontAlphabet{\mathrm}{operators} + \DeclareSymbolFontAlphabet{\mathnormal}{letters} + \ifhep@minion\else + \DeclareSymbolFontAlphabet{\mathcal}{symbols} + \fi + \DeclareMathAlphabet{\mathit}{OML}{\hep@font@text}{m}{it} + \SetMathAlphabet\mathit{bold}{OML}{\hep@font@text}{bx}{it} + \DeclareMathAlphabet{\mathsf}{OML}{\hep@font@sf}{m}{it} + \SetMathAlphabet{\mathsf}{bold}{OML}{\hep@font@sf}{bx}{it} +\fi +\ifhep@symbols + \RequirePackage{bm} + \AtBeginDocument{\let\mathbf\bm} + \g@addto@macro\bfseries{\boldmath} + \DeclareMathAlphabet{\mathtt}{OT1}{lmtt}{m}{n} + \SetMathAlphabet{\mathtt}{bold}{OT1}{lmtt}{bx}{n} + \DeclareMathAlphabet{\mathscr}{U}{rsfs}{m}{n} + \ifhep@minion + \DeclareMathAlphabet{\mathbb}{U}{% + \ifhep@serif dsrom\else dsss\fi% + }{m}{n} + \else + \ifhep@ams\else + \SetMathAlphabet{\mathbb}{normal}{U}{% + \ifhep@serif dsrom\else dsss\fi% + }{m}{n} + \fi + \fi +\fi + +\endinput +%% +%% End of file `hep-font.sty'. |