| 1 |
% Examples for the fancynum package |
| 2 |
% J.J.Green 1999 |
| 3 |
% $Id: examples.tex,v 1.7 2000/08/08 22:29:25 jjg Exp $ |
| 4 |
|
| 5 |
\documentclass[a4paper]{article} |
| 6 |
\usepackage[english,tight]{fancynum} |
| 7 |
\usepackage{xspace} |
| 8 |
\title{Example \texttt{fancynum} output} |
| 9 |
\date{17th March 2000} |
| 10 |
\author{J. J. Green} |
| 11 |
|
| 12 |
\begin{document} |
| 13 |
\maketitle |
| 14 |
|
| 15 |
This file contains some of examples of the use of the package. |
| 16 |
Table~\ref{dbltable} shows some examples of the setting |
| 17 |
of a number ($\pi$) for different \emph{printf} format strings. |
| 18 |
The table was generated entirely automatically by the C program |
| 19 |
\texttt{tables.c} include in the distribution. The group symbol used is |
| 20 |
the thinspace. |
| 21 |
\setfnumgsym{\,} |
| 22 |
\input{dbltable} |
| 23 |
|
| 24 |
The figures in Table~\ref{factorial} are also set by the package. |
| 25 |
This table shows some values of the factorial squared, and is |
| 26 |
included to give an example of a real table with integers of |
| 27 |
widely varying magnitude. The group symbol used here is the comma. |
| 28 |
\begin{table}[tbh] |
| 29 |
\begin{center} |
| 30 |
\setfnumgsym{{,}} |
| 31 |
\begin{tabular}{|c|r|} |
| 32 |
\hline |
| 33 |
$n$ & $(n!)^2$ \\ |
| 34 |
\hline |
| 35 |
$1$ & $\fnum{1}$ \\ |
| 36 |
$2$ & $\fnum{4}$ \\ |
| 37 |
$3$ & $\fnum{36}$ \\ |
| 38 |
$4$ & $\fnum{576}$ \\ |
| 39 |
$5$ & $\fnum{14400}$ \\ |
| 40 |
$6$ & $\fnum{518400}$ \\ |
| 41 |
$7$ & $\fnum{25401600}$ \\ |
| 42 |
$8$ & $\fnum{1625702400}$ \\ |
| 43 |
$9$ & $\fnum{131681894400}$ \\ |
| 44 |
\hline |
| 45 |
\end{tabular} |
| 46 |
\end{center} |
| 47 |
\caption{Some values of $(n!)^2$\label{factorial}} |
| 48 |
\end{table} |
| 49 |
|
| 50 |
\newcommand{\fntest}[1]{\texttt{#1} ($\fnum{#1}$)\xspace} |
| 51 |
An earlier version of the package had a bug which |
| 52 |
mis-set the examples \fntest{3.14e1}, \fntest{3.14e-1} |
| 53 |
and \fntest{3.14e000001}, but these problems are now |
| 54 |
fixed. |
| 55 |
|
| 56 |
\end{document} |
| 57 |
|
| 58 |
|