% \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}[2005/12/01]
%<package>\ProvidesPackage{hep-font}[2025/09/01 v1.4 hep-font style file]
%<documentation>\ProvidesFile{hep-font-documentation.tex}[2025/09/01 v1.4 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{768}
%
% \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}{Initial version of the style file.}
% \changes{v1.1}{2022/11/01}{Bug fixes.}
% \changes{v1.2}{2023/07/01}{Bug fixes.}
% \changes{v1.3}{2024/11/01}{Bug fixes.}
% \changes{v1.4}{2025/09/01}{Bug fixes.}
%
% \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 loads standard font packages and extends the usual \glsdesc{LM} implementations by replacing missing fonts with \glsdesc{CM} counterparts.
\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 \hologo{pdfTeX} and \hologo{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 \hologo{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 \hologo{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{\hologo{LuaLaTeX} or \hologo{XeLaTeX}}
%
% Load the \software{iftex} package \cite{iftex} and check if \hologo{LuaLaTeX} or \hologo{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}
%    \end{macrocode}
%
% \subsection{\hologo{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}
% 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}{\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}
%
% \begin{macro}{\unit}
% Patch the "\unit" and "\unitfrac" macros to work with lining numerals using the \software{xpatch} package \cite{xpatch} if the \software{units} package \cite{units} is loaded.
% TODO implement patch without actually loading the package.
%    \begin{macrocode}
\ifhepfont@lining\else
% \AtBeginDocument{
%   \@ifpackageloaded{units}{
  \RequirePackage{units}
  \RequirePackage{xpatch}
  \xpatchcmd{\unit}{\else#1}{%
    \else\ifthenelse{\boolean{mmode}}{#1}{\textl{#1}}%
  }{}{}
  \xpatchcmd{\unitfrac}{\else#1}{%
    \else\ifthenelse{\boolean{mmode}}{#1}{\textl{#1}}%
  }{}{}
%   }{}
% }
\fi
%    \end{macrocode}
% \end{macro}
%
%</package>
%
% \section{Test}
%
% \subsection{\hologo{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{\hologo{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 loads standard font packages and extends the usual
Latin Modern implementations by replacing missing fonts with Computer
Modern counterparts.

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
