% Examples for the fancynum package
% J.J.Green 1999
% $Id: examples.tex,v 1.7 2000/08/08 22:29:25 jjg Exp $

\documentclass[a4paper]{article}
\usepackage[english,tight]{fancynum}
\usepackage{xspace}
\title{Example \texttt{fancynum} output}
\date{17th March 2000}
\author{J. J. Green}

\begin{document}
\maketitle

This file contains some of examples of the use of the package.
Table~\ref{dbltable} shows some examples of the setting
of a number ($\pi$) for different \emph{printf} format strings.
The table was generated entirely automatically by the C program
\texttt{tables.c} include in the distribution. The group symbol used is
the thinspace.
\setfnumgsym{\,}
\input{dbltable}

The figures in Table~\ref{factorial} are also set by the package.
This table shows some values of the factorial squared, and is 
included to give an example of a real table with integers of 
widely varying magnitude. The group symbol used here is the comma.
\begin{table}[tbh]
\begin{center}
\setfnumgsym{{,}}
\begin{tabular}{|c|r|}
\hline
$n$ & $(n!)^2$ \\ 
\hline
$1$ & $\fnum{1}$ \\
$2$ & $\fnum{4}$ \\
$3$ & $\fnum{36}$ \\
$4$ & $\fnum{576}$ \\
$5$ & $\fnum{14400}$ \\
$6$ & $\fnum{518400}$ \\
$7$ & $\fnum{25401600}$ \\
$8$ & $\fnum{1625702400}$ \\
$9$ & $\fnum{131681894400}$ \\
\hline
\end{tabular}
\end{center}
\caption{Some values of $(n!)^2$\label{factorial}}
\end{table}

\newcommand{\fntest}[1]{\texttt{#1} ($\fnum{#1}$)\xspace}
An earlier version of the package had a bug which
mis-set the examples \fntest{3.14e1}, \fntest{3.14e-1}
and \fntest{3.14e000001}, but these problems are now
fixed.

\end{document}