Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-15-2012, 11:54 PM   #1
FatDog
Witless protection Agent
FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.
 
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?
FatDog is offline   Reply With Quote
Old 06-16-2012, 05:27 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
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>
and then with CSS you make it centered, and with some top and bottom margins. I often use <div>s for centered blocks, signatures, poetry...

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>.
Jellby is offline   Reply With Quote
Advert
Old 06-16-2012, 06:52 AM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 06-16-2012, 10:23 AM   #4
FatDog
Witless protection Agent
FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.
 
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. ).
FatDog is offline   Reply With Quote
Old 06-16-2012, 10:24 AM   #5
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
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:
Originally Posted by FatDog View Post
...
And there are separations like "* * *" sprinkled throughout. What tags should I use for these?
...
There are several issues to consider. If you are working from a very typical TXT format ebook and you are creating and HTML or ePub version with the commonly preferred "no leading between paragraphs and indented first line" style then:
  • omit the line with the asterisks
  • style (class) the following <p> so that it has a top-margin, generally 1em

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.
dwig is offline   Reply With Quote
Advert
Old 06-16-2012, 11:02 AM   #6
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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:
Originally Posted by FatDog View Post
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. ).
Those are supported in ePub 3 so you are just ahead of the curve . To maintain almost CSS compatibility I would suggest you change them to something like:
<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
DaleDe is offline   Reply With Quote
Old 06-17-2012, 04:17 AM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Toxaris View Post
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.
A blockquote can contain many kinds of paragraphs and blocks, I certainly consider adding a <blockquote> is easier and helps with consistency. Perhaps you didn't know a <blockquote> can contain <p> and <div> tags too?:

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>
Would you rather add different styles for "salutation", "center" and "signature" inside or outside a blockquote? And here:

Code:
<p>Normal text...</p>

<blockquote>
<p>Long quotation...</p>
<p>Long quotation...</p>
<p>Long quotation...</p>
</blockquote>

<p>Normal text...</p>
Would you rather add a top margin to the first paragraph and a bottom margin to the last paragraph in the quote?
Jellby is offline   Reply With Quote
Old 06-17-2012, 05:25 AM   #8
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 06-17-2012, 10:05 AM   #9
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
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?
HarryT is offline   Reply With Quote
Old 06-18-2012, 02:46 PM   #10
FatDog
Witless protection Agent
FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.FatDog ought to be getting tired of karma fortunes by now.
 
Posts: 290
Karma: 1002898
Join Date: Nov 2009
Location: Los Angeles
Device: Kindle
Quote:
A slightly oblique question, but do you actually need to do this?
No. I discovered a disk-case of CD's with .txt files from 10-15 years ago and I am trying to "curate" them. I'm having fun learning ePub, HTML5, and I am using the project to force me to re-train my fingers to use a MacBook.
FatDog is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 07:31 AM.


MobileRead.com is a privately owned, operated and funded community.