Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \usepackage{hyperref}
- \usepackage{algorithm}
- \usepackage{booktabs}
- \usepackage{colortbl}
- \usepackage[dvipsnames,svgnames,x11names,hyperref,table]{xcolor}
- \usepackage{graphicx}
- \usepackage{upquote,textcomp}
- \usepackage{caption}
- \captionsetup{hypcapspace=0.5\baselineskip}
- \captionsetup{labelfont=bf,labelsep=endash}
- \captionsetup[ruled]{labelfont=bf,labelsep=endash}
- \usepackage{float}
- \floatname{algorithm}{Listing}
- \newcommand{\algorithmname}{Listing}
- % Document colours
- \definecolor{externallinkcolour}{HTML}{1F3F81}
- \definecolor{internallinkcolour}{HTML}{BF910C}
- \definecolor{sectioncolour}{HTML}{1F3F81}
- \definecolor{sourcecolour}{HTML}{F0F0F0}
- % Table colours
- \colorlet{tableheader}{LightGray!80}
- \colorlet{zebra}{LightGray!40}
- \addtokomafont{sectioning}{\color{sectioncolour}}
- \usepackage[automark,nouppercase]{scrpage2}
- \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
- \newcommand{\ChapterTitle}{\leftmark}
- \makeatletter
- \def\ChapterNumberIfNeededEven{%
- \ifnum \value{chapter}>0 ~$ \star $ \chaptername{} \thechapter{} \fi
- }
- \def\ChapterNumberIfNeededOdd{%
- \ifnum \value{chapter}>0 \chaptername{} \thechapter{} $ \star $ \fi
- }
- \makeatother
- % Adjust the header and footer.
- \pagestyle{scrheadings}
- \clearscrheadfoot
- \setheadsepline{.5pt}
- \rehead{\textsc{\ChapterTitle \ChapterNumberIfNeededEven}}
- \lohead{\textsc{\ChapterNumberIfNeededOdd \ChapterTitle}}
- \lehead{\pagemark}
- \rohead{\pagemark}
- \cfoot{\small{\textnormal{Copyright \copyright~White Magic Software, Ltd.}}}
- % Cast the fantastically ugly, ugly hyperlink border into the depth of Hades.
- \hypersetup{
- % Show bookmarks bar?
- bookmarks=true,
- % Non-Latin characters in Acrobat's bookmarks
- unicode=false,
- % Show Acrobat's toolbar?
- pdftoolbar=true,
- % Show Acrobat's menu?
- pdfmenubar=true,
- % Window fit to page when opened
- pdffitwindow=false,
- % Fit the width of the page to the window
- pdfstartview={FitH},
- % Title
- pdftitle={Indespensible JasperReports},
- % author
- pdfauthor={White Magic Software, Ltd.},
- % subject of the document
- pdfsubject={Reporting Software and Business Intelligence},
- % Creator of the document
- pdfcreator={Dave Jarvis},
- % Producer of the document
- pdfproducer={Producer},
- % List of keywords
- pdfkeywords={JasperReports} {Business Intelligence} {Reports},
- % Links in new window
- pdfnewwindow=true,
- % false: boxed links; true: colored links
- colorlinks=true,
- % Color of internal links
- linkcolor=internallinkcolour,
- % Color of links to bibliography
- citecolor=black,
- % Color of file links
- filecolor=black,
- % Color of external links
- urlcolor=externallinkcolour,
- % No border around links
- pdfborder={0 0 0}
- }
- % Centre tables.
- \let\oldtable\table
- \let\endoldtable\endtable
- \renewenvironment{table}[1][ht]{%
- \rowcolors{2}{zebra}{white}
- \oldtable[#1]
- \centering}%
- {\endoldtable}
- \date{}
- % Allow figures to be placed near the top
- \renewcommand{\topfraction}{0.85}
- \renewcommand{\textfraction}{0.1}
- \renewcommand{\floatpagefraction}{0.75}
- % Determine if the image is too wide for the page.
- \makeatletter
- \def\ScaleIfNeeded{%
- \ifdim\Gin@nat@width>\linewidth
- \linewidth
- \else
- \Gin@nat@width
- \fi
- }
- \makeatother
- % Resize figures that are too wide for the page.
- \let\oldincludegraphics\includegraphics
- \renewcommand\includegraphics[2][]{%
- \graphicsformat{%
- \oldincludegraphics[width=\ScaleIfNeeded]{#2}%
- }%
- }
- % Change the background colour of algorithm boxes
- \let\oldalgorithm\algorithm
- \let\endoldalgorithm\endalgorithm
- \renewenvironment{algorithm}[1][htbp]{
- \let\graphicsformat\justifiedandcolored
- \oldalgorithm[#1]
- }%
- {\endoldalgorithm}
- \def\justifiedandcolored#1{%
- \setlength\fboxrule{0pt}%
- \setlength\fboxsep{0pt}%
- \kern-1.5pt
- \colorbox{sourcecolour}{%
- \hbox to\linewidth{#1}%
- }%
- \par
- \kern-1.5pt
- }
- % Centre graphics within non-Algorithm floats.
- \let\graphicsformat\centering
- % Suggest that non-breaking words (IllegalArgumentException) do
- % not spill into the margins.
- \tolerance 1414
- \hbadness 1414
- \emergencystretch 1.5em
- \hfuzz 0.3pt
- \widowpenalty=10000
- \vfuzz \hfuzz
- % Prevent multiline footnotes from being split across pages.
- \interfootnotelinepenalty=10000
- % Allow plenty of room at the bottom (this will prevent large vertical
- % gaps between enumerated items and bulleted lists).
- \raggedbottom
- % LyX requires this for some reason...
- \makeatletter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement