Add livelink to the flag uses (class flag).
[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 % \textregistered is the trademark symbol
35 \usepackage[headheight=16pt,paper=letterpaper]{geometry}
36 \setlength{\headheight}{15pt}  % avoids warning from latex
37 \usepackage{epic} % For eepic package 
38 \usepackage{eepic} % For the diagram of section relationships
39 \usepackage{makeidx}
40 % hyperref must be the last package listed.
41 % The hyperref settings helps hypertext get right links in the 
42 % pdf of the index.
43 \usepackage[plainpages=false,pdfpagelabels,pagebackref]{hyperref}  % Lets us generate colored active links inside a pdf.
44 \makeindex  % This and the makeidx package allow \index to create index entries.
45
46 \newcommand{\docdate}{29 May 2012}
47
48 \newcommand{\dwf}{DWARF Debugging Information Format}
49 \newenvironment{myindentpara}[1]%
50  {\begin{list}{}%
51    {\setlength{\leftmargin}{#1}}%
52    \item[]%
53  }
54  {\end{list}}
55
56 % broken somehow.
57 %\newcommand{\myindent1}[1]{\begin{myindentpara}{1cm}#1\end{myindentpara}}
58
59 \hypersetup{colorlinks=true,
60   %bookmarks=true,
61   pdfauthor={\dwf\ Committee},
62   pdftitle={\dwf\ Version 4.1}
63 }
64
65 % Generate a page ref.
66 % use like   \refersec{chap:registerbasedaddressing}
67 \newcommand{\refersec}[1]{ \ref{#1} Page \pageref{#1} }
68
69 % Generate a live link in the document
70 % use like \livelink{chap:DWOPdup}{DW\-\_OP\-\_dup}
71 \newcommand{\livelink}[2]{\hyperlink{#1}{#2}\index{#2} }
72 % livetarg is the declaration this is the target of livelinks.
73 % FIXME: we might want livetarg and livetargi  #2 to be \textbf{#2}
74 \newcommand{\livetarg}[2]{\hypertarget{#1}{#2}\index{#2}}
75 % When we want the index entry to look different from the name.
76 \newcommand{\livetargi}[3]{\hypertarget{#1}{#2}\index{#3}}
77
78 \newcommand{\dash}{\nobreakdash-\hspace{0pt}}  % So we handle dashes ok.
79
80 %Fors simple index entries, this saves typing.
81 \newcommand{\addtoindex}[1]{#1\index{#1}}
82
83
84 \begin{document}
85 \pagestyle{empty}
86 \nonzeroparskip
87 \setlength{\parindent}{0pt} 
88 \setlength{\headheight}{6cm}
89 \setlength{\uppermargin}{6cm}
90
91
92
93 \begin{centering}
94 \LARGE
95 \textbf{\dwf}
96
97 \textbf{Version 4.1}
98
99 \centering
100 \includegraphics[keepaspectratio=true,scale=0.5]{DWlogo}
101
102 \centering
103 \href{http://www.dwarfstd.org}{\dwf\ Committee} 
104
105 \url{http://www.dwarfstd.org}
106
107 \textbf{\docdate}
108
109 \end{centering}
110 \openany
111 \clearpage
112 \openany
113
114 \frontmatter
115 \textmd
116 \normalsize
117 \setlength{\headheight}{15pt}  
118
119 \pagestyle{plain}
120 \makeevenhead{plain}{}{}{}
121 \makeoddhead{plain}{}{}{}
122 \makeevenfoot{plain}{}{}{}
123 \makeoddfoot{plain}{}{}{}
124
125 \nonzeroparskip
126 \setlength{\parindent}{0pt} 
127 \settrims{0.5in}{0.5in}
128 \settypeblocksize{8.2in}{6.0in}
129 %\setlrmarginsandblock{0.6in}{0.6in}{*}
130 %\setheadfoot{15pt}{15pt}
131 %\setheaderspaces {*}{2\onelineskip}{*}
132 \nouppercaseheads
133 \makeevenhead{plain}{}{\rightmark}{}
134 \makeoddhead{plain}{}{\rightmark}{}
135 \makeevenfoot{plain}{\docdate}{}{Page \thepage}
136 \makeoddfoot{plain}{\docdate}{}{Page \thepage}
137
138 \openany
139 \pagenumbering{roman}
140 \nonzeroparskip
141 \setlength{\parindent}{0pt} 
142
143 \include{copyright}
144 \include{foreword}
145
146 \tableofcontents
147 \listoffigures
148 \listoftables
149
150 \mainmatter
151
152 % Define the levels of sectionality that are numbered.
153 \setcounter{secnumdepth}{5}
154
155 \nonzeroparskip
156 \setlength{\parindent}{0pt} 
157
158 \makepagestyle{fragFirstChPage}
159
160 \makeevenhead{fragFirstChPage}{}{}{}
161 \makeoddhead{fragFirstChPage}{}{}{}
162 \makeoddfoot{fragFirstChPage}{\docdate}{}{Page \thepage}
163 \makeevenfoot{fragFirstChPage}{\docdate}{}{Page \thepage}
164
165 \aliaspagestyle{chapter}{fragFirstChPage}
166
167
168
169 \chapterstyle{section}
170 \pagenumbering{arabic}
171
172 \aliaspagestyle{chapter}{fragFirstChPage}
173
174
175 \include{introduction}
176 \include{generaldescription}
177 \include{programscope}
178 \include{dataobject}
179 \include{typeentries}
180 \include{otherdebugginginformation}
181 \include{datarepresentation}
182 %  The \appendix toggles us into appendix chapters
183 \appendix
184 \include{attributesbytag}
185 \include{debugsectionrelationships}
186 \include{encodingdecoding}
187 \include{examples}
188 \include{compression}
189 \include{sectionversionnumbers}
190 \include{gnulicense}
191 \printindex
192 \end{document}