![]() |
#1 |
Witless protection Agent
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 290
Karma: 1002898
Join Date: Nov 2009
Location: Los Angeles
Device: Kindle
|
Help me with some concepts with tags/class for epub
I have 3 long stories by the same author in txt format.
My goal is to wrap enough XHTML tags so that I can shove it into Sigil and produce a halfway decent epub. I have wrapped all the paragraphs with "p" tags. Now I understand I need to find where it says "Chapter NN" and wrap "h2 class="chapter" around them. This will allow me to use CSS to center/bold/do interesting things and the TOC can be generated automatically. Since I might combine all 3 stories (40-90 chapters each) should these be "h3" tags so I can use "h2" for the titles? What about "div" tags? I have seen some examples, but not sure where I should put them or how many "class=aaa". Where should I put them and what are they used for? And there are separations like "* * *" sprinkled throughout. What tags should I use for these? What other markup should I use? Is there a good guide you can send me to other than "here are all the tags you CAN use..." with no instructions on why you should use each? |
![]() |
![]() |
![]() |
#2 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
You can use <h1> for each story, and <h2> for the chapters. Some people like using <h1> for the book title instead, but I find it unnecessary (I don't include the book title as an item in the TOC, anyway). But you could also use <h2> and <h3>, or <h5> and <h6>...
<div> are for marking generic blocks. They don't have any default styling, so any formatting you want to apply to them must be done with CSS, and for every different kind, you use a different class. Which ones to use depends on your book. The separations using "* * *" are a good candidate for a <div>: Code:
<div class="scene_break">* * *</div> As for other tags, I guess the main one is <blockquote>, which you can use if there are letters or quoted fragments in your books. And there's inline tags, such as <i>, <b>, or the generic <span>. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Is it me or am I the only one who rather uses a classed paragraph style instead of the blockquote tags? I find it more consistent if I use paragraphs only with a different style.
|
![]() |
![]() |
![]() |
#4 |
Witless protection Agent
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 290
Karma: 1002898
Join Date: Nov 2009
Location: Los Angeles
Device: Kindle
|
Thank you for your great response.
The author does have some email embedded inside the story and I have just wrapped "pre"formatted tags around these so they dont word-wrap. But blockquote tags would be better? (Part of my problem is I have been doing some HTML5/CSS3 stuff at work, then when trying to convert these files to epub I found some tags that actually said "<chapter>", and "<footnote>" and "<dedication>", then I learned it was for the DocText system and not compatible with xHTML. So I am in "tag hell" at the moment and need a basic ePub cheat sheet that just focuses on the content markup. ). |
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
Quote:
This leaves a blank line between the two paragraphs between which the asterisks had been placed. Some people prefer that the following <p> also no be indented. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
![]() <chapter> to <h2 class="chapter"> <footnote> to <p class="footnote"> <dedication to <p class="dedication"> etc. This will make the CSS changes easy and match the look of the ePub 3 book. This can be done using a simple search and replace in a text editor. Sigil will fix the trailing tags when you add it in. Dale |
|
![]() |
![]() |
![]() |
#7 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Code:
<p>Normal text ...</p> <blockquote> <p class="salutation">My dear Someone,</p> <p>Normal letter text...</p> <p>Normal letter text...</p> <p>Normal letter text...</p> <p class="center">Love</p> <div class="signature">Myself</p> </blockquote> <p>Normal text...</p> Code:
<p>Normal text...</p> <blockquote> <p>Long quotation...</p> <p>Long quotation...</p> <p>Long quotation...</p> </blockquote> <p>Normal text...</p> |
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I did know you can have that inside a blockquote, but for me it does not add anything. I can easily use multiple styles (it is cascading after all) and the margins I have already in styles. So, for me it does not really add anything. But I understand that others use it and why.
|
![]() |
![]() |
![]() |
#9 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
A slightly oblique question, but do you actually need to do this? Does the author not make these stories available for download in a more "modern" format, such as HTML, ePub, or Mobi?
|
![]() |
![]() |
![]() |
#10 | |
Witless protection Agent
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 290
Karma: 1002898
Join Date: Nov 2009
Location: Los Angeles
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-650 SD Card Importance? SDHC, SDHC Class 4, Class 10 etc is it important | Renji | Sony Reader | 11 | 12-03-2011 12:30 PM |
Amazon Tags - Popular tags vs Unique tags. | chrisanthropic | Writers' Corner | 6 | 09-19-2011 11:18 PM |
Looking for an Epub workshop/class in SF Bay Area | SamL | Workshop | 3 | 04-27-2011 11:21 AM |
New Interactive eBook concepts from Ideo | Dulin's Books | News | 0 | 09-22-2010 01:55 PM |
Trying to understand TOC concepts | walter2 | Introduce Yourself | 6 | 03-24-2010 08:52 PM |