% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
%
% The following three lines are to be commented out in order to chose
% the other font options
\usepackage{lmodern}
\usepackage{ar}
\newcommand\aroption{CM }
%
% The following three lines are to be commented out in order to chose
% the other font options
%\usepackage{txfonts}
%\usepackage[TX]{ar}
%\newcommand\aroption{TX }
%
% The following three lines are to be commented out in order to chose
% the other font options
%\usepackage{pxfonts}
%\usepackage[PX]{ar}
%\newcommand\aroption{PX }

\usepackage{textcomp,mflogo,booktabs}

\usepackage[a4paper,textwidth=15cm,textheight=24cm,%
            hcentering,vcentering]{geometry}

\newcommand\cs[1]{\texttt{\char`\\#1}}
\newcommand\meta[1]{\texttt{\textlangle{\normalfont\textit{#1}}\textlangle}}
\newcommand\marg[1]{\texttt{\{\meta{#1}\}}}
\newcommand\oarg[1]{\texttt{[\meta{#1}]}}
\newcommand\pack[1]{\textbf{\sffamily#1}}
\newcommand\Arg[1]{\texttt{\{#1\}}}
\newcommand\file[1]{\texttt{#1}}


\title{\textbf{The design of the ``A-R'' ligature\\
with Computer Modern, Times, and Palatino\\
compatible styles: \AR}}
\author{Agostino De Marco}
\date{\today\qquad version 2.0}

\begin{document}
\maketitle

\begin{abstract}
The ``aspect ratio'' symbol is used very much in aerodynamics and aeronautics to express a particular geometric property of airplane wing planforms. Very often in textbooks the quantity is simply called ``A'' because of typographic limitations of the typesetting system.
In 1998 Claudio Beccari (CB) came up with a well designed glyph, particularly suited for use with Computer Modern fonts and its siblings. An example of use of this symbol is given by the following definition of the aspect ratio of a wing:
\[
\AR = \frac{(\textup{wing span})^2}{(\textup{wing planform area})}= \frac{b^2}{S}
\]
As it can be seen from the above formula, the glyph is a ligature between a capital A and a capital R, much as the \texttt{\string\AE} command produces the ligature \AE\ between a capital A and a capital E.
\end{abstract}

\section{Package usage}
The symbol \AR\ is accessed in \LaTeX\ by means of the package \pack{ar} and is produced by the command \cs{AR}, in both math and text modes.

The package is loaded by the usual command:
\begin{flushleft}
\cs{usepackage}\oarg{options}\Arg{ar}
\end{flushleft}
The available options are the following:
\begin{description}
\item[CM] is the default setting and produces glyphs that are consistent with Computer Modern, CM-super, EC, and Latin Modern fonts;
\item[TM] or \textbf{TX} selects glyphs that are suitable with the Times, and Times eXtended fonts, but they are generally suited with other narrow fonts as, for example, the Linux Libertine ones.
\item[PA] or \textbf{PX} selects glyphs that are suitable with Palatino, Palatino eXtended, Mathpazo, and other wide fonts.
\end{description}

These options have been defined to allow the consistent use of the aspect ratio symbol in documents typeset with fonts other than Computer Modern and its siblings. Hopefully additional options will be roved in the future for a more comprehensive font support.

\section{Package contents}

The package contains several files of different types:
\begin{itemize}
\item This \file{ar.tex} and its compiled result \file{ar.pdf}.
\item The \MF\ source files \file{ar}\meta{size}\file{.mf} in order to produce the bitmapped fonts, in case the user wanted to typeset a document in DVI format and wanted to preview it with a DVI viewer. The \meta{size} ranges from 5 to 12, in the usual sequence as any other math font in the \TeX\ system.
\item The \MF\ source files for sans serif medium and bold fonts in 10pt size and the only source file for the typewriter monospaced version of the font in 10 pt size.
\item The metric files \file{*.tfm} for both the bitmapped and vector fonts.
\item The vector font files for the Computer Modern version, \file{ar}\meta{series}\meta{size}\file{.pfb} includiong the single 10pt size  sans serif and typewriter style fonts, and the vector font files for the Times and Palatino variants, \file{amar}\meta{series}\file{i.pfb} and \file{apar}\meta{series}\file{i.pfb}. The meta{series} is either empty or equal to `b', for medium and bold series respectively.
\item The \file{ar.sty} extension file through which the suitable settings are made and the \AR\ symbol made available to the user.
\item The \file{aspectratio.map} file necessary to configure your system for having the vector typesetting engines access the vector fonts.
\end{itemize}


\section{Installing the package and the fonts}

If the whole package is not already installed by your \TeX\ system distribution, we suggest to create an \file{AspectRatio} folder under these branches of your personal (for individual usage) or local (for machine wide usage) \file{TEXMF} tree\footnote{Here we use the UNIX folder separator \texttt{/}; change \texttt{/} with \texttt{\textbackslash} on Windows platforms. Moreover we do not specify the full path from the disk root, but we show only the end branches preceded by an ellipsis.}:
\begin{itemize}
\item \file{.../doc/latex/AspectRatio/}: move this file{ar.pdf} file to this folder;
\item \file{.../source/latex/AspectRatio/}: move the corresponding \file{ar.tex} file to this folder;
\item \file{.../tex/latex/AspectRatio/}: move the \file{ar.sty} to this folder;
\item \file{.../fonts/source/public/AspectRatio/}: move all the \file{*.mf} files to this folder;
\item \file{.../fonts/tfm/public/AspectRatio/}: move all the \file{*.tfm} files to this folder;
\item \file{.../fonts/type1/public/AspectRatio/}: move all the \file{*.,pub} files to this folder;
\item \file{.../fonts/map/AspectRatio/}: move all the \file{*.map} files to this folder.
\end{itemize}
If your TeX distribution requires it, refresh the file name database according to the procedure described in your system guide.

In order to use the Type~1 fonts, you must follow the instructions that came with your \TeX\ system distribution; the idea with all distributions is to let the configuration file \file{updmap.cfg} know about the new map file;  you have to execute a \TeX\ system command  in order to regenerate the map file suitable for the pdftex, dvips, and dvipdfm programs; after the operation is completed the \LaTeX\ engine will use the bitmapped fonts in the DVI output file, while the other vector font oriented engines will use the vector fonts in Type~1 format.

\section{Author guide}

The symbol \AR, as a means for indicating the aspect ratio, is meaningful only in mathematics, so that only the ``italic'' shape makes sense. As an isolated symbol the \AR\ ligature might be used also in text mode outside a math expression.

Keeping in mind that only the ``italic'' shape is available, with the Computer Modern and the Times or Palatino variants, the ligature produced by \cs{AR} is sensitive to the text series declarations or commands.  In math mode the bold symbol is available only through the explicit command \cs{ARb}. This asymmetry arises in order to avoid defining yet another math font group with an alphabet for medium math and a variant for bold math. Remember that when typesetting math, the various typesetting engines can handle a maximum of 16 alphabets; it does not happen very often, but while testing this very package with different fonts we eventually exceeded this maxim number and we produced an immediate fatal error. Therefore we decided that for just one glyph it was totally useless to define a new math group and we went around this problem with a \cs{mathcoice} work-around that allows us to actually typeset in the proper math size within a box to be used in math mode; apparently complicated, but actually very simple. This, on the other side, forbids us to use the regular math font switching commands to adapt the font family to the requested one.

Table~\ref{tab:glyphs} shows the various ways to produce the \AR\ symbol in math and in text mode with the various families available with the Computer Modern compliant \AR\ symbol. With Times and Palatino there is only one family available, the serifed one, and the variant commands resort to the italic shape.

If you get the source file of this documentation (\file{ar.tex} and comment out certain lines in the preamble, while uncommenting certain other lines (clearly marked in the preamble itself) you can typeset again this same file with the Times o Palatino fonts and you can verify the outcome of the various commands in the above mentioned table and in the following examples.

\begin{table}
\vspace*{-\bigskipamount}
\caption{Symbols and commands in both math and text modes}\label{tab:glyphs}
\bigskip
{\centering
\begin{tabular}{lcccc}
\toprule
Description 	& Math	&	Math	& Text	&	Text	\\
				& symbol& command	&symbol	& command	\\
\midrule
Medium ligature	& \AR	& \cs{AR}	& \AR	& \cs{AR}	\\
Bold ligature 	&$\ARb$
						&\cs{ARb}
									&\textbf{\AR}
											&\cs{textbf}\Arg{\cs{AR}}\\
Medium sans serif ligature&		&			&\ARss
											&\cs{ARss}\\
Bold sans serif ligature	&		&			&\textbf{\ARss}
											&\cs{textbf}\Arg{\cs{ARss}}\\
Monospaced ligature		&		&			&\ARtt
											&\cs{ARtt}\\
\bottomrule
\end{tabular}
\par}
\medskip
{\footnotesize
By means of the specified options it is possible to get the corresponding glyphs in Times or Palatino. Remember, though, that both Times and Palatino have only the proportional serifed medium and bold fonts, so there is no possibility of using the sans serif or the monospaced version. Avoid using the Computer Modern monospaced version; it is available, but certainly the complex ligature does not fit well into the narrow character width of the monospaced fonts.\par}
\end{table}

Here we show the various series, shapes, and sizes available with the package; with the CM fonts and their siblings you get the various families produce the proper variations; with the Times and Platino variants you get only the italics medium and bold variations always in serifed italics.
\begin{center}
\noindent\begin{tabular}{ll}
(\aroption Regular)& {\tiny \AR} {\scriptsize \AR} {\footnotesize \AR} {\small \AR} {\normalsize \AR} {\large \AR} {\Large \AR} {\LARGE \AR} {\huge \AR} {\Huge \AR}\\
(\aroption Bold)& {\bfseries{\tiny \AR} {\scriptsize \AR} {\footnotesize \AR} {\small \AR} {\normalsize \AR} {\large \AR} {\Large \AR} {\LARGE \AR} {\huge \AR} {\Huge \AR}}\\
(\aroption Sans serif regular)& {\tiny \ARss} {\scriptsize \ARss} {\footnotesize \ARss} {\small \ARss} {\normalsize \ARss} {\large \ARss} {\Large \ARss} {\LARGE \ARss} {\huge \ARss} {\Huge \ARss}\\
(\aroption Sans serif bold)& {\bfseries{\tiny \ARss} {\scriptsize \ARss} {\footnotesize \ARss} {\small \ARss} {\normalsize \ARss} {\large \ARss} {\Large \ARss} {\LARGE \ARss} {\huge \ARss} {\Huge \ARss}}\\
(\aroption Monospaced regular)& {\tiny \ARtt} {\scriptsize \ARtt} {\footnotesize \ARtt} {\small \ARtt} {\normalsize \ARtt} {\large \ARtt} {\Large \ARtt} {\LARGE \ARtt} {\huge \ARtt} {\Huge \ARtt}
\end{tabular}
\end{center}

\section{Legal issues}
This work is distributed under the LaTeX Project Public Licence, version 1.3 or later; the Licence text is distributed with any distribution of the TEX system.

This package is temporarily maintained by Claudio Beccari \texttt{claudio dot beccari at gmail dot com}.

\end{document}


