1a2c199605314cddd2d755a0257ba05b14efd975
[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}{20 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 \newcommand{\referfol}[1]{\ref{#1} following}
71
72 % Generate a live link in the document
73 % use like \livelink{chap:DWOPdup}{DW\-\_OP\-\_dup}
74 \newcommand{\livelink}[2]{\hyperlink{#1}{#2}\index{#2}}
75 % use when the index is different from the text and target.
76 \newcommand{\livelinki}[3]{\hyperlink{#1}{#2}\index{#3}}
77 % livetarg is the declaration this is the target of livelinks.
78 % FIXME: we might want livetarg and livetargi  #2 to be \textbf{#2}
79 \newcommand{\livetarg}[2]{\hypertarget{#1}{#2}\index{#2}}
80 % When we want the index entry to look different from the name.
81 \newcommand{\livetargi}[3]{\hypertarget{#1}{#2}\index{#3}}
82
83 \newcommand{\dash}{\nobreakdash-\hspace{0pt}}  % So we handle dashes ok.
84
85 % The following two let us mark a word as 'do not link' or
86 % 'do not index' to indicate the word is used generically
87 % and has been considered so do not index or link it.
88 % There is no significant difference in the two commands, though
89 % \nolink would be more oriented to words such as flag or address
90 % that might be linked (and indexed) in some circumstances.
91 \newcommand{\nolink}[1]{#1}
92 \newcommand{\noindex}[1]{#1}
93
94 % For index entries.
95 \newcommand{\addtoindex}[1]{#1\index{#1}}
96 \newcommand{\addtoindexi}[2]{#1\index{#2}}
97 \newcommand{\addtoindexx}[1]{\index{#1}}
98
99 % Better naming for the lowest level section header
100 \newcommand{\subsubsubsection}[1]{\paragraph{#1}}
101
102 % Reduce vertical space at beginning of a list
103 \setlength{\topsep}{0in}
104
105 \begin{document}
106 \pagenumbering{roman}
107 \pagestyle{empty}
108
109 \nonzeroparskip
110 \setlength{\parindent}{0pt} 
111 \setlength{\headheight}{6cm}
112 \setlength{\uppermargin}{6cm}
113
114 \begin{centering}
115 \LARGE
116 \textbf{\dwf}
117
118 \textbf{Version 4.1}
119
120 \centering
121 \includegraphics[keepaspectratio=true,scale=1.0]{DWlogo}
122
123 \centering
124 \vspace{1in}
125 \href{http://www.dwarfstd.org}{\dwf\ Committee}
126  
127 \url{http://www.dwarfstd.org}
128
129 \large
130 \vspace{1in}
131 \textbf{\docdate}
132
133 \end{centering}
134
135 %\clearpage
136 \openany
137
138 \frontmatter
139 \textmd
140 \normalsize
141 \setlength{\headheight}{15pt}  
142
143 \pagestyle{plain}
144 \makeevenhead{plain}{}{}{}
145 \makeoddhead{plain}{}{}{}
146 \makeevenfoot{plain}{}{}{}
147 \makeoddfoot{plain}{}{}{}
148
149 \nonzeroparskip
150 \setlength{\parindent}{0pt} 
151 \settrims{0.5in}{0.5in}
152 \settypeblocksize{8.2in}{6.0in}
153 %\setlrmarginsandblock{0.6in}{0.6in}{*}
154 %\setheadfoot{15pt}{15pt}
155 %\setheaderspaces {*}{2\onelineskip}{*}
156 \nouppercaseheads
157 \makeevenhead{plain}{}{\rightmark}{}
158 \makeoddhead{plain}{}{\rightmark}{}
159 \makeevenfoot{plain}{\docdate}{}{Page \thepage}
160 \makeoddfoot{plain}{\docdate}{}{Page \thepage}
161
162 \openany
163
164 \nonzeroparskip
165 \setlength{\parindent}{0pt} 
166
167 \flushleft
168 \include{copyright}
169 \include{foreword}
170 \include{foreword4.1}
171
172 \cleardoublepage
173 \tableofcontents
174
175 \cleardoublepage
176 \listoffigures
177
178 \cleardoublepage
179 \listoftables
180
181
182 \mainmatter
183 \pagenumbering{arabic}
184
185 % Define the levels of sectionality that are numbered.
186 \setcounter{secnumdepth}{5}
187
188 \nonzeroparskip
189 \setlength{\parindent}{0pt} 
190
191 \makepagestyle{fragFirstChPage}
192
193 \makeevenhead{fragFirstChPage}{}{}{}
194 \makeoddhead{fragFirstChPage}{}{}{}
195 \makeoddfoot{fragFirstChPage}{\docdate}{}{Page \thepage}
196 \makeevenfoot{fragFirstChPage}{\docdate}{}{Page \thepage}
197
198 \aliaspagestyle{chapter}{fragFirstChPage}
199
200
201
202 \chapterstyle{section}
203
204
205 \aliaspagestyle{chapter}{fragFirstChPage}
206
207 \flushleft
208
209 \include{introduction}
210 \include{generaldescription}
211 \include{programscope}
212 \include{dataobject}
213 \include{typeentries}
214 \include{otherdebugginginformation}
215 \include{datarepresentation}
216 %  The \appendix toggles us into appendix chapters
217 \appendix
218 \include{attributesbytag}
219 \include{debugsectionrelationships}
220 \include{encodingdecoding}
221 \include{examples}
222 \include{compression}
223 \include{sectionversionnumbers}
224 \include{gnulicense}
225 \printindex
226 \end{document}