Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 79a54f90d8
Fetching contributors…

Cannot retrieve contributors at this time

305 lines (251 sloc) 7.346 kB
\documentclass[
[% paper %]paper,
DIV=10,
parskip=full,
headsepline=on,
footsepline=off,
chapterprefix=on,
12pt,
twoside,
openright,
cleardoublepage=plain
]{scrbook}
% XeTeX unicode support -- e.g. character replacements
\usepackage{xunicode}
% This ensures that our dollar signs, braces, tildes and circumflex are shown correctly
\DeclareTextSymbol{\textdollar}{EU1}{`\$}
\DeclareTextSymbol{\textbraceright}{EU1}{`\}}
\DeclareTextSymbol{\textbraceleft}{EU1}{`\{}
\DeclareTextSymbol{\textasciitilde}{EU1}{`\~}
\DeclareTextSymbol{\textasciicircum}{EU1}{`\^}
% For the sidebars.
\usepackage{fancybox}
% Smart quotes
\usepackage{csquotes}
\MakeOuterQuote{"}
% For index generation. Supplies \printindex.
\usepackage{index}
% Fonts. use liberationfonts package from debian
\usepackage{fontspec}
\setromanfont[Mapping=tex-text]{Liberation Serif}
\setsansfont[Mapping=tex-text]{Liberation Sans}
\setmonofont[Scale=0.75]{Liberation Mono}
% microtype is not available for XeTeX yet
%\usepackage{microtype}
% Supplies 'tabular' environment and \rowcolor.
\usepackage{colortbl}
% Optimize for this language.
\usepackage[english]{babel}
% Verbatim definition for code blocks.
\usepackage{fancyvrb}
\RecustomVerbatimEnvironment
{Verbatim}{Verbatim}
{xleftmargin=0.35in,commandchars=\\\{\},fontsize=\small,gobble=4,labelposition=topline}
% Allows among other things the \documentclass '...paper' option
% to be passed on to the DVI processor.
\usepackage[xetex]{hyperref}
\hypersetup{
pdftitle={SDL Manual: Writing Games in Perl},
colorlinks,
linkcolor=black,
urlcolor=black,
}
% URLs
\DeclareUrlCommand\email{\urlstyle{rm}\urlstyle{bf}}
% Footnote correction
\deffootnote{1.5em}{1.5em}{\makebox[1.5em][c]{\textsuperscript\thefootnotemark}}
% Needed for \includegraphics from '=for figure' in some src/*.pod.
\usepackage{graphics,graphicx}
% Set TOC to mostly sans-serif
\usepackage[titles]{tocloft}
\setlength{\cftbeforechapskip}{2ex}
\setlength{\cftbeforesecskip}{0.8ex}
\setlength{\cftbeforesubsecskip}{0.8ex}
\renewcommand{\cftchapfont}{%
\sffamily\bfseries
}
\renewcommand{\cftchappagefont}{\sffamily}
\renewcommand{\cftsecfont}{\sffamily}
\renewcommand{\cftsecpagefont}{\sffamily}
\renewcommand{\cftsubsecfont}{\sffamily}
\renewcommand{\cftsubsecpagefont}{\sffamily}
\usepackage[sf,sl,outermarks,noindentafter,nobottomtitles]{titlesec}
% Headlines formatting
\titleformat{\section}[hang]{\Large\sffamily}{\thetitle}{8pt}{}
\titleformat{\subsection}[hang]{\large\sffamily}{\thetitle}{8pt}{}
\titleformat{\subsubsection}[hang]{\normalfont\sffamily}{\thetitle}{8pt}{}
\titleformat{\paragraph}[hang]{\bfseries\sffamily}{\thetitle}{8pt}{}
% Chapter heading formatting
\titleformat{\chapter}[display]
{\filleft\huge\sffamily}
{\fontsize{100pt}{90pt}\selectfont\thechapter}
{-2ex}{\vspace{1ex}}
[\vspace{1ex}]
%% HEADINGS %%
\newlength{\marginWidth}
\setlength\marginWidth{\marginparwidth+\marginparsep}
\newlength{\fulllinewidth}
\setlength\fulllinewidth{\textwidth+\marginWidth}
\usepackage{truncate}
\footskip=1.6cm
\makeatletter
% Standard footer on odd pages
\def\oddfootSTANDARD{
\renewcommand{\@oddfoot}{
\hbox to\textwidth{\vbox{\hbox to\textwidth{
\hfill
\strut
\hspace{1pt}
}}}
\hbox to\marginWidth{\vbox{\hbox to\marginWidth{
\strut
\hspace{5pt}
\vrule width 1pt height 2ex
\hspace{8pt}
\textsf{\thepage}
\hfill
}}}\hss
}
}
% Standard footer on even pages
\def\evenfootSTANDARD{
\renewcommand{\@evenfoot}{
\hspace{-\marginWidth}
\hbox to\marginWidth{\vbox{\hbox to\marginWidth{
\strut
\hfill
\textsf{\thepage}
\hspace{5pt}
\vrule width 1pt height 2ex
\hspace{7pt}
}}}\hss
}
}
\newcommand{\ps@doc}{
%% TODO: Re-enable when all text is in some kind of subchapter, since otherwise
%% the header is empty and the number is 2.0 or something like it.
%% \renewcommand{\@oddhead}{
%% \hbox to\textwidth{\vbox{\hbox to\textwidth{
%% \textsf
%% \hfill
%% \rightmark
%% \strut
%% \hspace{1pt}
%% }}}
%% \hbox to\marginWidth{\vbox{\hbox to\marginWidth{
%% \strut
%% \hspace{5pt}
%% \vrule width 1pt
%% \hspace{5pt}
%% \textsf
%% \thesection
%% \hfill
%% }}}\hss
%% }
\renewcommand{\@evenhead}{
\hspace{-\marginWidth}
\hbox to\marginWidth{\vbox{\hbox to\marginWidth{
\hfill
\strut
\textbf{\textsf{Chapter~\thechapter}}
\hspace{5pt}
\vrule width 1pt
\hspace{7pt}
\strut
}}}\hss
\hbox to\textwidth{\vbox{\hbox to\textwidth{
\strut
\truncate{.9\textwidth}{\leftmark}
\hfill
}}}\hss
}
\oddfootSTANDARD
\evenfootSTANDARD
}
\renewcommand{\ps@plain}{
\let\@oddhead\@empty
\let\@evenhead\@empty
\let\@evenfoot\@empty
\oddfootSTANDARD
}
\newcommand{\ps@docINTRO}{
\let\@oddhead\@empty
\let\@evenhead\@empty
\oddfootSTANDARD
\evenfootSTANDARD
}
\newcommand{\ps@docAPPENDIX}{
\let\@oddhead\@empty
\renewcommand{\@evenhead}{
\hspace{-\marginWidth}
\hbox to\marginWidth{\vbox{\hbox to\marginWidth{
\hfill
\strut
\textbf{\textsf{Appendix~\thechapter}}
\hspace{5pt}
\vrule width 1pt
\hspace{7pt}
\strut
}}}\hss
\hbox to\textwidth{\vbox{\hbox to\textwidth{
\strut
\truncate{.9\textwidth}{\leftmark}
\hfill
}}}\hss
}
\oddfootSTANDARD
\evenfootSTANDARD
}
\newcommand{\ps@reallyempty}{
\let\@oddhead\@empty
\let\@evenhead\@empty
\let\@oddfoot\@empty
\let\@evenfoot\@empty
}
\renewcommand{\chaptermark}[1]{\markboth{\uppercase{\textsf{#1}}}{}}
\renewcommand{\sectionmark}[1]{\markright{\textsf{#1}}}
\makeatother
%% \let\origdoublepage\cleardoublepage
%% \newcommand{\clearemptydoublepage}{%
%% \clearpage
%% {\pagestyle{empty}\origdoublepage}%
%% }
%% \let\cleardoublepage\clearemptydoublepage
%% HEADINGs END %%
% No widows and orphans
\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000
% Admonition
\usepackage{framed}
\usepackage{xcolor}
\definecolor{MyBoxColor}{rgb}{0.9,0.9,0.9}
\newenvironment{sidebar}{
\def\FrameCommand{\fboxsep=\FrameSep \colorbox{MyBoxColor}}
\MakeFramed {\advance\hsize-2\width\FrameRestore}}
{\endMakeFramed}
\makeindex
\begin{document}
\subject{\includegraphics{../src/logo}}
\title{SDL::Manual}
\subtitle{Writing Games in Perl}
\author{ Kartik Thakore }
\date{}
\publishers{With contributions by the community}
\lowertitleback{ Latex based on the Perl6 book: HTTPS://GitHub.Com/perl6/book }
\maketitle
\pagestyle{docINTRO}
\pagenumbering{roman}
\tableofcontents
\cleardoublepage
%\newpage
\pagestyle{doc}
\pagenumbering{arabic}
[% content %]
\begin{appendix}
\cleardoublepage
%\newpage
\pagestyle{docAPPENDIX}
\printindex
\end{appendix}
\end{document}
Jump to Line
Something went wrong with that request. Please try again.