02-16-2010, 12:30 AM | #1 |
Nevermore
Posts: 63
Karma: 10000
Join Date: Jan 2010
Location: the Flint Hills, KS
Device: ex-iLiad, DR800SG
|
An OpenOffice book template
Countless hours of lurking here at mobileread include many spent sifting Workshop for tips from the mechanics here. I feel confident enough to post my own work, now, for two purposes:
Firstly, I hope that you all can give me good advice on how to improve my work, and secondly, I hope that someone just starting out as I did not long ago might find this a useful example. The ODT files in the attached ZIP were generated using OpenOffice.org 3.1 from text taken from the Project Guteberg edition of de Tocqueville's Democracy in America (part 1). I used the 1904 edition found on Google Books as a guide. The first file is with real footnotes while the second includes the footnotes in the text body. I elected to remove the disclaimer due to editing and re-formatting (if I've misunderstood the fine print, someone please let me know). I've chosen to use size A5 in order to create good PDFs for the iLiad (and quite possibly the DR800), but with a good amount of work I believe these can be used to generate PDFs for any liseuse. It took a solid day's work to work the files into this condition. I confess that I don't know at all how to convert them to EPUB. I've used footers instead of headers because I think the chapter title pages are ugly with them and it doesn't look like there's a way to switch page styles without a break. Any suggestions? How is my use of styles? I'd like to see opinions on spacing or no spacing above/below paragraphs (see Header 3 no-outline style). But again, any constructive criticism is welcome. Update, May 16, 2010: I had to walk away and let this stew -- but I didn't know it would have to stew so long! The problem was that I had three styles for chapter headings: the chapter number, the chapter title, and a shortened title in some instances where the title was very long. Organizationally this was messy, but I couldn't figure out how to consolidate them and have the footers (and now also the table of contents) appear nice. My solution is to set the chapter number and title in the "Heading 3" style as such: "[sp][sp][sp]Chapter I[sp][sp][sp][line break][line break]THE[sp]EXTERIOR[sp]FORM[sp]OF[sp]NORTH[sp]AMERICA" where "Chapter I" is set to 22pt and the rest is set to 11pt; the spaces before and after "Chapter I" keep that line centered on the page. In the case of very long titles, I added a shortened title and set those in the "Heading 3" style as such: "[sp][sp][sp]Chapter II[sp][sp][sp][line break]ORIGIN[sp]OF[sp]THE[sp]ANGLO-AMERICANS", setting the shortened title to a font color=white. An indent of -0.10" in the footer and the TOC keeps this presentable. Other tweaks: - renamed the page styles to "A5 No Footer" and "A5 Book Body" in order to make them easier to find - added a TOC using cross-references for quick navigation - added "[CONTENTS]" to the left-page footer to allow quick return to the TOC, again using the cross-reference - Replaced most double carriage returns by adding spacing into styles; a regex search for "^^" found every instance - Switched the font to Constantia (I'd like to use Garamond, if I can find it) and reduced the text body font size to 11pt by editing styles - lightened the background color on the footnote style to make it easier to read (and the color can be easily removed the same way) - reduced the first tab of the footer style to 0.28" I might update the version with the footnotes set in-text if I have time, but I doubt that I will. Last edited by The Straven; 05-16-2010 at 08:55 PM. Reason: grammar |
02-23-2010, 06:06 AM | #2 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thanks for sharing your template. I am sure I will learn something.
I use to publish both in PDF 9x12 and odt format. You can find one of these books on MobileRead ("Wellington's army", or "Mémoires du maréchal Suchet" among others). Like you, I am not epub-fluent.... So my comments later.. Well, your text is pretty clear and very readable. I prefer b to a for paragraph indents. Here are the main differences (just a matter of choice) with my template. I chose not to use any header or footer because of the smaller screen template. I like to add an hypertext TOC and a cover image (or some images) I do not use colour for endnotes. I like to use hyphenation and justification (small screeen again) Last edited by roger64; 02-23-2010 at 07:31 AM. |
Advert | |
|
02-24-2010, 02:38 AM | #3 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Attached are the results of converting these, first to HTML using AbiWord, and then to ePub with calibre.
Calibre can convert OpenOffice's ODT format directly to ePub, and you can do this through a GUI, but it was easier for me to convert to HTML first, since I could then see what tags should be used for chapter detection for the table of contents. Unfortunately, I couldn't include both the names and the numbers of the chapters in the ToC, because you have these set up on different lines with different styles, and so they're not treated as a unit. Anyway, I prefer to convert via the commandline with calibre. I used this command and options: ebook-convert "Alexis de Tocqueville - Democracy in America, Vol. 1 a.html" "Alexis de Tocqueville - Democracy in America, Vol. 1 a.epub" --output-profile="sony" --remove-paragraph-spacing --chapter="//h:h3" --page-breaks-before="/" --authors="Alexis de Tocqueville" --title="Democracy in America: Vol. I" This tells is to optomize for Sony (which as far as I know only prevents the chunks inside the ePub from being too big for a Sony reader to handle); it prevents calibre from putting spaces between paragraphs, it detects chapters at H3 headings (which is what the chapter numbers became after conversion to HTML), it prevents page breaks elsewhere (which otherwise would put a page break in between the chapter number and title, since both are different heading levels), and sets the metadata for author and name. This could be improved with a cover page image (--these use calibre's default--), including the chapter number and name inside the same tags, and a few other ways, but they're a good start. I'm a strong opponent of using WYSIWYG editors like OpenOffice or Word for making ebooks. It's important to see the mark-up, to make things like automatic ToC detection very easy. Hence, I prefer to directly write HTML or LaTeX, and then convert to other formats as need be. But I realize I'm in the minority on that, and if you're willing to put up with the challenges of a WYSIWYG editor, and are careful to use styles consistently, more power to you. You might try the OpenOffice ePub export plugins -- there are two under development with development versions for download in the ePub forum. I've barely looked at the results, so all manner of oddities may remain. I definitely dislike spacing between paragraphs, and prefer indented paragraphs instead, except in business letters or informal writing. Last edited by frabjous; 02-24-2010 at 02:45 AM. |
02-24-2010, 03:51 AM | #4 |
Nevermore
Posts: 63
Karma: 10000
Join Date: Jan 2010
Location: the Flint Hills, KS
Device: ex-iLiad, DR800SG
|
roger64,
Looking at your work I'd be surprised if I had anything at all to teach you. Very glad you had posted it; can you recommend any English-language books on Napoleon and his generals that are not "Campaigns of Napoleon"? I agree that a linked TOC is best, but it's a low priority for me because OpenOffice generates bookmarks when exporting to PDF, and it turns out that the DR-800 renders those bookmarks into a TOC, in proper hierarchy no less. It's probably not a new feature, but I'm quite impressed. I like covers too; I once saw someone post a link to a source of hi-res covers, but I can't find it now. I like SHY after reading about them here, but in OpenOffice the only way I've found to insert them is by hand. frabjous, I'll load your epub onto the 800 very shortly. OpenOffice definitely has its limitations and it's crossed my mind that I really ought to learn to use TEX, but I'm HTML illiterate and it's a daunting project. The headings serve to illustrate the difficulties working with OpenOffice. I haven't figured out a way to place the chapter number and title in the same style and still maintain the layout except by margins, but that doesn't yield consistent results. Breaking them into two "paragraphs" causes two bookmarks to be inserted into the generated PDF, and I imagine would do the same in EPUB. The scheme I've been using, by the way, is H3 for chapters, H2 for sections, H1 for books, and I suppose H0 for collections if I ever create them. I learned your point about styles the hard way after editing a few texts line-by-line. This is the first book I generated without using the Default style. I think I've gone too far, as I find that my instinct upon seeing any slightly different formatting in a text is to create a new style. For anyone starting out with OpenOffice, definitely take the time to figure out styles and linked styles as it will save you a great deal of time. |
02-24-2010, 07:14 AM | #5 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
As far as OpenOffice is concerned, I find it very convenient. I use this joint template. From it: - to generate a TOC: Insert/insert table and it detects automatically H1, H2, H3 with page numbers...You also can very quickly hyperlinks, pressing some more buttons. Just try it. - to generate a PDF: press the button. - to generate en epub: euh... not here yet It is also good for dealing with footnotes (history books have a lot of them). In fact, once you have a convenient model, 95% of your work is done. To create a model is the difficult part, dealing with styles is not very easy that's true. To adapt to another size my odt file, I just need to create a new model only by selecting Format/Page, precise the size and margins and just insert my odt. I heard and believe that latex is an all powerful tool, but for my modest use, it looks a little like overkill... Though I am a keen Ubuntu Karmic user, I use the command line sparingly, more than ones, less than others... |
|
Advert | |
|
02-24-2010, 01:16 PM | #6 | ||||||
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Quote:
There's really nothing wrong with doing things your way. I was just stating my own preferences. I use LaTeX for work anyway; it may not be worth the effort in learning if you're doing this mainly for fun. It's mainly useful for math and other technical disciplines. It does have a steep learning curve at first. Consistent styles, as you've noted, is the key. Part of my dislike of WYSIWYG is that most people who use editors like that don't use styles, which makes global changes a pain in the butt, to say the least. But it's admittedly unfair to blame the software for for the sloppy habits of its users. HTML I think can be learned pretty easily if you're all inclined. You might start with the free tutorials here: http://w3schools.com [/quote] Quote:
I haven't really experimented enough with how calibre handles TOC creation, but I think an HTML <br /> tag in the middle of <H3>...</H3> (or <H2> ... </H2>) would be harmless. I could manually edit the TOC fine in the ePub after conversion, but that would be a pain. Quote:
Quote:
Quote:
Quote:
|
||||||
02-24-2010, 09:02 PM | #7 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
To make appear visually the structure, you also can use indents for TOCs. Ex: No indent for H1, 0,5cm for H2, 1cm for H3. (see image) On the other hand, OpenOffice provides you instantly with hypertext links for TOC entries and they are so handy with ebooks.. 2. The OpenOffice plugins for EPUB are not here yet. Escape is just another big piece of software, so I keep clear from it. Writer2epub is just starting. For the time being, I produce PDF for my screen size and ODT for the others. I feel no hurry because on my Sony at least, EPUB cannot yet use justified text. 3. What's the EPUB solution for 600 footnotes on a 800 pages book? (Not at all an extreme case, It happens so for many history books). With OpenOffice I could at least, before trying to hand over to calibre to format an epub, group all the footnotes at the end of the document. It's done instantly this way: (in French for me sorry) Menu: Outils/Notes de bas de page/Position.. select Fin de Document (and I also can modify instantly the numbering for all footnotes). This is not perfect for sure but it's a solution. How to avoid to scatter these many footnotes all along a book ? Last edited by roger64; 02-25-2010 at 12:20 AM. Reason: adding a TOC image |
|
02-25-2010, 12:37 AM | #8 | |||
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Quote:
The problem doesn't exist at all for the methods I use, since with HTML you can generate the word "Chapter" and the chapter number and display them however you like with CSS that doesn't register as a separate tag, and in LaTeX similarly, all the chapter title formatting and table of contents is done for you automatically. I just don't know what the solution is in Open Office if you want those on separate lines with different styles. Maybe someone else does. Quote:
Quote:
If the footnote marks are transferring as html <a href="..."> </a> tags, and their targets are all grouped together at the end, I don't see why calibre shouldn't do them correctly (however many there are). I've always grouped them at the end of the chapter personally, which I think is preferable, but I don't see why there should be a techinical difference, except perhaps slower loading time if you have to bounce back and forth between different xhtml pages inside the ePub. |
|||
02-25-2010, 01:23 AM | #9 | |
Nevermore
Posts: 63
Karma: 10000
Join Date: Jan 2010
Location: the Flint Hills, KS
Device: ex-iLiad, DR800SG
|
Quote:
I'll also set the title page to H1 or H2, since it came out poorly in the EPUB. I notice that the EPUB output strips almost all blank lines, except at the H3 titles. Are those manually entered carriage returns, or does that reflect the style spacing? If I stripped out all the blank lines in favor of style-specified spacing, how would that affect the EPUB? A more proper question might be whether HTML tags are generated for all formatting or not--will the hanging indents translate into HTML? A final step for my purposes is to set the page style dimensions to the DR800 size, as full-screen mode may or may not be patched in. This is all quite helpful. Last edited by The Straven; 02-25-2010 at 01:31 AM. |
|
02-25-2010, 02:15 AM | #10 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
I think using styles to space things apart rather than blank lines is probably a good idea. Don't have time to play around more tonight.
|
02-25-2010, 08:30 AM | #11 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Sure there are ways out of OpenOffice (there must be) and OO does not provide yet direct support for formatting EPUB as it does for PDF.
I was thinking we would follow on speaking about OO templates but now it seems we are going toward more specialized languages, of which I know nothing (but i noted the reference to the W3School ) so I have better step down. Thank you for sharing your informations. Last edited by roger64; 02-25-2010 at 08:34 AM. |
02-26-2010, 02:46 PM | #12 |
Nevermore
Posts: 63
Karma: 10000
Join Date: Jan 2010
Location: the Flint Hills, KS
Device: ex-iLiad, DR800SG
|
Oh, don't bow out roger64! HTML is germaine in that frabjous has used it to point out inconsistencies in my styles, and styles are central to a good OOo template.
I started re-working the file, then I remembered that another reason I split the headers is because some of the chapter titles are too long for the "chapter name" field inserted into the footer. I'm still puzzling over how to handle it. Other things intervened as well, but I'll get something figured out soon. I'm also kicking around the idea of a more straightforward template file that explains what is being done with each style, if anyone is interested. |
05-06-2010, 09:17 AM | #13 | ||
Writer2ePub creator
Posts: 354
Karma: 121129
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Quote:
Quote:
each note moved at the end of the text, one page each, a link from and to the footnote marker. The currrent version of writer2epub manages the footnotes, please test it and give me your feedback Luke |
||
05-06-2010, 01:52 PM | #14 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I will try it. Thanks for your efficient and relentless work!! I will report on your usual thread. |
05-16-2010, 09:06 PM | #15 |
Nevermore
Posts: 63
Karma: 10000
Join Date: Jan 2010
Location: the Flint Hills, KS
Device: ex-iLiad, DR800SG
|
Updated, see original post.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenOffice to ePub export extension | eBookLuke | Writer2ePub | 206 | 12-18-2010 06:02 PM |
Howto import a file created in OpenOffice? | roger64 | Sigil | 7 | 03-23-2010 01:21 AM |
Underscore to Italics in OpenOffice | Moejoe | Workshop | 8 | 05-23-2009 03:34 PM |
Mac Software and Openoffice | alphaomega | Sony Reader | 8 | 08-31-2007 10:50 AM |
NeoOffice - OpenOffice.org for Mac | Chaos | Lounge | 0 | 06-06-2005 07:06 PM |