From 68aa4241c4ca49714c69c454b44d77d708fe78ef Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 2 Nov 2020 21:55:51 +0000 Subject: spacingtricks (2nov20) git-svn-id: svn://tug.org/texlive/trunk@56840 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/spacingtricks/spacingtricks.pdf | Bin 124970 -> 124789 bytes .../source/latex/spacingtricks/spacingtricks.dtx | 49 ++++++++++++--------- .../source/latex/spacingtricks/spacingtricks.ins | 4 +- .../tex/latex/spacingtricks/spacingtricks.sty | 17 ++++--- 4 files changed, 41 insertions(+), 29 deletions(-) diff --git a/Master/texmf-dist/doc/latex/spacingtricks/spacingtricks.pdf b/Master/texmf-dist/doc/latex/spacingtricks/spacingtricks.pdf index 607b98a7f70..58d3a0602a5 100644 Binary files a/Master/texmf-dist/doc/latex/spacingtricks/spacingtricks.pdf and b/Master/texmf-dist/doc/latex/spacingtricks/spacingtricks.pdf differ diff --git a/Master/texmf-dist/source/latex/spacingtricks/spacingtricks.dtx b/Master/texmf-dist/source/latex/spacingtricks/spacingtricks.dtx index 698b64dcb3f..3c22a98a8aa 100644 --- a/Master/texmf-dist/source/latex/spacingtricks/spacingtricks.dtx +++ b/Master/texmf-dist/source/latex/spacingtricks/spacingtricks.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2019 by Antoine Missier +% Copyright (C) 2019-2020 by Antoine Missier % % This file may be distributed and/or modified under the conditions of % the LaTeX Project Public License, either version 1.3 of this license @@ -20,7 +20,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{spacingtricks} - [2019/09/09 v1.2 .dtx spacingtricks file] + [2020/11/02 v1.3 .dtx spacingtricks file] % %<*driver> \documentclass{ltxdoc} @@ -54,7 +54,7 @@ % % \fi % -% \CheckSum{905} +% \CheckSum{165} % % \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 @@ -78,20 +78,21 @@ % \changes{v1.0}{2019/06/16}{English translation of the documentation} % \changes{v1.1}{2019/09/06}{No automatic line breaking at the end of the centered command, % new length compactitemlist} -% \changes{v1.2}{2019/09/09}{Removing par command to get the expected centered macro} +% \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} % % \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{September 09, 2019} +% \date{November 02, 2020} % \maketitle % % \section{Introduction} % -% This package proposes some macros to deal with spacing issues. Thus: -% +% 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; @@ -109,15 +110,18 @@ % (figures, tables, text) side by side by adjusting the vertical positioning. % \end{compactlist} % +% \medskip +% Two other common packages are loaded by \textsf{spacingtricks}: +% \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 +% 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 % in mathematical formulas. -% Let us mention also the \textsf{setspace} package (natively in \LaTeXe), -% which allows to set the space between the lines of text, and -% at last \textsf{xspace}~\cite{XSP}, -% which is loaded by \textsf{spacingtricks}: it adds a space unless the macro -% is followed by certain punctuation characters. % % \section{Usage} % @@ -380,7 +384,7 @@ % % \medskip % \DescribeMacro{\compactlistindent} -% This length (fixed at 1\,em by default) can be modified with "\setlength" to increase +% This length (fixed at 0.5\,em by default) can be modified with "\setlength" to increase % or decrease the indentation of the \texttt{compactlist} environment. % Notice that there are several other ways to construct a compact list in particular % with the \texttt{noitemsep} key of the \textsf{enumitem} package~\cite{ENUM}. @@ -411,11 +415,11 @@ % (for several paragraphs and lists), etc. % The optional \meta{pos} parameter sets the vertical level on which the boxes are aligned: % a number between 0 (bottom) and 1 (top, default value). -% Here is a first example with "\dualboxes[0.7]". +% Here is a first example with "\dualboxes[0.65]". % % \medskip % \psset{xunit=0.5cm,yunit=1.0cm,algebraic=true} -% \dualboxes[0.7]{\footnotesize +% \dualboxes[0.65]{\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 @@ -485,9 +489,13 @@ % within "\dualboxes" arguments, % just as it's not possible for footnotes or margin notes. % +% \StopEventually{} +% % \section{Implementation} % \begin{macrocode} \RequirePackage{ifthen} +\RequirePackage{calc} +\RequirePackage{setspace} \RequirePackage{xspace} \newcommand*{\centered}[1]{{\setlength{\parskip}{0pt}\par\noindent\hfill @@ -535,8 +543,9 @@ }{\end{list}} \newlength{\compactlistindent} -\setlength{\compactlistindent}{1em} +\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} @@ -567,13 +576,13 @@ \newcommand{\@@dualboxes}[3][1]{ \par\noindent - \raisebox{-#1\height}{#2} \hfill - \raisebox{-#1\height}{#3} \smallskip + \raisebox{\depth-#1\totalheight}{#2} \hfill + \raisebox{\depth-#1\totalheight}{#3} \smallskip } \newcommand{\@dualboxes}[3][1]{ \par\noindent \hfill - \raisebox{-#1\height}{#2} \hfill - \raisebox{-#1\height}{#3} \hfill\mbox{}\smallskip + \raisebox{\depth-#1\totalheight}{#2} \hfill + \raisebox{\depth-#1\totalheight}{#3} \hfill\mbox{}\smallskip } \newcommand{\dualboxes}{\@ifstar{\@@dualboxes}{\@dualboxes}} % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/spacingtricks/spacingtricks.ins b/Master/texmf-dist/source/latex/spacingtricks/spacingtricks.ins index 9a5c670e8c6..28f889e0f1b 100644 --- a/Master/texmf-dist/source/latex/spacingtricks/spacingtricks.ins +++ b/Master/texmf-dist/source/latex/spacingtricks/spacingtricks.ins @@ -1,5 +1,5 @@ %% -%% Copyright (C) 2019 by Antoine Missier +%% Copyright (C) 2019-2020 by Antoine Missier %% %% This file may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license @@ -21,7 +21,7 @@ This is a generated file. -Copyright (C) 2019 by Antoine Missier +Copyright (C) 2019-2020 by Antoine Missier This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license diff --git a/Master/texmf-dist/tex/latex/spacingtricks/spacingtricks.sty b/Master/texmf-dist/tex/latex/spacingtricks/spacingtricks.sty index d966c2f360a..bd9ea824a14 100644 --- a/Master/texmf-dist/tex/latex/spacingtricks/spacingtricks.sty +++ b/Master/texmf-dist/tex/latex/spacingtricks/spacingtricks.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2019 by Antoine Missier +%% Copyright (C) 2019-2020 by Antoine Missier %% %% This file may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license @@ -22,8 +22,10 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{spacingtricks} - [2019/09/09 v1.2 .dtx spacingtricks file] + [2020/11/02 v1.3 .dtx spacingtricks file] \RequirePackage{ifthen} +\RequirePackage{calc} +\RequirePackage{setspace} \RequirePackage{xspace} \newcommand*{\centered}[1]{{\setlength{\parskip}{0pt}\par\noindent\hfill @@ -62,8 +64,9 @@ }{\end{list}} \newlength{\compactlistindent} -\setlength{\compactlistindent}{1em} +\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} @@ -89,13 +92,13 @@ \newcommand{\@@dualboxes}[3][1]{ \par\noindent - \raisebox{-#1\height}{#2} \hfill - \raisebox{-#1\height}{#3} \smallskip + \raisebox{\depth-#1\totalheight}{#2} \hfill + \raisebox{\depth-#1\totalheight}{#3} \smallskip } \newcommand{\@dualboxes}[3][1]{ \par\noindent \hfill - \raisebox{-#1\height}{#2} \hfill - \raisebox{-#1\height}{#3} \hfill\mbox{}\smallskip + \raisebox{\depth-#1\totalheight}{#2} \hfill + \raisebox{\depth-#1\totalheight}{#3} \hfill\mbox{}\smallskip } \newcommand{\dualboxes}{\@ifstar{\@@dualboxes}{\@dualboxes}} -- cgit v1.2.3