-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tex
More file actions
312 lines (226 loc) · 11 KB
/
Copy pathmain.tex
File metadata and controls
312 lines (226 loc) · 11 KB
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
%----------------------------------------------------------------------------------------
% AI Harmony
%----------------------------------------------------------------------------------------
% For PDF do the following
% Edit around line 71 to change include pdf version
% Edit around line 14 twoside=true below
% For KDP/Kindle/doc do the following
% Edit around line 71 to change include doc to pdf version
% Edit around line 14 twoside=false below
% open resulting pdf at https://smallpdf.com/pdf-to-word to convert to word
\documentclass[
letterpaper, % Page size
fontsize=10pt, % Base font size
twoside=true, % Use different layouts for even and odd pages (in particular, if twoside=true, the margin column will be always on the outside)
%open=any, % If twoside=true, uncomment this to force new chapters to start on any page, not only on right (odd) pages
%chapterentrydots=true, % Uncomment to output dots from the chapter name to the page number in the table of contents
numbers=noenddot, % Comment to output dots after chapter numbers; the most common values for this option are: enddot, noenddot and auto (see the KOMAScript documentation for an in-depth explanation)
]{kaobook}
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
% Choose the language
\ifxetexorluatex
\usepackage{polyglossia}
\setmainlanguage{english}
\else
\usepackage[english]{babel} % Load characters and hyphenation
\fi
\usepackage[english=british]{csquotes} % English quotes
% title customization
% Load packages for testing
\usepackage{blindtext} % Print text without any meaning for testing purposes
%\usepackage{showframe} % Uncomment to show boxes around the text area, margin, header and footer
%\usepackage{showlabels} % Uncomment to output the content of \label commands to the document where they are used
% Load the bibliography package
\usepackage{kaobiblio}
\addbibresource{main.bib} % Bibliography file
% Load mathematical packages for theorems and related environments
\usepackage[framed=true]{kaotheorems}
% Load the package for hyperreferences
\usepackage{kaorefs}
\graphicspath{{examples/documentation/images/}{images/}} % Paths in which to look for images
% Load comment package to temporarily remove stuff for formatting
\usepackage{comment}
%----------------------------------------------------------------------------------------
% FABLE EDITION ANNOTATIONS
%----------------------------------------------------------------------------------------
% Margin notes added for the 2026 "Fable Edition" update. The original 2023 text is
% preserved wherever possible; hindsight lives in the margins.
\definecolor{fableblue}{RGB}{25,75,140}
\NewDocumentCommand{\fablenote}{ O{0pt} +m }{%
\marginnote[#1]{\textcolor{fableblue}{\textbf{2026 update:}}\enskip #2}%
}
\makeindex[columns=3, title=Alphabetical Index, intoc] % Make LaTeX produce the files required to compile the index
\makeglossaries % Make LaTeX produce the files required to compile the glossary
\input{glossary.tex} % Include the glossary definitions
\makenomenclature % Make LaTeX produce the files required to compile the nomenclature
% Reset sidenote counter at chapters
%\counterwithin*{sidenote}{chapter}
%----------------------------------------------------------------------------------------
% FORMATTING KILLERS!!!!!!
%----------------------------------------------------------------------------------------
% Remove sidenotes and shit to easily edit in word
% You might need to redefine this if you get an error from the comment setup
\excludecomment{doc}
\includecomment{pdf}
\begin{doc}
\RenewDocumentCommand{\fablenote}{ O{0pt} +m }{}
\renewcommand{\sidenote}[1]{}
\renewcommand{\sidecite}[1]{\cite{#1}} % Use \cite instead of \sidecite since you are removing margins
\renewcommand{\setchapterpreamble}[1]{}
\renewcommand{\includepdf}[1]{}
\renewcommand{\labfig}[1]{}
\renewcommand{\margintoc}[1]{}
\usepackage{xparse}
\renewcommand{\marginlayout}{
\newgeometry{
top=27.4mm, % height of the top margin
bottom=27.4mm, % height of the bottom margin
inner=24.8mm, % width of the inner margin
textwidth=164.6mm, % width of the text
marginparsep=0mm, % width between text and margin
marginparwidth=0mm, % width of the margin
}
}
\end{doc}
\begin{document}
\captionsetup{labelformat=empty}
%----------------------------------------------------------------------------------------
% FRONT COVER
%----------------------------------------------------------------------------------------
% If you have a PDF/image file that you want to use as a back cover, uncomment the following lines
%\includepdf{cover.pdf}
%----------------------------------------------------------------------------------------
% BOOK INFORMATION
%----------------------------------------------------------------------------------------
% if this is too annoying to format, just get rid of it and do a custom title page https://github.com/fmarotta/kaobook/issues/195
\titlehead{}
\subject{}
\title[AI Harmony]{AI Harmony}
\subtitle{Blending Human Expertise and AI for Business Success}
\author[Brad Flaugher]{Brad Flaugher}
\date{The Fable Edition \textperiodcentered{} Revised \& Updated \textperiodcentered{} 2026}
\publishers{\includegraphics[width=0.3\textwidth]{publogo}}
%----------------------------------------------------------------------------------------
\frontmatter % Denotes the start of the pre-document content, uses roman numerals
%----------------------------------------------------------------------------------------
% OPENING PAGE, should be excluded for pdf ebook
%----------------------------------------------------------------------------------------
%\makeatletter
%\extratitle{
% % In the title page, the title is vspaced by 9.5\baselineskip
%\vspace*{9\baselineskip}
% \vspace*{\parskip}
%\begin{center}
% % In the title page, \huge is set after the komafont for title
% \usekomafont{title}\huge\@title
% \end{center}
% %\includepdf{blank.pdf}
%}
%\makeatother
%----------------------------------------------------------------------------------------
% COPYRIGHT PAGE, will be skipped if twosided=false, add to backmatter if needed
%----------------------------------------------------------------------------------------
\makeatletter
\lowertitleback{
\textcopyright 2023, 2026 Brad Flaugher
All Rights Reserved
\medskip
\noindent First Edition published May 2023
\noindent The Fable Edition (revised and updated) published June 2026
\medskip
\noindent Hardcover \textbf{ISBN:978-1-956257-82-3}
\noindent eBook \textbf{ISBN:978-1-956257-81-6}
%\noindent\textbf{DOI:}
}
\makeatother
%----------------------------------------------------------------------------------------
% DEDICATION
%----------------------------------------------------------------------------------------
\dedication{
\textit{To the visionary mentors who unraveled the enigma of mathematical chaos, kindling the flames of lucidity in the realms of modeling and AI.}
}
%----------------------------------------------------------------------------------------
% OUTPUT TITLE PAGE AND PREVIOUS
%----------------------------------------------------------------------------------------
% Note that \maketitle outputs the pages before here
\maketitle
%----------------------------------------------------------------------------------------
% ACKNOWLEDGEMENTS, PREFACE, ETC
%----------------------------------------------------------------------------------------
\input{chapters/acknowledgements.tex}
\index{acknowledgements}
\begin{pdf}
\input{chapters/qr.tex}
\index{qr}
\end{pdf}
\input{chapters/fable_preface.tex}
\index{fable preface}
\input{chapters/preface.tex}
\index{preface}
\input{chapters/foreword.tex}
\index{foreword}
%----------------------------------------------------------------------------------------
% TABLE OF CONTENTS & LIST OF FIGURES/TABLES
%----------------------------------------------------------------------------------------
\begingroup % Local scope for the following commands
% Define the style for the TOC, LOF, and LOT
%\setstretch{1} % Uncomment to modify line spacing in the ToC
%\hypersetup{linkcolor=blue} % Uncomment to set the colour of links in the ToC
\setlength{\textheight}{230\hscale} % Manually adjust the height of the ToC pages
% Turn on compatibility mode for the etoc package
\etocstandarddisplaystyle % "toc display" as if etoc was not loaded
\etocstandardlines % "toc lines as if etoc was not loaded
\tableofcontents % Output the table of contents
\input{chapters/summary.tex}
\index{summary}
% \listoffigures % Output the list of figures
% Comment both of the following lines to have the LOF and the LOT on
% different pages
% \let\cleardoublepage\bigskip
% \let\clearpage\bigskip
% \listoftables % Output the list of tables
% \listoflstlistings % Output the list of listings
\endgroup
%----------------------------------------------------------------------------------------
% MAIN BODY
%----------------------------------------------------------------------------------------
\mainmatter % Denotes the start of the main document content, resets page numbering and uses arabic numbers
\begin{doc}
\setchapterstyle{plain}
\end{doc}
\begin{pdf}
\setchapterstyle{kao} % Choose the default chapter heading style
\end{pdf}
\input{chapters/chapter1.tex}
\input{chapters/chapter2.tex}
\input{chapters/chapter3.tex}
\input{chapters/chapter4.tex}
\input{chapters/chapter5.tex}
\input{chapters/chapter6.tex}
\input{chapters/chapter7.tex}
\input{chapters/chapter8.tex}
\begin{pdf}
\input{chapters/omissions.tex}
\end{pdf}
%----------------------------------------------------------------------------------------
\backmatter % Denotes the end of the main document content
\setchapterstyle{plain} % Output plain chapters from this point onwards
%----------------------------------------------------------------------------------------
% BIBLIOGRAPHY
%----------------------------------------------------------------------------------------
% The bibliography needs to be compiled with biber using your LaTeX editor, or on the command line with 'biber main' from the template directory
\defbibnote{bibnote}{Here are the references in citation order.\par\bigskip} % Prepend this text to the bibliography
\printbibliography[heading=bibintoc, title=Bibliography, prenote=bibnote] % Add the bibliography heading to the ToC, set the title of the bibliography and output the bibliography note
%----------------------------------------------------------------------------------------
% BACK COVER
%----------------------------------------------------------------------------------------
% If you have a PDF/image file that you want to use as a back cover, uncomment the following lines
%\clearpage
%\thispagestyle{empty}
%\null%
%\clearpage
%\includepdf{cover-back.pdf}
%----------------------------------------------------------------------------------------
\end{document}