A few miscelleaneous corrections including especially fixing the spacing
[dwarf-doc.git] / dwarf5 / latexdoc / dwarf5.tex
index 1b2292e..6882ae6 100644 (file)
@@ -1,18 +1,32 @@
-\documentclass[12pt,letterpaper,twoside]{memoir} 
+\documentclass[12pt,letterpaper,oneside]{memoir} 
 % for debugging, add 'draft' (without quotes) to the [] document class list.
 % If draft is in the document class list, pix are just suggested
 % by an outline, the pic does not appear as a picture.
 %
-\usepackage{url} % For color in letters. Links instead?
-\usepackage{color} % For color in letters. Links instead?
-\usepackage{ellipsis} % Provides ... as \dots
-\usepackage{color}
+\newcommand{\docdate}{May 18, 2013 \hspace{1cm}(***\textbf{DRAFT}***)}
+%
+\usepackage[T1]{fontenc}
+\usepackage{palatino}
+\usepackage{cmtt}
+\renewcommand{\ttdefault}{cmtt}        % Use Computer Modern Typewriter instead of Courier
+%\usepackage{ascii}
+%\renewcommand{\ttdefault}{ascii}
+%\renewcommand{\ttfamily}{\asciifamily}
+%\usepackage{microtype}
+%\DisableLigatures[f]{encoding=T1}
+%\renewcommand{\familydefault}{phv}  % font family helvetica
+%
+
+\usepackage{url}                  % For color in letters. Links instead?
+\usepackage[usenames]{color} % For color in letters. Links instead?
+\usepackage{ellipsis}     % Provides ... as \dots
+%\usepackage{color}
 \usepackage{listings}
 \usepackage{alltt}
 \lstset{ %
 language={},               % choose the language of the code
-basicstyle=\footnotesize,  % the size of the fonts that are used for the code
-numbers=left,              % where to put the line-numbers
+basicstyle=\footnotesize\ttfamily,  % the size of the fonts that are used for the code
+numbers=none,              % where to put the line-numbers
 numberstyle=\footnotesize, % the size of the fonts that are used for the line-numbers
 numberfirstline=true,
 firstnumber=1,             % first line number in each listing
@@ -40,19 +54,16 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \usepackage{needspace}     % For assuring space remaining on a page
 \usepackage{ifthen}        % For conditional processing
 \usepackage{changepage}    % For odd/even page checks
-\usepackage{epic}          % For eepic package 
-\usepackage{eepic}         % For the diagram of section relationships
+\usepackage{tikz}                 % graphics (Appendix B)
+\usetikzlibrary{shapes.geometric}
+\usetikzlibrary{arrows}
 \usepackage{makeidx}       % For making an index
 % hyperref must be the last package listed.
 % The hyperref settings helps hypertext get right links in the 
 % pdf of the index.
-\usepackage[plainpages=false,pdfpagelabels,pagebackref]{hyperref} % Lets us generate colored active links inside a pdf.
+\usepackage[plainpages=false,pdfpagelabels,pagebackref,allcolors=blue]{hyperref} % Lets us generate colored active links inside a pdf.
 \makeindex  % This and the makeidx package allow \index to create index entries.
 
-\renewcommand{\familydefault}{phv}  % font family helvetica
-
-\newcommand{\docdate}{7 February 2013}
-
 \newcommand{\dwf}{DWARF Debugging Information Format}
 
 \newenvironment{myindentpara}[1]%
@@ -88,7 +99,7 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \newcommand{\referfol}[1]{\ref{#1} following}
 
 % Generate a live link in the document
-% use like \livelink{chap:DWOPdup}{DW\-\_OP\-\_dup}
+% use like \livelink{chap:DWOPdup}{DW\_OP\_dup}
 \newcommand{\livelink}[2]{\hyperlink{#1}{#2}\index{#2}}
 % use when the index is different from the text and target.
 \newcommand{\livelinki}[3]{\hyperlink{#1}{#2}\index{#3}}
@@ -98,6 +109,9 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 % When we want the index entry to look different from the name.
 \newcommand{\livetargi}[3]{\hypertarget{#1}{#2}\index{#3}}
 
+\newcommand{\thirtytwobitdwarfformat}[1][]{\livelink{datarep:xxbitdwffmt}{32-bit DWARF format}}
+\newcommand{\sixtyfourbitdwarfformat}[1][]{\livelink{datarep:xxbitdwffmt}{64-bit DWARF format}}
+
 \newcommand{\dash}{\nobreakdash-\hspace{0pt}}  % So we handle dashes ok.
 
 % The following two let us mark a word as 'do not link' or
@@ -109,10 +123,16 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \newcommand{\nolink}[1]{#1}
 \newcommand{\noindex}[1]{#1}
 
-% For index entries.
+% For index entries. The tt-variant of each pair is designed to
+% allow a word to appear in tt font in the main test and the index
+% but to collate in the index in its non-tt order. (LaTex normally
+% sorts all tt words before all non-tt words.)
 \newcommand{\addtoindex}[1]{#1\index{#1}}
+\newcommand{\addttindex}[1]{\texttt{#1}\index{#1@\texttt{#1}}}
 \newcommand{\addtoindexi}[2]{#1\index{#2}}
+\newcommand{\addttindexi}[2]{\texttt{#1}\index{#2@\texttt{#2}}}
 \newcommand{\addtoindexx}[1]{\index{#1}}
+\newcommand{\addttindexx}[1]{\index{#1@\texttt{#1}}}
 
 % Quote commands that avoid need for inline UTF-8 in these sources
 \newcommand{\doublequote}[1]{\textquotedblleft #1\textquotedblright}
@@ -130,9 +150,7 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 
 % And description lists with normal (not bold) text
 \renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textnormal{#1}}
-
-% Reduce vertical space at beginning of a list
-\setlength{\topsep}{0in}
+\newcommand{\descriptionlabelnl}[1]{\item[#1] \mbox{}\\}
 
 \newcommand{\emptypage}{
     \clearpage
@@ -159,6 +177,26 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
         \end{table}
         }
 
+% Anti-ligature commands added because \/ and {} don't work for unknown reasons
+% nor does the microtext package DisableLigatures command...???
+%
+\newcommand{\xiiif}                            {0x\hspace{1pt}3\hspace{2pt}f}
+\newcommand{\xiiifff}                  {0x\hspace{1pt}3\hspace{2pt}f\hspace{2pt}f\hspace{2pt}f}
+\newcommand{\xff}                              {0x\hspace{1pt}f\hspace{2pt}f}
+\newcommand{\xffff}                            {0x\hspace{1pt}f\hspace{2pt}f\hspace{2pt}f\hspace{2pt}f}
+%
+% These are intended for use in running text...
+%
+\newcommand{\xffffffff}                {\texttt{0xffffffff}}                   % use with following punctutation
+\newcommand{\wffffffff}                {\texttt{0xffffffff}\ }                 % use as separate "word"
+\newcommand{\xfffffffzero}             {\texttt{0xfffffff0}}                   % use with following punctutation
+\newcommand{\wfffffffzero}             {\texttt{0xfffffff0}\ }
+\newcommand{\xffffffffffffffff}        {\texttt{0xffffffffffffffff}}   % use with following punctutation
+\newcommand{\wffffffffffffffff}        {\texttt{0xffffffffffffffff}\ }
+
+% Define commands for all of the DWARF names (DW\_*, .debug_*, a few others)
+\include{dwarfnamecmds}
+
 %--- Begin the document pages
 %
 \begin{document}
@@ -169,6 +207,8 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \setlength{\parindent}{0pt} 
 \setlength{\headheight}{6cm}
 \setlength{\uppermargin}{6cm}
+\setlength{\topsep}{0pt}
+\tightlists                                    % less spacing before/after lists
 
 \begin{centering}
 \LARGE
@@ -177,33 +217,34 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \textbf{Version 4.1}
 
 \centering
-\includegraphics[keepaspectratio=true,scale=1.0]{DWlogo}
+\vspace{1cm}
+\includegraphics[keepaspectratio=true,scale=1.0]{dwarf-logo}
 
-\centering
-\vspace{3cm}
+%\centering
+\vspace{2cm}
 \href{http://www.dwarfstd.org}{\dwf\ Committee}
 
-\vspace{2cm} 
+\vspace{1cm} 
 \url{http://www.dwarfstd.org}
 
 \large
-\vspace{1in}
+\vspace{2cm}
 \textbf{\docdate}
 
 \end{centering}
 
 %\clearpage
-\openany
+%\openany
 
 \textmd
 \normalsize
 \setlength{\headheight}{15pt}  
 
 \pagestyle{plain}
-\makeevenhead{plain}{}{}{}
-\makeoddhead{plain}{}{}{}
-\makeevenfoot{plain}{}{}{}
-\makeoddfoot{plain}{}{}{}
+%\makeevenhead{plain}{}{}{}
+%\makeoddhead{plain}{}{}{}
+%\makeevenfoot{plain}{}{}{}
+%\makeoddfoot{plain}{}{}{}
 
 \nonzeroparskip
 \setlength{\parindent}{0pt} 
@@ -229,7 +270,7 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \include{foreword4.1}
 \emptypage
 
-\cleardoublepage
+\newpage
 \tableofcontents
 
 \cleardoublepage
@@ -240,7 +281,7 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 
 \flushleft
 \raggedbottom
-\chapterstyle{section}
+\chapterstyle{default}
 
 \setlength{\parindent}{0pt} 
 
@@ -261,16 +302,20 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \include{programscope}                  \emptypage
 \include{dataobject}                    \emptypage
 \include{typeentries}                   \emptypage
-\include{otherdebugginginformation} \emptypage
-\include{datarepresentation}            %\emptypage
+\include{otherdebugginginformation}    \emptypage
+\include{datarepresentation}            \emptypage
+
 %  The \appendix toggles us into appendix chapters
 \appendix
-\include{attributesbytag}
+
+\include{attributesbytag}                              %\emptypage
 \include{debugsectionrelationships}     \emptypage
 \include{encodingdecoding}              \emptypage
 \include{examples}                      %\emptypage
 \include{compression}                   %\emptypage
 \include{sectionversionnumbers}
 \include{gnulicense}
+
 \printindex
+
 \end{document}