-
Notifications
You must be signed in to change notification settings - Fork 41
/
onechap.tex
103 lines (77 loc) · 2.06 KB
/
onechap.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
%
% test file for building one chapter
%
\documentclass[12pt]{book}
\title{Think Java}
\author{Allen B. Downey and Chris Mayfield}
\newcommand{\thetitle}{Think Java}
\newcommand{\thesubtitle}{How to Think Like a Computer Scientist}
\newcommand{\theauthors}{Allen B. Downey and Chris Mayfield}
\newcommand{\theversion}{2nd Edition, Version 7.1.0}
%%%% Both LATEX and PLASTEX
\usepackage{graphicx}
\usepackage{setspace}
% automatically index glossary terms
\newcommand{\term}[1]{%
\item[#1:]\index{#1}}
\usepackage{amsmath}
\usepackage{amsthm}
% format end of chapter excercises
\newtheoremstyle{exercise}
{12pt} % space above
{12pt} % space below
{} % body font
{} % indent amount
{\bfseries} % head font
{} % punctuation
{12pt} % head space
{} % custom head
\theoremstyle{exercise}
\newtheorem{exercise}{Exercise}[chapter]
\newif\ifplastex
\plastexfalse
%%%% PLASTEX ONLY
\ifplastex
\makeindex
\usepackage{localdef}
\usepackage{url}
\renewcommand{\href}[2]{\url{#1}}
\makeatletter
\newcount\anchorcnt
\newcommand*{\Anchor}[1]{%
\@bsphack%
\Hy@GlobalStepCount\anchorcnt%
\edef\@currentHref{anchor.\the\anchorcnt}%
\Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
\M@gettitle{}\label{#1}%
\@esphack%
}
\makeatother
% code listing environments:
% we don't need these for plastex because they get replaced
% by preprocess.py
%\newenvironment{code}{\begin{verbatim}}{\end{verbatim}}
%\newenvironment{stdout}{\begin{verbatim}}{\end{verbatim}}
% inline syntax formatting
%\newcommand{\java}{\verb}%}
%\newcommand{\java}{\texttt}%}
\newcommand{\java}[1]{{\tt #1}}%{
\newcommand{\textcolor}[1]{\relax}
%%%% LATEX/HTML ONLY
\else
%BEGIN LATEX
\usepackage{comment}
\excludecomment{htmlonly}
\includecomment{latexonly}
%END LATEX
\input{latexonly.tex}
\fi
%%%% END OF PREAMBLE
\begin{document}
%\appendix
%\renewcommand{\chaptermark}[1]{\markboth{Appendix \thechapter ~~ #1}{}}
\setcounter{chapter}{0}
\setcounter{page}{0}
\tableofcontents
\input{ch01.tex}
\end{document}