]> pere.pagekite.me Git - text-free-culture-lessig.git/blob - myclass.cls
f6b10c1b5ac9dd78b7acfb3ce57ccdb1d2f8d432
[text-free-culture-lessig.git] / myclass.cls
1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesPackage{myclass}[]
3
4 %% Just use the original class and pass the options
5 \LoadClassWithOptions{report}
6 % report, book, memoir, scrreprt or scrbook ?
7
8 % Put the index in the TOC
9 \makeatletter
10 \let\stdindex=\theindex
11 \let\endstdindex=\endtheindex
12 \renewenvironment{theindex}{
13 \begin{stdindex}
14 \@ifundefined{chapter}{}{
15 % To not have the number, replace by:
16 % \addcontentsline{toc}{chapter}{\numberline{}\indexname}
17 \ifnum \c@secnumdepth >\z@
18 \ifnum \value{part} >\z@
19 \addcontentsline{toc}{part}{\numberline{\thechapter}\hspace{-1em}\indexname}
20 \else
21 \addcontentsline{toc}{chapter}{\numberline{\thechapter}\indexname}
22 \fi
23 \else
24 \addcontentsline{toc}{chapter}{\indexname}
25 \fi
26 }
27 }{
28 \end{stdindex}
29 }
30 \makeatother
31
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33
34 % From
35 % https://amyrhoda.wordpress.com/2012/06/04/latex-to-lulu-the-making-of-aosa-other-useful-packages-and-settings/
36
37 % The microtype package provides the ability to micromanage your
38 % typography. When invoked without any options it does some nice things
39 % like protruding punctuation over the edge of the right margin to make
40 % the margin appear smoother. Basically it makes your book look more
41 % professional with very little effort. It also has a ton of options if
42 % you want to micromanage even more.
43 \usepackage{microtype}
44
45 % By dafault, LaTeX will try and make all your pages the length that
46 % you set using the geometry setting. If a page has images, tables,
47 % headings or paragraph breaks which make it shorter than that page
48 % length, LaTeX will pad the page by adding whitespace between
49 % elements. We thought that looked sillier than having pages be
50 % different lengths, so we used the raggedbottom command.
51 \raggedbottom
52
53 % Hint for figure with empty title: remove the colon label separator
54 \usepackage{caption}
55 \captionsetup[figure]{labelsep=none}