diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2011-08-03 12:57:44 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2011-08-03 12:57:44 +0000 |
commit | a397305833a8a2a6a3a3cacbc0b12c7f8c9f1ea6 (patch) | |
tree | 40cd8add69efdcebb10fed7236ff7cee16e8afdb /Master | |
parent | 20324eb7345321b05affc375f49c9e24cb674eee (diff) |
decimal 2011/06/03 v1.1 (with pdf doc)
git-svn-id: svn://tug.org/texlive/trunk@23374 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/decimal/decimal.pdf | bin | 0 -> 187033 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/decimal/decimal.dtx | 309 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/decimal/decimal.ins | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/decimal/decimal.sty | 6 |
4 files changed, 218 insertions, 105 deletions
diff --git a/Master/texmf-dist/doc/latex/decimal/decimal.pdf b/Master/texmf-dist/doc/latex/decimal/decimal.pdf Binary files differnew file mode 100644 index 00000000000..52116c6682b --- /dev/null +++ b/Master/texmf-dist/doc/latex/decimal/decimal.pdf diff --git a/Master/texmf-dist/source/latex/decimal/decimal.dtx b/Master/texmf-dist/source/latex/decimal/decimal.dtx index 545f0e1b51c..6d0094c732f 100644 --- a/Master/texmf-dist/source/latex/decimal/decimal.dtx +++ b/Master/texmf-dist/source/latex/decimal/decimal.dtx @@ -15,7 +15,7 @@ %% Right brace \} Tilde \~} %\iffalse % -% (c) copyright 2003 A Syropoulos & RWD Nickalls +% (c) copyright 2003-2011 A Syropoulos & RWD Nickalls % This program can be redistributed and/or modified under the terms % of the LaTeX Project Public License Distributed from CTAN % archives in directory macros/latex/base/lppl.txt; either @@ -28,7 +28,7 @@ % Please report errors or suggestions for improvement to % % Apostolos Syropoulos and/or Dick Nickalls -% apostolo@obelix.ee.duth.gr dicknickalls@compuserve.com +% asyropoulos@yahoo.com dick@nickalls.org % %\fi % \CheckSum{21} @@ -36,13 +36,46 @@ % %<decimal, >\ProvidesFile{decimal.sty} % -%<decimal, > [2003/07/12 v1.0 Package `decimal.sty'] +%<decimal, > [2011/06/03 v1.1 Package `decimal.sty'] % % \begin{macrocode} %<*driver> \documentclass{ltxdoc} +\usepackage{ifpdf} +\newcommand{\journal}[1]{\textit{#1}} +\newcommand{\book}[1]{\textit{#1}} +\newcommand{\vol}[1]{\underline{#1}} +\newcommand{\etal}{\textit{et al.}} +\newcommand{\syntax}[1]{\noindent\texttt{#1}} +\newcommand{\command}[1]{$\langle$\texttt{#1}$\rangle$} +\pagestyle{myheadings} +\markright{A Syropoulos \& RWD Nickalls\hspace{2cm}\journal{The decimal package}} +\ifpdf + \usepackage[verbose]{microtype} + \usepackage[a4,pdftex]{crop} + \pdfinfo{/Title (The `decimal' package: (version 1.1)) + /Subject (typesetting tex macro package) + /Author (A Syropoulos and RWD Nickalls, 2011) + /Keywords (typesetting, tex, latex, mathematics, macros, mathematics) + } + \usepackage[unicode]{hyperref} + \hypersetup{debug=true,pdftoolbar=true, pdfmenubar=true, plainpages=false, + breaklinks=true, linktocpage=true, bookmarksopen=true, bookmarksopenlevel=2, + bookmarksnumbered=true, bookmarkstype=toc, pdfwindowui=true, + hyperindex, hyperfigures=true, hyperfootnotes, + colorlinks, urlcolor=blue, linkcolor=blue, + pdfstartview=FitH, pdfview=FitH, pdfcenterwindow=true, + pdfnewwindow=true, pdfpagelayout=SinglePage, + pdfpagelabels=true, pdftitle={The `decimal' package: (version 1.1)}, + pdfauthor={A Syropoulos and RWD Nickalls 2011}, + pdfsubject={typesetting tex macro package}, + pdfkeywords={typesetting, tex}, + } +\else +\fi \usepackage{decimal} \newcommand{\hidot}{\ensuremath{\raise.95ex\hbox{.}}} +\newcommand{\dntop}{\ifpdf\pdfbookmark[1]{Title}{Title}\fi \vspace*{1mm}} \GetFileInfo{decimal.drv} \begin{document} \DocInput{decimal.dtx} @@ -52,150 +85,230 @@ % \fi %\StopEventually{} %\MakeShortVerb{\|} -%\title{The `decimal' package} -%\author{A.Syropoulos and R.W.D.Nickalls} -% \date{2003/07/12} +%\title{\dntop The `decimal' package\\(\textit{version}~$1.1$)} +%\author{A.\ Syropoulos\,\footnote{Greek \TeX\ Friends, Xanthi, Greece. email:\,\textsf{apostolo@yahoo.com}} +% \ and R.\ W.\ D.\ Nickalls\,\footnote{(retired), c/o Department of Anaesthesia, Nottingham University Hospitals, City Hospital Campus, Nottingham, UK. \ +%email:\,\textsf{dick@nickalls.org} \ \ +%web:\,\texttt{www.nickalls.org} }} +%\date{June 1, 2011} %\maketitle -% \begin{abstract} -% In traditional English typography the decimal point in printed as -% slightly raised dot. This little package provides this functionallity -% by making the period (``.'') active in math mode. In addition, we -% redefine the commad |\.| so that it produces a dot in math mode, while -% it retains its ordinary functionality in text mode. +%\begin{abstract} +% \noindent In traditional English typography the decimal point is printed as a raised dot. +% The \textit{decimal} package provides this functionality by making the full point, or period (\,.\,) +% active in maths mode, and implementing the \verb!\cdot! character instead. In addition, the command +% |\.| is redefined in such a way that that it produces a full point in math mode, but +% retains its usual functionality in text mode. %\end{abstract} % -% \section{Introduction} -% The decimal point is variously used as a comma (European), a +%\section{Introduction} +% +% The decimal point (decimal separator) is variously implemented as a comma (European), a % full point (North American), or as a raised full point (English). -% While the comma and full point have always been supported, -% the English decimal point has been somewhat overlooked---until now. -% -% The \textsl{decimal} package places the height of the decimal -% point level with the center of the `equals' sign, as shown by -% $x=0.3456$, by re-implementing a math mode full point as the -% |\cdot| character. However, in old texts the practice was to place -% the full point rather higher, as in $25{\hidot}345$. While this is a bit -% too high for visual comfort nowadays, the reason for the original high -% position lies in the name used by metal type-setters for the decimal point, -% namely a ``turned' full point, as mentioned in the following extract from -% an $80$~year-old \textsl{Authors' \& Printers' Dictionary}.% -% \footnote{Collins H (1921). Authors' \& Printers' Dictionary: a guide for -% authors, editors, printers, correctors of the press, compositors, and -% typists. With a full list of abbreviations. An attempt to codify the best -% typographical practices of the present day. (pub: Humphrey Milford, -% London).} +% While the comma and full point have always been supported in electronic typesetting, +% the English raised decimal point has been somewhat overlooked---until now. +% For a nice history of the decimal fraction see the chapter on \book{The invention of decimal +% fractions and of logarithms} in Scott\footnote{Scott JF (1960). \book{A history of mathematics} +% (Taylor \& Francis, London), pp 266.} (1960). +% +%\section{Typography} +% +% In Great Britain until about 1970 or so the decimal separator was typically implemented as a +% raised dot (middle dot). For example, when currency decimalisation was introduced in the UK +% in 1971, the recommended way of writing currency was with a raised dot, as in $\pounds\,21.34$. +% However, since then there has been a gradual decline in the use of the raised point most probably +% owing to the fact that this glyph was not generally available on electronic typewriters or computer +% wordprocessors. While the raised dot does make occasional appearances in British newspapers, it is, +% unfortunately, seldom seen nowadays even in British scientific journals. +% +% This decline was highlighted relatively recently when the UK journal Nature reprinted some +% 1953 articles as part of the $50^{th}$ anniversary of the discovery of the double helix. +% For example, one of the reprinted articles (\textit{Nature} 2003; \underline{421}, 400--401) +% states that Franklin and Gosling\footnote{RWD Nickalls says that he was drawn to this particular +% series of articles since he spent a year as a student of Ray Gosling in the then Physics Department +% at Guy's Hospital Medical School, London, in the 1960s.} mentioned the ``\ldots very strong +% reflexion at $3.4$\,A \ldots''. Ironically, if this sentence were published in a journal in +% Britain today the {\AA}ngstr\"{o}m symbol would probably be typeset correctly but +% the decimal point would most likely appear in the American `full point' style as {3.4\,\AA}. +% +% The most pleasing position of the raised decimal point is level with +% the center of the `equals' sign, as shown by the expression $x=0.3456$, +% and this is what the \textit{decimal} package implements. +% However, in old texts the practice was to place +% the full point rather higher, as in $25{\hidot}345$. +% While this is a bit too high for visual comfort nowadays, +% the reason for the original high position lies in the name used by +% metal type-setters for the decimal point, namely +% a `turned' full point, as mentioned in the following extract from an $80$~year-old +% \textsl{Authors' \& Printers' Dictionary}.\footnote{Collins H (1921). Authors' \& +% Printers' Dictionary: a guide for authors, editors, printers, correctors of the press, +% compositors, and typists. With a full list of abbreviations. An attempt to codify the best +%typographical practices of the present day. (pub: Humphrey Milford, London).} % %\begin{center} %\begin{minipage}{0.7\textwidth} %\begin{itemize} -% \item [\ ]\textbf{\hspace{-5mm}decimal fractions}, no decimal can be plural, -% or take verb in pl., however many figures it contains; (typ.) -% print in figures. The decimal -% point in all cases to be a full point turned. +%\item [\ ]\textbf{\hspace{-5mm}decimal fractions}, no decimal can be plural, +%or take verb in pl., however many figures it contains; (typ.) print in figures. The decimal +%point in all cases to be a full point turned. %\end{itemize} %\end{minipage} %\end{center} % -% But what is meant by a full point `turned'? The clue comes from an entry -% in the dictionary on `turned commas', as follows. +%But what is meant by a full point `turned'? The clue comes from the `turned commas' entry +% in the same dictionary, as follows. %\begin{center} %\begin{minipage}{0.7\textwidth} %\begin{itemize} -% \item [\ ]\textbf{\hspace{-5mm}turned commas} (typ.), -% those used at the commencement of a quotation, as these~``, two -% apostrophes being at the end. +%\item [\ ]\textbf{\hspace{-5mm}turned commas} (typ.), +%those used at the commencement of a quotation, as these~``, two +%apostrophes being at the end. %\end{itemize} %\end{minipage} %\end{center} -% If we use a turned comma to show the location a full point would occupy -% if `turned' in the same way, we can see that the position is somewhat -% high, as in the decimal fraction $2$`$6$. Swapping the turned -% comma for a similarly turned full point we obtain~$2{\hidot}6$, which -% shows the decimal point in essentially the position we observe in older -% texts. All is now clear---the typesetter simply turned the metal block of -% the full point through $180\deg$ and, \textsl{eh presto}, he had a practical -% decimal point, albeit slightly on the high side. -% -% \section{Usage} -% -% First use the \textsl{decimal} package using the |\usepackage{}| command -% in the preamble. -%\begin{center} -% |\usepackage{decimal}| -%\end{center} +% +%\noindent If we use a turned comma to show the location a full +% point would occupy if `turned' in the same way, we can see +% that the position is somewhat high, as in the decimal fraction $2$`$6$. Swapping the turned +% comma for a similarly turned full point we +% obtain~$2{\hidot}6$, which shows the decimal point in essentially the position we observe in older texts. +% All is now clear---by simply turning the metal block of the full point through $180\deg$ the typesetter +% had access to a practical decimal point, albeit slightly on the high side. +% +%\section{Usage} +% +% First load the \textsl{decimal} package ({\em after} the \texttt{mathpazo} and \texttt{hyperref} +% packages---see Bugs section) using the preamble command +% \begin{verbatim} +% \usepackage{decimal} +% \end{verbatim} % The \textsl{decimal} package will now operate globally to -% implement the English decimal point where one types a fullpoint in -% math mode. For example the value $123.456$ is obtained by typing -% |$123.456$|. The correct positioning of the decimal is preserved even -% when the smaller mathmode fonts are used, as shown in the following two -% examples. -% $$ -% 23.562^{1.23^{\,2.6}}\hspace{2cm} -% j = \sqrt{ \underbrace{{ax^2 + bx +c }}_{-3.78} \ +\cos(3\pi/4 +\theta)} -% $$ +% implement the English decimal point wherever one types a fullpoint in math mode. +% For example the value $123.456$ is obtained by typing +% |$123.456$|. +% The correct positioning of the decimal is preserved even +% when the smaller mathmode fonts are used, as shown in the +% following two examples. +% \[ +% 23.562^{1.23^{\,2.6}}\hspace{2cm} +% j = \sqrt{ \underbrace{{ax^2 + bx +c }}_{-3.78} \ +\cos(3\pi/4 +\theta)} +% \] % % On those occasions when a true full point is % required in math mode (e.g.~at the end of a series of equations) -% then this is implemented by typing |\.|. For example -% $$ -% y = ax^2 + bx +c\. -% $$ -% is obtained by typing |$y = ax^2 + bx +c\.$|. -% -% It is important to appreciate that there are math mode commands which -% include a full point as an integral part of the command, and in these cases -% one must, of course, \textsl{not} use the |\.| command. A common situation -% where this arises is in the typesetting of unbalanced vertical braces, in -% which case a full point is used by one of the commands to represent the -% absent brace. For example, the structure -% $$ +% then this is implemented by typing |\.| +% For example +% \[ +% y = ax^2 + bx +c\. +% \] +% is obtained by typing |$y = ax^2 + bx +c\.$| +% +% \textbf{Note:} It is important to appreciate that there are mathmode +% commands which include a full point as an integral +% part of the command, and in +% these cases one must, of course, \textsl{not} use the |\.| command. +% A common situation where this arises is in the +% typesetting of unbalanced vertical braces, in which case +% a full point is used by one of the commands (|\right.|) to represent the absent brace. +% For example, the structure +% \[ % \left\{ % \begin{array}{l} % \displaystyle x = -b/6 \\ % \displaystyle y = (4ac - b^2)/7 % \end{array} % \right. -% $$ +% \] % is typeset by the following code -%\begin{verbatim} -% $$ +% \begin{verbatim} +% \[ % \left\{ % \begin{array}{l} % \displaystyle x = -b/6 \\ % \displaystyle y = (4ac - b^2)/7 % \end{array} % \right. -% $$ -%\end{verbatim} -% which uses the command \verb!\right.! to balance the left brace -% command \verb!\left\{! before the array. Since the full point -% is part of the command then there is no need to use the |\.| command. +% \] +% \end{verbatim} +% which uses the command |\right.| to balance the left brace +% command |\left\{| before the array. Since the full point +% is part of the command there is no need to use the |\.| command. +% % If we now add some punctuation to the above structure, say, a % comma terminating the first line and a full point to terminate % the second line as follows, -% $$ +% \[ % \left\{ % \begin{array}{l} -% \displaystyle x = -b/6, \\ -% \displaystyle y = (4ac - b^2)/3\. +% \displaystyle x = -b/6, \\ +% \displaystyle y = (4ac - b^2)/3\. % \end{array} % \right. -% $$ +% \] % then we add the full point using -% the command |\.| as shown in the following code. -%\begin{verbatim} -% $$ +% the command |\.| as shown in the following code.\newpage +% \begin{verbatim} +% \[ % \left\{ -% \begin{array}{l} +% \begin{array}{l} % \displaystyle x = -b/6, \\ % \displaystyle y = (4ac - b^2)/7\. -% \end{array} +% \end{array} % \right. -% +% \] %\end{verbatim} -% Outside math mode the command \verb!\.! performs its usual +% +% Outside mathmode the command |\.| performs its usual % function of placing a dot above a character, for example -% the command \verb!\.{a}! generates the \.{a} character. +% the command |\.{a}| generates the \.{a} character. +% +%\section{Installing the decimal package} +% +% The \textsc{decimal} package is included in the {\TeX}Live distribution, and is likely +% to be already installed if you have a fairly complete recent {\TeX}Live installation. +% The \textsc{decimal} package consists of the following files +%\begin{verbatim} +%decimal.ins +%decimal.dtx +%decimal.pdf (this file) +%decimal.sty +%\end{verbatim} +% +%\subsection*{Placing the files} +%\begin{itemize} +% +%\item \texttt{decimal.sty} +% {\TeX}Live typically places \texttt{decimal.sty} in the following directory +% \newline |/usr/local/texlive/2010/texmf-dist/tex/latex/decimal/decimal.sty| +% Alternatively, one could place it in the user's \texttt{/texmf-local/} directory, for example, +% something like \newline |/usr/local/texlive/texmf-local/tex/latex/local/decimal/decimal.sty| +% which has the merit of not being overwritten by {\TeX}Live. +% +% \item \texttt{decimal.pdf} +% +% {\TeX}Live typically places \texttt{decimal.pdf} in the \texttt{/doc/} directory, for example +% \newline |/usr/local/texlive/2010/texmf-dist/doc/latex/decimal/| +% {\newline}Using this directory has the great advantage that the \texttt{texdoc} utility +% will then display the pdf when you type the command \command{texdoc decimal}. +% +%\end{itemize} +%Once the files have been placed, then update the \TeX\ file database. On a Linux system this is +%done by running the \command{texhash} command (as root). +% +%\section{Known bugs} +% +%\subsection*{Problems with the \texttt{mathpazo} and \texttt{hyperref} packages} +% We know of only two package-interaction problems as follows. +% The \texttt{mathspazo} package effectively neutralises a previously loaded \texttt{decimal} package. +% If the \texttt{decimal} package is loaded before the \texttt{hyperref} package, then +% \LaTeX\ fails, throwing out multiple maths-related error messages +% +% The work-around is simply to install the decimal package \textit{after} these two packages. +% +%\section{Version history} +% \begin{itemize} +% \item May 2, 2005 --- version $1.1$ +% \item July 12, 2003 --- first release (version $1.0$) +% \end{itemize} % % \section{The Implementation} % diff --git a/Master/texmf-dist/source/latex/decimal/decimal.ins b/Master/texmf-dist/source/latex/decimal/decimal.ins index 4f479270c1c..1e8852e9b7e 100644 --- a/Master/texmf-dist/source/latex/decimal/decimal.ins +++ b/Master/texmf-dist/source/latex/decimal/decimal.ins @@ -1,4 +1,4 @@ -%% Copyright 2003 Apostolos Syropoulos and Dick Nickalls +%% Copyright 2003-2011 Apostolos Syropoulos and Dick Nickalls %% %% This file is part of the `decimal' package. %% You are not allowed to modify its contents. @@ -24,7 +24,7 @@ \preamble - (c) copyright 2003 Apostolos Syropoulos and Dick Nickalls + (c) copyright 2003-2011 Apostolos Syropoulos and Dick Nickalls This program can be redistributed and/or modified under the terms of the LaTeX Project Public License Distributed from CTAN archives in directory macros/latex/base/lppl.txt; either @@ -33,7 +33,7 @@ Please report errors or suggestions for improvement to Apostolos Syropoulos Dick Nickalls - apostolo@obelix.ee.duth.gr dicknickalls@compuserve.com + apostolo@obelix.ee.duth.gr dick@nickalls.org \endpreamble @@ -47,6 +47,6 @@ \Msg{* To finish installation you have to copy} \Msg{* the generated .sty file in the appropriate} \Msg{* directory and then to rehash your TeX system} -\Msg{* Happy English TeXing!} +\Msg{* Happy British TeXing!} \Msg{**********************************************************} \endinput diff --git a/Master/texmf-dist/tex/latex/decimal/decimal.sty b/Master/texmf-dist/tex/latex/decimal/decimal.sty index abfe70c252c..b446c3269e0 100644 --- a/Master/texmf-dist/tex/latex/decimal/decimal.sty +++ b/Master/texmf-dist/tex/latex/decimal/decimal.sty @@ -6,7 +6,7 @@ %% %% decimal.dtx (with options: `decimal') %% -%% (c) copyright 2003 Apostolos Syropoulos and Dick Nickalls +%% (c) copyright 2003-2011 Apostolos Syropoulos and Dick Nickalls %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN %% archives in directory macros/latex/base/lppl.txt; either @@ -15,7 +15,7 @@ %% Please report errors or suggestions for improvement to %% %% Apostolos Syropoulos Dick Nickalls -%% apostolo@obelix.ee.duth.gr dicknickalls@compuserve.com +%% apostolo@obelix.ee.duth.gr dick@nickalls.org %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -33,7 +33,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \ProvidesFile{decimal.sty} - [2003/07/12 v1.0 Package `decimal.sty'] + [2011/06/03 v1.1 Package `decimal.sty'] \let\peri@d\. \def\.{\ifmmode\mbox{.}\else\expandafter\peri@d\fi} \DeclareMathSymbol{\cd@t}{\mathord}{symbols}{"01} |