| 1 |
\pdfoutput1 |
| 2 |
\documentclass[a4paper,11pt,british]{article} |
| 3 |
\usepackage[T1]{fontenc} |
| 4 |
\usepackage[colorlinks]{hyperref} |
| 5 |
\usepackage{babel,thinsp,listings,tabularx,booktabs,ragged2e,textcomp} |
| 6 |
\author{Palle J\o rgensen} |
| 7 |
\title{The \thinsp\ package} |
| 8 |
\def\origthinspace{\kern .16667em } |
| 9 |
\def\orignegthinspace{\kern-.16667em } |
| 10 |
\def\thinsp{\texttt{thinsp}} |
| 11 |
\def\strthinspace{\texttt{\string\thinspace}} |
| 12 |
\lstset{language=[latex]tex,breaklines=true} |
| 13 |
\setcounter{tocdepth}{1} |
| 14 |
\begin{document} |
| 15 |
\maketitle |
| 16 |
|
| 17 |
\section*{Summary} |
| 18 |
\label{sec:summary} |
| 19 |
|
| 20 |
The \thinsp\ package provides a stretchable \strthinspace\ to replace |
| 21 |
\LaTeX's normal \strthinspace. |
| 22 |
|
| 23 |
\tableofcontents |
| 24 |
|
| 25 |
\section{Introduction} |
| 26 |
\label{sec:introduction} |
| 27 |
|
| 28 |
The normal \strthinspace\ command which \LaTeX\ provides as standard |
| 29 |
is a fixed space of 0.16667em, with no strething. This gives an akward |
| 30 |
spacing when using \strthinspace\ in underfull \verb+\hbox+'s. |
| 31 |
|
| 32 |
Say, I wanted to create a certain box with the name P.\,A.\,M. Dirac |
| 33 |
in it. To provide a proper spacing between the initials I use a |
| 34 |
\strthinspace\ between the letters. Here shown with some |
| 35 |
\verb+\framebox+'es. |
| 36 |
|
| 37 |
\begin{verbatim} |
| 38 |
\noindent\fbox{P.\,A.\,M. Dirac}\\ |
| 39 |
\framebox[\linewidth][s]{P.\,A.\,M. Dirac created |
| 40 |
relativistic quantum mechanics} |
| 41 |
\end{verbatim} |
| 42 |
|
| 43 |
Then I would get something looking like this when using the original |
| 44 |
\strthinspace\ from \LaTeX\medskip: |
| 45 |
|
| 46 |
\noindent\fbox{P.\origthinspace A.\origthinspace M. |
| 47 |
Dirac}\\ \framebox[\linewidth][s]{P.\origthinspace A.\origthinspace |
| 48 |
M. Dirac created relativistic quantum mechanics}\medskip |
| 49 |
|
| 50 |
In this example with the original spacing if \strthinspace\ the |
| 51 |
spacing between the initials is the same, whether or not the |
| 52 |
\verb+\hbox+ is underfull and need som stretcing or not. This makes |
| 53 |
the initials to appear ``unnaturally'' close when comparing them to |
| 54 |
the other characters. |
| 55 |
|
| 56 |
With a \strthinspace\ that is strecthable like the normal space, the |
| 57 |
resulting box is appearing more natural.\medskip |
| 58 |
|
| 59 |
\noindent\fbox{P.\,A.\,M. Dirac}\\ |
| 60 |
\framebox[\linewidth][s]{P.\,A.\,M. Dirac created relativistic quantum |
| 61 |
mechanics}\medskip |
| 62 |
|
| 63 |
\section{Usage} |
| 64 |
\label{sec:usage} |
| 65 |
|
| 66 |
The simplest usage of the package is simply adding |
| 67 |
\begin{lstlisting} |
| 68 |
\usepackage{thinsp} |
| 69 |
\end{lstlisting} |
| 70 |
to your preamble. |
| 71 |
|
| 72 |
The the \strthinspace\ command as well as the \verb+\,+ shortcut is |
| 73 |
replaced by the stretchable \strthinspace |
| 74 |
|
| 75 |
The package furthermore provides a command |
| 76 |
\verb+\thinthinspace+ with half the width of \strthinspace. |
| 77 |
|
| 78 |
\subsection{Options} |
| 79 |
\label{sec:options} |
| 80 |
|
| 81 |
\begin{tabularx}{\linewidth}{>{\ttfamily}l>{\RaggedRight}X} |
| 82 |
\toprule |
| 83 |
\textrm{Option} & Description\\ |
| 84 |
\midrule |
| 85 |
|
| 86 |
nothinspace & Disables the replacement of \strthinspace. |
| 87 |
The stretchable thinspace is still available as |
| 88 |
\texttt{\string\stretchthinspace}.\\ |
| 89 |
|
| 90 |
thinspace & Dummy option as counterpart to \texttt{nothinspace}\\ |
| 91 |
|
| 92 |
nothinthinspace & Disables the possible\footnotemark\ replacement of |
| 93 |
\texttt{\string\thinthinspace}. The stretchable thinthinspace is |
| 94 |
still available as \texttt{\string\stretchthinthinspace}.\\ |
| 95 |
|
| 96 |
thinthinspace & Dummy option as counterpart to |
| 97 |
\texttt{nothinthinspace}\\ |
| 98 |
|
| 99 |
negthinspace & Provides a stretchable \texttt{\string\negthinspace}. |
| 100 |
This is not default, as \texttt{\string\negthinspace} may be used |
| 101 |
with caution anyway, and almost always should be replaced by a |
| 102 |
manually \texttt{\string\kern}. A stretchable |
| 103 |
\texttt{\string\negthinspace} is available as |
| 104 |
\texttt{\string\stretchnegthinspace}\\ |
| 105 |
|
| 106 |
nonegthinspace & Dummy option as counterpart to |
| 107 |
\texttt{negthinspace}\\ |
| 108 |
|
| 109 |
\midrule |
| 110 |
|
| 111 |
onehalf & Ajusting the stretchable \strthinspace\ to half of the |
| 112 |
ordinary space. This is default, as it appears just like the |
| 113 |
original \strthinspace\ in boxes that are not stretched.\\ |
| 114 |
|
| 115 |
onethird & Ajusting the stretchable \strthinspace\ to one third of |
| 116 |
the ordinary space.\\ |
| 117 |
|
| 118 |
twothirds & Ajusting the stretchable \strthinspace\ to two thirds of |
| 119 |
the ordinary space. This is the author's favourite\dots\\ |
| 120 |
\bottomrule |
| 121 |
\end{tabularx} |
| 122 |
\footnotetext{Some packages provide a \texttt{\string\thinthinspace} |
| 123 |
command} |
| 124 |
|
| 125 |
\section{\thinsp\ and other packages} |
| 126 |
\label{sec:thinsp-other-pack} |
| 127 |
|
| 128 |
As the package \texttt{amsmath} redifines \strthinspace\ as well, |
| 129 |
there is a minor clash between these two packages. Hence \thinsp\ |
| 130 |
redefines \strthinspace\ at the beginning of the document, and if |
| 131 |
\texttt{amsmath} is loaded, the \strthinspace\ is redefined in an |
| 132 |
``\texttt{amsmath} way''. |
| 133 |
|
| 134 |
\section{Bug reports and comments} |
| 135 |
\label{sec:bug-reports-comments} |
| 136 |
|
| 137 |
Any comment on this package can be sent to the author on his e-mail |
| 138 |
address: \url{[email protected]}. |
| 139 |
|
| 140 |
\section{Copyright and license} |
| 141 |
\label{sec:copyright-license} |
| 142 |
|
| 143 |
The \thinsp\ package and this documentation i copyright |
| 144 |
\textcopyright\ 2007, 2016 by Palle J\o rgensen. |
| 145 |
|
| 146 |
The license of the \thinsp\ package and this documentation is GNU |
| 147 |
General Public License (GPL). |
| 148 |
|
| 149 |
You should have received a copy of the GNU General Public License |
| 150 |
along with this program. If not, see \url{http://www.gnu.org/licenses/}. |
| 151 |
|
| 152 |
\appendix |
| 153 |
\clearpage |
| 154 |
|
| 155 |
\section{Source code of \texttt{thinsp.sty}} |
| 156 |
\label{sec:source-code-thinsp.s} |
| 157 |
|
| 158 |
\lstinputlisting{thinsp.sty} |
| 159 |
|
| 160 |
\end{document} |
| 161 |
\clearpage |
| 162 |
|
| 163 |
\section{Source code of this document} |
| 164 |
\label{sec:source-code-this} |
| 165 |
|
| 166 |
\lstinputlisting{\jobname.tex} |
| 167 |
|
| 168 |
|
| 169 |
\end{document} |
| 170 |
|
| 171 |
%%% Local Variables: |
| 172 |
%%% mode: latex |
| 173 |
%%% TeX-master: t |
| 174 |
%%% End: |