-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathvirtio.tex
More file actions
123 lines (114 loc) · 4.64 KB
/
virtio.tex
File metadata and controls
123 lines (114 loc) · 4.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% VIRTIO 1.0 Specification Draft
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[10pt,titlepage]{report}
\usepackage[top=1in,left=1in,bottom=0.5in,right=1in,paperwidth=8.5in, paperheight=11in]{geometry}
\usepackage{parskip}
\usepackage{setspace}
\usepackage[english]{babel}
\usepackage{ae,aecompl}
\usepackage[T1]{fontenc}
\usepackage[xetex]{graphicx}
\usepackage{placeins}
\usepackage{framed}
\usepackage[xetex]{hyperref}
\usepackage{lineno}
\usepackage{listings}
\usepackage{courier}
\usepackage{fancyvrb}
\usepackage{array}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{xcolor}
\usepackage[explicit]{titlesec}
\usepackage{mdwlist}
\usepackage{url}
\usepackage{xifthen}
\usepackage[no-math]{fontspec}
\usepackage{xltxtra}
\usepackage{etoolbox}
\usepackage{tabularx}
\usepackage{ltablex}
\usepackage{underscore}
\usepackage{xstring}
\usepackage{enumitem}
\usepackage{float}
\IfFileExists{ellipsis.sty}{\usepackage{ellipsis}}{
\message{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
\message{LaTeX Warning: Missing ellipsis.sty: dots (...) will look ugly}
\message{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
}
% This is an alternative to package underscore above
% It makes it possible to disable hyphenation of upper-case
% identifiers with underscore (of which we have many) by
% treating them as acronyms.
% However, the result doesn't look pretty, so don't use this
% for now.
%\catcode`\_=\active
%\def_{\_}
% Don't hyphenate acronyms
%\uchyph=0
\IfFontExistsTF{Arial}{\setmainfont[Mapping=tex-text]{Arial}}{\setmainfont[Mapping=tex-text]{Liberation Sans}}
%\setromanfont{Arial}
\IfFontExistsTF{Courier New}{\setmonofont{Courier New}}{\setmonofont{Liberation Mono}}
\urlstyle{rm}
% commands
\input{specvars.tex}
\input{commands.tex}
\input{commands-pdf.tex}
\input{listings.tex}
% new command: header and footer
\newcommand{\virtioheaderfooter}{
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[L]{\footnotesize\virtiospecfile\\\virtioworkproduct}
\fancyfoot[C]{\footnotesize\ \\\virtiooasiscopyright}
\fancyfoot[R]{\footnotesize\virtioworkingdraftdate\\Page \thepage\ of \pageref*{LastPage}}
}
% page setup
\setlength{\headheight}{0pt}
\setlength{\headsep}{10pt}
\setlength{\extrarowheight}{0.05in}
% headers setup
\titleformat{\chapter}[block]{\titlerule}{}{0pt}{\color{oasis1}\fontsize{18}{18}\textbf{\ifthenelse{\equal{\@chapapp}{\appendixname}}{Appendix~\thechapter.\ #1}{\ifthenelse{\equal{\thechapter}{0}}{}{\thechapter\ \ }#1}}\vspace{-0.3in}}
\titleformat{\section}{\color{oasis1}\normalfont\Large\bfseries}{\color{oasis1}\thesection}{1em}{#1}
\titleformat{\subsection}{\color{oasis1}\normalfont\large\bfseries}{\color{oasis1}\thesubsection}{1em}{#1}
\titleformat{\subsubsection}{\color{oasis1}\normalfont\normalsize\bfseries}{\color{oasis1}\thesubsubsection}{1em}{#1}
\titleformat{\paragraph}[hang]{\color{oasis1}\normalfont\normalsize\bfseries}{\color{oasis1}\theparagraph}{1em}{#1}
\titleformat{\subparagraph}[hang]{\color{oasis1}\normalfont\normalsize\bfseries}{\color{oasis1}\thesubparagraph}{1em}{#1}
% toc hacks
\makeatletter
% hyperref package: do not include the chapter/section number in the link
\def\process@contentsline#1#2{#1{#2}\hyper@linkstart{link}{\Hy@tocdestname}}
\patchcmd{\contentsline}{\hyper@linkstart{link}{\Hy@tocdestname}{#2}}{\process@contentsline#2}{}{}
% report style: add dotted lines between chapter names and page numbers
\patchcmd{\l@chapter}{\hfil}{\leaders\hbox{\normalfont$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill}{}{}
% Deep headings (e.g. 5.14.6.10): widen the number box so long numbers do not touch the title.
% Default \numberline is left-aligned in that box, so a wide box adds a huge gap for short numbers.
% While reading the .toc only, right-align numbers in the box (\hfil#1) so only the longest
% entry sets the needed width and shorter entries stay close to the title text.
\renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{5.1em}}
\renewcommand*\l@paragraph{\@dottedtocline{4}{10em}{6em}}
\let\virtio@orig@starttoc\@starttoc
\def\virtio@tocsuffix{toc}
\def\@starttoc#1{%
\def\virtio@tmptocarg{#1}%
\ifx\virtio@tmptocarg\virtio@tocsuffix
\let\virtio@saved@numberline\numberline
\def\numberline##1{\hb@xt@\@tempdima{\hfil##1}\space\space}%
\fi
\virtio@orig@starttoc{#1}%
\ifx\virtio@tmptocarg\virtio@tocsuffix
\let\numberline\virtio@saved@numberline
\fi
}
\makeatother
% main document
\input{main.tex}