9506 Want support for QLogic QL41000/45000 series devices
[unleashed.git] / usr / src / uts / common / io / qede / 579xx / drivers / ecore / documentation / structure.tex
blob52305bea64ac3ac0ddd2d29ee58e8ee00a2f691a
1 %----------------------------------------------------------------------------------------
2 % VARIOUS REQUIRED PACKAGES
3 %----------------------------------------------------------------------------------------
5 \usepackage{titlesec} % Allows customization of titles
7 \usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry} % Page margins
9 \usepackage{xcolor} % Required for specifying colors by name
11 \usepackage{graphicx} % Required for including pictures
12 % Font Settings
13 \usepackage{avant} % Use the Avantgarde font for headings
14 %\usepackage{times} % Use the Times font for headings
15 \usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Sym­bol, Chancery and Com­puter Modern fonts
16 \usepackage{marvosym}
18 \usepackage{microtype} % Slightly tweak font spacing for aesthetics
19 \usepackage[utf8]{inputenc} % Required for including letters with accents
20 \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
22 \usepackage{pifont}
23 % Index
24 \usepackage{calc} % For simpler calculation - used for spacing the index letter headings correctly
25 \usepackage{makeidx} % Required to make an index
27 \graphicspath{{pictures/}} % Specifies the directory where pictures are stored
29 \usepackage{lipsum} % Inserts dummy text
31 \usepackage{tikz} % Required for drawing custom shapes
33 \usepackage[english]{babel} % English language/hyphenation
35 \usepackage{enumitem} % Customize lists
36 \setlist{nolistsep} % Reduce spacing between bullet points and numbered lists
38 \usepackage{booktabs} % Required for nicer horizontal rules in tables
40 \usepackage{eso-pic} % Required for specifying an image background in the title page
42 \usepackage{listings} % Required for inserting code snippets
44 \definecolor{ocre}{RGB}{243,102,25} % Define the orange color used for highlighting throughout the book
45 \definecolor{DarkGreen}{rgb}{0.0,0.4,0.0} % Comment color
46 \definecolor{highlight}{RGB}{255,251,204} % Code highlight color
48 \lstdefinestyle{Style1}{ % Define a style for your code snippet, multiple definitions can be made if, for example, you wish to insert multiple code snippets using different programming languages into one document
49 language=C, % Detects keywords, comments, strings, functions, etc for the language specified
50 backgroundcolor=\color{highlight}, % Set the background color for the snippet - useful for highlighting
51 basicstyle=\footnotesize\ttfamily, % The default font size and style of the code
52 breakatwhitespace=false, % If true, only allows line breaks at white space
53 breaklines=true, % Automatic line breaking (prevents code from protruding outside the box)
54 captionpos=b, % Sets the caption position: b for bottom; t for top
55 commentstyle=\usefont{T1}{pcr}{m}{sl}\color{DarkGreen}, % Style of comments within the code - dark green courier font
56 deletekeywords={}, % If you want to delete any keywords from the current language separate them by commas
57 %escapeinside={\%}, % This allows you to escape to LaTeX using the character in the bracket
58 firstnumber=1, % Line numbers begin at line 1
59 frame=single, % Frame around the code box, value can be: none, leftline, topline, bottomline, lines, single, shadowbox
60 frameround=tttt, % Rounds the corners of the frame for the top left, top right, bottom left and bottom right positions
61 keywordstyle=\color{blue}\bf, % Functions are bold and blue
62 morekeywords={}, % Add any functions no included by default here separated by commas
63 numbers=left, % Location of line numbers, can take the values of: none, left, right
64 numbersep=10pt, % Distance of line numbers from the code box
65 numberstyle=\tiny\color{gray}, % Style used for line numbers
66 rulecolor=\color{black}, % Frame border color
67 showstringspaces=false, % Don't put marks in string spaces
68 showtabs=false, % Display tabs in the code as lines
69 stepnumber=5, % The step distance between line numbers, i.e. how often will lines be numbered
70 stringstyle=\color{purple}, % Strings are purple
71 tabsize=2, % Number of spaces per tab in the code
74 %----------------------------------------------------------------------------------------
75 % MAIN TABLE OF CONTENTS
76 %----------------------------------------------------------------------------------------
78 \usepackage{titletoc} % Required for manipulating the table of contents
80 \contentsmargin{0cm} % Removes the default margin
81 % Chapter text styling
82 \titlecontents{chapter}[1.25cm] % Indentation
83 {\addvspace{15pt}\large\sffamily\bfseries} % Spacing and font options for chapters
84 {\color{ocre!60}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{ocre}} % Chapter number
85 {}
86 {\color{ocre!60}\normalsize\sffamily\bfseries\;\titlerule*[.5pc]{.}\;\thecontentspage} % Page number
87 % Section text styling
88 \titlecontents{section}[1.25cm] % Indentation
89 {\addvspace{5pt}\sffamily\bfseries} % Spacing and font options for sections
90 {\contentslabel[\thecontentslabel]{1.25cm}} % Section number
92 {\sffamily\hfill\color{black}\thecontentspage} % Page number
94 % Subsection text styling
95 \titlecontents{subsection}[1.25cm] % Indentation
96 {\addvspace{1pt}\sffamily\small} % Spacing and font options for subsections
97 {\contentslabel[\thecontentslabel]{1.25cm}} % Subsection number
99 {\sffamily\;\titlerule*[.5pc]{.}\;\thecontentspage} % Page number
102 %----------------------------------------------------------------------------------------
103 % MINI TABLE OF CONTENTS IN CHAPTER HEADS
104 %----------------------------------------------------------------------------------------
106 % Section text styling
107 \titlecontents{lsection}[0em] % Indendating
108 {\footnotesize\sffamily} % Font settings
113 % Subsection text styling
114 \titlecontents{lsubsection}[.5em] % Indentation
115 {\normalfont\footnotesize\sffamily} % Font settings
120 %----------------------------------------------------------------------------------------
121 % PAGE HEADERS
122 %----------------------------------------------------------------------------------------
124 \usepackage{fancyhdr} % Required for header and footer configuration
126 \pagestyle{fancy}
127 \renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries #1}{}} % Chapter text font settings
128 \renewcommand{\sectionmark}[1]{\markright{\sffamily\large\thesection\hspace{5pt} #1}{}} % Section text font settings
130 \fancyhf{} \fancyhead[LE,RO]{\sffamily\normalsize\thepage} % Font setting for the page number in the header
131 \fancyhead[LO]{\rightmark} % Print the nearest section name on the left side of odd pages
132 \fancyhead[RE]{\leftmark} % Print the current chapter name on the right side of even pages
133 \renewcommand{\headrulewidth}{0.5pt} % Width of the rule under the header
134 \addtolength{\headheight}{2.5pt} % Increase the spacing around the header slightly
135 \renewcommand{\footrulewidth}{0pt} % Removes the rule in the footer
136 \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}} % Style for when a plain pagestyle is specified
138 % Removes the header from odd empty pages at the end of chapters
139 \makeatletter
140 \renewcommand{\cleardoublepage}{
141 \clearpage\ifodd\c@page\else
142 %\hbox{}
143 %\vspace*{\fill}
144 %\thispagestyle{empty}
145 %\newpage
146 \fi}
148 %----------------------------------------------------------------------------------------
149 % THEOREM STYLES
150 %----------------------------------------------------------------------------------------
152 \usepackage{amsmath,amsfonts,amssymb,amsthm} % For including math equations, theorems, symbols, etc
154 \newcommand{\intoo}[2]{\mathopen{]}#1\,;#2\mathclose{[}}
155 \newcommand{\ud}{\mathop{\mathrm{{}d}}\mathopen{}}
156 \newcommand{\intff}[2]{\mathopen{[}#1\,;#2\mathclose{]}}
157 \newtheorem{notation}{Notation}[chapter]
159 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
160 %%%%%%%%%%%%%%%%%%%% dedicated to boxed/framed environements %%%%%%%%%%%%%%
161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
162 \newtheoremstyle{ocrenumbox}% % Theorem style name
163 {0pt}% Space above
164 {0pt}% Space below
165 {\normalfont}% % Body font
166 {}% Indent amount
167 {\small\bf\sffamily\color{ocre}}% % Theorem head font
168 {\;}% Punctuation after theorem head
169 {0.25em}% Space after theorem head
170 {\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
171 \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}} % Optional theorem note
172 \renewcommand{\qedsymbol}{$\blacksquare$}% Optional qed square
174 \newtheoremstyle{blacknumex}% Theorem style name
175 {5pt}% Space above
176 {5pt}% Space below
177 {\normalfont}% Body font
178 {} % Indent amount
179 {\small\bf\sffamily}% Theorem head font
180 {\;}% Punctuation after theorem head
181 {0.25em}% Space after theorem head
182 {\small\sffamily{\tiny\ensuremath{\blacksquare}}\nobreakspace\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
183 \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}% Optional theorem note
185 \newtheoremstyle{blacknumbox} % Theorem style name
186 {0pt}% Space above
187 {0pt}% Space below
188 {\normalfont}% Body font
189 {}% Indent amount
190 {\small\bf\sffamily}% Theorem head font
191 {\;}% Punctuation after theorem head
192 {0.25em}% Space after theorem head
193 {\small\sffamily\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
194 \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}% Optional theorem note
196 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
197 %%%%%%%%%%%%% dedicated to non-boxed/non-framed environements %%%%%%%%%%%%%
198 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
199 \newtheoremstyle{ocrenum}% % Theorem style name
200 {5pt}% Space above
201 {5pt}% Space below
202 {\normalfont}% % Body font
203 {}% Indent amount
204 {\small\bf\sffamily\color{ocre}}% % Theorem head font
205 {\;}% Punctuation after theorem head
206 {0.25em}% Space after theorem head
207 {\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
208 \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}} % Optional theorem note
209 \renewcommand{\qedsymbol}{$\blacksquare$}% Optional qed square
210 \makeatother
212 % Defines the theorem text style for each type of theorem to one of the three styles above
213 \newcounter{dummy}
214 \numberwithin{dummy}{section}
215 \theoremstyle{ocrenumbox}
216 \newtheorem{theoremeT}[dummy]{Theorem}
217 \newtheorem{problem}{Problem}[chapter]
218 \newtheorem{question}{Question}[chapter]
219 \newtheorem{Warning}{Warning}[chapter]
220 \newtheorem{reminder}[question]{Reminder}
221 \newtheorem{exerciseT}{Exercise}[chapter]
222 \theoremstyle{blacknumex}
223 \newtheorem{exampleT}{Example}[chapter]
224 \theoremstyle{blacknumbox}
225 \newtheorem{vocabulary}{Vocabulary}[chapter]
226 \newtheorem{definitionT}{Definition}[section]
227 \newtheorem{corollaryT}[dummy]{Corollary}
228 \theoremstyle{ocrenum}
229 \newtheorem{proposition}[dummy]{Proposition}
231 %----------------------------------------------------------------------------------------
232 % DEFINITION OF COLORED BOXES
233 %----------------------------------------------------------------------------------------
235 \newcommand\Loadedframemethod{TikZ}
236 \RequirePackage[framemethod=\Loadedframemethod]{mdframed}
238 %\RequirePackage[framemethod=default]{mdframed} % Required for creating the theorem, definition, exercise and corollary boxes
240 % Theorem box
241 \newmdenv[skipabove=7pt,
242 skipbelow=7pt,
243 backgroundcolor=black!5,
244 linecolor=ocre,
245 innerleftmargin=5pt,
246 innerrightmargin=5pt,
247 innertopmargin=5pt,
248 leftmargin=0cm,
249 rightmargin=0cm,
250 innerbottommargin=5pt]{tBox}
252 % Exercise box
253 \newmdenv[skipabove=7pt,
254 skipbelow=7pt,
255 rightline=false,
256 leftline=true,
257 topline=false,
258 bottomline=false,
259 backgroundcolor=ocre!10,
260 linecolor=ocre,
261 innerleftmargin=5pt,
262 innerrightmargin=5pt,
263 innertopmargin=5pt,
264 innerbottommargin=5pt,
265 leftmargin=0cm,
266 rightmargin=0cm,
267 linewidth=4pt]{eBox}
269 % Definition box
270 \newmdenv[skipabove=7pt,
271 skipbelow=7pt,
272 rightline=false,
273 leftline=true,
274 topline=false,
275 bottomline=false,
276 linecolor=ocre,
277 innerleftmargin=5pt,
278 innerrightmargin=5pt,
279 innertopmargin=0pt,
280 leftmargin=0cm,
281 rightmargin=0cm,
282 linewidth=4pt,
283 innerbottommargin=0pt]{dBox}
285 % Corollary box
286 \newmdenv[skipabove=7pt,
287 skipbelow=7pt,
288 rightline=false,
289 leftline=true,
290 topline=false,
291 bottomline=false,
292 linecolor=gray,
293 backgroundcolor=black!5,
294 innerleftmargin=5pt,
295 innerrightmargin=5pt,
296 innertopmargin=5pt,
297 leftmargin=0cm,
298 rightmargin=0cm,
299 linewidth=4pt,
300 innerbottommargin=5pt]{cBox}
303 % Creates an environment for each type of theorem and assigns it a theorem text style from the "Theorem Styles" section above and a colored box from above
304 \newenvironment{theorem}{\begin{tBox}\begin{theoremeT}}{\end{theoremeT}\end{tBox}}
305 \newenvironment{exercise}{\begin{eBox}\begin{exerciseT}}{\hfill{\color{ocre}\tiny\ensuremath{\blacksquare}}\end{exerciseT}\end{eBox}}
306 \newenvironment{definition}{\begin{dBox}\begin{definitionT}}{\end{definitionT}\end{dBox}}
307 \newenvironment{example}{\begin{exampleT}}{\hfill{\tiny\ensuremath{\blacksquare}}\end{exampleT}}
308 \newenvironment{corollary}{\begin{cBox}\begin{corollaryT}}{\end{corollaryT}\end{cBox}}
310 %----------------------------------------------------------------------------------------
311 % REMARK ENVIRONMENT
312 %----------------------------------------------------------------------------------------
314 \newenvironment{remark}{\par\vskip10pt\small % Vertical white space above the remark and smaller font size
315 \begin{list}{}{
316 \leftmargin=35pt % Indentation on the left
317 \rightmargin=25pt}\item\ignorespaces % Indentation on the right
318 \makebox[-2.5pt]{\begin{tikzpicture}[overlay]
319 \node[draw=ocre!60,line width=1pt,circle,fill=ocre!25,font=\sffamily\bfseries,inner sep=2pt,outer sep=0pt] at (-15pt,0pt){\textcolor{ocre}{R}};\end{tikzpicture}} % Orange R in a circle
320 \advance\baselineskip -1pt}{\end{list}\vskip5pt} % Tighter line spacing and white space after remark
322 %----------------------------------------------------------------------------------------
323 % SECTION NUMBERING IN THE MARGIN
324 %----------------------------------------------------------------------------------------
326 \makeatletter
327 \renewcommand{\@seccntformat}[1]{\llap{\textcolor{ocre}{\csname the#1\endcsname}\hspace{1em}}}
328 \renewcommand{\section}{\@startsection{section}{1}{\z@}
329 {-4ex \@plus -1ex \@minus -.4ex}
330 {1ex \@plus.2ex }
331 {\normalfont\large\sffamily\bfseries}}
332 \renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
333 {-3ex \@plus -0.1ex \@minus -.4ex}
334 {0.5ex \@plus.2ex }
335 {\normalfont\sffamily\bfseries}}
336 \renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}
337 {-2ex \@plus -0.1ex \@minus -.2ex}
338 {0.2ex \@plus.2ex }
339 {\normalfont\small\sffamily\bfseries}}
340 \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}
341 {-2ex \@plus-.2ex \@minus .2ex}
342 {0.1ex}
343 {\normalfont\small\sffamily\bfseries}}
345 %----------------------------------------------------------------------------------------
346 % CHAPTER HEADINGS
347 %----------------------------------------------------------------------------------------
349 \newcommand{\thechapterimage}{}
350 \newcommand{\chapterimage}[1]{\renewcommand{\thechapterimage}{#1}}
351 \def\thechapter{\arabic{chapter}}
352 \def\@makechapterhead#1{
353 \thispagestyle{empty}
354 {\centering \normalfont\sffamily
355 \ifnum \c@secnumdepth >\m@ne
356 \if@mainmatter
357 \startcontents
358 \begin{tikzpicture}[remember picture,overlay]
359 \node at (current page.north west)
360 {\begin{tikzpicture}[remember picture,overlay]
362 \node[anchor=north west,inner sep=0pt] at (0,0) {\includegraphics[width=\paperwidth]{\thechapterimage}};
364 %Commenting the 3 lines below removes the small contents box in the chapter heading
365 \draw[fill=white,opacity=.6] (1cm,0) rectangle (7.7cm,-4.7cm);
366 \node[anchor=north west] at (1cm,.25cm) {\parbox[t][8cm][t]{6.6cm}{\huge\bfseries\flushleft \printcontents{l}{1}{\setcounter{tocdepth}{2}}}};
368 \draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,fill=white,fill opacity=.6,text opacity=1,draw=ocre,draw opacity=1,line width=2pt,inner sep=15pt]{\huge\sffamily\bfseries\textcolor{black}{\thechapter\ ---\ #1\vphantom{plPQq}\makebox[22cm]{}}};
369 \end{tikzpicture}};
370 \end{tikzpicture}}\par\vspace*{230\p@}
374 \def\@makeschapterhead#1{
375 \thispagestyle{empty}
376 {\centering \normalfont\sffamily
377 \ifnum \c@secnumdepth >\m@ne
378 \if@mainmatter
379 \startcontents
380 \begin{tikzpicture}[remember picture,overlay]
381 \node at (current page.north west)
382 {\begin{tikzpicture}[remember picture,overlay]
383 \node[anchor=north west] at (-4pt,4pt) {\includegraphics[width=\paperwidth]{\thechapterimage}};
384 \draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,fill=white,opacity=.7,inner sep=15.5pt]{\huge\sffamily\bfseries\textcolor{black}{\vphantom{plPQq}\makebox[22cm]{}}};
385 \draw[anchor=west] (5cm,-9cm) node [rounded corners=25pt,draw=ocre,line width=2pt,inner sep=15pt]{\huge\sffamily\bfseries\textcolor{black}{#1\vphantom{plPQq}\makebox[22cm]{}}};
386 \end{tikzpicture}};
387 \end{tikzpicture}}\par\vspace*{230\p@}
391 \makeatother