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.
6 \newcommand{\docdate}{October 2, 2013}
10 \setboolean{isdraft}{true}
11 \newcommand{\draftmark}{\ifthenelse{\boolean{isdraft}}{*** DRAFT ***}{}}
13 \usepackage[T1]{fontenc}
16 \renewcommand{\ttdefault}{cmtt} % Use Computer Modern Typewriter instead of Courier
18 %\renewcommand{\ttdefault}{ascii}
19 %\renewcommand{\ttfamily}{\asciifamily}
20 %\usepackage{microtype}
21 %\DisableLigatures[f]{encoding=T1}
22 %\renewcommand{\familydefault}{phv} % font family helvetica
25 \usepackage{url} % For color in letters. Links instead?
26 \usepackage[usenames]{color} % For color in letters. Links instead?
27 \usepackage{ellipsis} % Provides ... as \dots
32 language={}, % choose the language of the code
33 basicstyle=\footnotesize\ttfamily, % the size of the fonts that are used for the code
34 numbers=none, % where to put the line-numbers
35 numberstyle=\footnotesize, % the size of the fonts that are used for the line-numbers
37 firstnumber=1, % first line number in each listing
38 stepnumber=5, % the step between two line-numbers. If it is 1 each line will be numbered
39 numbersep=10pt, % how far the line-numbers are from the code
40 backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
41 showspaces=false, % show spaces adding particular underscores
42 showstringspaces=false, % underline spaces within strings
43 showtabs=false, % show tabs within strings adding particular underscores
44 frame=single, % adds a frame around the code
45 tabsize=2, % sets default tabsize to 2 spaces
46 captionpos=b, % sets the caption-position to bottom
47 breaklines=true, % sets automatic line breaking
48 breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
49 escapeinside={\%*}{*)} % if you want to add a comment within your code
52 \usepackage{amsmath} % Provides \nobreakdash
53 \usepackage{graphicx} % For pictures
54 \usepackage{longtable} % For multipage tables
55 \usepackage{varioref} % defines \vref
56 % \textregistered is the trademark symbol
57 \usepackage[headheight=16pt,paper=letterpaper]{geometry}
58 \setlength{\headheight}{15pt} % avoids warning from latex
59 \usepackage{needspace} % For assuring space remaining on a page
60 \usepackage{ifthen} % For conditional processing
61 \usepackage{changepage} % For odd/even page checks
62 \usepackage{tikz} % graphics (Appendix B)
63 \usetikzlibrary{shapes.geometric}
64 \usetikzlibrary{arrows}
65 \usepackage{makeidx} % For making an index
66 % hyperref must be the last package listed.
67 % The hyperref settings helps hypertext get right links in the
69 \usepackage[plainpages=false,pdfpagelabels,pagebackref,allcolors=blue]{hyperref} % Lets us generate colored active links inside a pdf.
70 \makeindex % This and the makeidx package allow \index to create index entries.
72 \newcommand{\dwf}{DWARF Debugging Information Format}
74 \newenvironment{myindentpara}[1]%
76 {\setlength{\leftmargin}{#1}}%
82 %\newcommand{\myindent1}[1]{\begin{myindentpara}{1cm}#1\end{myindentpara}}
84 \hypersetup{colorlinks=true,
86 pdfauthor={\dwf\ Committee},
87 pdftitle={\dwf\ Version 5}
90 % An environment to create a listing-like (boxed) presentation for DWARF examples
91 % Use like \begin{lstlisting}...\end{lstlisting}. Does not do line numbers (boo)
92 % but does full LaTex processing within its scope (unlike \verb).
94 \newenvironment{dwflisting}{\begin{lrbox}{\savedwf}
95 \begin{minipage}{\textwidth}\footnotesize}
96 {\end{minipage}\end{lrbox}\fbox{\usebox{\savedwf}}}
97 % A helper to annotate the parts of a multipage figure
98 \newcommand{\figurepart}[2]{\raggedleft{\textit{\tiny{part #1 of #2}}}}
100 % Generate a page ref.
101 % use like \refersec{chap:registerbasedaddressing}
102 %\newcommand{\refersec}[1]{\ref{#1} on page \pageref{#1}}
103 \newcommand{\refersec}[1]{\vref{#1}} % beware possible rerun loop
104 \newcommand{\referfol}[1]{\ref{#1} following}
106 % Generate a live link in the document
107 % use like \livelink{chap:DWOPdup}{DW\_OP\_dup}
108 \newcommand{\livelink}[2]{\hyperlink{#1}{#2}\index{#2}}
109 % use when the index is different from the text and target.
110 \newcommand{\livelinki}[3]{\hyperlink{#1}{#2}\index{#3}}
111 % livetarg is the declaration this is the target of livelinks.
112 % FIXME: we might want livetarg and livetargi #2 to be \textbf{#2}
113 \newcommand{\livetarg}[2]{\hypertarget{#1}{#2}\index{#2}}
114 % When we want the index entry to look different from the name.
115 \newcommand{\livetargi}[3]{\hypertarget{#1}{#2}\index{#3}}
117 \newcommand{\thirtytwobitdwarfformat}[1][]{\livelink{datarep:xxbitdwffmt}{32-bit DWARF format}}
118 \newcommand{\sixtyfourbitdwarfformat}[1][]{\livelink{datarep:xxbitdwffmt}{64-bit DWARF format}}
120 \newcommand{\dash}{\nobreakdash-\hspace{0pt}} % So we handle dashes ok.
122 % The following two let us mark a word as 'do not link' or
123 % 'do not index' to indicate the word is used generically
124 % and has been considered so do not index or link it.
125 % There is no significant difference in the two commands, though
126 % \nolink would be more oriented to words such as flag or address
127 % that might be linked (and indexed) in some circumstances.
128 \newcommand{\nolink}[1]{#1}
129 \newcommand{\noindex}[1]{#1}
131 % For index entries. The tt-variant of each pair is designed to
132 % allow a word to appear in tt font in the main test and the index
133 % but to collate in the index in its non-tt order. (LaTex normally
134 % sorts all tt words before all non-tt words.)
135 \newcommand{\addtoindex}[1]{#1\index{#1}}
136 \newcommand{\addttindex}[1]{\texttt{#1}\index{#1@\texttt{#1}}}
137 \newcommand{\addtoindexi}[2]{#1\index{#2}}
138 \newcommand{\addttindexi}[2]{\texttt{#1}\index{#2@\texttt{#2}}}
139 \newcommand{\addtoindexx}[1]{\index{#1}}
140 \newcommand{\addttindexx}[1]{\index{#1@\texttt{#1}}}
142 % Quote commands that avoid need for inline UTF-8 in these sources
143 \newcommand{\doublequote}[1]{\textquotedblleft #1\textquotedblright}
144 \newcommand{\singlequote}[1]{\textquoteleft #1\textquoteright}
146 % Better naming for the lowest level section header
147 \newcommand{\subsubsubsection}[1]{\paragraph{#1.}}
149 % Issue \clearpage if less than n lines remain on page
150 \newcommand{\needlines}[1]{\needspace{#1\baselineskip}}
152 % Helper for item lists with bold subject markers
153 \newcommand{\itembf}[1]{\item \textbf{#1}}
154 \newcommand{\itembfnl}[1]{\itembf{#1} \\}
156 % And description lists with normal (not bold) text
157 \renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textnormal{#1}}
158 \newcommand{\descriptionlabelnl}[1]{\item[#1] \mbox{}\\}
160 \newcommand{\emptypage}{
163 \begin{center} \textit{(empty page)} \end{center}
166 % A simple rule used in simple tables; default length is 2 inches
167 \newcommand{\simplerule}[1][2in]{\rule[4pt]{#1}{0.5pt}}
169 % A simple one column table of names; default width is 2 inches
170 \newcommand{\simplenametablerule}{\simplerule[2in]}
171 \newenvironment{simplenametable}[3][2in]
172 { \begin{table}[here] \caption{#2} \label{#3}
174 \renewcommand{\simplenametablerule}{\simplerule[#1]}
175 \simplenametablerule \\
176 \begin{tabular*}{#1}{l}
180 \simplenametablerule \\
185 % Anti-ligature commands added because \/ and {} don't work for unknown reasons
186 % nor does the microtext package DisableLigatures command...???
188 \newcommand{\xiiif} {0x\hspace{1pt}3\hspace{2pt}f}
189 \newcommand{\xiiifff} {0x\hspace{1pt}3\hspace{2pt}f\hspace{2pt}f\hspace{2pt}f}
190 \newcommand{\xff} {0x\hspace{1pt}f\hspace{2pt}f}
191 \newcommand{\xffff} {0x\hspace{1pt}f\hspace{2pt}f\hspace{2pt}f\hspace{2pt}f}
193 % These are intended for use in running text...
195 \newcommand{\xffffffff} {\texttt{0xffffffff}} % use with following punctutation
196 \newcommand{\wffffffff} {\texttt{0xffffffff}\ } % use as separate "word"
197 \newcommand{\xfffffffzero} {\texttt{0xfffffff0}} % use with following punctutation
198 \newcommand{\wfffffffzero} {\texttt{0xfffffff0}\ }
199 \newcommand{\xffffffffffffffff} {\texttt{0xffffffffffffffff}} % use with following punctutation
200 \newcommand{\wffffffffffffffff} {\texttt{0xffffffffffffffff}\ }
202 % Define commands for all of the DWARF names (DW\_*, .debug_*, a few others)
203 \include{dwarfnamecmds}
205 %--- Begin the document pages
209 \thispagestyle{empty}
212 \setlength{\parindent}{0pt}
213 \setlength{\headheight}{6cm}
214 \setlength{\uppermargin}{6cm}
215 \setlength{\topsep}{0pt}
216 \tightlists % less spacing before/after lists
225 \includegraphics[keepaspectratio=true,scale=1.0]{dwarf-logo}
228 \href{http://www.dwarfstd.org}{\dwf}
229 \href{http://www.dwarfstd.org}{Committee}
232 \url{http://www.dwarfstd.org}
237 \ifthenelse{\boolean{isdraft}}{
245 \setlength{\headheight}{15pt}
247 %\makeevenhead{plain}{}{}{}
248 %\makeoddhead{plain}{}{}{}
249 %\makeevenfoot{plain}{}{}{}
250 %\makeoddfoot{plain}{}{}{}
252 \setlength{\parindent}{0pt}
253 \settrims{0.5in}{0.5in}
254 \settypeblocksize{8.2in}{6.0in}
255 %\setlrmarginsandblock{0.6in}{0.6in}{*}
256 %\setheadfoot{15pt}{15pt}
257 %\setheaderspaces {*}{2\onelineskip}{*}
259 \makeevenhead{plain}{}{\rightmark}{}
260 \makeoddhead{plain}{}{\rightmark}{}
261 \makeevenfoot{plain}{\docdate}{\draftmark}{Page \thepage}
262 \makeoddfoot{plain}{\docdate}{\draftmark}{Page \thepage}
267 \setlength{\parindent}{0pt}
281 \ifthenelse{\boolean{isdraft}}
282 { {% Environment to keep the following header change local
284 \makeevenhead{plain}{}{Change Summary}{}
285 \makeoddhead{plain}{}{Change Summary}{}
286 \include{changesummary}
292 \chapterstyle{default}
294 \setlength{\parindent}{0pt}
296 \makepagestyle{fragFirstChPage}
297 \makeevenhead{fragFirstChPage}{}{}{}
298 \makeoddhead{fragFirstChPage}{}{}{}
299 \makeoddfoot{fragFirstChPage}{\docdate}{\draftmark}{Page \thepage}
300 \makeevenfoot{fragFirstChPage}{\docdate}{\draftmark}{Page \thepage}
302 \aliaspagestyle{chapter}{fragFirstChPage}
304 % ----- Start the main part of the document -----
306 % Define the levels of sectionality that are numbered.
307 \setcounter{secnumdepth}{5}
309 \include{introduction}
310 \include{generaldescription} %\emptypage
311 \include{programscope} \emptypage
312 \include{dataobject} \emptypage
313 \include{typeentries} \emptypage
314 \include{otherdebugginginformation} \emptypage
315 \include{datarepresentation} \emptypage
317 % The \appendix toggles us into appendix chapters
320 \include{attributesbytag} \emptypage
321 \include{debugsectionrelationships} \emptypage
322 \include{encodingdecoding} \emptypage
323 \include{examples} %\emptypage
324 \include{compression} %\emptypage
325 \include{sectionversionnumbers}