summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/sepnum/sepnum-doc.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/sepnum/sepnum-doc.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/sepnum/sepnum-doc.tex')
-rw-r--r--macros/latex/contrib/sepnum/sepnum-doc.tex123
1 files changed, 123 insertions, 0 deletions
diff --git a/macros/latex/contrib/sepnum/sepnum-doc.tex b/macros/latex/contrib/sepnum/sepnum-doc.tex
new file mode 100644
index 0000000000..0a5ce06bb4
--- /dev/null
+++ b/macros/latex/contrib/sepnum/sepnum-doc.tex
@@ -0,0 +1,123 @@
+\documentclass[pagesize=auto, fontsize=12pt, DIV=11, parskip=half]{scrartcl}
+
+\usepackage{fixltx2e}
+\usepackage{etex}
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage[svgnames]{xcolor}
+\usepackage{listings}
+\usepackage{microtype}
+\usepackage{hyperref}
+
+\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
+\newcommand*{\pkg}[1]{\textsf{#1}}
+\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
+\makeatletter
+\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
+\makeatother
+\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
+\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
+
+\addtokomafont{title}{\rmfamily}
+
+\lstset{%
+ language=[LaTeX]TeX,%
+ columns=flexible,%
+ upquote=true,%
+ numbers=left,%
+ basicstyle=\ttfamily,%
+ keywordstyle=\color{Navy},%
+ commentstyle=\color{DimGray},%
+ stringstyle=\color{SeaGreen},%
+ numberstyle=\scriptsize\color{SlateGray}%
+}
+
+\title{The \pkg{sepnum} package\thanks{This manual corresponds to \pkg{sepnum}~v2.0, dated~1996/09/05.}}
+\subtitle{Separated numbers}
+\author{Bernd Raichle\thanks{\mail{Raichle@Informatik.Uni-Stuttgart.de}}}
+\date{1996/09/05}
+
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+ \noindent
+ This package provides a means of formatting numbers
+ with (a) a decimal separator different of the default (`.')
+ and (b) a separator (default `,') every three digits.
+
+ First version of this package was posted to the newsgroup
+ `\texttt{de.comp.tex}' November 6th, 1995 (as `\pkg{printnum.sty}').
+\end{abstract}
+
+
+\section{Licensing condition}
+
+This program may be redistributed and/or modified under the terms
+of the \LaTeX\ Project Public License, either version~1.0 of this
+license, or (at your option) any later version.
+The latest version of this license is in \href{http://ctan.org/macros/latex/base/lppl.txt}{\texttt{CTAN:macros/latex/base/lppl.txt}}.
+
+
+\section{Usage}
+
+The macro
+%
+\begin{quote}
+ \cmd{\sepnum}\marg{c}\marg{sbc}\marg{sac}\marg{number}
+\end{quote}
+%
+produces the \meta{number} with the decimal point replaced by \meta{c}
+and the separator \meta{sbc} every three digits in the integer part,
+the separator \meta{sac} every three digits in the fractional part
+of \meta{number}. \cmd{\sepnum} is \emph{fully expandable} and \emph{not} fragile,
+unless one of \meta{c}, \meta{sbc}, or \meta{sac} is.
+
+\minisec{Example:}
+%
+\begin{itemize}
+\item a non realistic example to show the capabilities of \cmd{\sepnum} \\
+ \verb|\sepnum{,}{*}{-}{1234.5678}| $\Rightarrow$ 1*234,567-8
+\item to print a number inserting small spaces each three digits \\
+ \verb|\sepnum{.}{\,}{\,}{1234.5678}| $\Rightarrow$ 1\,234.567\,8
+\end{itemize}
+
+
+Additionally this package provides
+%
+\begin{quote}
+ \cmd{\sepnumform}\marg{c}\marg{sbc}\marg{sac}\marg{\LaTeX-counter}
+\end{quote}
+%
+to use \cmd{\sepnum} with a \LaTeX\ counter.
+
+
+\minisec{Example (with a decimal comma in the print form \cmd{\the\meta{counter}}):}
+%
+\begin{lstlisting}
+\newcounter{money}
+\renewcommand{\themoney}{\sepnumform{,}{.}{}{money}}
+
+\setcounter{money}{-1000}
+You have \themoney{} left.
+\end{lstlisting}
+%
+(For compatibility with `\pkg{printnum.sty}', the macros
+\cmd{\printnum}\marg{number} and \cmd{\print\-numKomma}\slash\cmd{\printnumTrenner}
+still exist.)
+
+
+\section{See also}
+
+\begin{itemize}
+\item Package ``\pkg{comma.sty}'' by David Carlisle which provides
+ similar features for integers only, i.\,e.\ it misses support
+ for the decimal point/comma in fixed point numbers.
+\item Package ``\pkg{numprint.sty}'' by Harald Harders supporting
+ formatting of numbers given as \texttt{1234e5} in addition.
+\end{itemize}
+
+\end{document}