summaryrefslogtreecommitdiff
path: root/macros/luatex/latex/novel/lualatex/novel-Sandbox.sty
blob: 8c8b8210f11ec8ac38b7df3292df0d497cc6cafd (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
%% This is file `novel-Sandbox.sty', part of `novel' document class.
%% Copyright 2017-2023 Robert Allgeyer.
%%
%% Material extracted from `article.cls', a LaTeX document class.
%% Copyright 1993-2016
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file. LPPL 1.3c.
%% 
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, version 1.3c only.
%%   https://www.latex-project.org/lppl/lppl-1-3c/ 
%%
\ProvidesFile{novel-Sandbox.sty}%
[2023/03/25 v1.81b LaTeX file (used only with sandbox class option)]
%%

%%
%% This file is only loaded when the `sandbox' document class is used.
%% It provides support for tables, and a few other things that ordinarily
%%   would be prohibited in `novel' due to possible layout incompatibility.
%%
%% Normally, `novel' sets many glues and lengths to zero, to maintain line grid.
%% But `sandbox', sets the glues to values typical of other document classes.
%% So, not only can you construct tables, they will look as expected.
%%




\setlength\leftmargini  {2.5em}
\leftmargin  \leftmargini
\setlength\leftmarginii  {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv  {1.7em}
\setlength\leftmarginv  {1em}
\setlength\leftmarginvi {1em}
\setlength  \labelsep  {.5em}
\setlength  \labelwidth{\leftmargini}
\addtolength\labelwidth{-\labelsep}
\@beginparpenalty -\@lowpenalty
\@endparpenalty   -\@lowpenalty
\@itempenalty     -\@lowpenalty
\renewcommand\theenumi{\@arabic\c@enumi}
\renewcommand\theenumii{\@alph\c@enumii}
\renewcommand\theenumiii{\@roman\c@enumiii}
\renewcommand\theenumiv{\@Alph\c@enumiv}
\newcommand\labelenumi{\theenumi.}
\newcommand\labelenumii{(\theenumii)}
\newcommand\labelenumiii{\theenumiii.}
\newcommand\labelenumiv{\theenumiv.}
\renewcommand\p@enumii{\theenumi}
\renewcommand\p@enumiii{\theenumi(\theenumii)}
\renewcommand\p@enumiv{\p@enumiii\theenumiii}
\newcommand\labelitemi{\textbullet}
\newcommand\labelitemii{\normalfont\bfseries \textendash}
\newcommand\labelitemiii{\textasteriskcentered}
\newcommand\labelitemiv{\textperiodcentered}
\newenvironment{description}
               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
                        \let\makelabel\descriptionlabel}}
               {\endlist}
\newcommand*\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\bfseries #1}



\setlength\tabcolsep{6pt}
\setlength\arrayrulewidth{.4pt}
\setlength\doublerulesep{2pt}
\setlength\tabbingsep{\labelsep}


\newcounter{figure}
\renewcommand \thefigure {\@arabic\c@figure}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename\nobreakspace\thefigure}

\newenvironment{figure}
               {\@float{figure}}
               {\end@float}
\newenvironment{figure*}
               {\@float{figure}}
               {\end@float}



\newcounter{table}
\renewcommand\thetable{\@arabic\c@table}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename\nobreakspace\thetable}

\newenvironment{table}
               {\@float{table}}
               {\end@float}
\newenvironment{table*}
               {\@float{table}}
               {\end@float}



\newlength\abovecaptionskip
\newlength\belowcaptionskip

\setlength\abovecaptionskip{\nbs}

\setlength\belowcaptionskip{0pt}

\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1: #2}%
  \ifdim \wd\@tempboxa >\hsize
    #1: #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}







\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}



\endinput

%% end of file `novel-Sandbox.sty'.