-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheBook.tex
258 lines (218 loc) · 9.45 KB
/
eBook.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
249
250
251
252
253
254
255
256
257
258
% ----------------------------------------------------------------------------
% eBook - Mediterranea - MASTER LaTeX File
% -----------------------------------------------------------------------------
% Copyright 2018 Roberto Reale
%
% This is the Tex4eBook version of this work.
% It is designed to be formatted into .mobi, .epub, or .pdf versions for
% distribution to Amazon's Kindle, Apple iBooks, Barnes and Noble NookPress,
% or other ebook venders. An Html page can also be produced.
%
% Note: the makebook --epub script should be used to do the actual formatting.
% This will run epubcheck against the resulting .epub. The Calibre eBook editor
% should be used to check the resulting epub for quality and correct all
% errors found by epubcheck, BEFORE uploading to Ingram, CreateSpace, etc.
%
% After epubcheck runs clean use Calibre to convert to .mobi and other formats.
% -----------------------------------------------------------------------------
\listfiles
\documentclass[10pt,oneside]{book}
%% ----------------------------------------------------------------------------
%% ----- Common Document Information - Common to all Top Level Versions
\input{BookParameters.tex}
%% ----------------------------------------------------------------------------
\usepackage{geometry}
\geometry{
paperwidth=\PaperWidth in,%
paperheight=\PaperHeight in,%
left= 1.4 in,%
right= 0.5 in,%
top= 0.5 in,%
bottom=0.5 in,%
}
%\setlength{\stockheight}{\PaperHeight in} % Make hyperref happy.
%\evensidemargin=0.38in % Pushes left pages to right.
%\topmargin=-0.8in % Pushes entire page contents down
\textwidth=4.5in % width of actual text area
%\usepackage{showframe} % Show the layout frame on every page
\ifdefined\uselayouts
\usepackage{layouts} % Page layout diagram output
\printinunitsof{in} % Show layout units as inches.
\fi
%% ----------------------------------------------------------------------------
%% ----- CONTROL PARAMETERS FOR OUTPUT SELECTION -----
%% The default for producing the article form PDF should be: All options false.
%% Note: F11, Shift-Alt-F1, F1, F12, F1, F1 (Bibliography, Reauthor, Reindex,
%% and PDFLatex twice after changing)
%% Sometimes all files except .tex and .bib need to be deleted to
%% prevent errors. Setting NOINDEX, F1, F12, Unset NOINDEX can help.
\Boolean{ISBOOK} {true} % This is formatted as a book
\Boolean{FINALFORM} {false} % Ready for publication
\Boolean{EDITMODE} {no} % Editing mode (double spaced)
% Warning. Watermarks generate errors, but the doc still builds.
\Boolean{WATERMARK} {false} % Place a watermark on the text (VERY SLOW)
\Boolean{TOHTML} {true} % Format for Tex4HT conversion
\Boolean{TOMOBI} {false} % Extra Formatting for Kindle .MOBI
\Boolean{TOEPUB} {false} % Extra Formatting for IDPF .EPUB
\Boolean{RAWHTML} {no} % Allow /HCode directly in text [no PDF]
\Boolean{TOPRESS} {false} % Format for paper printing
\Boolean{NOCOLOR} {false} % Format for monochrome output
\Boolean{SUBCAPTIONS} {off} % Allow subcaptioned figures.
\Boolean{PARENTIMAGES}{false} % Images are in a parent directory.
\Boolean{CHAPTERNOTES}{off} % Place endnotes at end of each chapter
\Boolean{NOBODY} {false} % Incude only the intro [debugging]
\Boolean{NOLISTS} {off} % Do not generate lists of figures and tables
\Boolean{NOFIGLIST} {off} % Do not generate list of figures
\Boolean{NOFIGSRCS} {on} % Do not generate a list of figure sources
\Boolean{NOTABLIST} {on} % Do not generate list of tables
\Boolean{NOINDEX} {off} % Do not generate index entries
\Boolean{NOAUTHORS} {off} % Do not include the Authors section
\Boolean{NOHYPERREF} {off} % Disables hyperref - href linking
\Boolean{NOABBR} {true} % Suppress abbreviations section
\Boolean{NOIMAGES} {no} % Disable Graphics inclusion
\Boolean{ONECOLUMN} {true} % Use single column for indexes, authors, etc.
\Boolean{IMAGEMATH} {true} % Use saved images for complex math expressions
%% ----------------------------------------------------------------------------
%% John's COMMON Packages and Command Macros
\input{tex/zzInit.tex}% % Document packages and commands
\usepackage{lipsum}
%% ----------------------------------------------------------------------------
%\usepackage{showidx} % Enable index display in margins for checking
\advance\hoffset by -0.7 truein\relax
\def\theaipage{\string\hyperpage{\thepage}}
\let\footnote=\endnote % Convert all footnotes into endnotes
\setlength{\columnsep}{5mm} % Space between two columns
\appto{\theindex}{\spaceskip=.33333em plus .33333em minus .11111em }
% Double spacing when editing
\ifthenelse{\boolean{FINALFORM}}{}{
\ifthenelse{\boolean{EDITMODE}}{\linespread{1.6}}{}}
\InitMakeIndex % Set up \index commands
\makeindex % Enable \index commands (oddly, must be at top level)
%------------------------------------------------------------------------------
%% Nomenclature and abbreviation commands
\input{tex/zzAbbr.tex}
\def\pgfsys@svg@newline{^^J}
\def\Hnewline{^^J}
%------------------------------------------------------------------------------
%------------------------------------------------------------------------------
\begin{document}
\frontmatter
\pagenumbering{gobble} % Unnumbered cover page
\ifthenelse{\boolean{TOHTML}}{%
\IMAGE[width=1.0\textwidth]{eBookCoverPage.jpg}%
}{}%
%------------------------------------------------------------------------------
% Title Page
\newlength{\drop}
\input{tex/zzTitlepage.tex}
%------------------------------------------------------------------------------
% Copyright Page
\newpage
\input{tex/zzCopyright.tex}
\StopIndent
%------------------------------------------------------------------------------
% Table of Contents
\newpage
\pagenumbering{roman} % lowercase roman numerals
\setcounter{page}{3} % Set the page number
% Name the sections as needed
\renewcommand{\contentsname}{\huge{Contents}}
\renewcommand{\listfigurename}{List of Figures}
\renewcommand{\listtablename}{List of Tables}
\pagestyle{plain}
\tableofcontents
\newpage
\Indent
%% ----------------------------------------------------------------------------
%% Preface page(s)
\clearpage
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\input{tex/preface}
%% ----------------------------------------------------------------------------
%% ----------------------------------------------------------------------------
%% Chapters
\mainmatter % book only.
\pagestyle{headings}
\clearpage
\pagenumbering{arabic} % lowercase arabic numbers
\setcounter{page}{1} % Set the first page number
\input{tex/introduction}
\ifthenelse{\boolean{NOBODY}}{}{
\input{tex/body}%
}
%\clearpage % flush any floating elements
\backmatter
\BookEndNotes
%% ----------------------------------------------------------------------------
%% ----------------------------------------------------------------------------
%% References [Bibliography of /cited works]
%\setcounter{page}{499}% Set the page number
\cleardoublepage\phantomsection%
\addcontentsline{toc}{chapter}{Bibliography}%
% Note! If you have more than one bibliography file, make sure to
% put them all on the same line or TeXlive gets confused.
\bibliography{tex/bib/book}
%% NOTE! Changing the bibliography style will cause massive reformatting of
%% all of the text. You will need to check every page for bad box warnings:
%% ()over/under full \hbox) lines. Don't do this lightly.
%%
%\bibliographystyle{apalike} % Prime Author and year
\bibliographystyle{plain} % Just numbers
%\bibliographystyle{abbrv}
%\bibliography{bib,bib_extra}
%\bibliographystyle{alpha} % Authors last name first letters, year
%% ----------------------------------------------------------------------------
%% Cited Authors
\PrintAuthorIndex
%
%% ----------------------------------------------------------------------------
%% List of Figure Sources
\ifthenelse{\boolean{NOLISTS}}{}{%
\cleardoublepage\phantomsection%
\ifthenelse{\boolean{NOFIGLIST}}{}{%
% List of Figure Sources (attributions)
\ifthenelse{\boolean{NOFIGSRCS}}{}{%
\newpage
\RunningHeads{FIGURE SOURCES}%
\addcontentsline{toc}{chapter}{List of Figure Sources}%
\listofsources
\noindent\textbf{Note}: Additional information on sources and attributions for illustrations and figures can be found online at
\URL{http://YourBooksURL.com/}
}
}
}
%
%% ----------------------------------------------------------------------------
%% Nomenclature, Terms, Abbreviations, Acronyms, and Glossary
\ifthenelse{\boolean{NOABBR}}{}{
\newpage
\addcontentsline{toc}{chapter}{Abbreviations and Terms}
\PrintAcronyms%
}%
%
%% ----------------------------------------------------------------------------
%% Permuted index
\ifthenelse{\boolean{NOINDEX}}{}{%
\cleardoublepage\phantomsection%
% \setcounter{page}{999} % Set the page number [debugging]
\renewcommand{\indexname}{Index}%
\addcontentsline{toc}{chapter}{The Index}%
\raggedright
\PrintIndex%
}%
\RunningHeads{}
%
%% ----------------------------------------------------------------------------
%% Page of metrics and diagram about the physical and logical page format.
\ifdefined\uselayouts
\clearpage
\currentpage
\pagediagram
\pagevalues
\fi
%%
----------------------------------------------------------------------------
\cleardoublepage\phantomsection%
\typeout{\detokenize{\TRAP-LOG-MESSAGE}\{\TheAuthor message\}}.
\end{document}