diff options
author | Norbert Preining <preining@logic.at> | 2007-12-05 17:03:55 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-12-05 17:03:55 +0000 |
commit | 3d08d5d73aca1b65489c0d7e2a00271d00c9de59 (patch) | |
tree | bf9c73ded999f0d8316133dffc7ff72463789d28 /Master/texmf-dist/doc/latex/thinsp/thinsp.tex | |
parent | 7783322feeec90c418c79f9e5bc1fcdf2b85aaee (diff) |
new package thinsp from ctan 07-12-04
git-svn-id: svn://tug.org/texlive/trunk@5715 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/thinsp/thinsp.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/thinsp/thinsp.tex | 173 |
1 files changed, 173 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/thinsp/thinsp.tex b/Master/texmf-dist/doc/latex/thinsp/thinsp.tex new file mode 100644 index 00000000000..7efd530e295 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thinsp/thinsp.tex @@ -0,0 +1,173 @@ +\pdfoutput1 +\documentclass[a4paper,11pt,british]{article} +\usepackage[T1]{fontenc} +\usepackage{babel,thinsp,listings,tabularx,booktabs,ragged2e,hyperref,textcomp} +\author{Palle J\o rgensen} +\title{The \thinsp\ package} +\def\origthinspace{\kern .16667em } +\def\orignegthinspace{\kern-.16667em } +\def\thinsp{\texttt{thinsp}} +\def\strthinspace{\texttt{\string\thinspace}} +\lstset{language=[latex]tex,breaklines=true} +\setcounter{tocdepth}{1} +\begin{document} +\maketitle + +\section*{Summary} +\label{sec:summary} + +The \thinsp\ package provides a stretchable \strthinspace\ to replace +\LaTeX's normal \strthinspace. + +\tableofcontents + +\section{Introduction} +\label{sec:introduction} + +The normal \strthinspace\ command which \LaTeX\ provides as standard +is a fixed space of 0.16667em, with no strething. This gives an akward +spacing when using \strthinspace\ in underfull \verb+\hbox+'s. + +Say, I wanted to create a certain box with the name P.\,A.\,M. Dirac +in it. To provide a proper spacing between the initials I use a +\strthinspace\ between the letters. Here shown with some +\verb+\framebox+'es. + +\begin{verbatim} +\noindent\fbox{P.\,A.\,M. Dirac}\\ +\framebox[\linewidth][s]{P.\,A.\,M. Dirac created + relativistic quantum mechanics} +\end{verbatim} + +Then I would get something looking like this when using the original +\strthinspace\ from \LaTeX\medskip: + +\noindent\fbox{P.\origthinspace A.\origthinspace M. + Dirac}\\ \framebox[\linewidth][s]{P.\origthinspace A.\origthinspace + M. Dirac created relativistic quantum mechanics}\medskip + +In this example with the original spacing if \strthinspace\ the +spacing between the initials is the same, whether or not the +\verb+\hbox+ is underfull and need som stretcing or not. This makes +the initials to appear ``unnaturally'' close when comparing them to +the other characters. + +With a \strthinspace\ that is strecthable like the normal space, the +resulting box is appearing more natural.\medskip + +\noindent\fbox{P.\,A.\,M. Dirac}\\ +\framebox[\linewidth][s]{P.\,A.\,M. Dirac created relativistic quantum + mechanics}\medskip + +\section{Usage} +\label{sec:usage} + +The simplest usage of the package is simply adding +\begin{lstlisting} +\usepackage{thinsp} +\end{lstlisting} +to your preamble. + +The the \strthinspace\ command as well as the \verb+\,+ shortcut is +replaced by the stretchable \strthinspace + +The package furthermore provides a command +\verb+\thinthinspace+ with half the width of \strthinspace. + +\subsection{Options} +\label{sec:options} + +\begin{tabularx}{\linewidth}{>{\ttfamily}l>{\RaggedRight}X} + \toprule + \textrm{Option} & Description\\ + \midrule + + nothinspace & Disables the replacement of \strthinspace. + The stretchable thinspace is still available as + \texttt{\string\stretchthinspace}.\\ + + thinspace & Dummy option as counterpart to \texttt{nothinspace}\\ + + nothinthinspace & Disables the possible\footnotemark\ replacement of + \texttt{\string\thinthinspace}. The stretchable thinthinspace is + still available as \texttt{\string\stretchthinthinspace}.\\ + + thinthinspace & Dummy option as counterpart to + \texttt{nothinthinspace}\\ + + negthinspace & Provides a stretchable \texttt{\string\negthinspace}. + This is not default, as \texttt{\string\negthinspace} may be used + with caution anyway, and almost always should be replaced by a + manually \texttt{\string\kern}. A stretchable + \texttt{\string\negthinspace} is available as + \texttt{\string\stretchnegthinspace}\\ + + nonegthinspace & Dummy option as counterpart to + \texttt{negthinspace}\\ + + \midrule + + onehalf & Ajusting the stretchable \strthinspace\ to half of the + ordinary space. This is default, as it appears just like the + original \strthinspace\ in boxes that are not stretched.\\ + + onethird & Ajusting the stretchable \strthinspace\ to one third of + the ordinary space.\\ + + twothirds & Ajusting the stretchable \strthinspace\ to two thirds of + the ordinary space. This is the author's favourite\dots\\ + \bottomrule +\end{tabularx} +\footnotetext{Some packages provide a \texttt{\string\thinthinspace} + command} + +\section{\thinsp\ and other packages} +\label{sec:thinsp-other-pack} + +As the package \texttt{amsmath} redifines \strthinspace\ as well, +there is a minor clash between these two packages. Hence \thinsp\ +redefines \strthinspace\ at the beginning of the document, and if +\texttt{amsmath} is loaded, the \strthinspace\ is redefined in an +``\texttt{amsmath} way''. + +\section{Bug reports and comments} +\label{sec:bug-reports-comments} + +Any comment on this package can be sent to the author on his e-mail +address: \url{hamselv@pallej.dk}. + +\section{Copyright and license} +\label{sec:copyright-license} + +The \thinsp\ package and this documentation i copyright +\textcopyright\ 2007 by Palle J\o rgensen. + +The license of the \thinsp\ package and this documentation is GNU +General Public License (GPL). + +You should have received a copy of the GNU General Public License +along with this bundle; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +\appendix +\clearpage + +\section{Source code of \texttt{thinsp.sty}} +\label{sec:source-code-thinsp.s} + +\lstinputlisting{thinsp.sty} + +\clearpage + +\section{Source code of this document} +\label{sec:source-code-this} + +\lstinputlisting{\jobname.tex} + + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: |