-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode.tex
248 lines (225 loc) · 7.51 KB
/
code.tex
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
\documentclass{book}
\usepackage[margin=3cm]{geometry} % make our margins a little smaller instead of following the regular book document style
\usepackage{amsmath} % for \frac{enum}{denom}, although $^{enum}/_{denom}$ might look better...
\usepackage{enumerate} % for the creation of styled enumerated lists (one step above a normal enumeration)
\usepackage[tight,k-tight]{minitoc} % tocs for each section
\usepackage{tocloft} % formatting for our tocs
\usepackage{fmtcount} % leading zeros for our section numbering
\usepackage[hyperfootnotes=false]{hyperref} % clickable links within our document, minus footnotes
\usepackage{multirow} % allow multirow/multicolumn formatting in tables
\usepackage{graphicx} % for displaying images inline
\usepackage{array} % for fine-tuned tabular display
\usepackage{lscape} % allows us to insert landscape pages (only in chapter 152 thus far)
\usepackage{setspace} % fix multiline 'subchapters'
\usepackage[stable]{footmisc} % footnotes in section headings
\usepackage{makeidx} % for index generation
\usepackage{needspace} % hack to keep our 'subchapters' from being widows
\usepackage{fancyhdr} % custom headers and footers
\setcounter{tocdepth}{1} % only show tocs to the section depth
\setcounter{minitocdepth}{1} % only show minitocs to the section depth
\setcounter{secnumdepth}{4} % force numbering to paragraph depth
\renewcommand{\thesubsection}{\thesection.\Alph{subsection}} % give our subsections upper-case letters instead of numbers
\renewcommand{\theparagraph}{\thesubsubsection.\alph{paragraph}} % give our paragraphs lower-case letters instead of numbers
% we want three digit long sections, so enforce leading zeros
\newcommand{\leadingzero}{\ifnum\value{section}<100 \ifnum\value{section}<10 0\else \fi\fi\arabic{section}}
\renewcommand{\thesection}{\thechapter.\leadingzero}
% create 'subchapters' and include them in our ToC
% unfortunately, doesn't show up in minitoc
\newcommand{\subchapter}[1]{
\needspace{10\baselineskip}
\begin{center}
\begin{spacing}{1.5}\vskip 1cm\emph{\textbf{\LARGE{#1}}}\end{spacing}
\end{center}
\vskip-1cm\nobreak
% \addcontentsline{toc}{}{\protect{\hspace{1em}SUBCHAPTER: #1\hfill}}
\addtocontents{toc}{%
\protect\vspace{.3em}%
\protect\noindent\hspace{1em}SUBCHAPTER: #1\protect\par
\protect\vspace{.1em}%
}
}
\newcommand{\fillable}[1]{\noindent\rule{#1}{0.6pt}} % create a command for drawing a signature/date type line
% tocloft
\setlength{\cftsecnumwidth}{3.7em} % give ourselves enough space between section numbers and their titles in the toc
% minitoc
\renewcommand{\mtcSfont}{\small\normalfont} % print our minitocs in a normal font
% hyperref
\hypersetup{
colorlinks,
linktoc=all,
linkcolor=blue
}
% let's be more aggressive about eliminating widows and orphans from our text
\widowpenalty=1000
\clubpenalty=1000
% makeidx
\makeindex
% fancyhdr
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
\frontmatter
\input{chap/title}
\cleardoublepage
\fancyhead[LE,RO]{}
\fancyhead[CE,CO]{TABLE OF CONTENTS}
\fancyfoot[LE,RO]{\thepage}
\dominitoc % set up for minitoc
\tableofcontents
\mainmatter
\fancyhead[LE,RO]{\thesection}
\fancyhead[CE,CO]{CITY OF CROOKSTON CODES \& ORDINANCES}
\fancyfoot[LE,RO]{\thepage}
\setcounter{part}{0} % force toc correctness
\part*{Title I: General Provisions}
\addcontentsline{toc}{part}{Title I: General Provisions}
\setcounter{chapter}{10}
\setcounter{section}{0}
\input{chap/chapter10}
\setcounter{chapter}{11}
\setcounter{section}{0}
\input{chap/chapter11}
\setcounter{part}{2} % force ToC correctness
\part*{Title III: Administration}
\addcontentsline{toc}{part}{Title III: Administration}
\setcounter{chapter}{30}
\setcounter{section}{0}
\input{chap/chapter30}
\setcounter{chapter}{31}
\setcounter{section}{0}
\input{chap/chapter31}
\setcounter{chapter}{32}
\setcounter{section}{0}
\input{chap/chapter32}
\setcounter{chapter}{33}
\setcounter{section}{0}
\input{chap/chapter33}
\setcounter{chapter}{34}
\setcounter{section}{0}
\input{chap/chapter34}
\setcounter{chapter}{35}
\setcounter{section}{0}
\input{chap/chapter35}
\setcounter{chapter}{36}
\setcounter{section}{0}
\input{chap/chapter36}
\setcounter{part}{4} % force ToC correctness
\part*{Title V: Public Works}
\addcontentsline{toc}{part}{Title V: Public Works}
\setcounter{chapter}{50}
\setcounter{section}{0}
\input{chap/chapter50}
\setcounter{chapter}{51}
\setcounter{section}{0}
\input{chap/chapter51}
\setcounter{chapter}{52}
\setcounter{section}{0}
\input{chap/chapter52}
\setcounter{chapter}{53}
\setcounter{section}{0}
\input{chap/chapter53}
\setcounter{part}{6} % force ToC correctness
\part*{Title VII: Traffic Code}
\addcontentsline{toc}{part}{Title VII: Traffic Code}
\setcounter{chapter}{70}
\setcounter{section}{0}
\input{chap/chapter70}
\setcounter{chapter}{71}
\setcounter{section}{0}
\input{chap/chapter71}
\setcounter{chapter}{72}
\setcounter{section}{0}
\input{chap/chapter72}
\setcounter{part}{8} % force ToC correctness
\setcounter{chapter}{79}
\part*{Title IX: General Regulations}
\addcontentsline{toc}{part}{Title IX: General Regulations}
\setcounter{chapter}{90}
\setcounter{section}{0}
\input{chap/chapter90}
\setcounter{chapter}{91}
\setcounter{section}{0}
\input{chap/chapter91}
\setcounter{chapter}{92}
\setcounter{section}{0}
\input{chap/chapter92}
\setcounter{chapter}{93}
\setcounter{section}{0}
\input{chap/chapter93}
\setcounter{chapter}{94}
\setcounter{section}{0}
\input{chap/chapter94}
\setcounter{chapter}{95}
\setcounter{section}{0}
\input{chap/chapter95}
\setcounter{chapter}{96}
\setcounter{section}{0}
\input{chap/chapter96}
\setcounter{part}{10} % force ToC correctness
\setcounter{chapter}{109}
\part*{Title XI: Business Regulations}
\addcontentsline{toc}{part}{Title XI: Business Regulations}
\setcounter{chapter}{110}
\setcounter{section}{0}
\input{chap/chapter110}
\setcounter{chapter}{111}
\setcounter{section}{0}
\input{chap/chapter111}
\setcounter{chapter}{112}
\setcounter{section}{0}
\input{chap/chapter112}
\setcounter{chapter}{113}
\setcounter{section}{0}
\input{chap/chapter113}
\setcounter{chapter}{114}
\setcounter{section}{0}
\input{chap/chapter114}
\setcounter{chapter}{115}
\setcounter{section}{0}
\input{chap/chapter115}
\setcounter{chapter}{116}
\setcounter{section}{0}
\input{chap/chapter116}
\setcounter{chapter}{117}
\setcounter{section}{0}
\input{chap/chapter117}
\setcounter{chapter}{118}
\setcounter{section}{0}
\input{chap/chapter118}
\setcounter{chapter}{119}
\setcounter{section}{0}
\input{chap/chapter119}
\setcounter{chapter}{120}
\setcounter{section}{0}
\input{chap/chapter120}
\setcounter{part}{12} % force ToC correctness
\setcounter{chapter}{129}
\part*{Title XIII: General Offenses}
\addcontentsline{toc}{part}{Title XIII: General Offenses}
\setcounter{chapter}{130}
\setcounter{section}{0}
\input{chap/chapter130}
\setcounter{part}{14} % force ToC correctness
\setcounter{chapter}{149}
\part*{Title XV: Land Usage}
\addcontentsline{toc}{part}{Title XV: Land Usage}
\setcounter{chapter}{150}
\setcounter{section}{0}
\input{chap/chapter150}
\setcounter{chapter}{151}
\setcounter{section}{0}
\input{chap/chapter151}
\setcounter{chapter}{152}
\setcounter{section}{0}
\input{chap/chapter152}
\cleardoublepage
%\addcontentsline{toc}{chapter}{Index}
\backmatter
\fancyhead[LE,RO]{}
\fancyhead[CE,CO]{INDEX}
\fancyfoot[LE,RO]{\thepage}
\addcontentsline{toc}{chapter}{Index}
\printindex % last, but not least
\end{document}