I created a bebook class, to make pdf's that are perfect to read on my bebook.
And it really reads incredibly well, pleasant and smooth. I even forget about the rather small paper/screen size.
Maybe you can use this as a start to implement your template as a class file.
This will make your tex file(s) cleaner. Like this:
Code:
\documentclass{bebook}
\begin{document}
\chapter{Your chapter title}
some text ...
\end{document}
The bebook.cls file:
Code:
% TODO: del. pagenumbers, pass options, set position of title
% PART I: Identification
%**************************************
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{bebook}[2010/01/19 Jans Bebook Class]
% PART II: Preliminary declarations
%**************************************
\LoadClass{book}
% Specify which packages to use:
% fancyhdr - used for the header and footer
%\usepackage{fancyhdr}
% lastpage - used to get the number of pages for making a page 1 of 3 footer
%\usepackage{lastpage}
% graphicx - used to include graphics
\usepackage{graphicx}
% geometry - used to set up the layout
\usepackage[lmargin=2mm, rmargin=2mm,tmargin=2mm,bmargin=2mm]{geometry}
% xcolor - used to enable colors!
%\usepackage{xcolor}
% colortbl - used to enable tablecolors!
%\usepackage{colortbl}
% multirow - for tables with rowspan cells
%\usepackage{multirow}
% ifthen - used for declaring some commands with variables
%\usepackage{ifthen}
% sectsty - used to change the section headers a bit (sectionstyle package)
%\usepackage{sectsty}
% hyperref - used to include a clickable email address with mailto.
\usepackage[pdftex,a4paper]{hyperref}
\hypersetup{
bookmarks=true, % show bookmarks bar?
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={Fit}, % fits the width of the page to the window
pdftitle={My Book title}, % title
pdfauthor={your name}, % author
pdfsubject={title}, % subject of the document
pdfcreator={your name}, % creator of the document
pdfproducer={your name}, % producer of the document
pdfkeywords={some keywords, in a list, with commas}, % list of keywords
pdfnewwindow=false, % links in new window
colorlinks=false, % false: boxed links; true: colored links
linkcolor=black, % color of internal links
citecolor=black, % color of links to bibliography
filecolor=magenta, % color of file links
urlcolor=black % color of external links
}
\setlength\paperheight{120mm}%
\setlength\paperwidth{90mm}%
\setlength{\textwidth}{86mm}
\setlength{\textheight}{116mm}
% PART III: Options
%**************************************
% this passes unkown options to the book class
\DeclareOption*{
\PassOptionsToClass{\CurrentOption}{book}
}
% process all options
\ProcessOptions
% PART IV: More declarations
%**************************************
% New and renewed commands
% define some stuff to do at the begin of the document
\AtBeginDocument{
}
you can add your options to this class, or just keep using the template.
A table of contents is done by the command (surprise surprise): \tableofcontents
On my bebook the structure is also nicely reflected in the menu (button 7)
The only downside is copying all the text in the chapters and putting brackets around it which is a little too timeconsuming.
note: fancyhdr is also a great package to get your headers and footers the way you want.