View Single Post
Old 01-25-2010, 09:43 AM   #6
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by janneman View Post
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:
<snip>
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.
A class like that wouldn't be ideal for me. I want to transform my current HTML files into LaTeX. I have three files, one "titlepage", one "toc page" and one "text page". I already found out about the \tableofcontents and it actually works (at least, once I found out I had to build my PDF twice ). But I intend to make an application that will replace my HTML code with LaTeX code. And as my HTML code already contains things like book title and author and series (all those things that are in my title page), it's easy to generate a base.tex which will contain my preamble and two includes (and the toc, naturally). Then I have to replace the HTML elements with LaTeX elements, all done with regular expression search&replace. I already do exactly the same with the generation of my epub files, as I have one huge HTML file (much easier to maintain) which I split into chapter based files only for the book generation.

But I'd love to know how you get the structure in the menu button! Can you point out what part of your class does that?

Quote:
Originally Posted by Jellby
I prefer ePUB as a source rather than HTML because ePUB is better for distribution (it's already an ebook format). Since ePUB has HTML under the hood, you don't have to lose anything either.
I prefer HTML. Much easier to maintain because I don't have to unzip it... My base is HTML, and from that I can generate epub and mobipocket (which is the main format for me, as three from the four of my readers don't read epub). But my source is essentially an unpacked epub file
Sweetpea is offline   Reply With Quote