4

I try to get the Aspect Ratio Symbol used in aeronautics (A and R together see p.78 of this document) but it requires the ar package. I call \usepackage{ar} in my code and get the error: file ar.sty not found.

I already tried to install it under Windows some month ago (didn't manage it) but now I'm running Ubuntu so I hope I'll find someone who knows how to fix this. I would also accept a solution using another package as long as it produces this symbol (but I haven't been able to find one so far).

  • 1
    under ubuntu all you need to do is install the texlive-fonts-extra package, using synaptic or apt-get. – Sparkler Nov 27 '14 at 4:25
7

You can simply put ar.sty package in your working directory. Here is it's code:

%
% This package is for using the aspect ratio symbol in math mode and in
% text mode by means of the command \AR.
%
% It is supposed to work both with LaTeX209 and LaTeXe
% It requires the METAFONT files ar5.mf, ar6.mf, ar7.mf, ar8.mf, ar9.mf,
%                                ar10.mf, ar12.mf
%
\ifx\documentclass\undefined
% With LaTeX209 the symbol is available in just one size (by default)
% but the user can edit the next line in order to get the size s/he wants
  \newfont{\ar}{ar10 at 10pt}
  \load{\normalsize}{\ar}
  \def\AR{\mbox{\ar A}}
\else
% While with LaTeXe all standard sizes are available 
% (no bold version available...sorry!) 
  \DeclareFontFamily{U}{ar}{}
  \DeclareFontShape{U}{ar}{m}{it}%
       {<5><6><7><8><9>gen*ar%
        <10><10.95>ar10%
        <12><14.4><17.28><20.74><24.88>ar12%
        }{}
  \DeclareFontShape{U}{ar}{b}{it}%
     {<->ssub*ar/m/it}{}
  \DeclareFontShape{U}{ar}{bx}{it}%
     {<->ssub*ar/m/it}{}
  \DeclareMathAlphabet{\mar}{U}{ar}{m}{it}%
  \SetMathAlphabet{\mar}{normal}{U}{ar}{m}{it}%
  \SetMathAlphabet{\mar}{bold}{U}{ar}{bx}{it}% actually uses medium series
  \if@compatibility
   \def\tar{\fontencoding{U}\fontfamily{ar}\itshape}
   \DeclareRobustCommand{\ar}{\ifmmode\let\cf@ar\mar\else\let\cf@ar\tar\fi\cf@ar}
  \else
   \DeclareOldFontCommand{\ar}{\fontencoding{U}\fontfamily{ar}\itshape}{\mar}%
  \fi
  \DeclareRobustCommand{\AR}{{\ar A}}
\fi
\endinput

Then you have to make sure that you have at least the ar10.mf file in the same directory.

And if you want all the sizes, use the files from this repository.

|improve this answer|||||
  • 1
    If you are running Linux the simplest way to use the ar package is to run the command sudo apt-get install texlive-fonts-extra and that should do the work for you. – Ludovic C. Jun 11 '13 at 20:40
7

Based on David Carlisle’s answer and some experimentation:

\documentclass{article}

\usepackage{trimclip}

\begin{document}

\def\AR{\clipbox{0pt 0pt .32em 0pt}\AE\kern-.30emR}

              A\AE \AR R
\large        A\AE \AR R
\footnotesize A\AE \AR R

\itshape      A\AE \AR R
\large        A\AE \AR R
\footnotesize A\AE \AR R

\end{document}

Yields this result, which I think is pretty close to what the ar and aspectratio packages provide:

enter image description here

Edit: Since this symbol will be used in math mode, and is apparently always italicised, use this definition instead (requires amsmath):

\def\AR{\text{\itshape\clipbox{0pt 0pt .32em 0pt}\AE\kern-.30emR}}
|improve this answer|||||
  • Very nice solution which does what I was looking for. However, in my case, I found a way around running the appropriate command in a terminal to install easily the ar package (sudo apt-get install texlive-fonts-extra). That is a little bit overkilled to install all the extra fonts for only this symbol but actually a lot of them might turn useful. – Ludovic C. Jun 11 '13 at 20:43
  • 1
    A pirate goes into a bar...... – percusse Jun 11 '13 at 20:58
4

Using a metafont font for just one symbol might be considered excessive these days, and the generated bitmaps won't work too well in pdf viewers. An alternative would be to just bump an A and R together:

enter image description here

You can fine tune the spacing a bit more, especially if you are using a different base font.

\documentclass{article}

\usepackage{trimclip}

\begin{document}



\def\AR{\clipbox{0pt 0pt .35em 0pt}{\textit{\bfseries A}}\kern-.05emR}

\AR  \large \AR \footnotesize \AR


\end{document}

An alternative suggested in the comments is

\def\AR{\clipbox{0pt 0pt .35em 0pt}{\textit{\bfseries \AE}}\kern-.4em\textit{\bfseries R}}
|improve this answer|||||
  • Nice solution quite light and handy but I am really looking for the symbol as presented in the link of the question. – Ludovic C. Jun 11 '13 at 17:03
  • @LudovicC. OK then no problem to accept the other answer:-) but remember it is a bitmap font so won't look so nice in pdf:-) – David Carlisle Jun 11 '13 at 17:15
  • @LudovicC. What are you doing with \textbf{\bfseries R} exactly? Please ask the owner of the answer first before you edit it. It saves lots of trouble – percusse Jun 11 '13 at 18:05
  • Sorry it is a mistyping the command is actually \textit{\bfseries R} but as it is only a two caracters correction I cannot edit it. Sorry again! – Ludovic C. Jun 11 '13 at 18:10
  • @LudovicC. I rolled the edit back as it made the code and image not match, but added the \AE code as an alternative at the end. – David Carlisle Jun 11 '13 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.