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