-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBook.tex
57 lines (41 loc) · 1.36 KB
/
Book.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
% arara: pdflatex: { synctex: yes, options: [ '-halt-on-error' ] }
% arara: biber if exists(toFile('references.bib')) && exists('bcf')
% arara: pdflatex: { synctex: yes } if exists('toc') || exists('bbl')
% arara: pdflatex: { synctex: yes } while (found('log', '(?<!rerunfilecheck.{15,20})Rerun'))
% arara: clean: { extensions: [ log, out, toc, aux, blg, bcf, bbl, run.xml ] }
\documentclass{book}
% Useful packages
\usepackage[margin=1in]{geometry}
\usepackage{tocloft}
% Custom functions to declare a chapter author and have it appear in the TOC
\usepackage{suffix}
\newcommand\chapterauthor[1]{\authortoc{#1}\printchapterauthor{#1}}
\WithSuffix\newcommand\chapterauthor*[1]{\printchapterauthor{#1}}
\makeatletter
\newcommand{\printchapterauthor}[1]{%
{\parindent0pt\vspace*{-25pt}%
\linespread{1.1}\large\scshape#1%
\par\nobreak\vspace*{35pt}}
\@afterheading%
}
\newcommand{\authortoc}[1]{%
\addtocontents{toc}{\vskip-10pt}%
\addtocontents{toc}{%
\protect\contentsline{chapter}%
{\hskip1.3em\mdseries\scshape\protect\scriptsize#1}{}{}}
\addtocontents{toc}{\vskip5pt}%
}
\makeatother
% Title creation
\title{TITLE}
\author{YOU}
\begin{document}
\maketitle
\tableofcontents
\frontmatter
Front matter (e.g. Preface, Dedication) goes here.
\mainmatter
Main content goes here
\backmatter
Back matter (e.g. Index, Bibliography) goes here
\end{document}