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}{August 27, 2015}
9 \newcommand{\ifthen}[2]{\ifthenelse{#1}{#2}{}}
10 \newboolean{isdraft}\setboolean{isdraft}{true}
11 \newboolean{uselinenos}\setboolean{uselinenos}{true}
12 \newcommand{\draftmark}{\ifthenelse{\boolean{isdraft}}{*** DRAFT ***}{}}
14 \usepackage[T1]{fontenc}
17 \renewcommand{\ttdefault}{cmtt} % Use Computer Modern Typewriter instead of Courier
18 \usepackage{url} % for color in letters. Links instead?
19 \usepackage[usenames]{color}%for color in letters. Links instead?
20 \usepackage{ellipsis} % provides ... as \dots
21 \usepackage[utf8]{inputenc}% to type directly diacritic characters
26 language={}, % choose the language of the code
27 basicstyle=\footnotesize\ttfamily, % the size of the fonts that are used for the code
28 numbers=none, % where to put the line-numbers
29 numberstyle=\footnotesize, % the size of the fonts that are used for the line-numbers
31 firstnumber=1, % first line number in each listing
32 stepnumber=5, % the step between two line-numbers. If it is 1 each line will be numbered
33 numbersep=10pt, % how far the line-numbers are from the code
34 backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
35 showspaces=false, % show spaces adding particular underscores
36 showstringspaces=false, % underline spaces within strings
37 showtabs=false, % show tabs within strings adding particular underscores
38 frame=single, % adds a frame around the code
39 tabsize=2, % sets default tabsize to 2 spaces
40 captionpos=b, % sets the caption-position to bottom
41 breaklines=true, % sets automatic line breaking
42 breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
43 escapeinside={\%*}{*)} % if you want to add a comment within your code
47 \usepackage{amsmath} % Provides \nobreakdash
48 \usepackage{amssymb} % maths
49 \usepackage{graphicx} % For pictures
50 \usepackage{epstopdf} % Autoconvert .eps to .pdf
51 \epstopdfsetup{suffix=-generated} % Mark generaed PDF as such
52 \usepackage{lineno} % line numbers
53 \usepackage{longtable} % For multipage tables
54 \usepackage{hhline} % Single column horizontal lines
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[usenames,dvipsnames]{xcolor}
63 \usepackage{lscape} % For landscape mode (Appendix B)
64 \usepackage{tikz} % graphics (Name Index (Fig 6.1), Appendix B)
65 \usetikzlibrary{arrows}
66 \usetikzlibrary{arrows.meta}
67 \usetikzlibrary{backgrounds}
69 \usetikzlibrary{chains}
70 \usetikzlibrary{decorations.pathreplacing}
71 \usetikzlibrary{shapes.geometric}
72 \usetikzlibrary{shapes.multipart}
73 \usetikzlibrary{shapes.symbols}
74 \usepackage{changebar} % For change bars in margin
75 \usepackage{makeidx} % For making an index
76 % hyperref must be the last package listed.
77 % The hyperref settings helps hypertext get links right in the
79 % Also, allcolors lets us generate colored active links inside a pdf.
80 % And breaklinks resolves truncation issues with very long link names.
81 \usepackage[breaklinks,plainpages=false,pdfpagelabels,pagebackref,allcolors=blue,bookmarksnumbered=true]{hyperref}
82 \makeindex % This and the makeidx package allow \index to create index entries.
84 \newcommand{\dwf}{DWARF Debugging Information Format}
86 \newenvironment{myindentpara}[1]%
88 {\setlength{\leftmargin}{#1}}%
93 \hypersetup{colorlinks=true,
95 pdfauthor={\dwf\ Committee},
96 pdftitle={\dwf\ Version 5}
99 % An environment to create a listing-like (boxed) presentation for DWARF examples
100 % Use like \begin{lstlisting}...\end{lstlisting}. Does not do line numbers (boo)
101 % but does full LaTex processing within its scope (unlike \verb).
102 \newsavebox{\savedwf}
103 \newenvironment{dwflisting}{\begin{lrbox}{\savedwf}
104 \begin{minipage}{\textwidth}\footnotesize}
105 {\end{minipage}\end{lrbox}\fbox{\usebox{\savedwf}}}
106 % A helper to annotate the parts of a multipage figure
107 \newcommand{\figurepart}[2]{\raggedleft{\textit{\tiny{part #1 of #2}}}}
109 % Define a simple hyper-reference to a given URL
110 \newcommand{\hrefself}[1]{\href{#1}{#1}}
112 % Generate a page ref.
113 % use like \refersec{chap:registervalues}
114 %\newcommand{\refersec}[1]{\ref{#1} on page \pageref{#1}}
115 \newcommand{\refersec}[1]{\vref{#1}} % beware possible rerun loop
116 \newcommand{\referfol}[1]{\ref{#1} following}
118 % Generate a live link in the document
119 % use like \livelink{chap:DWOPdup}{DW\_OP\_dup}
120 \newcommand{\livelink}[2]{\hyperlink{#1}{#2}\index{#2}}
121 % use when the index is different from the text and target.
122 \newcommand{\livelinki}[3]{\hyperlink{#1}{#2}\index{#3}}
123 % livetarg is the declaration that is the target of livelinks.
124 \newcommand{\livetarg}[2]{\hypertarget{#1}{#2}\index{#2}}
125 % When we want the index entry to look different from the name.
126 \newcommand{\livetargi}[3]{\hypertarget{#1}{#2}\index{#3}}
128 \newcommand{\thirtytwobitdwarfformat}[1][]{\livelink{datarep:xxbitdwffmt}{32-bit DWARF format}}
129 \newcommand{\sixtyfourbitdwarfformat}[1][]{\livelink{datarep:xxbitdwffmt}{64-bit DWARF format}}
131 \newcommand{\dash}{\nobreakdash-\hspace{0pt}} % So we handle dashes ok.
133 % The following two let us mark a word as 'do not link' or
134 % 'do not index' to indicate the word is used generically
135 % and has been considered so do not index or link it.
136 % There is no significant difference in the two commands, though
137 % \nolink would be more oriented to words such as flag or address
138 % that might be linked (and indexed) in some circumstances.
139 \newcommand{\nolink}[1]{#1}
140 \newcommand{\noindex}[1]{#1}
142 % For index entries. The tt-variant of each pair is designed to
143 % allow a word to appear in tt font in the main test and the index
144 % but to collate in the index in its non-tt order. (LaTex normally
145 % sorts all tt words before all non-tt words.)
146 \newcommand{\addtoindex}[1]{#1\index{#1}}
147 \newcommand{\addttindex}[1]{\texttt{#1}\index{#1@\texttt{#1}}}
148 \newcommand{\addtoindexi}[2]{#1\index{#2}}
149 \newcommand{\addttindexi}[2]{\texttt{#1}\index{#2@\texttt{#2}}}
150 \newcommand{\addtoindexx}[1]{\index{#1}}
151 \newcommand{\addttindexx}[1]{\index{#1@\texttt{#1}}}
153 % Quote commands that avoid need for inline UTF-8 in these sources
154 \newcommand{\doublequote}[1]{\textquotedblleft #1\textquotedblright}
155 \newcommand{\singlequote}[1]{\textquoteleft #1\textquoteright}
157 % Better naming for the lowest level section header
158 \newcommand{\subsubsubsection}[1]{\paragraph{#1}~\newline}
159 %\newcommand{\subsubsubsubsection}[1]{\subparagraph{#1}.~} %% Huh?
160 \newcommand{\subsubsubsubsection}[1]{\textbf{#1}.~~}
161 %\newcommand{\subsubsubsection} %% Has to be in a style file--ugh...
162 % {\@startsection{subsubsubsection}{4}{0mm}{-\baselineskip}{\baselineskip}{\normalfont\normalsize\itshap}}
164 % Issue \clearpage if less than n lines remain on page
165 \newcommand{\needlines}[1]{\needspace{#1\baselineskip}}
167 % Helper for item lists with bold subject markers
168 \newcommand{\itembf}[1]{\needlines{4} \item \textbf{#1}}
169 \newcommand{\itembfnl}[1]{\itembf{#1} \\}
171 % And description lists with normal (not bold) text
172 \renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textnormal{#1}}
173 \newcommand{\descriptionlabelnl}[1]{\item[#1] \mbox{}\\}
175 \newcommand{\emptypage}{
178 \begin{nolinenumbers}
180 \textit{(empty page)}
185 % Define a new column type P that is just like p except
186 % that it uses ragged right (rather than right justification}
187 % within a column of a tabular environment. (See Goossens,
188 % Mittelback&Samarin, "The LaTex Companion", pp108&114.)
189 \newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}
190 \newcolumntype{P}[1]{>{\PBS\raggedright\hspace{0pt}}p{#1}}
192 % A simple rule used in simple tables; default length is 2 inches
193 \newcommand{\simplerule}[1][2in]{\rule[4pt]{#1}{0.5pt}}
195 % A simple one column table of names; default width is 2 inches
196 \newcommand{\simplenametablerule}{\simplerule[2in]}
197 \newenvironment{simplenametable}[3][2in]
198 { \begin{table}[h] \caption{#2} \label{#3}
200 \renewcommand{\simplenametablerule}{\simplerule[#1]}
201 \simplenametablerule \\
202 \begin{tabular*}{#1}{l}
206 \simplenametablerule \\
211 % Complement of \isundefined
212 \newcommand{\isdefined}[1]{\not{\isundefined{#1}}}
214 \newcommand{\uselinenos}{\ifthen{\boolean{uselinenos}}{\linenumbers*}}
216 % Preferred changebar asliases
217 \newcommand{\bb}{\cbstart} % Begin (change) bar
218 \newcommand{\eb}{\cbend} % End (change) bar
219 \newcommand{\bbpareb}{\bb~\eb\vspace{-1.5\baselineskip}} % Mark deleted paragraph
221 % Define commands for all of the DWARF names (DW\_*, .debug_*, a few others)
223 \newcommand{\definition}[1]{\textcolor{red!80!black}{#1}}
224 \newcommand{\definitionx}[1]{\definition{\addtoindex{#1}}}
225 \include{dwarfnamecmds}
227 % Define commands for pgf use in the name index figure (Fig 6.1)
229 \include{pgfcmdsfornameindexfig}
231 %--- Begin the document pages
235 \thispagestyle{empty}
238 \setlength{\parindent}{0pt}
239 \setlength{\headheight}{6cm}
240 \setlength{\uppermargin}{6cm}
241 \setlength{\topsep}{0pt}
242 \tightlists % less spacing before/after lists
251 \includegraphics[keepaspectratio=true,scale=1.0]{dwarf-logo}
254 \href{http://www.dwarfstd.org}{\dwf}
255 \href{http://www.dwarfstd.org}{Committee}
258 \url{http://www.dwarfstd.org}
261 {\Large \textbf{\docdate}}
263 \ifthenelse{\boolean{isdraft}}{
271 \setlength{\headheight}{15pt}
273 %\makeevenhead{plain}{}{}{}
274 %\makeoddhead{plain}{}{}{}
275 %\makeevenfoot{plain}{}{}{}
276 %\makeoddfoot{plain}{}{}{}
278 \setlength{\parindent}{0pt}
279 \settrims{0.5in}{0.5in}
280 \settypeblocksize{8.2in}{6.0in}
281 %\setlrmarginsandblock{0.6in}{0.6in}{*}
282 %\setheadfoot{15pt}{15pt}
283 %\setheaderspaces {*}{2\onelineskip}{*}
285 \makeevenhead{plain}{}{\rightmark}{}
286 \makeoddhead{plain}{}{\rightmark}{}
287 \makeevenfoot{plain}{\docdate}{\draftmark}{Page \thepage}
288 \makeoddfoot{plain}{\docdate}{\draftmark}{Page \thepage}
293 \setlength{\parindent}{0pt}
299 ~ % Make the page non-empty...
309 \ifthenelse{\boolean{isdraft}}
311 {% Environment to keep the following header change local
313 \makeevenhead{plain}{}{Change Summary}{}
314 \makeoddhead{plain}{}{Change Summary}{}
315 \include{changesummary}
322 \chapterstyle{default}
324 \setlength{\parindent}{0pt}
326 \makepagestyle{fragFirstChPage}
327 \makeevenhead{fragFirstChPage}{}{}{}
328 \makeoddhead{fragFirstChPage}{}{}{}
329 \makeoddfoot{fragFirstChPage}{\docdate}{\draftmark}{Page \thepage}
330 \makeevenfoot{fragFirstChPage}{\docdate}{\draftmark}{Page \thepage}
332 \aliaspagestyle{chapter}{fragFirstChPage}
334 % ----- Start the main part of the document -----
336 % Define the levels of sectionality that are numbered.
337 \setcounter{secnumdepth}{5}
339 \uselinenos\include{introduction} %\emptypage
340 \uselinenos\include{generaldescription} %\emptypage
341 \uselinenos\include{programscope} \emptypage
342 \uselinenos\include{dataobject} %\emptypage
343 \uselinenos\include{typeentries} %\emptypage
344 \uselinenos\include{otherdebugginginformation} \emptypage
345 \uselinenos\include{datarepresentation} %\emptypage
347 % The \appendix command toggles us into appendix chapters
350 \uselinenos\include{attributesbytag} %\emptypage
351 \uselinenos\include{debugsectionrelationships} \emptypage
352 \uselinenos\include{encodingdecoding} \emptypage
353 \uselinenos\include{examples} %\emptypage
354 \uselinenos\include{compression} \emptypage
355 \uselinenos\include{splitobjects} \emptypage
356 \uselinenos\include{sectionversionnumbers} \emptypage
358 \include{gnulicense} \emptypage
360 % Maybe someday the selected glossary concept will be of interest...
361 %\include{selectedglossary} %\emptypage