Register Guidelines E-Books Search Today's Posts Mark Forums Read

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: 257
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: 5,196
Karma: 2508097
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
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 online now   Reply With Quote
 
Enthusiast
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: 2,174
Karma: 1000593
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
__________________
Creator and maintainer of the e-Book Tools Word add-in. Also see thread here on Mobileread.
Creator and maintainer of the Clean HTML macro for MS Word.
Toxaris is online now   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: 257
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
Guru
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: 893
Karma: 1089705
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Kindle 3/WiFi Retired:Clie - UX50, T415, ...
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
dwig is offline   Reply With Quote
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: 8,795
Karma: 3644259
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
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
__________________
Dale DePriest
http://pages.suddenlink.net/dalede or http://daledepriest.wikispaces.com
currently using an EZ Reader or a Literati or my iPad.
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: 5,196
Karma: 2508097
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
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 online now   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: 2,174
Karma: 1000593
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
__________________
Creator and maintainer of the e-Book Tools Word add-in. Also see thread here on Mobileread.
Creator and maintainer of the Clean HTML macro for MS Word.
Toxaris is online now   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: 55,162
Karma: 27556397
Join Date: Nov 2006
Location: UK
Device: Kindle Touch, PW, Fire HD, iPad 3, iPhone 4, Samsung Tab 2 7 + More
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?
__________________
Harry

Currently proofreading The Poison Belt, by Sir Arthur Conan Doyle.
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: 257
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:45 PM.


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