03-29-2011, 09:05 PM | #1 |
Member
Posts: 21
Karma: 10
Join Date: Mar 2011
Device: none
|
CSS style, TOC and other stuff
Hi,
I am new to this domain. I am usually designing and typsetting printed books. In the last few months I had quite enough projects that I cannot accomplish because the authors wanted printedversion and ebook also. So, I start looking around. I finally take a project in which I had to layout a book for print and also create an ePub and Kindle version. The book is only text. I start with an easy one. So, before you through with rocks in me (because most of my questions are already discussed) I will describe the entire process I am doing and I will ask for your opinion. First think first, the book is laid out in InDesign CS4. I created styles for characters, paragraphs (headers, footers, body, notes, chapters title, chapters number, contents etc.). All the images are inserted in the text, not linked nor just placed with Wrap around. After the book was finished and printed, I export the book (Export for Digital Editions) as ePub. Once the process started, I start checking options in the new opened window as follows: GENERAL: Base for CSS Style: Defined Styles Include Embeddable Fonts - checked IMAGES: Copy images: optimized Formatted: checked Image conversion: GIF Gif Options: Web Interlace: checked CONTENTS: Format for ePub Content: XHTML Table of Contents: Include InDesign TOC Entries:checked TOC Styles: the TOC I've created myself, other than Default Suppress Automatic Entries for Documents: unchecked Well. The new ePub file I open it with Sigil v. 0.3.4. and I start working on the file. I saw that the CSS style is included already. The titles, text etc. looks fine, as in printed version. However, in some places I found that the text is mixed up (see attachment). This would not be a problem, even I have no idea how to correct it. What really bothers me is how to generate the TOC, since the Sigil don't use the styles I've created in InDesign. The TOC file exist but no links available to the designated titles. As I read on the manual, the only way is to use the pre-defined style of Sigil (H1, H2 etc.). If so, why bothering to import with CSS styles? So, I tried exporting, again, the document and choosing: Base for CSS Styles: Local Formatting Format for Epub Content: DTBook. The rest of the options remained the same. I find that using this option, the new file is looking clear of formating. Everything is unformatted. In which case I might be using the Sigil styles. Again, the problem is the Content that I've already have it in the file as text, but has no active links to the chapters. If I create the TOC using Sigil styles, this will not be part of the ebook as a distinctive page but as a menu on some devices. Bottom line, how do I keep the styles I defined and yet have the CONTENT active, inside the ePub, as a page in ePub? Like as it is in a PDF file, where at the page X is the Content and when you click on a title is going to the designated page. And, finally, how do I correct such text/style errors like the one in the attachment? Kind regards, Sebastian |
03-30-2011, 05:02 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
As for the TOC, that is normal. You can have an additional page with a TOC in your ePUB. You have to create that file and the anchor links to the corresponding headers. The layout of the TOC-page could be anything you like, any style you would like.
I am afraid you need to create that by hand. The style errors in your display seems to be wrong usage of styles. Go to the codeview in Sigil and see if a different style is used. If so, correct it to the correct style. |
Advert | |
|
03-30-2011, 10:32 AM | #3 |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
That looks like a possible 'Scene break' done with a 'First Paragraph' type treatment. (personally, I don't like this particular (size only) treatment. YMMV)
|
03-30-2011, 04:00 PM | #4 |
Guru
Posts: 688
Karma: 150000
Join Date: Feb 2010
Device: none
|
I'm guessing Sigil is not recognizing your chapter headers for its TOC because ID4 is not using <hx> tags, but rather something like <p class="heading-1-with-overrides-2"> (Hopefully all chapter headers of a given level will use the same class)
To fix this, globally replace the <p class="whatever"> tags with <h2 class="whatever"> tags (not forgetting the closing tag!) and then in the CSS, change the p.whatever { ... } element to h2.whatever { ...} Now Sigil will find your chapter headers and create the toc.ncx. |
03-30-2011, 06:30 PM | #5 |
Jr. - Junior Member
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
|
[QUOTE=st_albert;1469997
To fix this, globally replace the <p class="whatever"> tags with <h2 class="whatever"> tags (not forgetting the closing tag!) and then in the CSS, change the p.whatever { ... } element to h2.whatever { ...} Now Sigil will find your chapter headers and create the toc.ncx.[/QUOTE] Hi Sebastian, I would suggest care using this method. Let Sigil do a find and count for you (find and replace box) and if you have more hits than you have chapters, either do chapter at a time, a replace one at a time or try inserting <h3 title="Chapter 1"></h3> at the beginning of each chapter. If you use the search and replace method Sigil will put the closing </hx> in for you when you go from CV to BV (code view to book view). As to creating a table of contents page; you can do it manually or you can cheat. I choose to cheat. I run the epub (with the toc.ncx intact) into Calibre, do a epub to mobi convert and then mobi back to ebup. When you get finished your epub will have both the toc.ncx and the famous Blue TOC. I suppose you could stop there but I chose to create an additional xhtml file and do a cut and paste of the blue toc data and clean it up. I've attached a zip file with four files Play1.epub, Play2.epub & .mobi and Play3.epub. I started with Play1 and ended with Play3. I do have another suggestion; try to buy or borrow a Nook and a Kindle so you can see the results of your work. It does NOT look the same as it does on a computer screen. The printed page and PDF files are fixed in space ebups and mobis are not. I think that the reason so many ebooks are so poorly formated is that the print file output is converted to ebook format and then not proofed. And then too, most formatting is ignored by ereaders. Something like expecting a spell checker to catch syntax errors (their/there). Anyway, good luck. Regards -John Last edited by Jabby; 03-30-2011 at 06:32 PM. |
Advert | |
|
03-31-2011, 02:31 AM | #6 |
DRM remover
Posts: 84
Karma: 10
Join Date: Dec 2009
Location: North of Germany
Device: Kindle 3, 4 & Touch, iPhone/iPad, Hanvon N516 (OpenInkpot)
|
you could try the new beta version from Sigil 0.4 beta 3.
This version keeps the original TOC! regards calvin |
04-18-2011, 11:37 AM | #7 |
Member
Posts: 21
Karma: 10
Join Date: Mar 2011
Device: none
|
Hello,
Thank you very much to you all, for your precious advices. I managed to see the problem regarding the text format. Now it looks fine. Also I solved the TOC and now I have Contents in the body of the ebook as well as on the menu. Still, I have to figure it out how to link footnotes to their correspondent sign/number. Sincerely yours, Sebastian |
04-18-2011, 11:11 PM | #8 |
Fanatic
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
|
As for footnotes, if you haven't already completely figured them out, this is what I use:
CSS: .footnote { font-size: 0.6em; vertical-align: 0.6em;} Text: <p class="indent">It has long been a favourite subject of discussion whether the Falls were once situated seven miles farther north, or at Queenston. The ideal bird's-eye view given in the frontispiece may assist the reader who has not visited the spot to form a tolerably correct general notion of the geographical configuration of this country, which is very simple. The view has been constructed from a sketch published by Mr. Bakewell, in Loudon's Magazine for 1830, into which the geological representation of the rocks, as they appear on the surface and in the ravine of the Niagara, has been introduced from the State Survey by Mr. Hall.<span class="footnote"><a href="../Text/Section0002.xhtml#ref1" id="f1">1</a></span> The platform...</p> Footnote: <h3 id="head_35">FOOTNOTES</h3> <p class="indent"><a href="../Text/Section0001.xhtml#f1" id="ref1">1.</a> Mr. Bakewell gave me his original sketches in 1841.</p> This allows one to click on the footnote in the text, and return to that location by clicking on the reference number. |
04-19-2011, 03:40 AM | #9 | |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
has been introduced from the State Survey by Mr. Hall.<a class="footnote" href="../Text/Section0002.xhtml#ref1" id="f1">1</a> The platform...</p> |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
An example file of your CSS style sheet | roger64 | Writer2ePub | 6 | 04-11-2012 02:59 AM |
Feature request: CSS style application | Fitz | Sigil | 4 | 07-25-2010 06:36 AM |
Mobi TOC style vs ePub style? | phearlez | Kindle Formats | 3 | 04-11-2010 06:35 AM |
Sony PRS-505 style.css and calibre | goose61282 | Calibre | 0 | 02-26-2010 08:54 AM |
list-style in CSS? | frabjous | ePub | 2 | 08-13-2009 06:28 PM |