6842f0d5ecabd94b9281ad62d216716d2fdc4d8c
[dwarf-doc.git] / dwarf5 / latexdoc / dwarf5.tex
1 \documentclass[12pt,letterpaper,oneside]{memoir} 
2 % for debugging, add 'draft' (without quotes) to the [] document class list.
3 % If draft is in the document class list, pix are just suggested
4 % by an outline, the pic does not appear as a picture.
5 %
6 \usepackage{url} % For color in letters. Links instead?
7 \usepackage{color} % For color in letters. Links instead?
8 \usepackage{ellipsis} % Provides ... as \dots
9 \usepackage{color}
10 \usepackage{listings}
11 \usepackage{alltt}
12 \lstset{ %
13 language=C++,              % choose the language of the code
14 basicstyle=\footnotesize,  % the size of the fonts that are used for the code
15 numbers=left,              % where to put the line-numbers
16 numberstyle=\footnotesize, % the size of the fonts that are used for the line-numbers
17 numberfirstline=true,
18 firstnumber=1,             % first line number in each listing
19 stepnumber=5,              % the step between two line-numbers. If it is 1 each line will be numbered
20 numbersep=10pt,            % how far the line-numbers are from the code
21 backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
22 showspaces=false,          % show spaces adding particular underscores
23 showstringspaces=false,    % underline spaces within strings
24 showtabs=false,            % show tabs within strings adding particular underscores
25 frame=single,              % adds a frame around the code
26 tabsize=2,                 % sets default tabsize to 2 spaces
27 captionpos=b,              % sets the caption-position to bottom
28 breaklines=true,           % sets automatic line breaking
29 breakatwhitespace=false,   % sets if automatic breaks should only happen at whitespace
30 escapeinside={\%*}{*)}     % if you want to add a comment within your code
31 }
32
33 \usepackage{amsmath}       % Provides \nobreakdash
34 \usepackage{graphicx}      % For pictures
35 \usepackage{longtable}
36 \usepackage{varioref}      % defines \vref
37 % \textregistered is the trademark symbol
38 \usepackage[headheight=16pt,paper=letterpaper]{geometry}
39 \setlength{\headheight}{15pt}  % avoids warning from latex
40 \usepackage{epic} % For eepic package 
41 \usepackage{eepic} % For the diagram of section relationships
42 \usepackage{makeidx}
43 % hyperref must be the last package listed.
44 % The hyperref settings helps hypertext get right links in the 
45 % pdf of the index.
46 \usepackage[plainpages=false,pdfpagelabels,pagebackref]{hyperref}  % Lets us generate colored active links inside a pdf.
47 \makeindex  % This and the makeidx package allow \index to create index entries.
48
49 \newcommand{\docdate}{20 January 2013}
50
51 \newcommand{\dwf}{DWARF Debugging Information Format}
52 \newenvironment{myindentpara}[1]%
53  {\begin{list}{}%
54    {\setlength{\leftmargin}{#1}}%
55    \item[]%
56  }
57  {\end{list}}
58
59 % broken somehow.
60 %\newcommand{\myindent1}[1]{\begin{myindentpara}{1cm}#1\end{myindentpara}}
61
62 \hypersetup{colorlinks=true,
63   %bookmarks=true,
64   pdfauthor={\dwf\ Committee},
65   pdftitle={\dwf\ Version 4.1}
66 }
67
68 % An environment to create a listing-like presentation for DWARF examples
69 \newsavebox{\savedwf}
70 \newenvironment{dwflisting}{\begin{lrbox}{\savedwf}
71   \begin{minipage}{\textwidth}\footnotesize}
72   {\end{minipage}\end{lrbox}\fbox{\usebox{\savedwf}}}
73 % A helper to annotate the parts of a multipage figure
74 \newcommand{\figurepart}[2]{\raggedleft{\textit{\tiny{part #1 of #2}}}}
75 % Generate a page ref.
76 % use like   \refersec{chap:registerbasedaddressing}
77 %\newcommand{\refersec}[1]{\ref{#1} on page \pageref{#1}}
78 \newcommand{\refersec}[1]{\vref{#1}}  % beware possible rerun loop
79 \newcommand{\referfol}[1]{\ref{#1} following}
80
81 % Generate a live link in the document
82 % use like \livelink{chap:DWOPdup}{DW\-\_OP\-\_dup}
83 \newcommand{\livelink}[2]{\hyperlink{#1}{#2}\index{#2}}
84 % use when the index is different from the text and target.
85 \newcommand{\livelinki}[3]{\hyperlink{#1}{#2}\index{#3}}
86 % livetarg is the declaration this is the target of livelinks.
87 % FIXME: we might want livetarg and livetargi  #2 to be \textbf{#2}
88 \newcommand{\livetarg}[2]{\hypertarget{#1}{#2}\index{#2}}
89 % When we want the index entry to look different from the name.
90 \newcommand{\livetargi}[3]{\hypertarget{#1}{#2}\index{#3}}
91
92 \newcommand{\dash}{\nobreakdash-\hspace{0pt}}  % So we handle dashes ok.
93
94 % The following two let us mark a word as 'do not link' or
95 % 'do not index' to indicate the word is used generically
96 % and has been considered so do not index or link it.
97 % There is no significant difference in the two commands, though
98 % \nolink would be more oriented to words such as flag or address
99 % that might be linked (and indexed) in some circumstances.
100 \newcommand{\nolink}[1]{#1}
101 \newcommand{\noindex}[1]{#1}
102
103 % For index entries.
104 \newcommand{\addtoindex}[1]{#1\index{#1}}
105 \newcommand{\addtoindexi}[2]{#1\index{#2}}
106 \newcommand{\addtoindexx}[1]{\index{#1}}
107
108 % Better naming for the lowest level section header
109 \newcommand{\subsubsubsection}[1]{\paragraph{#1}}
110
111 % Reduce vertical space at beginning of a list
112 \setlength{\topsep}{0in}
113
114 \begin{document}
115 \pagenumbering{roman}
116 \pagestyle{empty}
117
118 \nonzeroparskip
119 \setlength{\parindent}{0pt} 
120 \setlength{\headheight}{6cm}
121 \setlength{\uppermargin}{6cm}
122
123 \begin{centering}
124 \LARGE
125 \textbf{\dwf}
126
127 \textbf{Version 4.1}
128
129 \centering
130 \includegraphics[keepaspectratio=true,scale=1.0]{DWlogo}
131
132 \centering
133 \vspace{1in}
134 \href{http://www.dwarfstd.org}{\dwf\ Committee}
135  
136 \url{http://www.dwarfstd.org}
137
138 \large
139 \vspace{1in}
140 \textbf{\docdate}
141
142 \end{centering}
143
144 %\clearpage
145 \openany
146
147 \frontmatter
148 \textmd
149 \normalsize
150 \setlength{\headheight}{15pt}  
151
152 \pagestyle{plain}
153 \makeevenhead{plain}{}{}{}
154 \makeoddhead{plain}{}{}{}
155 \makeevenfoot{plain}{}{}{}
156 \makeoddfoot{plain}{}{}{}
157
158 \nonzeroparskip
159 \setlength{\parindent}{0pt} 
160 \settrims{0.5in}{0.5in}
161 \settypeblocksize{8.2in}{6.0in}
162 %\setlrmarginsandblock{0.6in}{0.6in}{*}
163 %\setheadfoot{15pt}{15pt}
164 %\setheaderspaces {*}{2\onelineskip}{*}
165 \nouppercaseheads
166 \makeevenhead{plain}{}{\rightmark}{}
167 \makeoddhead{plain}{}{\rightmark}{}
168 \makeevenfoot{plain}{\docdate}{}{Page \thepage}
169 \makeoddfoot{plain}{\docdate}{}{Page \thepage}
170
171 \openany
172
173 \nonzeroparskip
174 \setlength{\parindent}{0pt} 
175
176 \flushleft
177 \include{copyright}
178 \include{foreword}
179 \include{foreword4.1}
180
181 \cleardoublepage
182 \tableofcontents
183
184 \cleardoublepage
185 \listoffigures
186
187 \cleardoublepage
188 \listoftables
189
190
191 \mainmatter
192 \pagenumbering{arabic}
193
194 % Define the levels of sectionality that are numbered.
195 \setcounter{secnumdepth}{5}
196
197 \nonzeroparskip
198 \setlength{\parindent}{0pt} 
199
200 \makepagestyle{fragFirstChPage}
201
202 \makeevenhead{fragFirstChPage}{}{}{}
203 \makeoddhead{fragFirstChPage}{}{}{}
204 \makeoddfoot{fragFirstChPage}{\docdate}{}{Page \thepage}
205 \makeevenfoot{fragFirstChPage}{\docdate}{}{Page \thepage}
206
207 \aliaspagestyle{chapter}{fragFirstChPage}
208
209
210
211 \chapterstyle{section}
212
213
214 \aliaspagestyle{chapter}{fragFirstChPage}
215
216 \flushleft
217
218 \include{introduction}
219 \include{generaldescription}
220 \include{programscope}
221 \include{dataobject}
222 \include{typeentries}
223 \include{otherdebugginginformation}
224 \include{datarepresentation}
225 %  The \appendix toggles us into appendix chapters
226 \appendix
227 \include{attributesbytag}
228 \include{debugsectionrelationships}
229 \include{encodingdecoding}
230 \include{examples}
231 \include{compression}
232 \include{sectionversionnumbers}
233 \include{gnulicense}
234 \printindex
235 \end{document}