summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/fancynum
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-09 00:49:07 +0000
committerKarl Berry <karl@freefriends.org>2006-01-09 00:49:07 +0000
commit007f67a693e4d031fd3d792df8e4d5f43e2cb2e7 (patch)
tree90d17e00e572ecb1e24764b6f29c80e098b08d29 /Master/texmf-dist/doc/latex/fancynum
parent950209b26f70aa87ed07c54f82a95b6f03b7c3a0 (diff)
doc/latex
git-svn-id: svn://tug.org/texlive/trunk@84 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/fancynum')
-rw-r--r--Master/texmf-dist/doc/latex/fancynum/README39
-rw-r--r--Master/texmf-dist/doc/latex/fancynum/aue.txt182
-rw-r--r--Master/texmf-dist/doc/latex/fancynum/ctt.txt238
-rw-r--r--Master/texmf-dist/doc/latex/fancynum/dbltable.tex17
-rw-r--r--Master/texmf-dist/doc/latex/fancynum/examples.tex58
5 files changed, 534 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/fancynum/README b/Master/texmf-dist/doc/latex/fancynum/README
new file mode 100644
index 00000000000..aec23bb0e1b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/fancynum/README
@@ -0,0 +1,39 @@
+README for the fancynum package
+-------------------------------
+
+Fancynum is a LaTeX package for typestting numbers, in particular
+those numbers written by computers.
+
+To install the package
+* LaTeX the file fancynum.ins
+* move fancynum.sty to somewhere where LaTeX can find it
+
+For documentation, LaTeX the file fancynum.dtx.
+
+An example file, examples.tex, requires the file dbltable.tex
+which is produced by the "table" program. If you have the gcc
+C compiler and "make" then
+
+ make examples.dvi
+
+should do the work for you.
+
+All files in the package are released under the the terms of
+the LaTeX Project Public License, as described in lppl.txt
+in the base LaTeX distribution. Either version 1.0 or, at
+your option, any later version.
+
+The most recent version of the package will normally be
+available on CTAN, or at the author's homepage
+
+ www.arbs.demon.co.uk
+
+Bugs reports and suggestions can be sent to
+
+ J. J. Green,
+ Dept Applied Mathematics,
+ University of Sheffield, UK.
+ j.j.green@shef.ac.uk
+
+$Id: README,v 1.3 2000/03/20 14:30:43 ap1jjg Exp $
+
diff --git a/Master/texmf-dist/doc/latex/fancynum/aue.txt b/Master/texmf-dist/doc/latex/fancynum/aue.txt
new file mode 100644
index 00000000000..58d9b75b2e5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/fancynum/aue.txt
@@ -0,0 +1,182 @@
+aue.txt
+-------
+
+$Id: aue.txt,v 1.1 2000/03/15 18:29:52 ap1jjg Exp $
+
+Some correspondance on alt.usage.english. I am curious as to
+what you should call the decimal point in a number qua symbol.
+The correspondance was inconclusive, and I decided to use
+"decimal symbol" and "group symbol" after all.
+
+---------------------------------------------------------------
+
+Punctuation of numbers
+
+Hello all
+
+I need to refer to the punctation used in numbers, eg.,
+
+ 3.141,592,653
+
+in a language-independant fashion. Specifically to
+* the "decimal separator" ("." or centered dot in English, "," in French)
+* the "digit-triple separator" ("," in English, "." in French)
+
+Would anyone have any suggestions or references?
+
+Thanks
+
+-j
+--
+J.J.Green, Dept. Applied Math. University of Sheffield, UK
+http://www.arbs.demon.co.uk
+
+From: "Frank Peelo" <fpeelo@indigo.ie>
+Subject: Re: Punctuation of numbers
+Newsgroups: alt.usage.english
+Date: Tue, 14 Mar 2000 14:19:26 -0000
+Xref: news.shef.ac.uk alt.usage.english:415923
+
+
+john green <ap1jjg@gold.cics.shef.ac.uk> wrote in message
+news:s8xpusxbud1.fsf@gold.cics.shef.ac.uk...
+> Hello all
+>
+> I need to refer to the punctation used in numbers, eg.,
+>
+> 3.141,592,653
+>
+> in a language-independant fashion. Specifically to
+> * the "decimal separator" ("." or centered dot in English, "," in French)
+> * the "digit-triple separator" ("," in English, "." in French)
+
+Do all languages group digits in threes? Windows, at least, allows you to
+specify the number of digits in a group, which suggests that some regions
+use different groupings.
+FP
+
+
+From: brahms@mindspring.com (Stan Brown)
+Subject: Re: Punctuation of numbers
+Newsgroups: alt.usage.english
+Date: Tue, 14 Mar 2000 15:46:36 -0500
+Organization: Oak Road Systems
+Xref: news.shef.ac.uk alt.usage.english:416044
+
+Said ap1jjg@gold.cics.shef.ac.uk (john green) in
+alt.usage.english:
+>Hello all
+>
+>I need to refer to the punctation used in numbers, eg.,
+>
+> 3.141,592,653
+>
+>in a language-independant fashion. Specifically to
+>* the "decimal separator" ("." or centered dot in English, "," in French)
+>* the "digit-triple separator" ("," in English, "." in French)
+
+First, I don't know of any widespread style that puts commas
+*after* the decimal point.
+
+Second, in 234,123.33 the comma is a "thousands separator", in my
+vocabulary anyway. ISO Handbook 1, /Units of Measurement/, calls
+the separator between the whole and fractional parts a "decimal
+sign". Microsloth Windows calls them "digit grouping symbol" and
+"decimal symbol".
+
+The preferred decimal sign is the comma, and the preferred
+thousands separator is a thin space. The American way is a period
+and a comma, respectively.
+
+--
+Stan Brown, Oak Road Systems, Cleveland, Ohio, USA
+ http://www.mindspring.com/~brahms/
+alt.usage.English intro and FAQs: http://go.to/aue
+WWWebster online dictionary: http://www.m-w.com/mw/netdict.htm
+more FAQs: http://www.mindspring.com/~brahms/faqget.htm
+
+From: "Bruce McIntyre" <mcbruce1@home.nospam.com>
+Subject: Re: Punctuation of numbers
+Newsgroups: alt.usage.english
+Date: Wed, 15 Mar 2000 02:20:53 GMT
+Organization: @Home Network Canada
+Xref: news.shef.ac.uk alt.usage.english:416159
+
+
+"Stan Brown" <brahms@mindspring.com> wrote in message
+news:MPG.13386f363c85ff8298adbe@news.mindspring.com...
+| Said ap1jjg@gold.cics.shef.ac.uk (john green) in
+| alt.usage.english:
+|
+| Second, in 234,123.33 the comma is a "thousands separator", in
+my
+| vocabulary anyway. ISO Handbook 1, /Units of Measurement/, calls
+| the separator between the whole and fractional parts a "decimal
+| sign". Microsloth Windows calls them "digit grouping symbol" and
+| "decimal symbol".
+|
+| The preferred decimal sign is the comma, and the preferred
+| thousands separator is a thin space. The American way is a
+period
+| and a comma, respectively.
+|
+
+I like the thin space as a thousands separator where possible. In
+newsgroups, which most of us read in monospaced text (and if you
+don't you probably should), I think the comma is a reasonable
+second choice. My sense of logic says that if the comma is going
+to be sometimes used as a thousands separator, it should never be
+used as a decimal symbol, as is commonly done in Europe (and
+perhaps elsewhere).
+
+Probably the reason Windows calls it a digit grouping symbol is
+that sometimes long decimals are separated, as in "1 Plekka =
+0.000 276 4 Euros." (Don't ask me what a Plekka is; I made it
+up.) It's easier to see from this that 27,640 Plekka make 1 Euro.
+I know, it's easier to write "27,640 Plekka = 1 Euro" but not if
+it's part of a list...
+
+I agree that commas/periods should never be used as decimal
+separators.
+
+
+--
+.-------------.----------------------------------------.
+| McBruce | Note new email: mcbruce1@home.com |
+| ICQ 6797517 | Now surfing UseNet via cable modem! |
+}-------------^----------------------------------------{
+| Bruce McIntyre, 6636 Dow Ave., #203 |
+| 604/438-9735 Burnaby BC, Canada V5H 3C9 |
+`------------------------------------------------------'
+
+
+Date: Tue, 14 Mar 2000 18:04:35 +0100 (MET)
+From: Arndt Jonasson <arndt@erix.ericsson.se>
+To: ap1jjg@gold.shef.ac.uk
+
+In article <s8xpusxbud1.fsf@gold.cics.shef.ac.uk> you write:
+>Hello all
+>
+>I need to refer to the punctation used in numbers, eg.,
+>
+> 3.141,592,653
+>
+>in a language-independant fashion. Specifically to
+>* the "decimal separator" ("." or centered dot in English, "," in French)
+>* the "digit-triple separator" ("," in English, "." in French)
+>
+>Would anyone have any suggestions or references?
+
+I don't know good names for them, but note that a blank is sometimes
+used as a "digit-triple separator", and that in Japanese, they separate
+digit-quadruples instead. Maybe "digit-group separator" is a better
+term.
+
+--
+Arndt Jonasson Ericsson Utvecklings AB
+arndt@erix.ericsson.se ÄT2/UAB/F/P
++46 8 719 75 87 126 25 Stockholm
+
+
+
+
diff --git a/Master/texmf-dist/doc/latex/fancynum/ctt.txt b/Master/texmf-dist/doc/latex/fancynum/ctt.txt
new file mode 100644
index 00000000000..295e6907c75
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/fancynum/ctt.txt
@@ -0,0 +1,238 @@
+Some anwsers from comp.text.tex (Nov 99)
+========================================
+
+$Id: ctt.txt,v 1.3 2000/03/15 18:31:04 ap1jjg Exp $
+
+From: oberdiek@ruf.uni-freiburg.de (Heiko Oberdiek)
+Subject: Re: TeX Macros
+Newsgroups: comp.text.tex
+Date: Wed, 03 Nov 1999 12:44:39 GMT
+Organization: Rechenzentrum der Universitaet Freiburg, Germany
+
+john green <ap1jjg@gold.cics.shef.ac.uk> wrote:
+
+>The macro \split should take one argument which
+>may or may not contain an "e". If the argument
+>contains an e, say 123e45, then \split should expand
+>to \a{123}{45}, and if not, say 12345, then \split
+>should expand to \b{12345}.
+>
+>You can probably guess that I want to use TeX to format
+>floating point numbers. This problem arises since the
+>C call
+>
+> printf("%g",x)
+>
+>will write x in exponetial format only for x of large or
+>small modulus.
+
+%%% cut %%% test.tex %%% cut %%%
+\def\floatsplit#1{\dofloatsplit#1e\END}
+\def\dofloatsplit#1e#2\END{%
+ \ifx\\#2\\%
+ \ReturnAfterElseFi{%
+ \b{#1}%
+ }%
+ \else
+ \ReturnAfterFi{%
+ \RemoveE{#1}#2\END
+ }%
+ \fi
+}
+\def\RemoveE#1#2e\END{\a{#1}{#2}}
+\long\def\ReturnAfterFi#1\fi{\fi#1}
+\long\def\ReturnAfterElseFi#1\else#2\fi{\fi#1}
+
+\def\a#1#2{$#1\cdot10^{#2}$}
+\def\b#1{$#1$}
+[\floatsplit{123e456}][\floatsplit{1}]
+\bye
+%%% cut %%% test.tex %%% cut %%%
+
+Yours sincerely
+ Heiko <oberdiek@ruf.uni-freiburg.de>
+
+=========================================================
+
+From: Norman Gray <ng3j@udcf.gla.ac.uk>
+Subject: Re: TeX Macros
+Newsgroups: comp.text.tex
+Date: 3 Nov 1999 12:01:02 -0000
+Organization: University of Glasgow
+
+Greetings,
+
+john green <ap1jjg@gold.cics.shef.ac.uk> writes:
+
+>The macro \split should take one argument which
+>may or may not contain an "e". If the argument
+>contains an e, say 123e45, then \split should expand
+>to \a{123}{45}, and if not, say 12345, then \split
+>should expand to \b{12345}.
+
+How's about:
+
+\documentclass{article}
+
+\def\a#1#2{(A #1 #2)}
+\def\b#1{(B #1)}
+
+\makeatletter
+\def\@split#1e#2e#3\end@split{%
+ \xdef\@gtempa{#2}%
+ \ifx\@gtempa\@empty
+ \b{#1}%
+ \else
+ \a{#1}{#2}%
+ \fi}
+\def\split#1{\@split#1ee\end@split}
+
+\begin{document}
+
+\tracingmacros=2
+\split{123e45}
+\split{12345}
+\tracingmacros=0
+
+\end{document}
+
+Norman
+
+------------------------------------------------------------------
+Norman Gray http://www.astro.gla.ac.uk/users/norman/
+
+=========================================================
+
+From: Michael Downes <mjd@epsilon.ams.org>
+Subject: Re: TeX Macros
+Newsgroups: comp.text.tex
+Date: 04 Nov 1999 12:40:21 -0500
+Organization: American Mathematical Society
+
+john green <ap1jjg@gold.cics.shef.ac.uk> writes:
+
+> I used a modifed version of Heikos solution in the end
+>
+> \def\frealsplit#1e#2e#3 {%
+> \xdef\fgtempa{#2}%
+> \ifx\fgtempa\empty
+> \fdecimal{#1}%
+> \else
+> \fexp{#1}{#2}%
+> \fi}
+> \def\freal#1{\frealsplit#1ee }
+
+If you change your definition of \fdecimal slightly so that it takes two
+arguments, but discards the second one, then you could let TeX's
+argument scanning handle the branching and do without \fgtempa and \ifx:
+
+\def\freal#1{\frealsplit#1ee\fexp\fdecimal\empty}
+\def\frealsplit#1e#2e#3#4#5{#4{#1}{#2}}
+
+E.g.:
+
+\def\fdecimal#1#2{Decimal #1}
+\def\fexp#1#2{Exponential #1 E #2}
+
+Regards, Michael Downes
+
+=========================================================
+
+From: oberdiek@ruf.uni-freiburg.de (Heiko Oberdiek)
+Subject: Re: TeX Macros
+Newsgroups: comp.text.tex
+Date: Fri, 05 Nov 1999 04:04:43 GMT
+Organization: Rechenzentrum der Universitaet Freiburg, Germany
+
+On 04 Nov 1999 12:40:21 -0500, Michael Downes <mjd@epsilon.ams.org>
+wrote:
+
+>john green <ap1jjg@gold.cics.shef.ac.uk> writes:
+>
+>> \def\frealsplit#1e#2e#3 {%
+>> \xdef\fgtempa{#2}%
+>> \ifx\fgtempa\empty
+>> \fdecimal{#1}%
+>> \else
+>> \fexp{#1}{#2}%
+>> \fi}
+>> \def\freal#1{\frealsplit#1ee }
+>
+>If you change your definition of \fdecimal slightly so that it takes two
+>arguments, but discards the second one, then you could let TeX's
+>argument scanning handle the branching and do without \fgtempa and \ifx:
+>
+>\def\freal#1{\frealsplit#1ee\fexp\fdecimal\empty}
+>\def\frealsplit#1e#2e#3#4#5{#4{#1}{#2}}
+
+Beautiful!
+
+>E.g.:
+>
+>\def\fdecimal#1#2{Decimal #1}
+>\def\fexp#1#2{Exponential #1 E #2}
+
+The second argument of \fdecimal can easily be removed:
+
+\def\freal#1{\frealsplit#1ee\fexp\frealdecimal\empty}
+\def\frealsplit#1e#2e#3#4#5{#4{#1}{#2}}
+\def\frealdecimal#1#2{\fdecimal{#1}}
+
+\def\fdecimal#1{Decimal #1}
+\def\fexp#1#2{Exponential #1 E #2}
+
+Best regards
+ Heiko <oberdiekf@ruf.uni-freiburg.de>
+
+=========================================================
+
+From: asnd@erich.triumf.ca (Donald Arseneau)
+Subject: Re: formatting numbers
+Newsgroups: comp.text.tex
+Date: 10 Nov 1999 16:55 PST
+Organization: TRIUMF: Canada's National Meson Facility
+
+In article <s8xvh7b4vn0.fsf@gold.cics.shef.ac.uk>, john green
+<ap1jjg@gold.cics.shef.ac.uk> writes...
+>I've almost finished doing just this
+
+ That brings to mind your earlier question about splitting text at
+ an "e" (or E). There's no real need, and it may not be the best way.
+ Let me put on my \mathcode"8000 hat...
+
+ \newcommand\sn[1]{\ensuremath{\bgroup
+ % \mathcode`e="8000 \mathcode`E="8000 % Avoid characters ` and "
+ \mathcode 69=32768 \mathcode 101=32768
+ #1\egroup}}
+
+ \def\SciNotate{\egroup \times 10^\bgroup}
+ {
+ \def\\#1{\global\let#1\SciNotate}
+ \catcode 69=13 \catcode 101=13
+ \\e \\E
+ }
+
+
+ (I din't use one of the "nice" ways to define active characters,
+ such as \actively\let e=\SciNotate.)
+
+ Maybe you also have niceties like converting E+07 to \times 10^{7},
+ but that too could be added here.
+
+ I think there is a general benefit form not parsing the text of the
+ argument, but the benefit is small here, as I expect it is intended
+ for automatically typesetting computer output.
+
+ Another thing to look for is the dcolumn package, using "e" as the
+ "decimal" character. This will align numbers on the exponent in a
+ table.
+
+ Donald Arseneau asnd@triumf.ca
+
+End of returned message
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/latex/fancynum/dbltable.tex b/Master/texmf-dist/doc/latex/fancynum/dbltable.tex
new file mode 100644
index 00000000000..dd46482854a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/fancynum/dbltable.tex
@@ -0,0 +1,17 @@
+% automatically generated by tables.c
+\begin{table}[tbh]
+\begin{center}
+\begin{tabular}{|c|c|c|}
+\hline
+Format & Output & Typeset \\ \hline
+\verb|%f| & \verb|3.141593| & $\fnum{3.141593}$ \\
+\verb|%e| & \verb|3.141593e+00| & $\fnum{3.141593e+00}$ \\
+\verb|%g| & \verb|3.14159| & $\fnum{3.14159}$ \\
+\verb|%.9f| & \verb|3.141592654| & $\fnum{3.141592654}$ \\
+\verb|%.9e| & \verb|3.141592654e+00| & $\fnum{3.141592654e+00}$ \\
+\verb|%.9g| & \verb|3.14159265| & $\fnum{3.14159265}$ \\
+\hline
+\end{tabular}
+\end{center}
+\caption{Double conversions for $\pi$\label{dbltable}}
+\end{table}
diff --git a/Master/texmf-dist/doc/latex/fancynum/examples.tex b/Master/texmf-dist/doc/latex/fancynum/examples.tex
new file mode 100644
index 00000000000..3909c04c2cd
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/fancynum/examples.tex
@@ -0,0 +1,58 @@
+% 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}
+
+