Commit 3f062c25 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Added developer guide template, bibliography and index.

parent 9900dbda
ADD_SUBDIRECTORY(user-guide)
ADD_SUBDIRECTORY(developer-guide)
SET(DEVGUIDESRC ${CMAKE_CURRENT_SOURCE_DIR})
SET(DEVGUIDE ${CMAKE_BINARY_DIR}/docs/developer-guide)
FILE(MAKE_DIRECTORY ${DEVGUIDE}/html)
FIND_PROGRAM(HTLATEX htlatex)
ADD_CUSTOM_TARGET(developer-guide-html
export TEXINPUTS=${DEVGUIDESRC}//: && ${HTLATEX} ${DEVGUIDESRC}/developer-guide.tex
"${DEVGUIDESRC}/styling.cfg,html,2,next,NoFonts"
WORKING_DIRECTORY ${DEVGUIDE}/html
)
FIND_PROGRAM(PDFLATEX pdflatex)
FIND_PROGRAM(BIBTEX bibtex)
FIND_PROGRAM(MAKEINDEX makeindex)
ADD_CUSTOM_TARGET(developer-guide-pdf
${PDFLATEX} --output-directory ${DEVGUIDE} ${DEVGUIDESRC}/developer-guide.tex
COMMAND TEXMFOUTPUT=${DEVGUIDE} ${BIBTEX} ${DEVGUIDE}/developer-guide.aux
COMMAND TEXMFOUTPUT=${DEVGUIDE} ${MAKEINDEX} ${DEVGUIDE}/developer-guide.idx
COMMAND ${PDFLATEX} --output-directory ${DEVGUIDE}
${DEVGUIDESRC}/developer-guide.tex
WORKING_DIRECTORY ${DEVGUIDESRC}
)
@misc{nektar-website,
title={Nektar++: Spectral/hp element framework},
url={http://www.nektar.info},
year={2014}
}
%%% DOCUMENTCLASS
%%%-------------------------------------------------------------------------------
\documentclass[
a4paper, % Stock and paper size.
11pt, % Type size.
% article,
% oneside,
onecolumn, % Only one column of text on a page.
% openright, % Each chapter will start on a recto page.
% openleft, % Each chapter will start on a verso page.
openany, % A chapter may start on either a recto or verso page.
]{memoir}
%%% PACKAGES
%%%------------------------------------------------------------------------------
\usepackage[utf8]{inputenc} % If utf8 encoding
% \usepackage[lantin1]{inputenc} % If not utf8 encoding, then this is probably the way to go
\usepackage[T1]{fontenc} %
\usepackage{lmodern}
\usepackage[english]{babel} % English please
\usepackage[final]{microtype} % Less badboxes
% \usepackage{kpfonts} %Font
\usepackage{amsmath,amssymb,mathtools} % Math
% \usepackage{tikz} % Figures
\usepackage{graphicx} % Include figures
\usepackage{makeidx}
%%% PAGE LAYOUT
%%%-----------------------------------------------------------------------------
\setlrmarginsandblock{0.15\paperwidth}{*}{1} % Left and right margin
\setulmarginsandblock{0.2\paperwidth}{*}{1} % Upper and lower margin
\checkandfixthelayout
\newlength\forceindent
\setlength{\forceindent}{\parindent}
\setlength{\parindent}{0cm}
\renewcommand{\indent}{\hspace*{\forceindent}}
\setlength{\parskip}{1em}
%%% SECTIONAL DIVISIONS
%%%------------------------------------------------------------------------------
\maxsecnumdepth{subsection} % Subsections (and higher) are numbered
\setsecnumdepth{subsection}
\makeatletter %
\makechapterstyle{standard}{
\setlength{\beforechapskip}{0\baselineskip}
\setlength{\midchapskip}{1\baselineskip}
\setlength{\afterchapskip}{8\baselineskip}
\renewcommand{\chapterheadstart}{\vspace*{\beforechapskip}}
\renewcommand{\chapnamefont}{\centering\normalfont\Large}
\renewcommand{\printchaptername}{\chapnamefont \@chapapp}
\renewcommand{\chapternamenum}{\space}
\renewcommand{\chapnumfont}{\normalfont\Large}
\renewcommand{\printchapternum}{\chapnumfont \thechapter}
\renewcommand{\afterchapternum}{\par\nobreak\vskip \midchapskip}
\renewcommand{\printchapternonum}{\vspace*{\midchapskip}\vspace*{5mm}}
\renewcommand{\chaptitlefont}{\centering\bfseries\LARGE}
% \renewcommand{\printchaptertitle}[1]{\chaptitlefont ##1}
\renewcommand{\afterchaptertitle}{\par\nobreak\vskip \afterchapskip}
}
\makeatother
%\chapterstyle{standard}
\chapterstyle{madsen}
\setsecheadstyle{\normalfont\large\bfseries}
\setsubsecheadstyle{\normalfont\normalsize\bfseries}
\setparaheadstyle{\normalfont\normalsize\bfseries}
\setparaindent{0pt}\setafterparaskip{0pt}
%%% FLOATS AND CAPTIONS
%%%------------------------------------------------------------------------------
\makeatletter % You do not need to write [htpb] all the time
\renewcommand\fps@figure{htbp} %
\renewcommand\fps@table{htbp} %
\makeatother %
\captiondelim{\space } % A space between caption name and text
\captionnamefont{\small\bfseries} % Font of the caption name
\captiontitlefont{\small\normalfont} % Font of the caption text
\changecaptionwidth % Change the width of the caption
\captionwidth{1\textwidth} %
%%% ABSTRACT
%%%------------------------------------------------------------------------------
\renewcommand{\abstractnamefont}{\normalfont\small\bfseries} % Font of abstract title
\setlength{\absleftindent}{0.1\textwidth} % Width of abstract
\setlength{\absrightindent}{\absleftindent}
%%% HEADER AND FOOTER
%%%------------------------------------------------------------------------------
\makepagestyle{standard} % Make standard pagestyle
\makeatletter % Define standard pagestyle
\makeevenfoot{standard}{}{}{} %
\makeoddfoot{standard}{}{}{} %
\makeevenhead{standard}{\bfseries\thepage\normalfont\qquad\small\leftmark}{}{}
\makeoddhead{standard}{}{}{\small\rightmark\qquad\bfseries\thepage}
% \makeheadrule{standard}{\textwidth}{\normalrulethickness}
\makeatother %
\makeatletter
\makepsmarks{standard}{
\createmark{chapter}{both}{shownumber}{\@chapapp\ }{ \quad }
\createmark{section}{right}{shownumber}{}{ \quad }
\createplainmark{toc}{both}{\contentsname}
\createplainmark{lof}{both}{\listfigurename}
\createplainmark{lot}{both}{\listtablename}
\createplainmark{bib}{both}{\bibname}
\createplainmark{index}{both}{\indexname}
\createplainmark{glossary}{both}{\glossaryname}
}
\makeatother %
\makepagestyle{chap} % Make new chapter pagestyle
\makeatletter
\makeevenfoot{chap}{}{\small\bfseries\thepage}{} % Define new chapter pagestyle
\makeoddfoot{chap}{}{\small\bfseries\thepage}{} %
\makeevenhead{chap}{}{}{} %
\makeoddhead{chap}{}{}{} %
% \makeheadrule{chap}{\textwidth}{\normalrulethickness}
\makeatother
\nouppercaseheads
\pagestyle{standard} % Choosing pagestyle and chapter pagestyle
\aliaspagestyle{chapter}{chap} %
%%% NEW COMMANDS
%%%-----------------------------------------------------------------------------
\newcommand{\p}{\partial} %Partial
% Or what ever you want
%%% CODE SNIPPETS, COMMANDS, ETC
%%%-----------------------------------------------------------------------------
\usepackage{xcolor}
\usepackage{listings} % Display code / shell commands
%\newcommand{\shellcommand}[1]{\begin{lstlisting} \#1 \end{lstlisting}
\lstdefinestyle{BashInputStyle}{
language=bash,
basicstyle=\small\sffamily,
% numbers=left,
% numberstyle=\tiny,
% numbersep=3pt,
frame=,
columns=fullflexible,
backgroundcolor=\color{black!05},
linewidth=0.9\linewidth,
xleftmargin=0.1\linewidth
}
\definecolor{gray}{rgb}{0.4,0.4,0.4}
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
\definecolor{cyan}{rgb}{0.0,0.6,0.6}
\definecolor{maroon}{rgb}{0.5,0.0,0.0}
\lstdefinelanguage{XML}
{
basicstyle=\ttfamily\footnotesize,
morestring=[b]",
moredelim=[s][\bfseries\color{maroon}]{<}{\ },
moredelim=[s][\bfseries\color{maroon}]{</}{>},
moredelim=[l][\bfseries\color{maroon}]{/>},
moredelim=[l][\bfseries\color{maroon}]{>},
morecomment=[s]{<?}{?>},
morecomment=[s]{<!--}{-->},
commentstyle=\color{gray},
stringstyle=\color{orange},
identifierstyle=\color{darkblue}
}
\lstdefinestyle{XMLStyle}{
language=XML,
basicstyle=\sffamily\footnotesize,
numbers=left,
numberstyle=\tiny,
numbersep=3pt,
frame=,
columns=fullflexible,
backgroundcolor=\color{black!05},
linewidth=0.9\linewidth,
xleftmargin=0.1\linewidth
}
%%% TABLE OF CONTENTS AND INDEX
%%%-----------------------------------------------------------------------------
\maxtocdepth{subsection} % Only parts, chapters and sections in the table of contents
\settocdepth{subsection}
\makeindex
%\AtEndDocument{\addtocontents{toc}{\par}} % Add a \par to the end of the TOC
%%% INTERNAL HYPERLINKS
%%%-----------------------------------------------------------------------------
\usepackage[linktoc=all]{hyperref} % Internal hyperlinks
\hypersetup{
colorlinks,
citecolor=darkblue,
filecolor=darkblue,
linkcolor=darkblue,
urlcolor=darkblue
pdfborder={0 0 0}, % No borders around internal hyperlinks
pdfauthor={I am the Author} % author
}
\usepackage{memhfixc} %
%%% PRETTY TITLE PAGE FOR PDF DOC
%%%-----------------------------------------------------------------------------
\makeatletter
\newlength\drop
\newcommand{\br}{\hfill\break}
\newcommand*{\titlepage}{%
\thispagestyle{empty}
\begingroup% Gentle Madness
\drop = 0.1\textheight
\vspace*{\baselineskip}
\vfill
\hbox{%
\hspace*{0.1\textwidth}%
\rule{1pt}{\dimexpr\textheight-28pt\relax}%
\hspace*{0.05\textwidth}%
\parbox[b]{0.85\textwidth}{%
\vbox{%
\vspace{\drop}
{\Huge\bfseries\raggedright\@title\par}
\vskip2.37\baselineskip
{\huge\bfseries Version \input{../../VERSION}\par}
\vskip4\baselineskip
{\huge\bfseries \textcolor{darkblue}{Developer Guide}\par}
\vskip1.0\baselineskip
{\large\bfseries\@date\par}
\vspace{0.3\textheight}
{\small\noindent\@author}\\[\baselineskip]
}% end of vbox
}% end of parbox
}% end of hbox
\vfill
\null
\endgroup}
\makeatother
%%% THE DOCUMENT
%%% Where all the important stuff is included!
%%%-------------------------------------------------------------------------------
\author{Department of Aeronautics, Imperial College London, UK\\
Scientific Computing and Imaging Institute, University of Utah, USA}
\title{Nektar++: Spectral/hp Element Framework}
\date{\today}
\begin{document}
\frontmatter
% Render pretty title page if not building HTML
\ifdefined\HCode
\maketitle
\else
\titlepage
\fi
\clearpage
\ifx\HCode\undefined
\tableofcontents*
\fi
\clearpage
\chapter{Introduction}
Welcome to the developer's guide for Nektar++\cite{nektar-website}.
\mainmatter
\input{core-concepts/core-concepts.tex}
\input{library-design/library-design.tex}
\input{data-structures-algorithms/data-structures-algorithms.tex}
\input{coding-standard/coding-standard.tex}
%\appendix
\backmatter
%%% BIBLIOGRAPHY
%%% -------------------------------------------------------------
\bibliographystyle{plain}
\bibliography{developer-guide}
\printindex
\end{document}
\Preamble{html}
\begin{document}
\Css{
h2 {color: \#000000; }
a {
color: \#000066;
text-decoration: none;
}
a:hover {
color: \#0000ff;
}
.lstlisting {
background: \#eeeeee;
margin-left: 20px;
margin-right: 20px;
padding: 5px;
font-family: "Lucida Console", Monaco, monospace;
}
.lstinline {
padding: 2px;
font-family: "Lucida Console", Monaco, monospace;
}
}
\EndPreamble
......@@ -11,8 +11,12 @@ ADD_CUSTOM_TARGET(user-guide-html
)
FIND_PROGRAM(PDFLATEX pdflatex)
FIND_PROGRAM(BIBTEX bibtex)
FIND_PROGRAM(MAKEINDEX makeindex)
ADD_CUSTOM_TARGET(user-guide-pdf
${PDFLATEX} --output-directory ${USERGUIDE} ${USERGUIDESRC}/user-guide.tex
COMMAND TEXMFOUTPUT=${USERGUIDE} ${BIBTEX} ${USERGUIDE}/user-guide.aux
COMMAND TEXMFOUTPUT=${USERGUIDE} ${MAKEINDEX} ${USERGUIDE}/user-guide.idx
COMMAND ${PDFLATEX} --output-directory ${USERGUIDE}
${USERGUIDESRC}/user-guide.tex
WORKING_DIRECTORY ${USERGUIDESRC}
......
@misc{nektar-website,
title={Nektar++: Spectral/hp element framework},
url={http://www.nektar.info},
year={2014}
}
......@@ -28,7 +28,7 @@ openany, % A chapter may start on either a recto or verso page.
% \usepackage{tikz} % Figures
\usepackage{graphicx} % Include figures
\usepackage{makeidx}
%%% PAGE LAYOUT
%%%-----------------------------------------------------------------------------
......@@ -168,6 +168,7 @@ openany, % A chapter may start on either a recto or verso page.
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
\definecolor{cyan}{rgb}{0.0,0.6,0.6}
\definecolor{maroon}{rgb}{0.5,0.0,0.0}
\definecolor{darkgreen}{rgb}{0.0,0.5,0.0}
\lstdefinelanguage{XML}
{
basicstyle=\ttfamily\footnotesize,
......@@ -196,12 +197,14 @@ openany, % A chapter may start on either a recto or verso page.
}
%%% TABLE OF CONTENTS
%%% TABLE OF CONTENTS AND INDEX
%%%-----------------------------------------------------------------------------
\maxtocdepth{subsection} % Only parts, chapters and sections in the table of contents
\settocdepth{subsection}
\makeindex
%\AtEndDocument{\addtocontents{toc}{\par}} % Add a \par to the end of the TOC
%%% INTERNAL HYPERLINKS
......@@ -239,9 +242,9 @@ pdfauthor={I am the Author} % author
\vspace{\drop}
{\Huge\bfseries\raggedright\@title\par}
\vskip2.37\baselineskip
{\huge\bfseries Version 4.0\par}
{\huge\bfseries Version \input{../../VERSION}\par}
\vskip4\baselineskip
{\huge\bfseries User Guide\par}
{\huge\bfseries \textcolor{darkgreen}{User Guide}\par}
\vskip1.0\baselineskip
{\large\bfseries\@date\par}
\vspace{0.3\textheight}
......@@ -283,7 +286,7 @@ Scientific Computing and Imaging Institute, University of Utah, USA}
\clearpage
\chapter{Introduction}
Welcome to the user guide for Nektar++\cite{nektar-website}.
\mainmatter
......@@ -315,7 +318,9 @@ Scientific Computing and Imaging Institute, University of Utah, USA}
%%% BIBLIOGRAPHY
%%% -------------------------------------------------------------
% \bibliographystyle{utphysics}
% \bibliography{ref}
\bibliographystyle{plain}
\bibliography{user-guide}
\printindex
\end{document}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment