Skip to content
Newer
Older
100644 104 lines (90 sloc) 2.82 KB
11008ab @armandofox initial checkin
authored
1 % book version - referenced by some other macros, but optional for you
2 \newcommand{\bookversion}{1.0}
3
1892d1e @armandofox works for pdf, almost works for mobi
authored
4 % ::EDITME::
5 % If you're using Pastebin integration (see docs) or screencast
6 % integration (see docs), change these to the base URI of your account
7 % on Pastebin or Vimeo. If this makes no sense to you, leave this
8 % alone.
9 \newcommand{\pastebinbase}{}
10 \newcommand{\vimeobase}{}
11
11008ab @armandofox initial checkin
authored
12 % load macros, some of which depend on the above switches
13 \input{macros}
14
15 % Enable compilation of just a single chapter at a time.
16 % \onechap will be defined as TRUE in only.tex if it
17 % exists, and used in an \includeonly below.
18 \IfFileExists{only.tex}%
19 {\input{only}}%
20 {\def\onechap{FALSE}}
21
22 % partial compilation?
23 \ifthenelse{\equal{\onechap}{FALSE}}%
24 {\newif\ifwholebook\wholebooktrue}% full compilation
25 {\newif\ifwholebook\wholebookfalse}% partial compilation
26
27 % ::EDITME::
28 % comment out the following if you DON'T want ``Draft:'' watermark
29 % when you generate individual chapters
30 \ifwholebook
31 \else
32 \usepackage{draftwatermark}
33 \SetWatermarkText{DRAFT: Do Not Distribute}
34 \SetWatermarkScale{0.4}
35 \fi
36
37 \begin{document}
38 \raggedbottom
39 % make true PDF page size match logical page size (for pdflatex)
40 % to change physical paper size, edit \paperwidth and \paperheight
41 % in book.cls or whatever class file you're using
42 \ifhtmloutput
43 \else
44 \special{papersize=\paperwidth,\paperheight}
45 \setlength{\pdfpagewidth}{\paperwidth}
46 \setlength{\pdfpageheight}{\paperheight}
47 \fi
48
49 % ::EDITME::
50 \title{Your Title Here}
51 \author{Your Name Here}
52 \pagestyle{headings}
53
54 \ifhtmloutput
55 % define XHTML outputs for different book elements
1892d1e @armandofox works for pdf, almost works for mobi
authored
56 \ifmobioutput \input{book_mobi.4ht} \else \input{book_html.4ht} \fi %
11008ab @armandofox initial checkin
authored
57 \else
58 %
59 \fi
60 \ifwholebook%
61 \maketitle%
62 % title page with CIP data
63 \input{titlepage}% title page, copyright info
64 \ifhtmloutput
65 \ifmobioutput
66 \tableofcontents
67 \else
68 \CutAt{chapter,likesubsubsection}
69 \fi
70 \else
71 \dominitoc % remove to suppress per-chapter mini-TOCs
72 \thispagestyle{empty}\tableofcontents
73 \fi
74 \fi
75
76 % bibliography per-chapter (requires bibunits package)
77 \defaultbibliographystyle{abbrvnat}
78 \bibpunct{}{}{;}{a}{}{,}
1892d1e @armandofox works for pdf, almost works for mobi
authored
79 \defaultbibliography{book}
11008ab @armandofox initial checkin
authored
80 \bibliographyunit[\chapter]
81
82 % ::EDITME::
83 % Add your chapters here:
1892d1e @armandofox works for pdf, almost works for mobi
authored
84 \include{ch_example/example}
11008ab @armandofox initial checkin
authored
85 % \include{ch_intro/intro}
86 % etc.
87 % all chapters after the \appendix directive are treated as appendices:
88 \appendix
89 % \include{ch_app1/app1}
90
91 % back matter: bibliography, indices, etc.
92
93 % ::EDITME::
94 % uncomment only if you REMOVED the per-chapter bibliography stuff above:
95 %\bibliographystyle{authordate1}
96 %\bibliography{saasbook}
97 \ifhtmloutput
98 % suppress index for HTML, Kindle versions
99 \else
100 \ifwholebook \printindex \fi
101 \fi
102
103 \end{document}
Something went wrong with that request. Please try again.