summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/spacingtricks/spacingtricks.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/spacingtricks/spacingtricks.dtx')
-rw-r--r--macros/latex/contrib/spacingtricks/spacingtricks.dtx96
1 files changed, 49 insertions, 47 deletions
diff --git a/macros/latex/contrib/spacingtricks/spacingtricks.dtx b/macros/latex/contrib/spacingtricks/spacingtricks.dtx
index 3c22a98a8a..d9ff9bc46d 100644
--- a/macros/latex/contrib/spacingtricks/spacingtricks.dtx
+++ b/macros/latex/contrib/spacingtricks/spacingtricks.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2019-2020 by Antoine Missier <antoine.missier@ac-toulouse.fr>
+% Copyright (C) 2019-2021 by Antoine Missier <antoine.missier@ac-toulouse.fr>
%
% This file may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, either version 1.3 of this license
@@ -19,8 +19,8 @@
%</driver>
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{spacingtricks}
- [2020/11/02 v1.3 .dtx spacingtricks file]
+\ProvidesPackage{spacingtricks}
+ [2021/09/20 v1.4 .dtx spacingtricks file]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -32,24 +32,24 @@
\usepackage{pifont}
\usepackage{amsmath}
\usepackage{pstricks-add}
-\DisableCrossrefs
+\DisableCrossrefs
%\CodelineIndex
%\RecordChanges
\usepackage{hyperref}
\hypersetup{%
- colorlinks,
+ colorlinks,
linkcolor=blue,
citecolor=blue,
- pdftitle={spacingtricks},
- pdfsubject={LaTeX package},
+ pdftitle={spacingtricks},
+ pdfsubject={LaTeX package},
pdfauthor={Antoine Missier}
}
\begin{document}
- \DeleteShortVerb{\|}
- \MakeShortVerb{\"}
- \DocInput{spacingtricks.dtx}
- %\PrintChanges
- %\PrintIndex
+\DeleteShortVerb{\|}
+\MakeShortVerb{\"}
+\DocInput{spacingtricks.dtx}
+%\PrintChanges
+%\PrintIndex
\end{document}
%</driver>
% \fi
@@ -81,13 +81,14 @@
% \changes{v1.2}{2019/09/09}{A bug correction in the last update}
% \changes{v1.3}{2020/11/02}{Loading the setspace package,
% small changes in compactlist environment, improvement in dualboxes macro}
+% \changes{v1.4}{2021/09/21}{A mistake in the documentation is now corrected}
%
% \GetFileInfo{spacingtricks.sty}
%
% \title{The \texttt{spacingtricks} package\thanks{This document
% corresponds to \textsf{spacingtricks}~\fileversion, dated \filedate.}}
% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}}
-% \date{November 02, 2020}
+% \date{September 20, 2021}
% \maketitle
%
% \section{Introduction}
@@ -95,7 +96,7 @@
% This package offers some macros to deal with spacing issues. Thus:
% \begin{compactlist}
% \item "\centered" yields good horizontal centering without vertical spacing;
-% \item "\footnote" has been redefined to avoid unsuitable spacings;
+% \item "\footnote" has been redefined to avoid unsuitable spacing;
% \item "\vstrut" produces a strut with variable height or depth;
% \item "\indent" has been redefined to indent a line at the beginning
% of a particular paragraph even if "\parindent" has been set to 0;
@@ -105,7 +106,7 @@
% several aliases are provided to type some list symbols shorter:
% "\bul", "\dash", "\ddash", "\aster", "\hand", "\checksymb", "\arrowsymb";
% \item the macros "\ie" and "\eg" attends to typeset common abbreviations
-% \ie and \eg with correct spacings;
+% \ie and \eg with correct spacing;
% \item the "\dualboxes" command attends to place two boxes
% (figures, tables, text) side by side by adjusting the vertical positioning.
% \end{compactlist}
@@ -115,12 +116,13 @@
% \textsf{setspace} (natively in \LaTeXe),
% for setting line spacing in a piece of text
% (with the \texttt{spacing} environment), and
-% \textsf{xspace}~\cite{XSP}, which adds an interword space unless the macro
+% \textsf{xspace}~\cite{XSP}, which adds an inter-word space unless the macro
% is followed by a punctuation character.
%
% Otherwise, we provide the package \textsf{arraycols}~\cite{ARCOL},
-% wich allows a good management of spacings in \texttt{tabular} and \texttt{array} environments,
-% and \textsf{mismath}~\cite{MSMATH} of which several macros tends to improve spacings
+% which allows a good management of spacing in \texttt{tabular}
+% and \texttt{array} environments,
+% and \textsf{mismath}~\cite{MSMATH} of which several macros tends to improve spacing
% in mathematical formulas.
%
% \section{Usage}
@@ -216,11 +218,11 @@
%
% \medskip
% \DescribeMacro{\footnotespace} \DescribeMacro{\footenoteindent}
-% Like the old one, the new "\footnote" command can take an opional argument
+% Like the old one, the new "\footnote" command can take an optional argument
% to force the number of the note.
% Likewise, we have always the customization macros
% "\footnotesize", "\footnotesep", "\footnoterule",
-% but two new macros have been added to manage spacings:
+% but two new macros have been added to manage spacing:
% "\footnotespace" produces the space before the note call symbol
% and "\footnoteindent" produces the space at the beginning of the footnote text.
% For instance, with "\renewcommand{\footnotespace}{\,}"
@@ -373,7 +375,7 @@
% \DescribeMacro{\checksymb}\DescribeMacro{\arrowsymb}
% The following example is obtained with "\begin{compactlist}[\checksymb]":
% \begin{compactlist}[\checksymb]
-% \item Fisrt item.
+% \item First item.
% \item Second item.
% \item Third item.
% \end{compactlist}
@@ -392,7 +394,7 @@
% \medskip
% \DescribeMacro{\ie} \DescribeMacro{\eg}
% In English, at the end of a sentence, the point is followed by an em space
-% which is larger than an interword space.
+% which is larger than an inter-word space.
% We provide the "\ie" (\textit{id est}) and "\eg" (\textit{exempli gratia}) macros,
% suggested in The \LaTeX\ Companion \cite{COMP},
% to get correct spacing after these abbreviations \eg here.
@@ -433,11 +435,11 @@
% }
%
% \noindent
-% The horizontal space is equally shared between left margin, interbox space and right margin.
+% The horizontal space is equally shared between left margin, inter-box space and right margin.
%
% \medskip
% In the following example the right box has been shifted back
-% to make an overlaping with the left one, what \textsf{picins} cannot do.
+% to make an overlapping with the left one, what \textsf{picins} cannot do.
%
%\dualboxes{\footnotesize
% $\begin{array}{|*{7}{c|}} \hline
@@ -452,7 +454,7 @@
% \end{pspicture}
%}
% \begin{verbatim}
-% \dualboxes*{\footnotesize
+% \dualboxes{\footnotesize
% $\begin{array}{|*{7}{c|}} \hline
% x & -2 & -1 & 0 & 1 & 2 & 3 \\ \hline
% f(x) & -0.96 & -0.71 & 0 & 0.59 & 0.38 & 0.18 \\ \hline
@@ -498,8 +500,8 @@
\RequirePackage{setspace}
\RequirePackage{xspace}
-\newcommand*{\centered}[1]{{\setlength{\parskip}{0pt}\par\noindent\hfill
- #1\hfill\mbox{}}}
+\newcommand*{\centered}[1]{{\setlength{\parskip}{0pt}\par\noindent\hfill
+ #1\hfill\mbox{}}}
% \end{macrocode}
% The double braces are necessary here to ensure that the "\parskip" modification applies
% locally within the command and not globally to the rest of the document.
@@ -534,29 +536,29 @@
\newenvironment*{indentblock}[1][\parindentlength]{
\begin{list}{}{%
- \setlength{\leftmargin}{#1}
- \setlength{\itemsep}{0pt}
- \setlength{\topsep}{1ex}
- \setlength{\partopsep}{0pt}
+ \setlength{\leftmargin}{#1}
+ \setlength{\itemsep}{0pt}
+ \setlength{\topsep}{1ex}
+ \setlength{\partopsep}{0pt}
}
- \item[]
- }{\end{list}}
+ \item[]
+ }{\end{list}}
\newlength{\compactlistindent}
\setlength{\compactlistindent}{0.5em}
\newenvironment*{compactlist}[1][\textbullet]{
\par % sometimes necessary
\begin{list}{#1\unskip}{% \unskip suppresses the space created by \xspace
- \setlength{\itemsep}{0pt}
- \setlength{\parsep}{0pt}
- \setlength{\topsep}{0ex}
- \setlength{\partopsep}{0pt}
- \setlength{\labelwidth}{1em}
- \setlength{\leftmargin}{\labelwidth}
- \addtolength{\leftmargin}{\labelsep}
- \addtolength{\leftmargin}{\compactlistindent}
+ \setlength{\itemsep}{0pt}
+ \setlength{\parsep}{0pt}
+ \setlength{\topsep}{0ex}
+ \setlength{\partopsep}{0pt}
+ \setlength{\labelwidth}{1em}
+ \setlength{\leftmargin}{\labelwidth}
+ \addtolength{\leftmargin}{\labelsep}
+ \addtolength{\leftmargin}{\compactlistindent}
}
- }{\end{list}}
+ }{\end{list}}
\providecommand{\bul}{\textbullet}
\providecommand{\dash}{\textendash}
@@ -571,19 +573,19 @@
\providecommand{\checksymb}{\ding{51}\xspace}
\providecommand{\arrowsymb}{\ding{226}\xspace}
-\providecommand{\ie}{i.e.\@\xspace}
+\providecommand{\ie}{i.e.\@\xspace}
\providecommand{\eg}{e.g.\@\xspace}
\newcommand{\@@dualboxes}[3][1]{
\par\noindent
\raisebox{\depth-#1\totalheight}{#2} \hfill
\raisebox{\depth-#1\totalheight}{#3} \smallskip
- }
+}
\newcommand{\@dualboxes}[3][1]{
\par\noindent \hfill
\raisebox{\depth-#1\totalheight}{#2} \hfill
\raisebox{\depth-#1\totalheight}{#3} \hfill\mbox{}\smallskip
- }
+}
\newcommand{\dualboxes}{\@ifstar{\@@dualboxes}{\@dualboxes}}
% \end{macrocode}
%
@@ -597,9 +599,9 @@
% \bibitem{CELLSP} \emph{The \textsf{cellspace} package}, Josselin Noirel, CTAN, v1.8 2019/03/11.
% \bibitem{ENUM} \emph{Customizing lists with the \textsf{enumitem} package}, Javier Bezos,
% CTAN, v3.9 2019/06/20.
-% \bibitem{ARCOL} \emph{The \textsf{arraycols} package}, Antoine Missier, CTAN, v1.0 2019/06/26.
+% \bibitem{ARCOL} \emph{The \textsf{arraycols} package}, Antoine Missier, CTAN, v1.2 2021/09/20.
% \bibitem{MSMATH} \emph{\textsf{mismath} -- Miscellaneous mathematical macros}, Antoine Missier,
-% CTAN, v1.6 2019/09/06.
+% CTAN, v1.8 2020/11/15.
% \bibitem{PICINS} \emph{Bilder in \LaTeX -Dokumenten -- PicIns-Benutzerhandbuch},
% Joachim Bleser, Edmund Lang, CTAN, v3.0 sept. 1992.
% \bibitem{COMP} \emph{The \LaTeX\ Companion}. Frank Mittelbach, Michel Goossens,