cannam@86: % $Id$ cannam@86: \documentclass[12pt,paper=a4]{scrartcl} cannam@86: cannam@86: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cannam@86: % Packages cannam@86: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cannam@86: cannam@86: % ... cannam@86: %\usepackage[margin=3cm]{geometry} cannam@86: \usepackage{a4wide} cannam@86: cannam@86: % ... cannam@86: \usepackage[english]{babel} cannam@86: cannam@86: %\usepackage[latin1]{inputenc} cannam@86: %\usepackage[T1]{fontenc} cannam@86: cannam@86: % Do not indent paragraphs, instead separate them via vertical spacing cannam@86: \usepackage{parskip} cannam@86: cannam@86: % Support for graphics, provides \includegraphics cannam@86: \usepackage{graphicx} cannam@86: %\graphicspath{{images/}} % Specify subdir containing the images cannam@86: cannam@86: % Hyperref enriches the generated PDF with clickable links, cannam@86: % and provides many other useful features. cannam@86: \usepackage{nameref} cannam@86: \usepackage[colorlinks]{hyperref} cannam@86: \def\sectionautorefname{Section} % Write section with capital 'S' cannam@86: \def\subsectionautorefname{Subsection} % Write subsection with capital 'S' cannam@86: cannam@86: cannam@86: % The fancyvrb package provides the "Verbatim" environment, which, cannam@86: % unlike the built-in "verbatim", allows embedding TeX commands, as cannam@86: % well as tons of other neat stuff (line numbers, formatting adjustments, ...) cannam@86: \usepackage{fancyvrb} cannam@86: \fvset{tabsize=4,fontsize=\scriptsize,numbers=left} cannam@86: cannam@86: % Normally, one can not use the underscore character in LaTeX without cannam@86: % escaping it (\_ instead of _). Since the Vorbis specs use it a lot, cannam@86: % we use the underscore package to change this default behavior. cannam@86: \usepackage[nohyphen]{underscore} cannam@86: cannam@86: \usepackage{enumitem} cannam@86: cannam@86: % In LaTeX, pictures are normally put into floating environments, and it is cannam@86: % left to the typesetting engine to place them in the "optimal" spot. These cannam@86: % docs however expect pictures to be placed in a *specific* position. So we cannam@86: % don't use \begin{figure}...\end{figure}, but rather a center environment. cannam@86: % To still be able to use captions, we use the capt-of package. cannam@86: \usepackage{capt-of} cannam@86: cannam@86: cannam@86: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cannam@86: % Custom commands cannam@86: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cannam@86: cannam@86: % Custom ref command, using hyperrefs autoref & nameref, to simulate the cannam@86: % behavior of DocBook's ''. cannam@86: \newcommand{\xref}[1]{\autoref{#1}, ``\nameref{#1}''} cannam@86: cannam@86: % Emulat DocBook's ''. cannam@86: \newcommand{\link}[2]{\hyperref[#1]{#2}} cannam@86: cannam@86: % Simple 'Note' environment. Can be customized later on. cannam@86: \newenvironment{note}{\subparagraph*{Note:}}{} cannam@86: cannam@86: % Map DocBook's to fancyvrb's Verbatim environment cannam@86: \let\programlisting\Verbatim cannam@86: \let\endprogramlisting\endVerbatim cannam@86: cannam@86: % Fake some more DocBook elements cannam@86: \newcommand{\function}[1]{\texttt{#1}} cannam@86: \newcommand{\filename}[1]{\texttt{#1}} cannam@86: \newcommand{\varname}[1]{\texttt{#1}} cannam@86: \newcommand{\literal}[1]{\texttt{#1}} cannam@86: cannam@86: % Redefine \~ to generate something that looks more appropriate when used in text. cannam@86: \renewcommand{\~}{$\sim$} cannam@86: cannam@86: % Useful helper macro that inserts TODO comments very visibly into the generated cannam@86: % file. Helps you to not forget to resolve those TODOs... :) cannam@86: \newcommand{\TODO}[1]{\textcolor{red}{*** #1 ***}} cannam@86: cannam@86: % Configure graphics formats: Prefer PDF, fall back to PNG or JPG, as available. cannam@86: \DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg} cannam@86: cannam@86: cannam@86: % NOTE: Things to watch out for: Some chars are reserved in LaTeX. You need to translate them... cannam@86: % ~ -> $\sim$ (or \~ which we defined above) cannam@86: % % -> \% cannam@86: % & -> \& cannam@86: % < -> $<$ cannam@86: % > -> $>$ cannam@86: % and others. Refer to any of the many LaTeX refs out there if in doubt! cannam@86: cannam@86: \begin{document} cannam@86: cannam@86: cannam@86: \title{Vorbis I specification} cannam@86: \author{Xiph.Org Foundation} cannam@86: \maketitle cannam@86: cannam@86: \tableofcontents cannam@86: cannam@86: \include{01-introduction} cannam@86: \include{02-bitpacking} cannam@86: \include{03-codebook} cannam@86: \include{04-codec} cannam@86: \include{05-comment} cannam@86: \include{06-floor0} cannam@86: \include{07-floor1} cannam@86: \include{08-residue} cannam@86: \include{09-helper} cannam@86: \include{10-tables} cannam@86: cannam@86: \appendix cannam@86: \include{a1-encapsulation-ogg} cannam@86: \include{a2-encapsulation-rtp} cannam@86: cannam@86: \include{footer} cannam@86: cannam@86: cannam@86: % TODO: Use a bibliography, as in the example below? cannam@86: \begin{thebibliography}{99} cannam@86: cannam@86: \bibitem{Sporer/Brandenburg/Edler} T.~Sporer, K.~Brandenburg and B.~Edler, cannam@86: The use of multirate filter banks for coding of high quality digital audio, cannam@86: \url{http://www.iocon.com/resource/docs/ps/eusipco_corrected.ps}. cannam@86: cannam@86: cannam@86: \end{thebibliography} cannam@86: cannam@86: \end{document}