| 1 |
%% $Id: lucida-otf-doc.tex 556 2017-09-18 06:22:29Z herbert $ |
| 2 |
% Copyright 2012-2015 TeX Users Group. |
| 3 |
% |
| 4 |
% Copying and distribution of this file, with or without modification, |
| 5 |
% are permitted in any medium, without royalty. |
| 6 |
|
| 7 |
\listfiles |
| 8 |
\documentclass[11pt]{article} |
| 9 |
\usepackage{geometry} |
| 10 |
|
| 11 |
\usepackage[usefilenames, |
| 12 |
TT={Scale=0.88,FakeStretch=0.9}, |
| 13 |
SS={Scale=0.9}, |
| 14 |
RM={Scale=0.9}, |
| 15 |
DefaultFeatures={Ligatures=TeX}]{dejavu-otf} % support opentype math fonts |
| 16 |
|
| 17 |
|
| 18 |
\usepackage{biblatex} |
| 19 |
\addbibresource{\jobname.bib} |
| 20 |
\usepackage{array} |
| 21 |
\usepackage{metalogo} % for \XeTeX logo |
| 22 |
\usepackage{booktabs} % for examples |
| 23 |
\usepackage{ltablex} % for examples |
| 24 |
\usepackage{listings} % for code |
| 25 |
\usepackage{hvlogos} % for Wikipedia W |
| 26 |
|
| 27 |
%\setmathfont{texgyredejavu-math.otf} |
| 28 |
|
| 29 |
\pagestyle{headings} |
| 30 |
|
| 31 |
\usepackage[colorlinks,hyperfootnotes=false]{hyperref} |
| 32 |
% define \code for url-like breaking of typewriter fragments. |
| 33 |
\ifx\nolinkurl\undefined \let\code\url \else \let\code\nolinkurl \fi |
| 34 |
|
| 35 |
% Define \cs to prepend a backslash, and be unbreakable: |
| 36 |
\DeclareRobustCommand\cs[1]{\mbox{\texttt{\char`\\#1}}} |
| 37 |
|
| 38 |
% An environment like quote, but less space above and more below: |
| 39 |
\newenvironment{demoquote} |
| 40 |
{\tabularx{\dimexpr\linewidth+\marginparwidth}{@{} X >{\ttfamily}l @{}}} |
| 41 |
{\endtabularx} |
| 42 |
|
| 43 |
|
| 44 |
\title{Support for the DejaVu TrueType fonts and Math OpenType font% |
| 45 |
\thanks{Thanks to: Reinhard Kotuchs; Lars Madsen; Rolf Niepraschk; Marei Peischl;}} |
| 46 |
\author{Herbert Voß} |
| 47 |
\begin{document} |
| 48 |
\maketitle |
| 49 |
\tableofcontents |
| 50 |
|
| 51 |
\section{Introduction} |
| 52 |
|
| 53 |
The DejaVu fonts are modifications of the Bitstream Vera fonts designed for greater coverage of |
| 54 |
Unicode, as well as providing more styles. The Bitstream Vera family was limited mainly to the |
| 55 |
characters in the Basic Latin and Latin-1 Supplement portions of Unicode, roughly equivalent to |
| 56 |
ISO/IEC 8859-15, but was released with a license that permitted changes. The DejaVu fonts project |
| 57 |
was started with the aim to "provide a wider range of characters ... while maintaining the original |
| 58 |
look and feel through the process of collaborative development". The development of the fonts is |
| 59 |
done by many contributors, and is organized through a wiki and a mailing list.~\cite{dejavu} |
| 60 |
|
| 61 |
A brief overview: |
| 62 |
|
| 63 |
\begin{itemize} |
| 64 |
\item Math fonts: TeXGyre DejaVu Math Regular, created by the Polish \TeX\ User group GUST. |
| 65 |
|
| 66 |
\item Three font families (serif, sans, mono) |
| 67 |
coming from the original Bitstream Vera. |
| 68 |
|
| 69 |
\end{itemize} |
| 70 |
|
| 71 |
The package \texttt{dejavu-otf} supports all families with specific optional |
| 72 |
arguments: |
| 73 |
|
| 74 |
\begin{tabular}{@{} >{\ttfamily}l l l @{}}\\\toprule |
| 75 |
\emph{name} & \emph{value} &\emph{meaning}\\\midrule |
| 76 |
mono & true/false & use only the DejaVu Sans Mono\\ |
| 77 |
serif & true/false & use only the DejaVu Serif\\ |
| 78 |
sans & true/false & use only the DejaVu Sans\\ |
| 79 |
math & true/false & use only the \TeX\ Gyre DejaVu Math \\ |
| 80 |
RM & code & options for DejaVu Serif\\ |
| 81 |
SS & code & options for DejaVu Sans\\ |
| 82 |
TT & code & options for DejaVu Sans Mono\\ |
| 83 |
MM & code & options for TeXGyre DejaVu Math\\ |
| 84 |
%MMbold & TeXGyre DejaVu Boldmath\\ |
| 85 |
DefaultFeatures & code & for all font styles\\\bottomrule |
| 86 |
\end{tabular} |
| 87 |
|
| 88 |
\bigskip |
| 89 |
Except math all fonts are preset with \texttt{Scale=0.92}. For this documentation |
| 90 |
we use instead: |
| 91 |
|
| 92 |
\begin{verbatim} |
| 93 |
\usepackage[TT={Scale=0.88,FakeStretch=0.9}, |
| 94 |
SS={Scale=0.9}, |
| 95 |
RM={Scale=0.9}, |
| 96 |
DefaultFeatures={Ligatures=TeX}]{dejavu-otf} % support opentype DejaVu fonts |
| 97 |
\end{verbatim} |
| 98 |
|
| 99 |
|
| 100 |
The standard font families \texttt{rm}, \texttt{sf}, and \texttt{tt} |
| 101 |
can be used as usual for any \LaTeX\ engine. |
| 102 |
By default the fonts are defined by their symbolic name. As an alternative you can load |
| 103 |
the package with the option \texttt{usefilenames}. |
| 104 |
|
| 105 |
\begin{verbatim} |
| 106 |
\usepackage[usefilenames=true, |
| 107 |
TT={Scale=0.88,FakeStretch=0.9}, |
| 108 |
SS={Scale=0.9}, |
| 109 |
RM={Scale=0.9}, |
| 110 |
DefaultFeatures={Ligatures=TeX}]{dejavu-otf} % supports also opentype math fonts |
| 111 |
\end{verbatim} |
| 112 |
|
| 113 |
|
| 114 |
Then all definitions uses the |
| 115 |
extension \texttt{.ttf} (roman, sans serif, mono) and \texttt{.otf} (math) for the filenames of the fonts: |
| 116 |
|
| 117 |
\begin{verbatim} |
| 118 |
DejaVuSans-BoldOblique.ttf |
| 119 |
DejaVuSans-Bold.ttf |
| 120 |
DejaVuSansCondensed-BoldOblique.ttf |
| 121 |
DejaVuSansCondensed-Bold.ttf |
| 122 |
DejaVuSansCondensed-Oblique.ttf |
| 123 |
DejaVuSansCondensed.ttf |
| 124 |
DejaVuSans-ExtraLight.ttf |
| 125 |
DejaVuSansMono-BoldOblique.ttf |
| 126 |
DejaVuSansMono-Bold.ttf |
| 127 |
DejaVuSansMono-Oblique.ttf |
| 128 |
DejaVuSansMono.ttf |
| 129 |
DejaVuSans-Oblique.ttf |
| 130 |
DejaVuSans.ttf |
| 131 |
DejaVuSerif-BoldItalic.ttf |
| 132 |
DejaVuSerif-Bold.ttf |
| 133 |
DejaVuSerifCondensed-BoldItalic.ttf |
| 134 |
DejaVuSerifCondensed-Bold.ttf |
| 135 |
DejaVuSerifCondensed-Italic.ttf |
| 136 |
DejaVuSerifCondensed.ttf |
| 137 |
DejaVuSerif-Italic.ttf |
| 138 |
DejaVuSerif.ttf |
| 139 |
texgyredejavu-math.otf |
| 140 |
\end{verbatim} |
| 141 |
|
| 142 |
The condensed and extra-light versions are definied by \cs{newfontfamily} and can be accessed by |
| 143 |
the macros: |
| 144 |
|
| 145 |
|
| 146 |
\begin{verbatim} |
| 147 |
\DejaVuSerifCondensed |
| 148 |
\DejaVuSansCondensed |
| 149 |
\DejaVuSansLight |
| 150 |
\end{verbatim} |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
\section{Text examples} |
| 156 |
|
| 157 |
The DejaVu fonts have no Small Caps and no oldstyle figures! |
| 158 |
|
| 159 |
|
| 160 |
\newcommand\demotext{% |
| 161 |
For \textsterling 45, almost anything can |
| 162 |
be found floating in fields. |
| 163 |
!`THE DAZED BROWN FOX QUICKLY GAVE 12345--67890 JUMPS! |
| 164 |
--- ?`But aren't Kafka's Schlo\ss{} and |
| 165 |
\AE sop's \OE uvres often na\"\i ve vis-\`a-vis the d\ae monic |
| 166 |
ph\oe nix's official r\^ole in fluffy souffl\'es?} |
| 167 |
|
| 168 |
\newcommand*\demotextsc{\textsc{\ Sphinx of black quartz, judge my vow}.} |
| 169 |
|
| 170 |
The basic text family is \code{DejaVuSerif}, with the usual four |
| 171 |
variants---\allowbreak regular, italic, bold, and bold italic. %, all with |
| 172 |
%oldstyle figures; small caps are available in the upright shapes: |
| 173 |
|
| 174 |
\noindent |
| 175 |
\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}} |
| 176 |
\demotext\demotextsc & DejaVu Serif\\[4pt] |
| 177 |
\itshape\demotext & DejaVu Serif Italic\\[4pt] |
| 178 |
\bfseries\demotext & DejaVu Serif Bold\\[4pt] |
| 179 |
\bfseries\itshape\demotext & DejaVu Serif BoldItalic\\[12pt] |
| 180 |
%\end{tabularx} |
| 181 |
~ & ~ \\ |
| 182 |
%\noindent |
| 183 |
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}} |
| 184 |
\sffamily\demotext & DejaVu Sans\\[4pt] |
| 185 |
\sffamily\itshape\demotext & DejaVu Sans Italic\\[4pt] |
| 186 |
\sffamily\bfseries\demotext & DejaVu Sans Bold \\[4pt] |
| 187 |
\sffamily\bfseries\itshape\demotext & DejaVu Sans BoldItalic\\[12pt] |
| 188 |
%\end{tabularx} |
| 189 |
~ & ~ \\ |
| 190 |
|
| 191 |
%\noindent |
| 192 |
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}} |
| 193 |
\ttfamily\demotext & DejaVu Sans Mono\\[4pt] |
| 194 |
\ttfamily\itshape\demotext & DejaVu Sans Mono Italic\\[4pt] |
| 195 |
\ttfamily\bfseries\demotext & DejaVu Sans Mono Bold\\[4pt] |
| 196 |
\ttfamily\bfseries\itshape\demotext & DejaVu Sans Mono Bold Italic\\[12pt] |
| 197 |
%\end{tabularx} |
| 198 |
~ & ~ \\% |
| 199 |
|
| 200 |
%\noindent |
| 201 |
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}} |
| 202 |
\DejaVuSerifCondensed\demotext & DejaVu Serif Condensed\\[4pt] |
| 203 |
\DejaVuSerifCondensed\itshape\demotext & DejaVu Serif Condensed Italic\\[4pt] |
| 204 |
\DejaVuSerifCondensed\bfseries\demotext & DejaVu Serif Condensed Bold\\[4pt] |
| 205 |
\DejaVuSerifCondensed\bfseries\itshape\demotext & DejaVu Serif Condensed Bold Italic\\[12pt] |
| 206 |
%\end{tabularx} |
| 207 |
~ & ~ \\% |
| 208 |
|
| 209 |
%\noindent |
| 210 |
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}} |
| 211 |
\DejaVuSansCondensed\demotext & DejaVu Sans Condensed\\[4pt] |
| 212 |
\DejaVuSansCondensed\itshape\demotext & DejaVu Sans Condensed Italic\\[4pt] |
| 213 |
\DejaVuSansCondensed\bfseries\demotext & DejaVu Sans Condensed Bold\\[4pt] |
| 214 |
\DejaVuSansCondensed\bfseries\itshape\demotext & DejaVu Sans Condensed Bold Italic\\[12pt] |
| 215 |
%\end{tabularx} |
| 216 |
~ & ~ \\% |
| 217 |
|
| 218 |
%\noindent |
| 219 |
%\begin{tabularx}{\dimexpr\linewidth+\marginparwidth}{@{} >{\raggedright}X >{\ttfamily}l @{}} |
| 220 |
\DejaVuSansLight\demotext & DejaVu Sans Extra Light\\[4pt] |
| 221 |
\DejaVuSansLight\itshape\demotext & DejaVu Sans Extra Light Italic\\[4pt] |
| 222 |
\DejaVuSansLight\bfseries\demotext & DejaVu Sans Extra Light Bold\\[4pt] |
| 223 |
\DejaVuSansLight\bfseries\itshape\demotext & DejaVu Sans Extra Light Bold Italic\\[4pt] |
| 224 |
%\end{tabularx} |
| 225 |
~ & ~ \\% |
| 226 |
\end{tabularx} |
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
\section{Math examples} |
| 231 |
|
| 232 |
There is only the regular version of the math font \cs{mathnormal}. The bold version is |
| 233 |
faked by the option \texttt{FakeBold}: |
| 234 |
|
| 235 |
\begin{verbatim} |
| 236 |
\setmathfont[\DejaVuMM@features,version=normal]{texgyredejavu-math.otf} |
| 237 |
\setmathfont[\DejaVuMM@features,FakeBold=3,version=bold]{texgyredejavu-math.otf} |
| 238 |
\end{verbatim} |
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
\begin{verbatim} |
| 243 |
Here's some text. And here's some math: |
| 244 |
\[ |
| 245 |
\phi(x)=\int_{-\infty}^{x} e^{-x^{2}/2} |
| 246 |
\] |
| 247 |
And now bold math: |
| 248 |
\boldmath |
| 249 |
\[ |
| 250 |
\phi(x)=\int_{-\infty}^{x} e^{-x^{2}/2} |
| 251 |
\] |
| 252 |
\unboldmath |
| 253 |
|
| 254 |
$f(x)=13\int$ \boldmath$f(x)=13 \int$\unboldmath |
| 255 |
|
| 256 |
Euro and copyright symbols are available: \texteuro\ \textcopyright. |
| 257 |
\end{verbatim} |
| 258 |
|
| 259 |
Here's some text. And here's some math: |
| 260 |
\[ |
| 261 |
\phi(x)=\int_{-\infty}^{x} e^{-x^{2}/2} |
| 262 |
\] |
| 263 |
And now bold math: |
| 264 |
|
| 265 |
\boldmath |
| 266 |
|
| 267 |
\[ |
| 268 |
\phi(x)=\int_{-\infty}^{x} e^{-x^{2}/2} |
| 269 |
\] |
| 270 |
\unboldmath |
| 271 |
|
| 272 |
$f(x)=13\int$ \boldmath$f(x)=13 \int$\unboldmath |
| 273 |
|
| 274 |
Euro and copyright symbols are available: \texteuro\ \textcopyright. |
| 275 |
|
| 276 |
\section{Closing} |
| 277 |
The font list of this documentation is: |
| 278 |
|
| 279 |
\scriptsize\ttfamily |
| 280 |
\expandafter\IfFileExists\expandafter{\jobname.fonts}% |
| 281 |
{\lstinputlisting{\jobname.fonts}}{} |
| 282 |
|
| 283 |
\normalfont\rmfamily |
| 284 |
|
| 285 |
\nocite{*} |
| 286 |
\printbibliography |
| 287 |
|
| 288 |
|
| 289 |
\end{document} |
| 290 |
|
| 291 |
https://en.wikipedia.org/wiki/DejaVu_fonts |