summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/spacingtricks/spacingtricks.sty
blob: d026b759d57d092fdb73fb67786a4606ff6bb390 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
%%
%% This is file `spacingtricks.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% spacingtricks.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2019 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
%% or (at your option) any later version. The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3 or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{spacingtricks}
    [2019/06/26 v1.0 .dtx spacingtricks file]
\RequirePackage{ifthen}
\RequirePackage{xspace}

\newcommand*{\centered}[1]{{\setlength{\parskip}{0pt}\par\noindent\hfill
    #1\hfill\mbox{}\par}}
\newcommand{\footnotespace}{}
\newcommand{\footnoteindent}{}
\let\footnt\footnote
\renewcommand{\footnote}[2][]{\unskip\footnotespace%
    \ifthenelse{\equal{#1}{}}{
        \unskip\footnt{\footnoteindent\ignorespaces #2}
    }{
        \unskip\footnt[#1]{\footnoteindent\ignorespaces #2}
    }\unskip
}
\newlength{\strutheight}
\newcommand*{\vstrut}[2][0pt]{%
    \setlength{\strutheight}{#2}%
    \addtolength{\strutheight}{#1}%
    \unskip
    \ensuremath{\rule[-#1]{0pt}{\strutheight}}%
    \ignorespaces%
}

\newlength{\parindentlength}
\setlength{\parindentlength}{\parindent}
\renewcommand{\indent}{\hspace{\parindentlength}}

\newenvironment*{indentblock}[1][\parindentlength]{
    \begin{list}{}{%
        \setlength{\leftmargin}{#1}
        \setlength{\itemsep}{0pt}
        \setlength{\topsep}{1ex}
        \setlength{\partopsep}{0pt}
        }
    \item[]
    }{\end{list}}

\newenvironment*{compactlist}[1][\textbullet]{
    \begin{list}{#1\unskip}{% \unskip suppresses the space created by \xspace
        \setlength{\labelwidth}{1em}
        %\setlength{\leftmargin}{\labelwidth} % indentation
        \setlength{\itemsep}{0pt}
        \setlength{\parsep}{0pt}
        \setlength{\topsep}{0ex}
        \setlength{\partopsep}{0pt}
        }
    }{\end{list}}

\providecommand{\bul}{\textbullet}
\providecommand{\dash}{\textendash}
\providecommand{\ddash}{\textemdash}
\providecommand{\aster}{\textasteriskcentered}
\providecommand{\hand}{\ding{43}\xspace}
\providecommand{\checksymb}{\ding{51}\xspace}
\providecommand{\arrowsymb}{\ding{226}\xspace}

\providecommand{\ie}{i.e.\@\xspace}
\providecommand{\eg}{e.g.\@\xspace}

\newcommand{\@@dualboxes}[3][1]{
    \par\noindent
    \raisebox{-#1\height}{#2} \hfill
    \raisebox{-#1\height}{#3} \smallskip
    }
\newcommand{\@dualboxes}[3][1]{
    \par\noindent \hfill
    \raisebox{-#1\height}{#2} \hfill
    \raisebox{-#1\height}{#3} \hfill\mbox{}\smallskip
    }
\newcommand{\dualboxes}{\@ifstar{\@@dualboxes}{\@dualboxes}}

\endinput
%%
%% End of file `spacingtricks.sty'.