View Single Post
Old 01-25-2010, 08:10 AM   #2
janneman began at the beginning.
Posts: 13
Karma: 10
Join Date: Jan 2010
Device: BEBOOK
a bebook (e-reader) latex class

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:

\chapter{Your chapter title}
some text ...
The bebook.cls file:
% TODO: del. pagenumbers, pass options, set position of title

% PART I: Identification
\ProvidesClass{bebook}[2010/01/19 Jans Bebook Class]

% PART II: Preliminary declarations

% Specify which packages to use:
	% fancyhdr		-   used for the header and footer
	% lastpage		-   used to get the number of pages for making a page 1 of 3 footer
	% graphicx		-   used to include graphics   
	% geometry		-   used to set up the layout   
	\usepackage[lmargin=2mm, rmargin=2mm,tmargin=2mm,bmargin=2mm]{geometry}
	% xcolor		-   used to enable colors!    
	% colortbl		-   used to enable tablecolors!    
	% multirow		-   for tables with rowspan cells    
	% ifthen			-   used for declaring some commands with variables
	% sectsty			-   used to change the section headers a bit (sectionstyle package)
	% hyperref		-   used to include a clickable email address with mailto.
    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

% PART III: Options

% this passes unkown options to the book class	
% process all options

% PART IV: More declarations

% New and renewed commands

% define some stuff to do at the begin of the document
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.

Last edited by janneman; 01-25-2010 at 08:18 AM.
janneman is offline   Reply With Quote