Debian Codegraph @

texmf-dist/source/fonts/hep-font/hep-font-implementation.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2019-2023 by Jan Hajer
4 % -----------------------------------
5 %
6 % This file may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either version 1.3c
8 % of this license or (at your option) any later version.
9 % The latest version of this license is in:
10 %
11 % http://www.latex-project.org/lppl.txt
12 %
13 % and version 1.3c or later is part of all distributions of LaTeX
14 % version 2005/12/01 or later.
15 %
16 % \fi
17 %
18 % \iffalse
19 %
20 %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
21 %<package>\ProvidesPackage{hep-font}[2025/09/01 v1.4 hep-font style file]
22 %<documentation>\ProvidesFile{hep-font-documentation.tex}[2025/09/01 v1.4 hep-font documentation]
23 %
24 %<*documentation>
25 \documentclass{ltxdoc}
26
27 \renewcommand*\theCodelineNo{\rmfamily\tstyle\footnotesize\arabic{CodelineNo}}
28 \AtBeginEnvironment{macrocode}{\renewcommand*{\ttdefault}{clmt}}
29 \renewcommand*{\MacroFont}{\codestyle}
30 \AtBeginDocument{\DeleteShortVerb{\|}}
31 \AtBeginDocument{\MakeShortVerb{\"}}
32 \EnableCrossrefs
33 \CodelineIndex
34 \RecordChanges
35
36 \usepackage{hologo}
37
38 \usepackage[parskip,oldstyle,font=10pt]{hep-paper}
39 \bibliography{bibliography}
40 \acronym{CM}{computer modern}
41 \acronym{LM}{latin modern}
42 \acronym{NFSS}{new font selection scheme}
43 %</documentation>
44
45 %<*driver>
46 \expandafter\newif\csname ifshort\endcsname
47 \shortfalse
48 \begin{document}
49 \DocInput{hep-font-implementation.dtx}
50 \end{document}
51 %</driver>
52 %
53 % \fi
54 %
55 % \CheckSum{768}
56 %
57 % \CharacterTable
58 % {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
59 % 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
60 % Digits \0\1\2\3\4\5\6\7\8\9
61 % Exclamation \! Double quote \" Hash (number) \#
62 % Dollar \$ Percent \% Ampersand \&
63 % Acute accent \' Left paren \( Right paren \)
64 % Asterisk \* Plus \+ Comma \,
65 % Minus \- Point \. Solidus \/
66 % Colon \: Semicolon \; Less than \<
67 % Equals \= Greater than \> Question mark \?
68 % Commercial at \@ Left bracket \[ Backslash \\
69 % Right bracket \] Circumflex \^ Underscore \_
70 % Grave accent \` Left brace \{ Vertical bar \|
71 % Right brace \} Tilde \~}
72 %
73 % \changes{v1.0}{2021/09/01}{Initial version of the style file.}
74 % \changes{v1.1}{2022/11/01}{Bug fixes.}
75 % \changes{v1.2}{2023/07/01}{Bug fixes.}
76 % \changes{v1.3}{2024/11/01}{Bug fixes.}
77 % \changes{v1.4}{2025/09/01}{Bug fixes.}
78 %
79 % \ifshort
80 %<*documentation>
81 % \fi
82 %
83 \GetFileInfo{hep-font.sty}
84
85 \title{The \software{hep-font} package\thanks{This document corresponds to \software{hep-font}~\fileversion.}}
86 \subtitle{Latin modern extended by computer modern}
87 \author{Jan Hajer \email{[email protected]}}
88 \date{\filedate}
89
90 % \ifshort
91 \begin{document}
92 % \fi
93
94 \newgeometry{vscale=.8, vmarginratio=3:4, includeheadfoot, left=11em, marginparwidth=4.6cm, marginparsep=3mm, right=7em}
95
96 \maketitle
97
98 \begin{abstract}
99 The \software{hep-font} package loads standard font packages and extends the usual \glsdesc{LM} implementations by replacing missing fonts with \glsdesc{CM} counterparts.
100 \end{abstract}
101
102 The package is loaded using "\usepackage{hep-font}".
103
104 \DescribeMacro{size}
105 The "size="\meta{size} option loads the specified font size.
106 The possible \meta{sizes} are:
107 "8pt", "9pt", "10pt", "11pt", "12pt", "14pt", "17pt", "20pt" and "default" deactivates this switch.
108 The default value is \unit[11]{pt}.
109
110 \DescribeMacro{sans}
111 The "sans" option switches to sans-serif font instead of serif font.
112
113 \DescribeMacro{oldstyle}
114 The "oldstyle" option switches to oldstyle numerals such as 123 in text mode instead of lining numerals such as \textl{123}.
115
116 The \software{fontenc} package \cite{fontenc} with "T1" and "TU" font encoding is loaded for \hologo{pdfTeX} and \hologo{LuaTeX}, respectively.
117
118 Some restrictions of \CM fonts are lifted with the \software{fixcm} package \cite{fix-cm}.
119
120 The \software{microtype} \cite{microtype} optimizations are activated.
121
122 The \hologo{LaTeX} \NFSS is extended with the \software{nfssext-cfr} package \cite{nfssext-cfr}.
123
124 The \LM font is loaded using the \software{cfr-lm} package \cite{cfr-lm} for \hologo{pdfTeX}.
125
126 The text companion fonts are loaded \cite{textcomp}.
127
128 \DescribeMacro{\textsc}
129 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.
130
131 \DescribeMacro{\textui}
132 A sans-serif upright italic font is provided using the \software{sansmathfonts} package \cite{sansmathfonts}.
133
134 Finally the \software{inputenc} package \cite{inputenc} with the "utf8" option is loaded.
135
136 % \ifshort
137 \printbibliography
138
139 \end{document}
140 %
141 %</documentation>
142 % \fi
143 %
144 % \StopEventually{
145 % \printbibliography
146 % \PrintChanges
147 % }
148 %
149 % \appendix
150 %
151 % \section{Implementation}
152 %
153 %<*package>
154 %
155 % Define a hepfont namespace for the options using the \software{kvoptions} package \cite{kvoptions}.
156 % \begin{macrocode}
157 \RequirePackage{kvoptions}
158 \SetupKeyvalOptions{
159 family=hepfont,
160 prefix=hepfont@
161 }
162 % \end{macrocode}
163 %
164 % \begin{macro}{size}
165 % Define the "size" option switching taking the font size as an argument.
166 % \begin{macrocode}
167 \DeclareStringOption[11pt]{size}
168 % \end{macrocode}
169 % \end{macro}
170 %
171 % \begin{macro}{sans}
172 % Define the "sans" option switching to sans serif font.
173 % \begin{macrocode}
174 \DeclareBoolOption[false]{sans}
175 \DeclareComplementaryOption{serif}{sans}
176 % \end{macrocode}
177 % \end{macro}
178 %
179 % \begin{macro}{lining}
180 % Define the "lining" option deactivating the use of text figures in text mode.
181 % \begin{macrocode}
182 \DeclareBoolOption[true]{lining}
183 \DeclareComplementaryOption{oldstyle}{lining}
184 % \end{macrocode}
185 % \end{macro}
186 %
187 % Process options.
188 % \begin{macrocode}
189 \ProcessKeyvalOptions*
190 % \end{macrocode}
191 %
192 % Read font argument from class call.
193 % \begin{macrocode}
194 \def\hepfont@get@class#1.cls#2\relax{\def\hepfont@class{#1}}
195 \def\hepfont@getclass{\expandafter\hepfont@get@class\@filelist\relax}
196 \hepfont@getclass
197 \@ifclasswith{\hepfont@class}{10pt}{\setkeys{hepfont}{size=10pt}}{}
198 \@ifclasswith{\hepfont@class}{11pt}{\setkeys{hepfont}{size=11pt}}{}
199 \@ifclasswith{\hepfont@class}{12pt}{\setkeys{hepfont}{size=12pt}}{}
200 \@ifpackageloaded{jheppub}{\setkeys{hepfont}{size=default}}{}
201 % \end{macrocode}
202 %
203 % Switch text size to requested value using the \software{pdftexcmds} package \cite{pdftexcmds}.
204 % \begin{macrocode}
205 \RequirePackage{pdftexcmds}
206 \ifnum\pdf@strcmp{\hepfont@size}{default}=0\else
207 \def\hepfont@remove@pt#1pt{#1}
208 \edef\hepfont@pt@size{\expandafter\hepfont@remove@pt\hepfont@size}
209 \let\small\relax
210 \let\footnotesize\relax
211 \let\scriptsize\relax
212 \let\tiny\relax
213 \let\large\relax
214 \let\Large\relax
215 \let\LARGE\relax
216 \let\huge\relax
217 \let\Huge\relax
218 \input{size\hepfont@[email protected]}
219 \fi
220 % \end{macrocode}
221 %
222 % \subsection{\hologo{LuaLaTeX} or \hologo{XeLaTeX}}
223 %
224 % Load the \software{iftex} package \cite{iftex} and check if \hologo{LuaLaTeX} or \hologo{XeLaTeX} are running
225 % \begin{macrocode}
226 \RequirePackage{iftex}
227 \iftutex
228 % \end{macrocode}
229 % Load the \software{fontsetup} package \cite{fontsetup} which lodas in turn the \software{fontspec} \cite{fontspec} and \software{unicode-math} \cite{unicode-math} packages.
230 % \begin{macrocode}
231 \RequirePackage{fontspec}
232 \ifhepfont@lining\else
233 \defaultfontfeatures{Numbers=OldStyle}
234 \fi
235 \PassOptionsToPackage{
236 math-style=ISO,
237 bold-style=ISO,
238 sans-style=italic
239 }{unicode-math}
240 \PassOptionsToPackage{
241 \ifhepfont@sans sansdefault\else olddefault\fi
242 }{fontsetup}
243 \RequirePackage{fontsetup}
244 % \end{macrocode}
245 % Define numeral macros.
246 % \begin{macrocode}
247 \DeclareRobustCommand{\pstyle}{%
248 \not@math@alphabet\pstyle\relax%
249 \addfontfeatures{Numbers=Proportional}%
250 }
251 \DeclareRobustCommand{\tstyle}{%
252 \not@math@alphabet\tstyle\relax%
253 \addfontfeatures{Numbers=Monospaced}%
254 }
255 \DeclareRobustCommand{\ostyle}{%
256 \not@math@alphabet\ostyle\relax%
257 \addfontfeatures{Numbers=OldStyle}%
258 }
259 \DeclareRobustCommand{\lstyle}{%
260 \not@math@alphabet\lstyle\relax%
261 \addfontfeatures{Numbers=Lining}%
262 }
263 \DeclareRobustCommand{\postyle}{\pstyle\ostyle}
264 \DeclareRobustCommand{\plstyle}{\pstyle\lstyle}
265 \DeclareRobustCommand{\tostyle}{\tstyle\ostyle}
266 \DeclareRobustCommand{\tlstyle}{\tstyle\lstyle}
267 \DeclareRobustCommand{\tmstyle}{\ttfamily}
268 \DeclareRobustCommand{\tvstyle}{\ttfamily}
269 \DeclareTextFontCommand{\textl}{\lstyle}
270 \DeclareTextFontCommand{\texto}{\ostyle}
271 \DeclareTextFontCommand{\textp}{\pstyle}
272 \DeclareTextFontCommand{\textt}{\tstyle}
273 \DeclareTextFontCommand{\textpl}{\plstyle}
274 \DeclareTextFontCommand{\textpo}{\postyle}
275 \DeclareTextFontCommand{\texttl}{\tlstyle}
276 \DeclareTextFontCommand{\textto}{\tostyle}
277 % \end{macrocode}
278 %
279 % \subsection{\hologo{pdfLaTeX}}
280 %
281 % \begin{macrocode}
282 \else
283 % \end{macrocode}
284 %
285 % Load the \software{inputenc} package \cite{inputenc}.
286 % \begin{macrocode}
287 \PassOptionsToPackage{utf8}{inputenc}
288 \RequirePackage{inputenc}
289 % \end{macrocode}
290 %
291 % Pick the correct font encoding depending on the engine used and load the \software{fontenc} package \cite{fontenc} with this encoding.
292 % For details of the font encoding see \cite{encguide}.
293 % \begin{macrocode}
294 \def\hepfont@encoding{T1}
295 \PassOptionsToPackage{\hepfont@encoding}{fontenc}
296 \RequirePackage{fontenc}
297 % \end{macrocode}
298 % Switch document to sans-serif font if requested.
299 % \begin{macrocode}
300 \ifhepfont@sans
301 \renewcommand*{\familydefault}{\sfdefault}
302 \fi
303 % \end{macrocode}
304 % Switch to the \LM font using the \software{cfr-lm} package \cite{cfr-lm}
305 % Additionally, some warnings are silenced using the \software{silence} \cite{silence} and \software{etoolbox} \cite{etoolbox} packages.
306 % \begin{macrocode}
307 \RequirePackage{etoolbox}
308 \RequirePackage{silence}
309 \robustify\@latex@warning@no@line
310 \robustify\sl@StoreMessage
311 \WarningFilter{nfssext-cfr}{Patching font initialisation macro for serif.}
312 \WarningFilter{nfssext-cfr}{Patching font initialisation macro for sans.}
313 \WarningFilter{nfssext-cfr}{Patching font initialisation macro for typewriter.}
314 \WarningFilter{nfssext-cfr}{Overwriting kernel definition of \swshape (new)}
315 \ifhepfont@lining
316 \PassOptionsToPackage{rm={lining},sf={lining},tt={lining}}{cfr-lm}
317 \fi
318 \RequirePackage{cfr-lm}
319 % \end{macrocode}
320 % Fix the remaining \CM \cite{cm} fonts using the \software{fix-cm} package \cite{fix-cm}
321 % \begin{macrocode}
322 \RequirePackage{fix-cm}
323 % \end{macrocode}
324 % Load the \software{textcomp} extension \cite{textcomp} and define helper functions.
325 % \begin{macrocode}
326 \RequirePackage{textcomp}
327 % \end{macrocode}
328 %
329 % \subsubsection{Serif}
330 %
331 %For serif fonts
332 % \begin{macrocode}
333 \rmfamily
334 \newcommand*{\hepfont@rm@shape}[3]{%
335 \DeclareFontShape{\hepfont@encoding}{\rmdefault}{#1}{#2}{#3}{}%
336 }
337 % \end{macrocode}
338 %\begin{macro}{\textsc}
339 %For lining numerals add \CM roman small caps (italic and bold) from the \software{slantsc} package \cite{slantsc}.
340 % \begin{macrocode}
341 \ifhepfont@lining
342 \RequirePackage{slantsc}
343 \hepfont@rm@shape{b}{sc}{<->ssub*cmr/bx/sc}{}
344 \hepfont@rm@shape{bx}{sc}{<->ssub*cmr/bx/sc}{}
345 \hepfont@rm@shape{b}{scsl}{<->ssub*cmr/bx/scsl}{}
346 \hepfont@rm@shape{bx}{scsl}{<->ssub*cmr/bx/scit}{}
347 \hepfont@rm@shape{b}{scit}{<->ssub*cmr/bx/scsl}{}
348 \hepfont@rm@shape{bx}{scit}{<->ssub*cmr/bx/scit}{}
349 % \end{macrocode}
350 %\end{macro}
351 %\begin{macro}{\textsc}
352 %For oldstyle numerals use the fonts from the \software{hfoldsty} package \cite{hfoldsty}.
353 % \begin{macrocode}
354 \else
355 \DeclareFontFamily{\hepfont@encoding}{hfor}{}
356 \DeclareFontShape{\hepfont@encoding}{hfor}{bx}{sc}{
357 <-6>hfoxc0500<6-7>hfoxc0600<7-8>hfoxc0700<8-9>hfoxc0800
358 <9-10>hfoxc0900<10-12>hfoxc1000<12-17>hfoxc1200<17->hfoxc1728
359 }{}
360 \DeclareFontShape{\hepfont@encoding}{hfor}{bx}{scsl}{
361 <-6>hfooc0500<6-7>hfooc0600<7-8>hfooc0700<8-9>hfooc0800
362 <9-10>hfooc0900<10-12>hfooc1000<12-17>hfooc1200<17->hfooc1728
363 }{}
364 \hepfont@rm@shape{b}{sc}{<->ssub*hfor/bx/sc}{}
365 \hepfont@rm@shape{bx}{sc}{<->ssub*hfor/bx/sc}{}
366 \hepfont@rm@shape{bx}{scsl}{<->ssub*hfor/bx/scsl}{}
367 \hepfont@rm@shape{b}{scit}{<->ssub*hfor/bx/scsl}{}
368 \hepfont@rm@shape{bx}{scit}{<->ssub*hfor/bx/scsl}{}
369 \hepfont@rm@shape{b}{scsl}{<->ssub*hfor/bx/scsl}{}
370 \fi
371 % \end{macrocode}
372 %\end{macro}
373 %
374 % \subsubsection{Sans serif}
375 %
376 % \begin{macrocode}
377 \sffamily
378 \newcommand*{\hepfont@sf@shape}[3]{%
379 \DeclareFontShape{\hepfont@encoding}{\sfdefault}{#1}{#2}{#3}{}%
380 }
381 % \end{macrocode}
382 %\begin{macro}{\textsc}
383 %Provide the sans serif small caps font shape using the extended \CM from the \software{sansmathfonts} package \cite{sansmathfonts}.
384 % \begin{macrocode}
385 \hepfont@sf@shape{m}{sc}{<->ssub*xcmss/m/sc}{}
386 \hepfont@sf@shape{b}{sc}{<->ssub*xcmss/bx/sc}{}
387 \hepfont@sf@shape{bx}{sc}{<->ssub*xcmss/bx/sc}{}
388 \hepfont@sf@shape{m}{scit}{<->ssub*xcmss/m/scit}{}
389 \hepfont@sf@shape{b}{scit}{<->ssub*xcmss/bx/scit}{}
390 \hepfont@sf@shape{bx}{scit}{<->ssub*xcmss/bx/scit}{}
391 \hepfont@sf@shape{m}{scsl}{<->ssub*xcmss/m/scit}{}
392 \hepfont@sf@shape{b}{scsl}{<->ssub*xcmss/bx/scit}{}
393 \hepfont@sf@shape{bx}{scsl}{<->ssub*xcmss/bx/scit}{}
394 % \end{macrocode}
395 %\end{macro}
396 %\begin{macro}{\textui}
397 %Provide a sans upright italic font.
398 % \begin{macrocode}
399 \hepfont@sf@shape{m}{ui}{<->cmssu10}{}
400 % \end{macrocode}
401 %\end{macro}
402 %
403 % \subsection{Engine independent macros}
404 %
405 % \begin{macrocode}
406 \fi
407 % \end{macrocode}
408 %
409 % Load the \software{microtype} font optimizations \cite{microtype}.
410 % \begin{macrocode}
411 \RequirePackage{microtype}
412 % \end{macrocode}
413 %
414 % Ensure that the table of contest uses tabular figures using the \software{xpatch} package \cite{xpatch}.
415 % \begin{macrocode}
416 \RequirePackage{xpatch}
417 \xpretocmd{\@dottedtocline}{\tstyle}{}{}
418 \xpatchcmd{\@dottedtocline}{\normalfont}{\normalfont\tstyle}{}{}
419 \xpretocmd{\l@section}{\tstyle}{}{}
420 \xpretocmd{\l@chapter}{\tstyle}{}{}
421 \xpretocmd{\l@part}{\tstyle}{}{}
422 % \end{macrocode}
423 % Ensure that the "verbatim" environment uses proportional font and provide an inline "\code" macro.
424 % Work around a bug in \software{nfssext-cfr} which defines a global "\set" macro and breaks other macros of the same name.
425 % \begin{macrocode}
426 \newcommand*{\codestyle}{\tmstyle\lstyle}
427 \let\verbatim@font\codestyle
428 \RequirePackage{xparse}
429 \ProvideDocumentCommand{\code}{v}{{\codestyle #1}}
430 % \end{macrocode}
431 % Adjust the figures according to the "lining" option and ensure that tables always use lining.
432 % \begin{macrocode}
433 \g@addto@macro\@floatboxreset{\tlstyle}
434 % \g@addto@macro\@subfloatboxreset{\tlstyle}
435 % \end{macrocode}
436 % Adjust the equation such that the number is always table style.
437 % \begin{macrocode}
438 \pretocmd{\theequation}{\tstyle}{}{}
439 % \end{macrocode}
440 %
441 % \begin{macro}{\unit}
442 % 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.
443 % TODO implement patch without actually loading the package.
444 % \begin{macrocode}
445 \ifhepfont@lining\else
446 % \AtBeginDocument{
447 % \@ifpackageloaded{units}{
448 \RequirePackage{units}
449 \RequirePackage{xpatch}
450 \xpatchcmd{\unit}{\else#1}{%
451 \else\ifthenelse{\boolean{mmode}}{#1}{\textl{#1}}%
452 }{}{}
453 \xpatchcmd{\unitfrac}{\else#1}{%
454 \else\ifthenelse{\boolean{mmode}}{#1}{\textl{#1}}%
455 }{}{}
456 % }{}
457 % }
458 \fi
459 % \end{macrocode}
460 % \end{macro}
461 %
462 %</package>
463 %
464 % \section{Test}
465 %
466 % \subsection{\hologo{pdfLaTeX}}
467 %
468 %<*pdflatex>
469 %
470 % \begin{macrocode}
471 \documentclass[a4paper]{article}
472
473 \usepackage[oldstyle]{hep-font}
474 \usepackage[cm]{fullpage}
475 \usepackage{fancyvrb}\DefineShortVerb{\|}
476 \newenvironment{vrb}{\begin{tabular}{@{}p{5.4cm}ll@{}}}{\end{tabular}}
477
478 \begin{document}
479
480 \subsection*{Roman}
481
482 \begin{vrb}
483 |\rmfamily| &
484 {\rmfamily Latin Modern Roman 123} \\
485 | \sbweight| &
486 {\rmfamily\sbweight Latin Modern Roman Semi Bold 123} \\
487 | \bfseries| &
488 {\rmfamily\bfseries Latin Modern Roman Bold Extended 123} \\
489 |\slshape| &
490 {\rmfamily\slshape Latin Modern Roman Oblique 123} \\
491 | \sbweight| &
492 {\rmfamily\sbweight\slshape Latin Modern Roman Semi Bold Oblique 123} \\
493 | \bfseries| &
494 {\rmfamily\bfseries\slshape Latin Modern Roman Bold Oblique Extended 123} \\
495 |\itshape| &
496 {\rmfamily\itshape Latin Modern Roman Italic 123} \\
497 | \bfseries| &
498 {\rmfamily\bfseries\itshape Latin Modern Roman Bold Italic Extended 123} \\
499 |\uishape| &
500 {\rmfamily\uishape Latin Modern Roman Upright Italic 123} \\
501 |\scshape| &
502 {\rmfamily\scshape Latin Modern Roman Small Caps 123} \\
503 | \bfseries| &
504 {\rmfamily\bfseries\scshape Computer Modern Roman Bold Small Caps 123} \\
505 | \sishape| &
506 {\rmfamily\scshape\slshape Latin Modern Roman Oblique Small Caps 123} \\
507 | \bfseries| &
508 {\rmfamily\slshape\bfseries\scshape Computer Modern Roman Bold Small Caps 123} \\
509 \end{vrb}
510
511 \subsubsection*{Dunhill}
512
513 \begin{vrb}
514 |\tistyle | &
515 {\tistyle Latin Modern Dunhill 123} \\
516 | \slshape| &
517 {\tistyle\slshape Latin Modern Dunhill Oblique 123} \\
518 \end{vrb}
519
520 \subsection*{Sans}
521
522 \begin{vrb}
523 |\sffamily| &
524 {\sffamily Latin Modern Sans 123} \\
525 | \fontseries{sbc}\selectfont| &
526 {\sffamily\fontseries{sbc}\selectfont Latin Modern Sans Demi Condensed 123} \\
527 | \bfseries| &
528 {\sffamily\bfseries Latin Modern Sans Bold 123} \\
529 |\slshape| &
530 {\sffamily\slshape Latin Modern Sans Oblique 123} \\
531 | \fontseries{sbc}\selectfont| &
532 {\sffamily\fontseries{sbc}\selectfont\slshape Latin Modern Sans Demi Condensed Oblique 123} \\
533 | \bfseries| &
534 {\sffamily\bfseries\slshape Latin Modern Sans Bold Oblique 123} \\
535 |\uishape| &
536 {\sffamily\uishape Computer Modern Sans Upright Italic 123} \\
537 |\scshape| &
538 {\sffamily\scshape Computer Modern Sans Small Caps 123} \\
539 | \bfseries| &
540 {\sffamily\bfseries\scshape Computer Modern Sans Bold Small Caps 123} \\
541 | \itshape| &
542 {\sffamily\itshape\scshape Computer Modern Sans Italic Small Caps 123} \\
543 | \bfseries| &
544 {\sffamily\itshape\bfseries\scshape Computer Modern Sans Italic Bold Small Caps 123} \\
545 \end{vrb}
546
547 \subsubsection*{Quotation}
548
549 \begin{vrb}
550 |\qtstyle | &
551 {\sffamily\qtstyle Latin Modern Sans Extended 123} \\
552 | \bfseries | &
553 {\sffamily\qtstyle\bfseries Latin Modern Sans Bold Extended 123} \\
554 |\slshape | &
555 {\sffamily\qtstyle\slshape Latin Modern Sans Extended Oblique 123} \\
556 | \bfseries | &
557 {\sffamily\qtstyle\bfseries\slshape Latin Modern Sans Bold Extended Oblique 123} \\
558 \end{vrb}
559
560 \subsection*{Typewriter}
561
562 \begin{vrb}
563 |\ttfamily\tvstyle | &
564 {\ttfamily\tvstyle Latin Modern Typewriter Proportional 123} \\
565 | \bfseries | &
566 {\ttfamily\tvstyle\bfseries Latin Modern Typewriter Proportional Dark 123} \\
567 | \lgweight | &
568 {\ttfamily\tvstyle\lgweight Latin Modern Typewriter Proportional Light 123} \\
569 |\slshape | &
570 {\ttfamily\tvstyle\slshape Latin Modern Typewriter Proportional Oblique 123} \\
571 | \bfseries | &
572 {\ttfamily\tvstyle\bfseries\slshape Latin Modern Typewriter Proportional Dark Oblique 123} \\
573 | \lgweight | &
574 {\ttfamily\tvstyle\lgweight\slshape Latin Modern Typewriter Proportional Light Oblique 123} \\
575 \end{vrb}
576
577 \subsubsection*{Fixed-width}
578
579 \begin{vrb}
580 |\ttfamily\tmstyle | &
581 {\ttfamily\tmstyle Latin Modern Typewriter 123} \\
582 | \lgweight | &
583 {\ttfamily\tmstyle\lgweight Latin Modern Typewriter Light 123} \\
584 | \bfseries | &
585 {\ttfamily\tmstyle\bfseries Latin Modern Typewriter Dark 123} \\
586 | \fontseries{lc}\selectfont | &
587 {\ttfamily\tmstyle\fontseries{lc}\selectfont Latin Modern Typewriter Light Condensed 123} \\
588 |\slshape | &
589 {\ttfamily\tmstyle\slshape Latin Modern Typewriter Oblique 123} \\
590 | \lgweight | &
591 {\ttfamily\tmstyle\lgweight\slshape Latin Modern Typewriter Light Oblique 123} \\
592 | \bfseries | &
593 {\ttfamily\tmstyle\bfseries\slshape Latin Modern Typewriter Dark Oblique 123} \\
594 | \fontseries{lc} | &
595 {\ttfamily\tmstyle\fontseries{lc}\slshape Latin Modern Typewriter Light Condensed Oblique 123} \\
596 |\itshape | &
597 {\ttfamily\tmstyle\itshape Latin Modern Typewriter Italic 123} \\
598 |\scshape | &
599 {\ttfamily\tmstyle\scshape Latin Modern Typewriter Small Caps 123} \\
600 | \slshape | &
601 {\ttfamily\tmstyle\scshape\slshape Latin Modern Typewriter Oblique Small Caps 123} \\
602 \end{vrb}
603
604 \end{document}
605 % \end{macrocode}
606 %
607 %</pdflatex>
608 %
609 % \subsection{\hologo{LuaLaTeX}}
610 %
611 %<*lualatex>
612 %
613 % \begin{macrocode}
614 \documentclass{article}
615
616 \usepackage[oldstyle]{hep-font}
617
618 \usepackage{fancyvrb}\DefineShortVerb{\|}
619 \newenvironment{vrb}{\begin{tabular}{@{}p{5.4cm}ll@{}}}{\end{tabular}}
620
621 \begin{document}
622
623 \subsection*{Roman}
624
625 \begin{vrb}
626 |\rmfamily| &
627 {\rmfamily New Computer Modern 123} \\
628 | \bfseries| &
629 {\rmfamily\bfseries New Computer Modern 123} \\
630 |\slshape| &
631 {\rmfamily\slshape New Computer Modern 123} \\
632 | \bfseries| &
633 {\rmfamily\bfseries\slshape New Computer Modern 123} \\
634 |\itshape| &
635 {\rmfamily\itshape New Computer Modern 123} \\
636 | \bfseries| &
637 {\rmfamily\bfseries\itshape New Computer Modern 123} \\
638 |\scshape| &
639 {\rmfamily\scshape New Computer Modern 123} \\
640 | \bfseries| &
641 {\rmfamily\bfseries\scshape New Computer Modern 123} \\
642 | \sishape| &
643 {\rmfamily\scshape\slshape New Computer Modern 123} \\
644 | \bfseries| &
645 {\rmfamily\slshape\bfseries\scshape New Computer Modern 123} \\
646 \end{vrb}
647
648 \subsection*{Sans}
649
650 \begin{vrb}
651 |\sffamily| &
652 {\sffamily New Computer Modern 123} \\
653 | \bfseries| &
654 {\sffamily\bfseries New Computer Modern 123} \\
655 |\slshape| &
656 {\sffamily\slshape New Computer Modern 123} \\
657 | \bfseries| &
658 {\sffamily\bfseries\slshape New Computer Modern 123} \\
659 |\itshape| &
660 {\sffamily\itshape New Computer Modern 123} \\
661 | \bfseries| &
662 {\sffamily\bfseries\itshape New Computer Modern 123} \\
663 |\scshape| &
664 {\sffamily\scshape New Computer Modern 123} \\
665 \end{vrb}
666
667 \subsection*{Typewriter}
668
669 \begin{vrb}
670 |\ttfamily| &
671 {\ttfamily New Computer Modern 123} \\
672 | \bfseries| &
673 {\ttfamily\bfseries New Computer Modern 123} \\
674 |\slshape| &
675 {\ttfamily\slshape New Computer Modern 123} \\
676 | \bfseries| &
677 {\ttfamily\bfseries\slshape New Computer Modern 123} \\
678 |\itshape| &
679 {\ttfamily\itshape New Computer Modern 123} \\
680 | \bfseries| &
681 {\ttfamily\bfseries\itshape New Computer Modern 123} \\
682 |\scshape| &
683 {\ttfamily\scshape New Computer Modern 123} \\
684 \end{vrb}
685
686 \subsection*{Uncial}
687
688 \begin{vrb}
689 |\uncial| &
690 {\uncial New Computer Modern 123} \\
691 | \bfseries| &
692 {\uncial\bfseries New Computer Modern 123} \\
693 |\slshape| &
694 {\uncial\slshape New Computer Modern 123} \\
695 | \bfseries| &
696 {\uncial\bfseries\slshape New Computer Modern 123} \\
697 \end{vrb}
698
699 \end{document}
700 % \end{macrocode}
701 %
702 %</lualatex>
703 %
704 % \section{Readme}
705 %
706 %<*readme>
707 %
708 % \begin{macrocode}
709 # The `hep-font` package
710
711 Latin modern extended by computer modern.
712
713 ## Introduction
714
715 The `hep-font` package loads standard font packages and extends the usual
716 Latin Modern implementations by replacing missing fonts with Computer
717 Modern counterparts.
718
719 The package is loaded with `\usepackage{hep-font}`.
720
721 ## Author
722
723 Jan Hajer
724
725 ## License
726
727 This file may be distributed and/or modified under the conditions of the
728 `LaTeX` Project Public License, either version 1.3c of this license or
729 (at your option) any later version. The latest version of this license is
730 in `http://www.latex-project.org/lppl.txt` and version 1.3c or later is
731 part of all distributions of LaTeX version 2005/12/01 or later.
732 % \end{macrocode}
733 %
734 %</readme>
735 %
736 % \Finale
737
738 \endinput
739
740 % \PrintIndex
741 % makeindex -s gglo.ist -o hep-font-implementation.gls hep-font-implementation.glo
742 % makeindex -s gglo.ist -o hep-font-implementation.ind hep-font-implementation.idx