% \iffalse meta-comment
%
% Copyright (C) 2019-2023 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.
%
% \fi
%
% \iffalse
%
%<package>\NeedsTeXFormat{LaTeX2e}[2021-11-15]
%<package>\ProvidesPackage{hep-font}[2026/08/01 v1.5 hep-font style file]
%<documentation>\ProvidesFile{hep-font-documentation.tex}[2026/08/01 v1.5 hep-font documentation]
%
%<*documentation>
\documentclass{ltxdoc}

\renewcommand*\theCodelineNo{\rmfamily\tstyle\footnotesize\arabic{CodelineNo}}
\AtBeginEnvironment{macrocode}{\renewcommand*{\ttdefault}{clmt}}
\renewcommand*{\MacroFont}{\codestyle}
\AtBeginDocument{\DeleteShortVerb{\|}}
\AtBeginDocument{\MakeShortVerb{\"}}
\EnableCrossrefs
\CodelineIndex
\RecordChanges

\usepackage{hologo}

\usepackage[parskip,oldstyle,font=10pt]{hep-paper}
\bibliography{bibliography}
\acronym{CM}{computer modern}
\acronym{LM}{latin modern}
\acronym{NFSS}{new font selection scheme}
%</documentation>

%<*driver>
\expandafter\newif\csname ifshort\endcsname
\shortfalse
\begin{document}
\DocInput{hep-font-implementation.dtx}
\end{document}
%</driver>
%
% \fi
%
% \CheckSum{775}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \changes{v1.0}{2021/09/01}{Created the dedicated font package with size, family, numeral, encoding, microtype, Latin Modern and Computer Modern, small-caps, and upright italic handling.}
% \changes{v1.1}{2022/11/01}{Added size and sans-serif options, class font-size detection, dynamic size loading, code and verbatim styling, safer option passing, and namespaced font-shape helpers.}
% \changes{v1.2}{2023/07/01}{Disabled size overrides under jheppub, added tabular figures to table-of-contents and float contexts, introduced \cs{codestyle}, and refreshed documentation and README formatting.}
% \changes{v1.3}{2024/11/01}{Made equation numbers use table-style figures.}
% \changes{v1.4}{2025/09/01}{Split pdfLaTeX and TU-engine font setup, using iftex, fontspec, unicode-math, and fontsetup for LuaLaTeX and XeLaTeX, and applied starred command definitions.}
% \changes{v1.5}{2026/08/01}{Raised the LaTeX format requirement, bumped release metadata, refreshed the documentation and README, replaced engine markup that broke documentation builds, and updated the checksum.}
%
% \ifshort
%<*documentation>
% \fi
%
\GetFileInfo{hep-font.sty}

\title{The \software{hep-font} package\thanks{This document corresponds to \software{hep-font}~\fileversion.}}
\subtitle{Latin modern extended by computer modern}
\author{Jan Hajer \email{jan.hajer@tecnico.ulisboa.pt}}
\date{\filedate}

% \ifshort
\begin{document}
% \fi

\newgeometry{vscale=.8, vmarginratio=3:4, includeheadfoot, left=11em, marginparwidth=4.6cm, marginparsep=3mm, right=7em}

\maketitle

\begin{abstract}
The \software{hep-font} package sets up text fonts for the HEP package suite.
It selects the document font size, switches between serif and sans-serif documents, chooses lining or oldstyle numerals, loads the appropriate encodings and micro-typographic support, and extends the \glsdesc{LM} setup with \glsdesc{CM} small caps and sans-serif upright italic shapes where needed.
\end{abstract}

The package is loaded using "\usepackage{hep-font}".

\DescribeMacro{size}
The "size="\meta{size} option loads the specified font size.
The possible \meta{sizes} are:
"8pt", "9pt", "10pt", "11pt", "12pt", "14pt", "17pt", "20pt" and "default" deactivates this switch.
The default value is \unit[11]{pt}.

\DescribeMacro{sans}
The "sans" option switches to sans-serif font instead of serif font.

\DescribeMacro{oldstyle}
The "oldstyle" option switches to oldstyle numerals such as 123 in text mode instead of lining numerals such as \textl{123}.

The \software{fontenc} package \cite{fontenc} with "T1" and "TU" font encoding is loaded for \software{pdfTeX} and \software{LuaTeX}, respectively.

Some restrictions of \CM fonts are lifted with the \software{fixcm} package \cite{fix-cm}.

The \software{microtype} \cite{microtype} optimizations are activated.

The \LaTeX{} \NFSS is extended with the \software{nfssext-cfr} package \cite{nfssext-cfr}.

The \LM font is loaded using the \software{cfr-lm}  package \cite{cfr-lm} for \software{pdfTeX}.

The text companion fonts are loaded \cite{textcomp}.

\DescribeMacro{\textsc}
Bold \textbf{\textsc{Small Caps}} and a sans serif \textsf{\textsc{Small Caps}} based on the \CM font \cite{cm} is provided, the latter using the \software{sansmathfonts} \cite{sansmathfonts} and \software{hfoldsty} \cite{hfoldsty} packages.

\DescribeMacro{\textui}
A sans-serif upright italic font is provided using the \software{sansmathfonts} package \cite{sansmathfonts}.

Finally the \software{inputenc} package \cite{inputenc} with the "utf8" option is loaded.

% \ifshort
\printbibliography

\end{document}
%
%</documentation>
% \fi
%
% \StopEventually{
% \printbibliography
% \PrintChanges
% }
%
% \appendix
%
% \section{Implementation}
%
%<*package>
%
% Define a hepfont namespace for the options using the \software{kvoptions} package \cite{kvoptions}.
%    \begin{macrocode}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
  family=hepfont,
  prefix=hepfont@
}
%    \end{macrocode}
%
% \begin{macro}{size}
% Define the "size" option switching taking the font size as an argument.
%    \begin{macrocode}
\DeclareStringOption[11pt]{size}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{sans}
% Define the "sans" option switching to sans serif font.
%    \begin{macrocode}
\DeclareBoolOption[false]{sans}
\DeclareComplementaryOption{serif}{sans}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{lining}
% Define the "lining" option deactivating the use of text figures in text mode.
%    \begin{macrocode}
\DeclareBoolOption[true]{lining}
\DeclareComplementaryOption{oldstyle}{lining}
%    \end{macrocode}
% \end{macro}
%
% Process options.
%    \begin{macrocode}
\ProcessKeyvalOptions*
%    \end{macrocode}
%
% Read font argument from class call.
%    \begin{macrocode}
\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}}{}
\@ifpackageloaded{jheppub}{\setkeys{hepfont}{size=default}}{}
%    \end{macrocode}
%
% Switch text size to requested value using the \software{pdftexcmds} package \cite{pdftexcmds}.
%    \begin{macrocode}
\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
%    \end{macrocode}
%
% \subsection{LuaLaTeX or XeLaTeX}
%
% Load the \software{iftex} package \cite{iftex} and check if LuaLaTeX or XeLaTeX are running
%    \begin{macrocode}
\RequirePackage{iftex}
\iftutex
%    \end{macrocode}
% Load the \software{fontsetup} package \cite{fontsetup} which lodas in turn the \software{fontspec} \cite{fontspec} and \software{unicode-math} \cite{unicode-math} packages.
%    \begin{macrocode}
  \RequirePackage{fontspec}
  \ifhepfont@lining\else
    \defaultfontfeatures{Numbers=OldStyle}
  \fi
  \PassOptionsToPackage{
    math-style=ISO,
    bold-style=ISO,
    sans-style=italic
  }{unicode-math}
  \PassOptionsToPackage{
    \ifhepfont@sans sansdefault\else olddefault\fi
  }{fontsetup}
  \RequirePackage{fontsetup}
%    \end{macrocode}
% Define numeral macros.
%    \begin{macrocode}
  \DeclareRobustCommand{\pstyle}{%
    \not@math@alphabet\pstyle\relax%
    \addfontfeatures{Numbers=Proportional}%
  }
  \DeclareRobustCommand{\tstyle}{%
    \not@math@alphabet\tstyle\relax%
    \addfontfeatures{Numbers=Monospaced}%
  }
  \DeclareRobustCommand{\ostyle}{%
    \not@math@alphabet\ostyle\relax%
    \addfontfeatures{Numbers=OldStyle}%
  }
  \DeclareRobustCommand{\lstyle}{%
    \not@math@alphabet\lstyle\relax%
    \addfontfeatures{Numbers=Lining}%
  }
  \DeclareRobustCommand{\postyle}{\pstyle\ostyle}
  \DeclareRobustCommand{\plstyle}{\pstyle\lstyle}
  \DeclareRobustCommand{\tostyle}{\tstyle\ostyle}
  \DeclareRobustCommand{\tlstyle}{\tstyle\lstyle}
  \DeclareRobustCommand{\tmstyle}{\ttfamily}
  \DeclareRobustCommand{\tvstyle}{\ttfamily}
  \DeclareTextFontCommand{\textl}{\lstyle}
  \DeclareTextFontCommand{\texto}{\ostyle}
  \DeclareTextFontCommand{\textp}{\pstyle}
  \DeclareTextFontCommand{\textt}{\tstyle}
  \DeclareTextFontCommand{\textpl}{\plstyle}
  \DeclareTextFontCommand{\textpo}{\postyle}
  \DeclareTextFontCommand{\texttl}{\tlstyle}
  \DeclareTextFontCommand{\textto}{\tostyle}
  \protected\def\hep@lining@style{\lstyle}
%    \end{macrocode}
%
% \subsection{pdfLaTeX}
%
%    \begin{macrocode}
\else
%    \end{macrocode}
%
% Load the \software{inputenc} package \cite{inputenc}.
%    \begin{macrocode}
  \PassOptionsToPackage{utf8}{inputenc}
  \RequirePackage{inputenc}
%    \end{macrocode}
%
% Pick the correct font encoding depending on the engine used and load the \software{fontenc} package \cite{fontenc} with this encoding.
% For details of the font encoding see \cite{encguide}.
%    \begin{macrocode}
  \def\hepfont@encoding{T1}
  \PassOptionsToPackage{\hepfont@encoding}{fontenc}
  \RequirePackage{fontenc}
%    \end{macrocode}
% Switch document to sans-serif font if requested.
%    \begin{macrocode}
  \ifhepfont@sans
    \renewcommand*{\familydefault}{\sfdefault}
  \fi
%    \end{macrocode}
% Switch to the \LM font using the \software{cfr-lm} package \cite{cfr-lm}
% Additionally, some warnings are silenced using the \software{silence} \cite{silence} and \software{etoolbox} \cite{etoolbox} packages.
%    \begin{macrocode}
  \RequirePackage{etoolbox}
  \RequirePackage{silence}
  \robustify\@latex@warning@no@line
  \robustify\sl@StoreMessage
  \WarningFilter{nfssext-cfr}{Patching font initialisation macro for serif.}
  \WarningFilter{nfssext-cfr}{Patching font initialisation macro for sans.}
  \WarningFilter{nfssext-cfr}{Patching font initialisation macro for typewriter.}
  \WarningFilter{nfssext-cfr}{Overwriting kernel definition of \swshape (new)}
  \ifhepfont@lining
    \PassOptionsToPackage{rm={lining},sf={lining},tt={lining}}{cfr-lm}
  \fi
  \RequirePackage{cfr-lm}
%    \end{macrocode}
% The lining-style command provided by \software{nfssext-cfr} is not reliable for \software{cfr-lm} fonts in some older \TeX{} distributions when it is invoked from nested text-mode constructions.
% We therefore preserve the original command for all other font families and handle \software{cfr-lm} explicitly.
% For these families, the oldstyle-figure modifier \code{j} is removed from the current family name before the font is selected again.
% This changes only the figure style while retaining the current serif, sans-serif, typewriter, quotation, or Dunhill variant.
%    \begin{macrocode}
\ExplSyntaxOn
\cs_set_eq:NN \hepfont_cfr_lstyle: \lstyle
\cs_set_protected:Npn \hep@lining@style{
  \tl_set:Nx \l_tmpa_tl { \f@family }
  \exp_args:NnV \regex_match:nnTF{ \A clm }\l_tmpa_tl{
    \regex_replace_once:nnN{ \A ( clm [^j]* ) j }{ \1 }\l_tmpa_tl
    \fontfamily { \tl_use:N \l_tmpa_tl }
    \selectfont
  }{\hepfont_cfr_lstyle:}
}
\ExplSyntaxOff
%    \end{macrocode}
% Fix the remaining \CM \cite{cm} fonts using the \software{fix-cm} package \cite{fix-cm}
%    \begin{macrocode}
  \RequirePackage{fix-cm}
%    \end{macrocode}
% Load the \software{textcomp} extension \cite{textcomp} and define helper functions.
%    \begin{macrocode}
  \RequirePackage{textcomp}
%    \end{macrocode}
%
% \subsubsection{Serif}
%
%For serif fonts
%    \begin{macrocode}
  \rmfamily
  \newcommand*{\hepfont@rm@shape}[3]{%
    \DeclareFontShape{\hepfont@encoding}{\rmdefault}{#1}{#2}{#3}{}%
  }
%    \end{macrocode}
%\begin{macro}{\textsc}
%For lining numerals add \CM roman small caps (italic and bold) from the \software{slantsc} package \cite{slantsc}.
%    \begin{macrocode}
  \ifhepfont@lining
    \RequirePackage{slantsc}
    \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}{}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\textsc}
%For oldstyle numerals use the fonts from the \software{hfoldsty} package \cite{hfoldsty}.
%    \begin{macrocode}
  \else
    \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{\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
    }{}
    \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
%    \end{macrocode}
%\end{macro}
%
% \subsubsection{Sans serif}
%
%    \begin{macrocode}
  \sffamily
  \newcommand*{\hepfont@sf@shape}[3]{%
    \DeclareFontShape{\hepfont@encoding}{\sfdefault}{#1}{#2}{#3}{}%
  }
%    \end{macrocode}
%\begin{macro}{\textsc}
%Provide the sans serif small caps font shape using the extended \CM from the \software{sansmathfonts} package \cite{sansmathfonts}.
%    \begin{macrocode}
  \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}{}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\textui}
%Provide a sans upright italic font.
%    \begin{macrocode}
  \hepfont@sf@shape{m}{ui}{<->cmssu10}{}
%    \end{macrocode}
%\end{macro}
%
% \subsection{Engine independent macros}
%
%    \begin{macrocode}
\fi
%    \end{macrocode}
%
% Load the \software{microtype} font optimizations \cite{microtype}.
%    \begin{macrocode}
\RequirePackage{microtype}
%    \end{macrocode}
%
% Ensure that the table of contest uses tabular figures using the \software{xpatch} package \cite{xpatch}.
%    \begin{macrocode}
\RequirePackage{xpatch}
\xpretocmd{\@dottedtocline}{\tstyle}{}{}
\xpatchcmd{\@dottedtocline}{\normalfont}{\normalfont\tstyle}{}{}
\xpretocmd{\l@section}{\tstyle}{}{}
\xpretocmd{\l@chapter}{\tstyle}{}{}
\xpretocmd{\l@part}{\tstyle}{}{}
%    \end{macrocode}
% Ensure that the "verbatim" environment uses proportional font and provide an inline "\code" macro.
% Work around a bug in \software{nfssext-cfr} which defines a global "\set" macro and breaks other macros of the same name.
%    \begin{macrocode}
\newcommand*{\codestyle}{\ttfamily\tmstyle\lstyle}
\let\verbatim@font\codestyle
\RequirePackage{xparse}
\ProvideDocumentCommand{\code}{v}{{\codestyle #1}}
%    \end{macrocode}
% Adjust the figures according to the "lining" option and ensure that tables always use lining.
%    \begin{macrocode}
\g@addto@macro\@floatboxreset{\tlstyle}
% \g@addto@macro\@subfloatboxreset{\tlstyle}
%    \end{macrocode}
% Adjust the equation such that the number is always table style.
%    \begin{macrocode}
\pretocmd{\theequation}{\tstyle}{}{}
%    \end{macrocode}
%
%</package>
%
% \section{Test}
%
% \subsection{pdfLaTeX}
%
%<*pdflatex>
%
%    \begin{macrocode}
\documentclass[a4paper]{article}

\usepackage[oldstyle]{hep-font}
\usepackage[cm]{fullpage}
\usepackage{fancyvrb}\DefineShortVerb{\|}
\newenvironment{vrb}{\begin{tabular}{@{}p{5.4cm}ll@{}}}{\end{tabular}}

\begin{document}

\subsection*{Roman}

\begin{vrb}
|\rmfamily| &
{\rmfamily Latin Modern Roman 123} \\
|  \sbweight| &
{\rmfamily\sbweight Latin Modern Roman Semi Bold 123} \\
|  \bfseries| &
{\rmfamily\bfseries Latin Modern Roman Bold Extended 123} \\
|\slshape| &
{\rmfamily\slshape Latin Modern Roman Oblique 123} \\
|  \sbweight| &
{\rmfamily\sbweight\slshape Latin Modern Roman Semi Bold Oblique 123} \\
|  \bfseries| &
{\rmfamily\bfseries\slshape Latin Modern Roman Bold Oblique Extended 123} \\
|\itshape| &
{\rmfamily\itshape Latin Modern Roman Italic 123} \\
|  \bfseries| &
{\rmfamily\bfseries\itshape Latin Modern Roman Bold Italic Extended 123} \\
|\uishape| &
{\rmfamily\uishape Latin Modern Roman Upright Italic 123} \\
|\scshape| &
{\rmfamily\scshape Latin Modern Roman Small Caps 123} \\
|  \bfseries| &
{\rmfamily\bfseries\scshape Computer Modern Roman Bold Small Caps 123} \\
|  \sishape| &
{\rmfamily\scshape\slshape Latin Modern Roman Oblique Small Caps 123} \\
|    \bfseries| &
{\rmfamily\slshape\bfseries\scshape Computer Modern Roman Bold Small Caps 123} \\
\end{vrb}

\subsubsection*{Dunhill}

\begin{vrb}
|\tistyle | &
{\tistyle Latin Modern Dunhill 123} \\
|  \slshape| &
{\tistyle\slshape Latin Modern Dunhill Oblique 123} \\
\end{vrb}

\subsection*{Sans}

\begin{vrb}
|\sffamily| &
{\sffamily Latin Modern Sans 123} \\
|  \fontseries{sbc}\selectfont| &
{\sffamily\fontseries{sbc}\selectfont Latin Modern Sans Demi Condensed 123} \\
|  \bfseries| &
{\sffamily\bfseries Latin Modern Sans Bold 123} \\
|\slshape| &
{\sffamily\slshape Latin Modern Sans Oblique 123} \\
|  \fontseries{sbc}\selectfont| &
{\sffamily\fontseries{sbc}\selectfont\slshape Latin Modern Sans Demi Condensed Oblique 123} \\
|  \bfseries| &
{\sffamily\bfseries\slshape Latin Modern Sans Bold Oblique 123} \\
|\uishape| &
{\sffamily\uishape Computer Modern Sans Upright Italic 123} \\
|\scshape| &
{\sffamily\scshape Computer Modern Sans Small Caps 123} \\
|  \bfseries| &
{\sffamily\bfseries\scshape Computer Modern Sans Bold Small Caps 123} \\
|  \itshape| &
{\sffamily\itshape\scshape Computer Modern Sans Italic Small Caps 123} \\
|    \bfseries| &
{\sffamily\itshape\bfseries\scshape Computer Modern Sans Italic Bold Small Caps 123} \\
\end{vrb}

\subsubsection*{Quotation}

\begin{vrb}
|\qtstyle | &
{\sffamily\qtstyle Latin Modern Sans Extended 123} \\
|  \bfseries | &
{\sffamily\qtstyle\bfseries Latin Modern Sans Bold Extended 123} \\
|\slshape | &
{\sffamily\qtstyle\slshape Latin Modern Sans Extended Oblique 123} \\
|  \bfseries | &
{\sffamily\qtstyle\bfseries\slshape Latin Modern Sans Bold Extended Oblique 123} \\
\end{vrb}

\subsection*{Typewriter}

\begin{vrb}
|\ttfamily\tvstyle | &
{\ttfamily\tvstyle Latin Modern Typewriter Proportional 123} \\
|  \bfseries | &
{\ttfamily\tvstyle\bfseries Latin Modern Typewriter Proportional Dark 123} \\
|  \lgweight | &
{\ttfamily\tvstyle\lgweight Latin Modern Typewriter Proportional Light 123} \\
|\slshape | &
{\ttfamily\tvstyle\slshape Latin Modern Typewriter Proportional Oblique 123} \\
|  \bfseries | &
{\ttfamily\tvstyle\bfseries\slshape Latin Modern Typewriter Proportional Dark Oblique 123} \\
|  \lgweight | &
{\ttfamily\tvstyle\lgweight\slshape Latin Modern Typewriter Proportional Light Oblique 123} \\
\end{vrb}

\subsubsection*{Fixed-width}

\begin{vrb}
|\ttfamily\tmstyle | &
{\ttfamily\tmstyle Latin Modern Typewriter 123} \\
|  \lgweight | &
{\ttfamily\tmstyle\lgweight Latin Modern Typewriter Light 123} \\
|  \bfseries | &
{\ttfamily\tmstyle\bfseries Latin Modern Typewriter Dark 123} \\
|  \fontseries{lc}\selectfont | &
{\ttfamily\tmstyle\fontseries{lc}\selectfont Latin Modern Typewriter Light Condensed 123} \\
|\slshape | &
{\ttfamily\tmstyle\slshape Latin Modern Typewriter Oblique 123} \\
|  \lgweight | &
{\ttfamily\tmstyle\lgweight\slshape Latin Modern Typewriter Light Oblique 123} \\
|  \bfseries | &
{\ttfamily\tmstyle\bfseries\slshape Latin Modern Typewriter Dark Oblique 123} \\
|  \fontseries{lc} | &
{\ttfamily\tmstyle\fontseries{lc}\slshape Latin Modern Typewriter Light Condensed Oblique 123} \\
|\itshape | &
{\ttfamily\tmstyle\itshape Latin Modern Typewriter Italic 123} \\
|\scshape | &
{\ttfamily\tmstyle\scshape Latin Modern Typewriter Small Caps 123} \\
|  \slshape | &
{\ttfamily\tmstyle\scshape\slshape Latin Modern Typewriter Oblique Small Caps 123} \\
\end{vrb}

\end{document}
%    \end{macrocode}
%
%</pdflatex>
%
% \subsection{LuaLaTeX}
%
%<*lualatex>
%
%    \begin{macrocode}
\documentclass{article}

\usepackage[oldstyle]{hep-font}

\usepackage{fancyvrb}\DefineShortVerb{\|}
\newenvironment{vrb}{\begin{tabular}{@{}p{5.4cm}ll@{}}}{\end{tabular}}

\begin{document}

\subsection*{Roman}

\begin{vrb}
|\rmfamily| &
{\rmfamily New Computer Modern 123} \\
|  \bfseries| &
{\rmfamily\bfseries New Computer Modern 123} \\
|\slshape| &
{\rmfamily\slshape New Computer Modern 123} \\
|  \bfseries| &
{\rmfamily\bfseries\slshape New Computer Modern 123} \\
|\itshape| &
{\rmfamily\itshape New Computer Modern 123} \\
|  \bfseries| &
{\rmfamily\bfseries\itshape New Computer Modern 123} \\
|\scshape| &
{\rmfamily\scshape New Computer Modern 123} \\
|  \bfseries| &
{\rmfamily\bfseries\scshape New Computer Modern 123} \\
|  \sishape| &
{\rmfamily\scshape\slshape New Computer Modern 123} \\
|    \bfseries| &
{\rmfamily\slshape\bfseries\scshape New Computer Modern 123} \\
\end{vrb}

\subsection*{Sans}

\begin{vrb}
|\sffamily| &
{\sffamily New Computer Modern 123} \\
|  \bfseries| &
{\sffamily\bfseries New Computer Modern 123} \\
|\slshape| &
{\sffamily\slshape New Computer Modern 123} \\
|  \bfseries| &
{\sffamily\bfseries\slshape New Computer Modern 123} \\
|\itshape| &
{\sffamily\itshape New Computer Modern 123} \\
|  \bfseries| &
{\sffamily\bfseries\itshape New Computer Modern 123} \\
|\scshape| &
{\sffamily\scshape New Computer Modern 123} \\
\end{vrb}

\subsection*{Typewriter}

\begin{vrb}
|\ttfamily| &
{\ttfamily New Computer Modern 123} \\
|  \bfseries| &
{\ttfamily\bfseries New Computer Modern 123} \\
|\slshape| &
{\ttfamily\slshape New Computer Modern 123} \\
|  \bfseries| &
{\ttfamily\bfseries\slshape New Computer Modern 123} \\
|\itshape| &
{\ttfamily\itshape New Computer Modern 123} \\
|  \bfseries| &
{\ttfamily\bfseries\itshape New Computer Modern 123} \\
|\scshape| &
{\ttfamily\scshape New Computer Modern 123} \\
\end{vrb}

\subsection*{Uncial}

\begin{vrb}
|\uncial| &
{\uncial New Computer Modern 123} \\
|  \bfseries| &
{\uncial\bfseries New Computer Modern 123} \\
|\slshape| &
{\uncial\slshape New Computer Modern 123} \\
|  \bfseries| &
{\uncial\bfseries\slshape New Computer Modern 123} \\
\end{vrb}

\end{document}
%    \end{macrocode}
%
%</lualatex>
%
% \section{Readme}
%
%<*readme>
%
%    \begin{macrocode}
# The `hep-font` package

Latin modern extended by computer modern.

## Introduction

The `hep-font` package sets up text fonts for the HEP package suite. It
selects the document font size, switches between serif and sans-serif
documents, chooses lining or oldstyle numerals, loads the appropriate
encodings and micro-typographic support, and extends the Latin Modern
setup with Computer Modern small caps and sans-serif upright italic shapes
where needed.

The package is loaded with `\usepackage{hep-font}`.

## Author

Jan Hajer

## License

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.
%    \end{macrocode}
%
%</readme>
%
% \Finale

\endinput

% \PrintIndex
% makeindex -s gglo.ist -o hep-font-implementation.gls hep-font-implementation.glo
% makeindex -s gglo.ist -o hep-font-implementation.ind hep-font-implementation.idx
