%% LyX 1.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{array}
\usepackage{graphicx}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Bold symbol macro for standard LaTeX users
\newcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}

%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.

%\usepackage[letterpaper,text={6.5in,9in}]{geometry}
\usepackage{fullpage}
%\usepackage{fourier}
\usepackage{bera}
\usepackage{arevmath}

\fboxsep=.25in

\usepackage{babel}
\makeatother
\begin{document}

\title{Arev Sans for \TeX{} and \LaTeX{}}


\author{Stephen G.\ Hartke%
\footnote{\emph{email}: lastname at gmail dot com.%
}}


\date{August 2, 2005}

\maketitle

\section{Introduction}

Bitstream Vera was designed by Jim Lyles of Bitstream, Inc., in cooperation
with the Gnome Foundation as a high quality scalable free font for
use with free open-source software \cite{vera}. The Bitstream Vera
family includes serif, sans serif, and monospaced fonts,%
\footnote{The text of this document is set in Bera Serif and Mono~\cite{bera},
a repackaging of Bitstream Vera for \TeX{}.%
} and all three fonts have normal, oblique, bold, and bold oblique
faces. Bitstream Vera is primarily intended as a screen font (though
it also works well as a print font) and has hinting for display on
low-resolution devices such as computer monitors and projectors. All
three fonts have large \emph{x} height, wide letters and spacing,
and {}``open'' letters,%
\footnote{For instance, compare the lowercase {}``e'' of Arev Sans with that
of Helvetica.%
} resulting in fonts that are extremely easy to read at small sizes
or on projected displays. 

Tavmjong Bah created Arev Sans%
\footnote{Per the license for Bitstream Vera, any derivative fonts must have
a different name.%
} by extending Bitstream Vera Sans to include Greek, Cyrillic, and
many mathematical symbols \cite{arev}. The new glyphs added by Bah
accurately capture the feel of the Latin letters and so seamlessly
integrate into the font. Bah's intention was to add symbols that are
useful for technical writing, and hence the Greek letters are typical
of those used in mathematics and science and not of the letters used
in writing the Greek language.%
\footnote{Specifically, alpha is not the same as lowercase {}``a,'' nu is
not the same as lowercase {}``v,'' and Upsilon is not the same as
uppercase {}``Y.''%
} At the author's request, Bah also added several alternate glyphs
for some of the Latin and Greek letters. This was mainly done so that
all of the letters can be clearly distinguished when in mathematics
and not surrounded by other letters or even aligned with the baseline.%
\footnote{The lowercase {}``l'' and the uppercase {}``I'' in particular
are almost identical in Bitstream Vera Sans. The lowercase phi and
original uppercase Phi in Arev Sans are also difficult to distinguish
without a baseline.%
} Additionally, several alternate glyphs were added that are {}``warmer''
or more {}``humanist'' than the strict {}``geometric'' glyphs.%
\footnote{The extra glyphs include {}``a,'' {}``i,'' {}``l,'' {}``u,''
{}``v,'' {}``w,'' {}``x,'' and uppercase Pi and Phi. The florin
is used as an alternate {}``f.''%
} These extra glyphs add a degree of warmth to mathematics written
in Arev Sans that is not achieved with other sans serif fonts.

%
\begin{figure*}
\begin{center}\framebox{\includegraphics{fontsample.eps}}\end{center}


\caption{\label{cap:fontsample}Font sample of Arev Sans text and math.}
\end{figure*}
Figure~\ref{cap:fontsample} shows a sample of Arev Sans being used
for text and mathematics. The primary use that the author sees for
Arev Sans in \LaTeX{} is for presentations, and especially for those
that are displayed with a computer projector. The attributes of Bitstream
Vera and Arev mentioned above make Arev particularly suited for this
purpose. Besides Arev, there are only a few other options for sans
serif fonts in \LaTeX{}, and none of them are entirely satisfactory.
Computer Modern sans serif and the Sli\TeX{} sans serif%
\footnote{Arev Sans is actually very similar to Sli\TeX{} sans serif (\texttt{lcmss})
in that both have large \emph{x} height, have wide letters and spacing,
and have {}``open'' letters. Arev Sans is heavier than Sli\TeX{}
sans serif though, which makes it more suitable for computer projectors.%
} fonts can be used for text, but Computer Modern roman is still used
for mathematics. Walter Schmidt's Computer Modern Bright%
\footnote{Harald Halders created Type 1 Postcript font versions of the \texttt{cmbright}
fonts called \texttt{hfbright}. The fonts were created by tracing
high resolution bitmaps, and so are not perfect. However, scalable
Type 1 fonts greatly improve the quality of Postscript and \texttt{.pdf}
files on computer screens and projectors.%
} (\texttt{cmbright}\cite{cmbright}) is a sans serif family that includes
both text and mathematics, but is very thin and does not display well
on a computer projector. Kerkis Sans\cite{kerkis} is based on Avant
Garde and includes Greek sans serif glyphs, but is also very thin.
Helvetica and other PostScript sans serif fonts can be used for text
and for Latin letters in mathematics, but they do not have matching
Greek letters or the proper weight for geometric mathematical symbols.

The \texttt{arev} package works well with the \LaTeX{} package \texttt{beamer}\cite{beamer}
with the \texttt{professionalfonts} option. %
\begin{figure}
\begin{center}\framebox{\includegraphics[%
  scale=0.9]{prosper-arev.eps}}\end{center}


\vspace*{-1.75em}
\caption{\label{cap:ArevSans}Arev Sans}
\end{figure}
%
\begin{figure}
\begin{center}\framebox{\includegraphics[%
  scale=0.9]{prosper-lcmss.eps}}\end{center}


\vspace*{-1.75em}
\caption{Sli\TeX{} font (\texttt{lcmss})}
\end{figure}
%
\begin{figure}
\begin{center}\framebox{\includegraphics[%
  scale=0.9]{prosper-cmss.eps}}\end{center}


\vspace*{-1.75em}
\caption{Computer Modern sans serif (\texttt{cmss})}
\end{figure}
%
\begin{figure}
\begin{center}\framebox{\includegraphics[%
  scale=0.9]{prosper-cmbright.eps}}\end{center}


\vspace*{-1.75em}
\caption{CM Bright}
\end{figure}
%
\begin{figure}
\begin{center}\framebox{\includegraphics[%
  scale=0.9]{prosper-kerkis.eps}}\end{center}


\vspace*{-1.75em}
\caption{Kerkis Sans}
\end{figure}
%
\begin{figure}
\begin{center}\framebox{\includegraphics[%
  scale=0.9]{prosper-helvetica.eps}}\end{center}


\vspace*{-1.75em}
\caption{\label{cap:Helvetica}Helvetica}
\end{figure}
Figures~\ref{cap:ArevSans}-\ref{cap:Helvetica} show examples of
\texttt{beamer} with the font options mentioned above where each slide
is scaled to 90\% of its default size, and %
\begin{figure}
\begin{center}\begin{tabular}{cc}
\begin{minipage}[c]{0.45\columnwidth}%
\framebox{\includegraphics[%
  scale=0.5]{prosper-arev.eps}}


\vspace*{-0.5em}
\caption{\label{cap:Arev}Arev Sans}\vspace*{\bigskipamount}
\end{minipage}%
&
\begin{minipage}[c]{0.45\columnwidth}%
\framebox{\includegraphics[%
  scale=0.5]{prosper-helvetica.eps}}


\vspace*{-0.5em}
\caption{Helvetica}\vspace*{\bigskipamount}
\end{minipage}%
\tabularnewline
\begin{minipage}[c]{0.45\columnwidth}%
\framebox{\includegraphics[%
  scale=0.5]{prosper-lcmss.eps}}


\vspace*{-0.5em}
\caption{Sli\TeX{} font (\texttt{lcmss})}\vspace*{\bigskipamount}
\end{minipage}%
&
\begin{minipage}[c]{0.45\columnwidth}%
\framebox{\includegraphics[%
  scale=0.5]{prosper-kerkis.eps}}


\vspace*{-0.5em}
\caption{Kerkis Sans}\vspace*{\bigskipamount}
\end{minipage}%
\tabularnewline
\begin{minipage}[c]{0.45\columnwidth}%
\framebox{\includegraphics[%
  scale=0.5]{prosper-cmss.eps}}


\vspace*{-0.5em}
\caption{Computer Modern sans serif (\texttt{cmss})}\vspace*{\bigskipamount}
\end{minipage}%
&
\begin{minipage}[c]{0.45\columnwidth}%
\framebox{\includegraphics[%
  scale=0.5]{prosper-cmbright.eps}}


\vspace*{-0.5em}
\caption{\label{cap:CM-Bright}CM Bright}\vspace*{\bigskipamount}
\end{minipage}%
\tabularnewline
\end{tabular}\end{center}
\end{figure}
Figures~\ref{cap:Arev}-\ref{cap:CM-Bright} show side-by-side examples
scaled to 50\%. Sli\TeX{} sans serif is loaded into \texttt{beamer}
using \TeX{}Power's \texttt{tpslifonts.sty}~\cite{texpower}.


\section{Implementation}

With internationalization of computer software and the growing use
of Unicode, many free scalable fonts are available that include both
Latin and Greek letters. However, making use of these fonts for mathematics
in \LaTeX{} is a nontrivial task: not only are there many subtleties
to using fonts in \LaTeX{}, but the documentation is scattered among
many sources and there are few examples to consult. The author hopes
that the \texttt{arev} package can serve as a template for others
who wish to create new math font packages for \LaTeX{}.

The excellent GPLed font editor FontForge~\cite{fontforge} was used
by Bah to create Arev Sans and was used by the author for creating
PostScript \texttt{pfb}, \texttt{afm} , and \TeX{} \texttt{tfm} files.
The Bash shell script \texttt{afmtoglyphlist} was used to extract
the glyph names from the \texttt{afm} file into a list that a \texttt{fontinst}
script used for renaming glyphs. The magic of \texttt{fontinst} was
used to create virtual fonts and font metrics, \LaTeX{} font definition
files, and the \texttt{dvips} map file.

The vertical placement of math accents requires the accents to be
appropriately placed for characters 1 ex high. The accents also need
to have a zero depth, which is set by the file \texttt{fixot1accents.mtx}
(based on their bounding boxes, the accents naturally have negative
depths). Horizontal placement of math accents is done by centering
the accent over the character, and then adjusting the position by
the kern between the character on the left and a special character
called the \emph{skewchar}. To better visualize the placement of the
accents, the graphical kerning dialog box in FontForge was used, and
then the script \texttt{afmtokernaccent} extracts this kern information
from the \texttt{afm} file and creates \texttt{mtx} files that calculate
the appropriate kern. The one difficulty in implementing this in \texttt{fontinst}
is that the kerning data must be reglyphed before applied to the font
metrics.

Arev Sans is used for all letter-like symbols, including Latin and
Greek letters. Arev Sans includes many mathematical symbols, but not
the full range of symbols included in Computer Modern or the AMS symbol
fonts. The Math Design Bitstream Charter~\cite{mdch} bold math font
comes very close to the weight of Arev Sans, and so is used for the
majority of geometric symbols%
\footnote{The Math Design Bitstream Charter math fonts have a few minor flaws:
for instance, in the formation of square root symbols and overbraces.
However, most of the symbols are of fine quality, and the range of
symbols is impressive.%
}. Computer Modern is used for the default calligraphic font, Fourier-GUTenberg~\cite{fourier}
for blackboard bold (since the letters are sans serif), Ralph Smith
Formal Script for script, and the AMS font for fraktur. One disadvantage
of using so many different fonts for mathematics is that \TeX{} can
only have sixteen simultaneously loaded fonts, and the Arev package
comes very close to this limit.

The file \texttt{mathtesty.tex} is a combination of the file \texttt{mathtestx.tex}
from the \texttt{mathptmx} package~\cite{mathptmx} and the \texttt{symbols.tex}
file of David Carlisle. It is very useful for testing all of the math
styles and symbols for a given font setup.

There are three \LaTeX{} packages for use with Arev Sans: \texttt{arev},
\texttt{arevtext}, and \texttt{arevmath}. The \texttt{arev} package
simply loads both \texttt{arevtext} and \texttt{arevmath}. \texttt{arevtext}
changes the default text font (both roman and sans serif) to Arev
Sans. \texttt{arevtext} also changes the default typewriter font to
Bera Mono, a repackaging of Bitstream Vera Mono for \TeX{}. \texttt{arevmath}
sets the math fonts as described above. In addition to the normal
styles, the \texttt{\textbackslash{}mathbm} command changes the math
font to bold italic.

Variant letters defined by \texttt{arevmath}:

\begin{center}\begin{tabular}{lllllp{0.5in}lllll}
$\origa$&
\texttt{\textbackslash{}origa}&
&
$\vara$&
\texttt{\textbackslash{}vara}&
&
$\origI$&
\texttt{\textbackslash{}origI}&
&
$\varI$&
\texttt{\textbackslash{}varI}\tabularnewline
$\origi$&
\texttt{\textbackslash{}origi}&
&
$\vari$&
\texttt{\textbackslash{}vari}&
&
$\origIota$&
\texttt{\textbackslash{}origIota}&
&
$\varIota$&
\texttt{\textbackslash{}varIota}\tabularnewline
$\origimath$&
\texttt{\textbackslash{}origimath}&
&
$\varimath$&
\texttt{\textbackslash{}varimath}&
&
$\origPi$&
\texttt{\textbackslash{}origPi}&
&
$\varPi$&
\texttt{\textbackslash{}varPi}\tabularnewline
$\origf$&
\texttt{\textbackslash{}origf}&
&
$\varf$&
\texttt{\textbackslash{}varf}&
&
$\origPhi$&
\texttt{\textbackslash{}origPhi}&
&
$\varPhi$&
\texttt{\textbackslash{}varPhi}\tabularnewline
$\origl$&
\texttt{\textbackslash{}origl}&
&
$\varl$&
\texttt{\textbackslash{}varl}&
&
&
&
&
&
\tabularnewline
$\origu$&
\texttt{\textbackslash{}origu}&
&
$\varu$&
\texttt{\textbackslash{}varu}&
&
&
&
&
&
\tabularnewline
$\origv$&
\texttt{\textbackslash{}origv}&
&
$\varv$&
\texttt{\textbackslash{}varv}&
&
&
&
&
&
\tabularnewline
$\origw$&
\texttt{\textbackslash{}origw}&
&
$\varw$&
\texttt{\textbackslash{}varw}&
&
&
&
&
&
\tabularnewline
$\origx$&
\texttt{\textbackslash{}origx}&
&
$\varx$&
\texttt{\textbackslash{}varx}&
&
&
&
&
&
\tabularnewline
\end{tabular}\end{center}

Extra symbols defined by \texttt{arevmath}:

\begin{center}\begin{tabular}{ll>{\raggedright}p{0.5in}ll}
$\varspade$&
\texttt{\textbackslash{}varspade}&
&
$\quarternote$&
\texttt{\textbackslash{}quarternote}\tabularnewline
$\varheart$&
\texttt{\textbackslash{}varheart}&
&
$\eighthnote$&
\texttt{\textbackslash{}eighthnote}\tabularnewline
$\vardiamond$&
\texttt{\textbackslash{}vardiamond}&
&
$\sixteenthnote$&
\texttt{\textbackslash{}sixteenthnote}\tabularnewline
$\varclub$&
\texttt{\textbackslash{}varclub}&
&
$\steaming$&
\texttt{\textbackslash{}steaming}\tabularnewline
\end{tabular}\end{center}

All of the variant letters are selected by default except for the
variant {}``f'' (which is a florin symbol). The user can choose
which variants to use by selecting the package option \texttt{origletters},
and then choosing the variants from the options \texttt{vara}, \texttt{vari},
\texttt{varf}, \texttt{varl}, \texttt{varu}, \texttt{varv}, \texttt{varw},
\texttt{varx}, \texttt{varI}, \texttt{varPi}, and \texttt{varPhi}.
Note that there is no \texttt{varimath} option, which follows the
\texttt{vari} selection, or \texttt{varIota} option, since Iota is
treated the same as {}``I.'' For example, if a user selected

\begin{quote}
\texttt{\textbackslash{}usepackage{[}origletters,vara,varf,varPi{]}\{arevmath\}}
\end{quote}
the following letters would be used:

\begin{center}\begin{tabular}{lll}
$a\origi\origimath\varf\origl\origu\origv\origw\origx\origI\Pi\origPhi$&
&
\texttt{\$ai\textbackslash{}imath fluvwxI\textbackslash{}Pi\textbackslash{}Phi\$}\tabularnewline
\end{tabular}\end{center}

A possible future capability of the \texttt{arevmath} package is the
ability to choose either italic or upright Greek letters. This would
require modification of the variant letters code as well.


\section{Licenses}

Bitstream Vera is released under a special license that allows free
distribution. The fonts may also be modified and extended, as long
as the resulting fonts are released under a different name. Arev Sans
is released under the same license as Bitstream Vera. However, Arev's
creator Tavmjong Bah requests that TrueType versions of Arev be obtained
from his website at \cite{arev} instead of being converted from the
Postscript fonts included with the \LaTeX{} package. FontForge source
files may also be obtained at his website.

The virtual fonts, font definitions, \LaTeX{} packages and other supporting
files of the \texttt{arev} package are released under the \LaTeX{}
Project Public License (LPPL), version~1.2. The one exception is
the file \texttt{ams-mdbch.sty}, which was taken from the Math Design
Bitstream Charter package. This file is released under the GNU General
Public License (GPL), version~2.


\section{Acknowledgments}

The author would like to thank Tavmjong Bah for his willingness to
add characters to Arev Sans; George Williams for a prompt response
and patch on the FontForge mailing list; and Lars Hellstr\"om for
help with math accents and \texttt{fontinst} on the \texttt{tex-fonts}
and \texttt{fontinst} mailing lists.

\begin{thebibliography}{10}
\bibitem{arev}Arev Sans by Tavmjong Bah, \texttt{http://tavmjong.free.fr/FONTS}.
\bibitem{beamer}\LaTeX{} class \texttt{beamer} by Till Tantau, \texttt{http://latex-beamer.sourceforge.net}.
\bibitem{bera}Bera Postscript Type 1 fonts by Malte Rosenau (converted from Bitstream
Vera fonts, which necessitated the name change) and \LaTeX{} support
files by Walter Schmidt, CTAN:\texttt{/fonts/bera}.
\bibitem{vera}Bitstream Vera by Jim Lyles of Bitstream, Inc., released in cooperation
with the Gnome Foundation, \texttt{http://www.gnome.org/fonts}.
\bibitem{cmbright}Computer Modern Bright fonts and \texttt{cmbright} \LaTeX{} package
by Walter Schmidt, CTAN:\texttt{/fonts/cmbright}.
\bibitem{fontforge}FontForge font editor by George Williams, \texttt{http://fontforge.sourceforge.net}.
\bibitem{fontinst}\texttt{fontinst} \TeX{} font installation utility by Alan Jeffrey,
Sebastian Rahtz, Ulrik Vieth, Lars Hellstr\"om, and Rowland McDonnell,
CTAN:\texttt{/fonts/utilities/fontinst}.
\bibitem{fourier}Fourier-GUTenberg fonts and \LaTeX{} package by Michel Bovani, CTAN:\texttt{/fonts/fourier-GUT}.
\bibitem{kerkis}Kerkis font by Antonis Tsolomitis, CTAN:\texttt{/fonts/greek/kerkis}.
\bibitem{mdch}Math Design fonts for Bitstream Charter by Paul Pichaureau, CTAN:\texttt{/fonts/mathdesign}.
\bibitem{mathptmx}\texttt{mathptmx} by Walter Schmidt, part of the \texttt{psnfss} package,
CTAN:\texttt{/fonts/psfonts/psnfss-source}.
\bibitem{rsfs}Ralph Smith Formal Script (\texttt{rsfs}) font by Ralph Smith, Postscript
Type 1 version by Taco Hoekwater, CTAN:\texttt{/fonts/rsfs}.
\bibitem{texpower}\TeX{}Power \LaTeX{} style files by Stephan Lehmke, \texttt{http://texpower.sourceforge.net}.\end{thebibliography}

\end{document}
