Mercurial > ~dholland > hg > ag > index.cgi
comparison doc/manual/agdefs.tex @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 % | |
2 % This file contains all the \usepackage and whatnot definitions, | |
3 % so they can be included as a unit. This is to make it possible | |
4 % to build each chapter separately with as little fuss as possible. | |
5 % | |
6 | |
7 \usepackage{ifpdf} | |
8 \ifpdf | |
9 \usepackage[pdftex]{graphicx} | |
10 \else | |
11 \usepackage{graphicx} | |
12 \fi | |
13 | |
14 % \nohtml is defined by buildguide.sh | |
15 % so that the manual can be succesfully built without | |
16 % latex2html installed, even though we need \usepackage{html} | |
17 % | |
18 \usepackage{ifthen} | |
19 \ifthenelse{\isundefined{\nohtml}}{ | |
20 \usepackage{html} | |
21 }{ | |
22 % not latex2html | |
23 \usepackage{comment} | |
24 \excludecomment{htmlonly} | |
25 \excludecomment{rawhtml} | |
26 } | |
27 | |
28 \usepackage{url} | |
29 | |
30 %\usepackage{multicol} %? | |
31 | |
32 \usepackage{ragged2e} | |
33 \usepackage{parskip} | |
34 \usepackage{sectsty} | |
35 | |
36 % let's have some real fonts | |
37 \usepackage{palatino} | |
38 \usepackage{courier} | |
39 | |
40 % Apparently in teTeX 3.x ``helvetic'' became ``helvet''. | |
41 %\usepackage{helvetic} | |
42 %\renewcommand{\sfdefault}{phv} % the contents of the old helvetic.sty | |
43 \usepackage{helvet} | |
44 | |
45 % without help, latex sets these characters in the wrong font inside \tt | |
46 \newcommand{\us}{{\tt\char`\_}} | |
47 \newcommand{\bra}{{\tt\char`\{}} | |
48 \newcommand{\ket}{{\tt\char`\}}} | |
49 \newcommand{\bs}{{\tt\char`\\}} | |
50 | |
51 % this doesn't exist by default? | |
52 %\newcommand{\degrees}{{\char'027}} | |
53 \newcommand{\degrees}{$^{\circ}$} % fix sdh4 9/29/07 | |
54 | |
55 | |
56 % Unfortunately, these leave the vertical spacing attached to the | |
57 % chapter and section headings unchanged, which leaves huge gaps | |
58 % in everything. I've asked some people for advice. XXX. | |
59 % | |
60 %\allsectionsfont{\sffamily\FlushRight} | |
61 \chapterfont{\sffamily\FlushRight\Large} | |
62 \sectionfont{\sffamily\large} | |
63 \subsectionfont{\sffamily\normalsize} | |
64 \paragraphfont{\sffamily\normalsize} | |
65 | |
66 \setlength{\pdfpagewidth}{8.5in} | |
67 \setlength{\pdfpageheight}{11in} | |
68 \setlength{\paperwidth}{8.5in} | |
69 \setlength{\paperheight}{11in} | |
70 \setlength{\oddsidemargin}{-0in} | |
71 \setlength{\evensidemargin}{-0in} | |
72 \setlength{\textwidth}{6.5in} | |
73 \setlength{\topmargin}{-.5in} | |
74 \setlength{\textheight}{9.25in} | |
75 \setlength{\headheight}{0.25in} | |
76 \setlength{\headsep}{0.25in} | |
77 | |
78 % While this ought, in theory, to make things work better than | |
79 % a bunch of setlengths, it's generating odd and even side margins, | |
80 % I'd rather it didn't, and I don't feel like looking up how to | |
81 % change that right now. XXX | |
82 %\usepackage[pdftex,paperwidth=8.5in,paperheight=11in,total={6.5in,9.25in}]{geometry} | |
83 | |
84 % The converted version had this, but the original manual is not set | |
85 % with ragged right, or at least the WordPerfect pdf from Stephen's | |
86 % tree isn't. | |
87 % | |
88 %\raggedright | |
89 | |
90 % I don't think this is used... | |
91 %\newcommand{\bracket}[1]{$<${\bf #1}$>$} | |
92 | |
93 % Heading on both sides of the page. Used in the appendices. | |
94 \newcommand{\dualheading}[2]{\vskip 1ex \textbf{\large #1} \hfill [#2]} | |
95 | |
96 % You can't just do \sf \bf; that gets you roman bold. | |
97 \newcommand{\sfbf}{\sf \fontseries{b} \selectfont} | |
98 | |
99 % Typographical conventions. | |
100 % | |
101 % I am mostly following the cues from the wordperfect version, but a | |
102 % few things need to change; in particular, it doesn't make sense in | |
103 % this day and age to use uppercase to set off filenames. So: | |
104 % | |
105 % C keywords - courier \agcode | |
106 % file and path names - courier \agfile | |
107 % menu items and ui actions - italic \agmenu | |
108 % ui options - italic \agoption | |
109 % configuration parameters - bold \agparam | |
110 % technical term definitions - italic \agterm | |
111 % window names - normal \agwindow | |
112 % | |
113 % Don't forget that we can also use small caps (\textsc) for | |
114 % something. | |
115 % | |
116 % I was using helvetica bold (\sfbf above) for \agmenu and \agoption, | |
117 % but that looks like crap - the fonts don't seem to space right when | |
118 % mixed. Helvetica non-bold is not visually distinguishable enough | |
119 % from Palatino and looks like etaoin shrdlu. So, I think we can't use | |
120 % Helvetica for anything. | |
121 % | |
122 % There ought to be a section describing these. XXX. | |
123 % | |
124 | |
125 % XXX should have \agparam automatically add indexing. will that work? | |
126 \newcommand{\agcode}[1]{\texttt{#1}} % code, C keywords, etc. | |
127 \newcommand{\agfile}[1]{\texttt{#1}} % file and path names | |
128 \newcommand{\agmenu}[1]{{\it #1}} % menu items and ui actions | |
129 \newcommand{\agoption}[1]{{\it #1}} % ui options | |
130 \newcommand{\agparam}[1]{\textbf{#1}} % configuration parameters | |
131 \newcommand{\agterm}[1]{{\it #1}} % technical term definitions | |
132 \newcommand{\agwindow}[1]{#1} % window names | |
133 | |
134 % This is like \agparam but for the list headings in Appendix A. | |
135 \newcommand{\agparamheading}[2]{\dualheading{\agparam{#1}}{#2}} | |
136 | |
137 | |
138 % | |
139 % Environment for the indented code examples. | |
140 % | |
141 \makeatletter | |
142 | |
143 %begin{latexonly} | |
144 \newenvironment{indentingcode}[1] | |
145 { | |
146 \begin{list}{}{ | |
147 \setlength{\listparindent}{0in} | |
148 \setlength{\rightmargin}{0in} | |
149 \setlength{\leftmargin}{#1} | |
150 \setlength{\itemindent}{0in} | |
151 \setlength{\labelwidth}{0in} | |
152 \setlength{\labelsep}{0in} | |
153 \setlength{\parsep}{0in} | |
154 } \frenchspacing \@vobeyspaces \obeylines \tt \item | |
155 } { | |
156 \end{list} | |
157 } | |
158 %end{latexonly} | |
159 | |
160 \begin{htmlonly} | |
161 \newenvironment{indentingcode}[1]{ | |
162 \begin{rawhtml} | |
163 <pre> | |
164 \end{rawhtml} | |
165 } | |
166 { | |
167 \begin{rawhtml} | |
168 </pre> | |
169 \end{rawhtml} | |
170 } | |
171 \end{htmlonly} | |
172 | |
173 \makeatother | |
174 | |
175 % This is for metavariable names inside an indentingcode block. | |
176 \newcommand{\codemeta}[1]{{\rm \it #1}} | |
177 | |
178 % | |
179 % This is for indenting certain tables. | |
180 % (Shouldn't a table be able to indent itself? You'd think...) | |
181 % | |
182 \newenvironment{indenting}[1] | |
183 { | |
184 \begin{list}{}{ | |
185 \setlength{\listparindent}{0in} | |
186 \setlength{\rightmargin}{0in} | |
187 \setlength{\leftmargin}{#1} | |
188 \setlength{\itemindent}{0in} | |
189 \setlength{\labelwidth}{0in} | |
190 \setlength{\labelsep}{0in} | |
191 } \item | |
192 } { | |
193 \end{list} | |
194 } |