Debian Codegraph @

texmf-dist/source/fonts/baskervaldadf/baskervaldadf.dtx

raw
1 % \iffalse meta-comment
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 % baskervaldadf.dtx
4 % Additions and changes Copyright (C) 2010-2024 Clea F. Rees.
5 % Code from skeleton.dtx Copyright (C) 2015-2024 Scott Pakin (see below).
6 %
7 % This work may be distributed and/or modified under the
8 % conditions of the LaTeX Project Public License, either version 1.3c
9 % of this license or (at your option) any later version.
10 % The latest version of this license is in
11 % https://www.latex-project.org/lppl.txt
12 % and version 1.3c or later is part of all distributions of LaTeX
13 % version 2008-05-04 or later.
14 %
15 % This work has the LPPL maintenance status `maintained'.
16 %
17 % The Current Maintainer of this work is Clea F. Rees.
18 %
19 % This work consists of all files listed in manifest.txt.
20 %
21 % The file baskervaldadf.dtx is a derived work under the terms of the
22 % LPPL. It is based on version 2.4 of skeleton.dtx which is part of
23 % dtxtut by Scott Pakin. A copy of dtxtut, including the
24 % unmodified version of skeleton.dtx is available from
25 % https://www.ctan.org/pkg/dtxtut and released under the LPPL.
26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
27 % \fi
28 %
29 % \iffalse
30 %<@@=baskervald>
31 %<*driver>
32 \RequirePackage{svn-prov}
33 % ref. ateb Max Chernoff: https://tex.stackexchange.com/a/723294/
34 \def\MakePrivateLetters{\makeatletter\ExplSyntaxOn\endlinechar13}
35 \ProvidesFileSVN{$Id: baskervaldadf.dtx 10395 2024-09-26 23:52:22Z cfrees $}[v1.1 \revinfo][\filebase DTX: BaskervaldADF for 8-bit engines]
36 \DefineFileInfoSVN[baskervaldadf]
37 \documentclass[11pt,british]{ltxdoc}
38 % l3doc loads fancyvrb
39 % fancyvrb overwrites svn-prov's macros without warning
40 % restore \fileversion \filerev in case we're using l3doc
41 \GetFileInfoSVN{baskervaldadf}
42 \EnableCrossrefs
43 \CodelineIndex
44 \RecordChanges
45 % \OnlyDescription
46 \DoNotIndex{\verb,\ProvidesPackageSVN,\NeedsTeXFormat,\ProcessKeyOptions}
47 \usepackage{babel}
48 \usepackage{lmodern}
49 \renewcommand{\ttdefault}{lmvtt}
50 \let\origrmdefault\rmdefault
51 \DeclareRobustCommand{\origrmfamily}{%
52 \fontencoding{T1}%
53 \fontfamily{\origrmdefault}%
54 \selectfont}
55 \DeclareTextFontCommand{\textorigrm}{\origrmfamily}
56 \usepackage[]{ baskervald}
57 \pdfmapfile{ybv.map} % not necessary for installed package
58 \pdfmapfile{+pdftex.map} % not necessary for installed package
59 \usepackage{fancyhdr}
60 \usepackage{fixfoot}
61 \usepackage{array}
62 \usepackage{enumitem}
63 \usepackage{booktabs}
64 \usepackage{xcolor}
65 \usepackage{xurl}
66 \urlstyle{tt}
67 \usepackage{microtype}
68 \usepackage[a4paper,headheight=14pt]{geometry} % use 14pt for 11pt text, 15pt for 12pt text
69 \usepackage{csquotes}
70 \MakeAutoQuote{‘}{’}
71 \MakeAutoQuote*{“}{”}
72 \usepackage{caption}
73 \DeclareCaptionFont{lf}{\lstyle}
74 \captionsetup[table]{labelfont=lf}
75 % sicrhau hyperindex=false: llwytho CYN bookmark
76 \usepackage{hypdoc}% ateb Ulrike Fischer: https://tex.stackexchange.com/a/695555/
77 \usepackage{bookmark}
78 \hypersetup{%
79 colorlinks=true,
80 citecolor={moss},
81 extension=pdf,
82 linkcolor={strawberry},
83 linktocpage=true,
84 pdfcreator={TeX},
85 pdfproducer={pdfeTeX},
86 urlcolor={blueberry}%
87 }
88 \usepackage{fancyref}
89 \title{\filebase}
90 \author{Clea F. Rees\thanks{%
91 Bug tracker:
92 \href{https://codeberg.org/cfr/nfssext/issues}{\url{codeberg.org/cfr/nfssext/issues}}
93 \textbar{} Code:
94 \href{https://codeberg.org/cfr/nfssext}{\url{codeberg.org/cfr/nfssext}}
95 \textbar{} Mirror:
96 \href{https://github.com/cfr42/nfssext}{\url{github.com/cfr42/nfssext}}%
97 }}
98 \date{\fileversion~\filetoday}
99 \pagestyle{fancy}
100 \fancyhf[lh]{\itshape\filebase~\fileversion}
101 \fancyhf[rh]{\itshape\filetoday}
102 \fancyhf[ch]{}
103 \fancyhf[lf]{}
104 \fancyhf[rf]{}
105 \fancyhf[cf]{--- \thepage~/~\lastpage{} ---}
106 \ExplSyntaxOn
107 \hook_gput_code:nnn {shipout/lastpage} {.}
108 {
109 \property_record:nn {t:lastpage}{abspage,page,pagenum}
110 }
111 \cs_new_protected_nopar:Npn \lastpage
112 {
113 \property_ref:nn {t:lastpage}{page}
114 }
115 \ExplSyntaxOff
116 \definecolor{strawberry}{rgb}{1.000,0.000,0.502}
117 \definecolor{blueberry}{rgb}{0.000,0.000,1.000}
118 \definecolor{moss}{rgb}{0.000,0.502,0.251}
119 \begin{document}
120 \DocInput{\filename}
121 \end{document}
122 %</driver>
123 % \fi
124 %
125 % \maketitle\thispagestyle{empty}
126 % \pdfinfo{%
127 % /Creator (TeX)
128 % /Producer (pdfTeX)
129 % /Author (Clea F. Rees)
130 % /Title (baskervaldadf)
131 % /Subject (TeX)
132 % /Keywords (TeX,LaTeX,font,fonts,tex,latex,Baskervald,baskervald,baskervaldadf,BaskervaldADF,ADF,adf,Arkandis,Digital,Foundry,arkandis,digital,foundry,Hirwen,Harendal,Clea,Rees)}
133 % \pdfcatalog{%
134 % /URL ()
135 % /PageMode /UseOutlines} ^^A other values: /UseNone, /UseOutlines, /UseThumbs, /FullScreen
136 % ^^A[openaction <actionspec>]
137 % \setlength{\parindent}{0pt}
138 % \setlength{\parskip}{0.5em}
139 %
140 %
141 % \newcommand*{\adf}{ADF}
142 % \newcommand*{\lpack}[1]{\textsf{#1}}
143 % \newcommand*{\fgroup}[1]{\textsf{#1}}
144 % \newcommand*{\fname}[1]{\textsf{#1}}
145 %
146 % \begin{abstract}
147 % \hspace*{-\parindent}Hirwen Harendal, Arkandis Digital Foundry (\adf) has produced the Baskervald \adf\ font collection.
148 % This guide outlines the \TeX/\LaTeX\ support provided by \lpack{baskervaldadf} for version 1.016 of the fonts.
149 % \end{abstract}
150 %
151 % \tableofcontents
152 %
153 % \section{Introduction}
154 %
155 % This document explains how to use the \TeX/\LaTeX\ support provided for version 1.016 of the Baskervald \adf\ font collection developed by Hirwen Harendal of the Arkandis Digital Foundry (\adf). \lpack{baskervaldadf} includes copies of the fonts in postscript type 1 format. Further information about the fonts themselves and alternative font formats for use with other programmes can be found at \url{http://arkandis.tuxfamily.org/adffonts.html}. The fonts are released under the \MakeUppercase{gnu} General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version, with font exception. For details, see \MakeUppercase{notice}.txt and \MakeUppercase{ctan}.
156 %
157 % \section{Requirements}
158 %
159 % Apart from such obvious requirements as \LaTeXe, the \LaTeX\ support provided by \path{baskervald.sty} requires \lpack{nfssext-cfr}.
160 % Without this, you will get errors complaining that the package cannot be found and you will not be able to use any of the additional font commands described in \fref{sec:commands}.
161 %
162 % The documentation requires in addition:
163 % \begin{itemize}
164 % \item \lpack{array}
165 % \item \lpack{babel}
166 % \item \lpack{bookmark}
167 % \item \lpack{booktabs}
168 % \item \lpack{caption}
169 % \item \lpack{csquotes}
170 % \item \lpack{enumitem}
171 % \item \lpack{fancyhdr}
172 % \item \lpack{fancyref}
173 % \item \lpack{fixfoot}
174 % \item \lpack{geometry}
175 % \item \lpack{hyperref}
176 % \item \lpack{lm}
177 % \item \lpack{microtype}
178 % \item \lpack{xcolor}
179 % \item \lpack{xurl}
180 % \end{itemize}
181 %
182 % Note that creating the font files, as opposed to just the package and documentation files, \emph{requires} \texttt{l3build} and a set of custom \texttt{lua} scripts available on \texttt{codeberg}.
183 % More specifically, if you want to build the font definition files (\texttt{.fd}) yourself, you \emph{must} use \texttt{l3build fnttarg} and this requires files available from the code repository, but not included in this package.
184 %
185 % The reason for this is that \lpack{fontinst} provides no way\footnote{Or no way I've yet discovered.} to enable variable scaling.
186 % While it is entirely possible to scale a font by any factor you please, it is not, as far as I can tell, possible to enable scaling by any factor a user later pleases.
187 % In particular, while it is possible to define shapes and families to use a variable factor, it is not possible to write a definition of that factor into the font definition file, which is the way variable scaling is usually configured.
188 %
189 % In order to enable this functionality, \texttt{lua} is used to inject the relevant code into the \texttt{.fd} files after \lpack{fontinst} has generated them.
190 % If you simply process the relevant \TeX{} files by hand, you will create broken definition files, since the code produced by \lpack{fontinst} assumes the relevant lines have been injected.
191 %
192 % \section{The support package}\label{sec:support}
193 %
194 % \subsection{Encodings}\label{sec:encs}
195 %
196 % The package supports modified \MakeUppercase{ec}/\MakeUppercase{t1} and Text Companion (\MakeUppercase{ts1}) encodings. Most characters in the \MakeUppercase{ec} encoding are available and the fonts provide a small number of characters from the \MakeUppercase{ts1} encoding as well, including the \texteuro. The regular version of the \MakeUppercase{ec}/\MakeUppercase{t1} encoding (\path{t1-baskervald.enc}) reassigns two slots which would otherwise be empty due to missing glyphs which \path{fontinst} cannot fake. In the \MakeUppercase{t1} encoding, these slot are standardly used for the Sami Eng/eng characters (\textorigrm{\NG}/\textorigrm{\ng}) . \path{t1-baskervald.enc} uses these slots for the non-standard ligatures ‘fj’ and ‘ffj’. The fonts also lack the unfakable per thousand zero. Although this slot remains in the regular version of the encoding, it is empty due to the lack of a suitable glyph.
197 %
198 % The ‘ligature’ version of the \MakeUppercase{ec}/\MakeUppercase{t1} encoding (\path{t1-baskervald-lig.enc}) provides access to the full range of ligatures available: \textswash{‘ct’, ‘sp’ and ‘st’}. Because further slots are required to accommodate the relevant glyphs, a number of characters normally available in the \MakeUppercase{ec} encoding are unavailable. These are the \MakeUppercase{ascii} tilde (\textasciitilde), the \MakeUppercase{ascii} upward-pointing arrow head (\textasciicircum) and the ‘neutral’ double quotation mark (\textquotedbl). Attempting to access these characters while using the ligature versions of the fonts may result in errors of various kinds and will certainly produce unexpected output even though the characters are provided by the fonts, as the previous sentence demonstrates. To access these glyphs, ensure that the regular version of the fonts is active.
199 %
200 % \subsection{\LaTeX\ package}
201 %
202 % To use the fonts in a \LaTeX\ document, add \verb|\usepackage{baskervald}| to your document preamble. This will set the default serif/roman family to \fname{ybv} (\fgroup{baskervald}) and enable access to the additional glyphs available in the other family. The package supports the single option \verb|lig|. Loading \lpack{baskervald} with this option will select the ‘ligature’ version as the default serif/roman family. \textbf{\emph{This option is not recommended unless you are \emph{certain} you do not wish to access any of the characters described in \fref{sec:encs}.}} You should also note that this option will mean all of the additional ligatures will be active, which may not be what you want.
203 %
204 % Note that loading \path{baskervald.sty} will not affect the default sans-serif or typewriter families.
205 %
206 % \section{Additional font selection commands}\label{sec:commands}
207 %
208 % The \LaTeX\ package \lpack{baskervald}\ loads \lpack{nfssext-cfr}\ which is an extension of the package \lpack{nfssext}\ supplied by Philipp Lehman as part of The Font Installation Guide. The file extends the font selection commands to facilitate access to various font features. Both the original and the extension are designed for use with a wide range of fonts. For this reason, only a subset of the additional commands are relevant to any particular font support package. Those relevant to \lpack{baskervaldadf}\ are described below.
209 %
210 % See \lpack{nfssext-cfr} for further details, caveats and changes affecting use
211 % on post-2020 kernels.
212 %
213 % \subsection{nfssext-cfr}
214 %
215 % These commands are available when \lpack{baskervald} is loaded. If for some reason you wish to make them available when no relevant package is loaded, use \verb|\usepackage{nfssext-cfr}| in your document preamble.
216 %
217 % \subsubsection{Weights}
218 %
219 % \begin{table}
220 % \centering
221 % \caption{Weights}\label{tab:weights}
222 % \begin{tabular}{lll}
223 % \toprule
224 % \textbf{weight} & \textbf{weight command} & \textbf{text command}\\\midrule
225 % heavy & \verb|\ebweight| & \verb|\texteb{}|\\
226 % \bottomrule
227 % \end{tabular}
228 % \end{table}
229 %
230 % The commands in \fref{tab:weights} work in the same way as the standard \LaTeX\ commands for switching to bold text, for example.
231 % \iffalse
232 %<*verb>
233 % \fi
234 \begin{verbatim}
235 \texteb{Heavy and \textsl{heavy oblique}}
236 \end{verbatim}
237 % \iffalse
238 %</verb>
239 % \fi
240 % produces:
241 % \begin{center}
242 % \texteb{Heavy and \textsl{heavy oblique}}
243 % \end{center}
244 %
245 % \subsubsection{Styles}
246 %
247 % \begin{table}
248 % \centering
249 % \caption{Styles}\label{tab:styles}
250 % \begin{tabular}{llll}
251 % \toprule
252 % \textbf{style} & \textbf{style command} & \textbf{text command} & \textbf{effect}\\\midrule
253 % ligature/script/swash & \verb|\swashstyle| & \verb|\textswash{}| & additional ligatures\\
254 % \bottomrule
255 % \end{tabular}
256 % \end{table}
257 %
258 % \verb|\swashstyle| and \verb|\textswash{}| switch to the ‘ligature’ family
259 % (\fgroup{ybvw}) (\fref{tab:styles}).
260 % Within the scope of these commands:
261 % \begin{itemize}
262 % \item \verb|ct|, \verb|sp| and \verb|st| will typeset the corresponding ligature (\textswash{ct}/\textswash{sp}/\textswash{st});
263 % \item attempting to typeset certain standard characters will produce unexpected results (see \fref{sec:encs}).
264 % \end{itemize}
265 %
266 % For example, suppose that \lpack{baskervald}\ was loaded and the following commands set up:
267 % \iffalse
268 %<*verb>
269 % \fi
270 \begin{verbatim}
271 \newcommand{\fytext}{%
272 Sphinx of black quartz, judge my vow.\smallskip\par
273 Somewhat splendid fjords act last.}
274 \newcommand{\fytest}{%
275 \fytext\smallskip\par
276 \textit{\fytext}}
277 \end{verbatim}
278 % \iffalse
279 %</verb>
280 % \fi
281 % \newcommand{\fytext}{%
282 % Sphinx of black quartz, judge my vow.\smallskip\par
283 % Somewhat splendid fjords act last.}
284 % \newcommand{\fytest}{%
285 % \fytext\smallskip\par
286 % \textit{\fytext}}
287 % Then:
288 % \iffalse
289 %<*verb>
290 % \fi
291 \begin{verbatim}
292 \begin{center}
293 --- ‘regular’ ---\smallskip\par
294 \fytest\medskip\par
295 --- ‘ligature’ ---\smallskip\par
296 \swashstyle
297 \fytest
298 \end{center}
299 \end{verbatim}
300 % \iffalse
301 %</verb>
302 % \fi
303 % produces:
304 % \begin{center}
305 % --- ‘regular’ ---\smallskip\par
306 % \fytest\medskip\par
307 % --- ‘ligature’ ---\smallskip\par
308 % \swashstyle
309 % \fytest
310 % \end{center}
311 %
312 % \subsection{The slashed zero (\zeroslash)}
313 %
314 % Both of the modified \MakeUppercase{t1} encodings used by \lpack{baskervaldadf} include a non-standard ligature to accommodate the slashed zero. Provided \lpack{baskervald} is loaded and the default serif/roman family is active, \verb|\zeroslash| will produce the slashed zero (\zeroslash).
315 %
316 % \changes{v1.0}{2010/07/13}{First public release.}
317 % \changes{v1.1}{2024-09-17}{%
318 % Belated update for (New) NFSS and revised nfssext-cfr.
319 % Add package option to scale fonts.
320 % Try switching to DTX/INS.%
321 % }
322 %
323 % \appendix
324 %
325 % \DeclareFixedFootnote \fnupdmap {%
326 % See, for example, \href{https://tex.stackexchange.com/q/255709/}{Why shouldn't I use \texttt{getnonfreefonts} to install additional fonts? Why shouldn't I use \texttt{updmap} when installing or removing fonts?}.}
327 %
328 % \section{Installation}
329 %
330 % \textbf{The vast majority of users should IGNORE this section entirely.}
331 % \lpack{ baskervaldadf} is included in all major \TeX{} distributions and should be installed as part of your \TeX{} installation.
332 % Installing the package yourself should be done only as a last resort or an educational exercise.
333 %
334 % Note, in particular, that this version of \lpack{ baskervaldadf} should \textbf{not} be installed on older \LaTeX{} kernels as it is designed to work with the (New) New Font Selection Scheme, as updated around 2020\footnote{%
335 % The package should\texttrademark{} work fine on older kernels, but the new version is bound to have some bugs and there is no reason to use it on these systems.
336 % The sole purpose of the update is to accommodate the breaking changes made to font selection.
337 % If you don't have those changes installed locally, nothing should be broken and the newer version of \lpack{ baskervaldadf} offers no advantage at all.%
338 % }.
339 % Use the initial release of \lpack{ baskervaldadf} if your installation of \LaTeX{} predates those changes.
340 %
341 % Installation varies with \TeX\ distribution so you should consult the documentation which came with your system for details.
342 % In most cases, you will need to perform three steps:
343 % \begin{enumerate}
344 % \item move or copy the package files to appropriate locations on your system;
345 % \item refresh the \TeX\ database;
346 % \item incorporate the included map file fragments for the different engines your distribution supports.
347 % \end{enumerate}
348 %
349 % The following instructions assume you are using \TeX~Live\footnote{This includes Mac\TeX\ for OS X users.}.
350 % They should not be too difficult to adapt if you are using a different distribution.
351 %
352 % \subsection{Install the files}
353 %
354 % The files should be installed in one of two locations: \emph{either} the local system-wide \TeX\ tree \emph{or} your personal tree.
355 % If the package is installed system-wide, all users will have access to it.
356 % On the other hand, you may need privileges you do not have to do this in which case you must use your personal tree.
357 %
358 % \textbf{There are serious disadvantages to installing the package into your personal tree.
359 % In particular, these pertain to use of \verb|updmap --user| rather than \verb|updmap --sys|.
360 % If you are not aware of these disadvantages, please ensure you are fully cognisant of them before proceeding\fnupdmap.
361 % Merely removing the package from your personal tree at a later point will \emph{not} undo the effects.}
362 %
363 % For \TeX~Live, \verb|kpsewhich -var-value TEXMFLOCAL| will return the path to the local tree and \verb|kpsewhich -var-value TEXMFHOME| the path to your personal tree.
364 % The package already includes a hierarchy of files to help you install them correctly.
365 % Ignoring any symbolic link in the top directory, move or copy the files in \path{doc}, \path{fonts} and \path{tex} into the appropriate locations.
366 % If the tree is initially empty, you can simply move or copy the directories in as they are.
367 % If the tree already contains other packages, you may need to merge the package hierarchy with the pre-existing one.
368 % For example, if you already have a \path{doc/fonts} directory, move or copy \path{doc/fonts/baskervald} into \path{doc/fonts/}.
369 % If you have a \path{doc} directory but not a \path{doc/fonts}, move \path{doc/fonts} into \path{doc/}.
370 %
371 % \subsection{Refresh the database}
372 %
373 % Again, this depends on your distribution. For \TeX~Live, \verb|mktexlsr <path to directory>| for the directory you used in the first step should do the trick.
374 % Note that you \emph{may} be able to skip this step if you install into your personal tree.
375 % Whether this is so depends on the details of your set-up.
376 % As a test, move to a directory containing none of the package files and try \verb|kpsewhich baskervald.sty|.
377 % If the file is found, you don't need to refresh the database; otherwise use \verb|mktexlsr| and then try again.
378 %
379 % \subsection{Install the map fragments}
380 %
381 % For \TeX~Live, there are at least two ways of doing this.
382 % The second method varies according to the version of \TeX~Live and instructions are provided accordingly.
383 % Both methods depend on whether you installed into \verb|TEXMFLOCAL| or \verb|TEXMFHOME|.
384 % If you installed system-wide, the choice is relatively straightforward --- it obviously makes sense in that case to update the font maps system-wide as well.
385 %
386 % If, on the other hand, you installed into your personal tree, the matter is more complex.
387 % On the one hand, updating the system-wide maps may create difficulties or confusion for other users because while the map files will list the fonts as available, they will not be able to access them.
388 % On the other hand, maintaining personal font map files can produce difficulties and confusions of its own\fnupdmap.
389 % Whether it is to be preferred or not is a complex issue and depends on the details of your \TeX\ distribution, local configuration and personal preference.
390 % The one clear case is that in which you install into your personal tree because you lack the privileges needed to install system-wide.
391 % In that case, you have no choice but to maintain personal font map files or forgo the use of all fonts not provided by your administrator.
392 % Other cases are thankfully beyond the scope of this document.
393 %
394 % \subsubsection{Method 1}
395 %
396 % If you installed the package system-wide, use the command:
397 % \iffalse
398 %^^A ateb Heiko Oberdiek: https://tex.stackexchange.com/a/172896/
399 %^^A dyw hwn ddim yn gweithio tu mewn i arg macro!
400 %^^A (*wrth gwrs* dyw e ddim yn weithio! wyt ti'n *hollol* dwp?)
401 %<*verb>
402 % \fi
403 \begin{verbatim}
404 updmap-sys --enable Map=ybv.map
405 \end{verbatim}
406 % \iffalse
407 %</verb>
408 % \fi
409 %
410 % If you installed the package in your personal tree, you \emph{may} prefer\fnupdmap:
411 % \iffalse
412 %<*verb>
413 % \fi
414 \begin{verbatim}
415 updmap --enable Map=ybv.map
416 \end{verbatim}
417 % \iffalse
418 %</verb>
419 % \fi
420 % Either way, \verb|updmap| will output a good deal of information after each incantation.
421 % This is normal.
422 % Just check that it does not end with an error and that it found the new map file.
423 %
424 % \subsubsection{Method 2: \TeX~Live 2008 (and probably earlier)}
425 %
426 % If you installed the package system-wide, use \verb|updmap-sys --edit|.
427 %
428 % If you installed into your personal tree, you \emph{may} prefer to use \verb|updmap --edit|\fnupdmap.
429 %
430 % Either way, a configuration file will be opened which you can edit.
431 % Move to the end of the file and add the following line:
432 % \iffalse
433 %<*verb>
434 % \fi
435 \begin{verbatim}
436 Map ybv.map
437 \end{verbatim}
438 % \iffalse
439 %</verb>
440 % \fi
441 % When you are done, save the file.
442 % \verb|updmap| or \verb|updmap-sys| will produce a great deal of output if all is well.
443 % Just check that it does not end with an error and that \path{ybv.map} is found.
444 %
445 % \subsubsection{Method 2: \TeX~Live 2009 (and possibly later)}
446 %
447 % If you installed the package system-wide, edit or or create \path{TEXMFLOCAL/web2c/updmap-local.cfg} and add the following line to the end of the file:
448 % \iffalse
449 %<*verb>
450 % \fi
451 \begin{verbatim}
452 Map ybv.map
453 \end{verbatim}
454 % \iffalse
455 %</verb>
456 % \fi
457 % Save the file and tell \verb|tlmgr| to merge in your addition using the command:
458 % \iffalse
459 %<*verb>
460 % \fi
461 \begin{verbatim}
462 tlmgr generate updmap
463 \end{verbatim}
464 % \iffalse
465 %</verb>
466 % \fi
467 % \verb|tlmgr| will then tell you that you need to ensure the changes are propagated correctly by calling \verb|updmap-sys|.
468 % This should produce a great deal of output.
469 % Check that it finds the new map file and does not end with an error.
470 %
471 % If you installed into your personal tree, you \emph{may} prefer to use \verb|updmap --edit| as described above for \TeX~Live 2008\fnupdmap.
472 %
473 % \subsubsection{Method 3: Current/Recent \TeX~Live}
474 %
475 % If you installed the package system-wide, tell \cs{updmap} to enable the map file:
476 % \iffalse
477 %<*verb>
478 % \fi
479 \begin{verbatim}
480 updmap --sys --enable Map=ybv.map
481 \end{verbatim}
482 % \iffalse
483 %</verb>
484 % \fi
485 % This should produce a great deal of output.
486 % Check that it finds the new map file and does not end with an error.
487 %
488 % If you installed into your personal tree, you \emph{could} use \verb|updmap --user| in place of \verb|updmap --sys| as described above for \TeX~Live 2008, but this is \textbf{not} recommended\fnupdmap.
489 %
490 % To test your installation and that the package works on your system, latex this file (\path{baskervaldadf.tex}).
491 % The console output and/or log should tell you whether any fonts were not found.
492 % If you are careful not to overwrite it, you may also compare your output with \path{baskervaldadf.pdf}.%
493 %
494 % \MaybeStop{%
495 % \PrintChanges
496 % \PrintIndex
497 % }
498 %
499 % \section{Implementation}
500 %
501 % You do not need to read the remainder of this document in order to install
502 % or use the fonts.
503 %
504 % \iffalse
505 %<*sty>
506 % \fi
507 % \begin{macrocode}
508 \NeedsTeXFormat{LaTeX2e}
509 \RequirePackage{svn-prov}
510 \ProvidesPackageSVN[baskervald.sty]{$Id: baskervaldadf.dtx 10395 2024-09-26 23:52:22Z cfrees $}[v1.1 \revinfo]
511 \DefineFileInfoSVN[baskervald]
512 \RequirePackage[T1]{fontenc}
513 \RequirePackage{nfssext-cfr}[2024/01/01]
514 % \end{macrocode}
515 % \lpack{nfssext-cfr} provides \cs{ProcessKeyOptions}, \cs{IfFormatAtLeastTF} on older kernels.
516 % \begin{macrocode}
517 \IfFormatAtLeastTF {2020-02-02}{%
518 % \end{macrocode}
519 % To get the oldstyle numbers etc.\ used from TS1, we need to set the subset to 0 or 1.
520 % Unfortunately, this means characters missing from the fonts will not use default symbols as fallback, but this seems to be unavoidable.
521 % \begin{macrocode}
522 \DeclareEncodingSubset{TS1}{ybv}{1}%
523 \DeclareEncodingSubset{TS1}{ybvw}{1}%
524 }{%
525 \RequirePackage{textcomp}}
526 \ExplSyntaxOn
527 % \end{macrocode}
528 % The actual \verb|sty| is ultra simple.
529 % Four options of which only three are actually needed.
530 % \texttt{lig} sets additional ligatures (swash) or not.
531 % Two booleans suffice.
532 % \texttt{scale} takes a factor by which to scale the fonts.
533 % This is empty by default, which is equivalent to \texttt{1}, but more efficient.
534 % \begin{macrocode}
535 \keys_define:nn { baskervald }
536 {
537 lig .bool_set:N = \g__baskervald_lig_bool,
538 lig .default:n = true,
539 lig .initial:n = false,
540 scale .tl_set:N = \ybv@scale,
541 scale .initial:V = \@empty,
542 }
543 % \end{macrocode}
544 % Note the optional argument is mandatory in case we're on an older kernel.
545 % \begin{macrocode}
546 \ProcessKeyOptions[baskervald]
547 % \end{macrocode}
548 % Use a token list initialised with the bare Berry name.
549 % %% could I just use \rmdefault directly here?
550 % %% does it matter if it is a cs rather than a tl?
551 % \begin{macrocode}
552 \tl_new:N \g__baskervald_rm_tl
553 \tl_gset:Nn \g__baskervald_rm_tl {ybv}
554 % \end{macrocode}
555 % Add indicator for swash or not.
556 % \begin{macrocode}
557 \bool_if:NT \g__baskervald_lig_bool
558 {
559 \tl_gput_right:Nn \g__baskervald_rm_tl {w}
560 }
561 % \end{macrocode}
562 % Order is critical as we're matching on family names.
563 % Make BaskervaldADF default roman font, using the assembled name to implement requested options.
564 % Note that older versions of this package ignored the lig option entirely ....
565 % \begin{macrocode}
566 \renewcommand{\rmdefault}{\g__baskervald_rm_tl}
567 \ExplSyntaxOff
568 \DeclareTextSymbol{\zeroslash}{TS1}{225}
569 \DeclareTextSymbolDefault{\zeroslash}{TS1}
570 \AddToHook {begindocument}[.]
571 {%
572 \@ifpackageloaded{hyperref}{%
573 \DeclareTextCommand{\zeroslash}{PU}{0}% U+0030
574 \DeclareTextCommand{\zeroslash}{PD1}{0}% U+0030
575 }{}%
576 }
577 %^^A paid â chynnwys \endinput - docstrip yn chwilio amddo fe yn arbennigol
578 %^^A & bydd doctrip yn ei ychwanegu fe beth bynnag
579 %^^A (Martin Scharrer: https://tex.stackexchange.com/a/28997/)
580 %% end baskervald.sty
581 % \end{macrocode}
582 % \iffalse
583 %</sty>
584 %<@@=>
585 % \fi
586 %
587 % The remaining files are not used directly, but are required to generate the files which allow \TeX{} and \LaTeX{} to use the fonts.
588 % The sources use \verb|fontinst| as explained in the (sparse) comments.
589 % While you can install these files into a \TeX{} tree, they are not required for typesetting.
590 %
591 % \subsection{Driver}
592 %
593 % The file does all the initial setup of the fonts.
594 % It organises the fonts into families, defines shapes and reencodes as required.
595 %
596 % \iffalse
597 %<*drv>
598 % \fi
599 % \begin{macrocode}
600 \input fontinst.sty
601 \needsfontinstversion{1.926}
602 % \end{macrocode}
603 % Substitutions
604 % Bold for bold extended
605 % \begin{macrocode}
606 \substitutesilent{bx}{b}
607 \substitutesilent{si}{it}
608 \substitutesilent{scit}{si}
609 \substitutesilent{it}{sl}
610 \substitutesilent{sl}{it}
611 \substitutesilent{sc}{n}
612 % light for medium
613 %\substitutesilent{m}{l}
614 % demi-bold for bold
615 %\substitutesilent{bx}{db}
616 % simulate small caps (if optical small caps are unavailable)
617 % 800 is fontinst's default
618 \setint{smallcapsscale}{800}
619 % \end{macrocode}
620 % Record transformations for later map file creation
621 % \begin{macrocode}
622 \recordtransforms{ybv-rec.tex}
623 % \end{macrocode}
624 % Allow fonts to be scaled via variable in fd files
625 % Also requires fontinst.lua fnttarg as no means to define variable in fontinst
626 % \begin{macrocode}
627 \declaresize{}{<-> \string\ybv@@scale}
628 % \end{macrocode}
629 % Transformations : reencode fonts
630 % \begin{macrocode}
631 \transformfont{ybvr8r}{\reencodefont{8r}{\fromafm{ybvr8a}}}
632 \transformfont{ybvri8r}{\reencodefont{8r}{\fromafm{ybvri8a}}}
633 \transformfont{ybvb8r}{\reencodefont{8r}{\fromafm{ybvb8a}}}
634 \transformfont{ybvbi8r}{\reencodefont{8r}{\fromafm{ybvbi8a}}}
635 \transformfont{ybvh8r}{\reencodefont{8r}{\fromafm{ybvh8a}}}
636 \transformfont{ybvho8r}{\reencodefont{8r}{\fromafm{ybvho8a}}}
637 \transformfont{ybvr8s}{\reencodefont{supp-ybv}{\fromafm{ybvr8a}}}
638 \transformfont{ybvri8s}{\reencodefont{supp-ybv}{\fromafm{ybvri8a}}}
639 \transformfont{ybvb8s}{\reencodefont{supp-ybv}{\fromafm{ybvb8a}}}
640 \transformfont{ybvbi8s}{\reencodefont{supp-ybv}{\fromafm{ybvbi8a}}}
641 \transformfont{ybvh8s}{\reencodefont{supp-ybv}{\fromafm{ybvh8a}}}
642 \transformfont{ybvho8s}{\reencodefont{supp-ybv}{\fromafm{ybvho8a}}}
643 \input reglyph-ybv.tex
644 % \end{macrocode}
645 % Installation: creation of virtual fonts
646 % \begin{macrocode}
647 \installfonts
648 \installfamily{T1}{ybv}{}
649 \installfont{ybvr8t}{ybvr8r,ybvr8sr,newlatin}{t1-baskervald}{T1}{ybv}{m}{n}{}
650 \installfont{ybvri8t}{ybvri8r,ybvri8sr,newlatin}{t1-baskervald}{T1}{ybv}{m}{it}{}
651 \installfont{ybvb8t}{ybvb8r,ybvb8sr,newlatin}{t1-baskervald}{T1}{ybv}{b}{n}{}
652 \installfont{ybvbi8t}{ybvbi8r,ybvbi8sr,newlatin}{t1-baskervald}{T1}{ybv}{b}{it}{}
653 \installfont{ybvh8t}{ybvh8r,ybvh8sr,newlatin}{t1-baskervald}{T1}{ybv}{eb}{n}{}
654 \installfont{ybvho8t}{ybvho8r,ybvho8sr,newlatin}{t1-baskervald}{T1}{ybv}{eb}{sl}{}
655 \installfamily{T1}{ybvw}{}
656 \installfont{ybvrw8t}{ybvr8r,ybvr8sr,newlatin}{t1-baskervald-lig}{T1}{ybvw}{m}{n}{}
657 \installfont{ybvriw8t}{ybvri8r,ybvri8sr,newlatin}{t1-baskervald-lig}{T1}{ybvw}{m}{it}{}
658 \installfont{ybvbw8t}{ybvb8r,ybvb8sr,newlatin}{t1-baskervald-lig}{T1}{ybvw}{b}{n}{}
659 \installfont{ybvbiw8t}{ybvbi8r,ybvbi8sr,newlatin}{t1-baskervald-lig}{T1}{ybvw}{b}{it}{}
660 \installfont{ybvhw8t}{ybvh8r,ybvh8sr,newlatin}{t1-baskervald-lig}{T1}{ybvw}{eb}{n}{}
661 \installfont{ybvhow8t}{ybvho8r,ybvho8sr,newlatin}{t1-baskervald-lig}{T1}{ybvw}{eb}{sl}{}
662 \installfamily{TS1}{ybv}{}
663 \installfont{ybvr8c}{ybvr8r,ybvr8sr,textcomp}{ts1-baskervald}{TS1}{ybv}{m}{n}{}
664 \installfont{ybvri8c}{ybvri8r,ybvri8sr,textcomp}{ts1-baskervald}{TS1}{ybv}{m}{it}{}
665 \installfont{ybvb8c}{ybvb8r,ybvb8sr,textcomp}{ts1-baskervald}{TS1}{ybv}{b}{n}{}
666 \installfont{ybvbi8c}{ybvbi8r,ybvbi8sr,textcomp}{ts1-baskervald}{TS1}{ybv}{b}{it}{}
667 \installfont{ybvh8c}{ybvh8r,ybvh8sr,textcomp}{ts1-baskervald}{TS1}{ybv}{eb}{n}{}
668 \installfont{ybvho8c}{ybvho8r,ybvho8sr,textcomp}{ts1-baskervald}{TS1}{ybv}{eb}{sl}{}
669 \installfamily{TS1}{ybvw}{}
670 \installfontas{ybvr8c}{TS1}{ybvw}{m}{n}{}
671 \installfontas{ybvri8c}{TS1}{ybvw}{m}{it}{}
672 \installfontas{ybvb8c}{TS1}{ybvw}{b}{n}{}
673 \installfontas{ybvbi8c}{TS1}{ybvw}{b}{it}{}
674 \installfontas{ybvh8c}{TS1}{ybvw}{eb}{n}{}
675 \installfontas{ybvho8c}{TS1}{ybvw}{eb}{sl}{}
676 \endinstallfonts
677 \endrecordtransforms
678 \bye
679 % \end{macrocode}
680 % \iffalse
681 %</drv>
682 % \fi
683 % \subsection{Map}
684 %
685 % This file is compiled to produce the map file fragment \verb|updmap| needs to install the fonts.
686 % It uses files recorded during compilation of the driver.
687 % \iffalse
688 %<*map>
689 % \fi
690 % \begin{macrocode}
691 \input finstmsc.sty
692 \resetstr{PSfontsuffix}{.pfb}
693 \adddriver{dvips}{ybv.map}
694 \adddriver{pltotf}{ybv-pltotf.sh}
695 \input ybv-rec.tex
696 \donedrivers
697 \bye
698 % \end{macrocode}
699 % \iffalse
700 %</map>
701 % \fi
702 %
703 % \subsection{Encodings}
704 %
705 % \lpack{baskervaldadf} uses several custom encoding files (\texttt{.etx}) to generate the files required to use BaskervaldADF in \LaTeXe{}.
706 % These are included in the package, listed in \texttt{baskervaldadf-build.pdf} and briefly described in this section.
707 %
708 % \subsubsection{Supplementary (raw)}
709 %
710 % We need an additional ‘raw’ encoding to pick up characters otherwise missed.
711 % Many of these are here just because they are named differently, but this also covers fancy ligatures, alternate styles of digits etc.
712 %
713 % Note that \verb|etx| files may specify raw and/or output encodings.
714 % Those which are specific to BaskervaldADF are described below and included in this package.
715 % Those which are not are included as separate sources unless provided by
716 % \verb|fontinst|.
717 % \begin{itemize}
718 % \item \texttt{supp-ybv.etx}
719 % \end{itemize}
720 %
721 % \subsubsection{Reglyph}
722 % We need to rename characters whose names don't match our TeX font encodings.
723 % \begin{itemize}
724 % \item \texttt{reglyph-ybv.etx}
725 % \end{itemize}
726 %
727 % \subsubsection{Encodings (output)}
728 % These files define variant T1 and TS1 font encodings.
729 % \begin{itemize}
730 % \item \texttt{t1-baskervald.etx}
731 % \item \texttt{t1-baskervald-lig.etx}
732 % \item \texttt{ts1-baskervald.etx}
733 % \end{itemize}
734 % In addition to these encodings, we use encoding files supplied by
735 % \verb|fontinst|.
736 %
737 % The \verb|etx| files are not used directly by \LaTeX{} or \TeX.
738 % Where needed, they are processed to produce \verb|enc| files.
739 % In some cases, however, they are not themselves standalone encodings.
740 % Instead, they change how some other encoding is interpreted.
741 %
742 % \subsubsection{MEX}
743 % \verb|mtx| files are used to build ‘fake’ glyphs where these are missing from the original fonts.
744 % We do not fake small-caps or bold, but only glyphs which can be constructed without altering the original design.
745 %
746 % This package doesn't use any \verb|mtx| files specific to BaskervaldADF, but it does make use of standard files supplied by \lpack{fontinst}.
747 % \iffalse
748 %<*ee>
749 % \fi
750 % \begin{macrocode}
751 % !TEX TS-program = pdflatex
752 % !TEX encoding = UTF-8 Unicode
753 \documentclass[12pt]{article}
754 \usepackage{longtable}
755 \title{\textswash{baskervald test (ybv, ybvw)}}
756 \author{\textswash{splendid spiky strains of active fjords}}
757 \newcommand{\alphaline}{%
758 \begin{flushleft}
759 ABCDEFGHIJKLMNOPQRSTUVWXYZ\par abcdefghijklmnopqrs{}tuvwxyz\par %
760 0\zeroslash 123456789 f{}f ff f{}i fi f{}l fl f{}f{}i ffi f{}f{}l ffl f{}j fj f{}f{}j ffj c{}t ct s{}p sp s{}t st\par
761 <{}< << >{}> >> - -{}- -- -{}-{}- ---\par
762 \& \texteuro\ \textdollar\ \textsterling\ \textyen\ \textcurrency\ \textflorin\ \textcent\ \textohm\ \textmu\ \textcelsius\ \textnumero\ \textdiv\ \texttimes\ \textpm\ \textregistered\ \textcopyright\ \texttrademark\ \textparagraph\ \textestimated\ \textonequarter\ \textonehalf\ \textthreequarters\ \textonesuperior\ \texttwosuperior\ \textthreesuperior\par
763 Sphinx of black quartz, judge my vow.\par
764 The quick brown fox jumps over the lazy dog.\par
765 Somewhat splendid fjords act last.
766 \end{flushleft}}
767 \newcommand{\alphatest}{%
768 \begin{flushleft}
769 {\upshape upright shape:\par \alphaline}\smallskip\par
770 {\itshape italics/oblique:\par \alphaline}\smallskip\par
771 {\bfseries
772 {\upshape upright shape:\par \alphaline}\smallskip\par
773 {\itshape italics/oblique:\par \alphaline}\smallskip\par}
774 {\ebweight
775 {\upshape upright shape:\par \alphaline}\smallskip\par
776 {\itshape italics/oblique:\par \alphaline}\smallskip\par}
777 \end{flushleft}}
778
779 \usepackage[T1]{fontenc}
780 \pdfmapfile{+ybv.map}
781 \usepackage{baskervald}
782
783 \begin{document}
784 \maketitle
785 \setlength{\parindent}{0pt}
786
787 \section*{regular modified encoding}
788
789 \alphatest
790
791 \section*{alternative modified encoding (ligature)}
792
793 \swashstyle
794
795 \alphatest
796
797 \end{document}
798
799 % \end{macrocode}
800 % \iffalse
801 %</ee>
802 % \fi
803 %\Finale
804 %^^A vim: tw=0: