summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/misc/spacing.sty
blob: 530c07ff377bdec0783d9687adc09a9f02f596b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
\makeatletter

% Single- and double-spacing macros for LATEX

% To use these macros, simply include "spacing" as an optional argument to the
% \documentsyle command, e.g.,
%
%       \documentstyle[12pt,spacing]{article}
%
% in your LATEX file.  The options can appear in any order.

% These macros are designed to be used with \begin and \end in the typical
% LATEX-environment way, e.g.,
%
%       \begin{singlespace}
%           .
%           .
%           .
%        \begin{doublespace}
%            .
%            .
%            .
%        \end{doublespace}
%           .
%           .
%           .
%       \end{singlespace}

\def\singlespace{\par%
 \vskip \parskip%
 \vskip \baselineskip%
 \def\baselinestretch{1}%
 \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi%
 \vskip -\parskip%
 \vskip -\baselineskip}

\def\endsinglespace{\par}

\def\doublespace{\par%
 \def\baselinestretch{2}%
 \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi}

\def\enddoublespace{\par%
 \vskip \parskip%
 \vskip \baselineskip%
 \endgroup%
 \vskip -\parskip%
 \vskip -\baselineskip%
 \begingroup}

\makeatother