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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-30-2010, 01:18 PM   #1
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Ebook Formatting Tutorial

Hi, for a class project I made a website tutorial based off using Calibre. I was hoping people from the Mobile Read may find it helpful.

Here's the link.

Ebook Formatting Tutorial

P.S. if any part of the tutorial is unclear please let me know so I can fix it for future users.
Amalthia is offline   Reply With Quote
Old 04-30-2010, 01:22 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Cool
kovidgoyal is offline   Reply With Quote
Advert
Old 04-30-2010, 01:47 PM   #3
Laurentiu
Connoisseur
Laurentiu has learned how to buy an e-book online
 
Laurentiu's Avatar
 
Posts: 94
Karma: 78
Join Date: Nov 2009
Location: Germany
Device: iPad 2, Sony PRS-600 (no longer used)
Nice. You should have made this post sticky, otherwise it will get lost.
Laurentiu is offline   Reply With Quote
Old 04-30-2010, 03:55 PM   #4
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by Laurentiu View Post
Nice. You should have made this post sticky, otherwise it will get lost.
I wasn't sure how to do that?

I thought the moderators made posts sticky?
Amalthia is offline   Reply With Quote
Old 04-30-2010, 04:00 PM   #5
Laurentiu
Connoisseur
Laurentiu has learned how to buy an e-book online
 
Laurentiu's Avatar
 
Posts: 94
Karma: 78
Join Date: Nov 2009
Location: Germany
Device: iPad 2, Sony PRS-600 (no longer used)
Quote:
Originally Posted by Amalthia View Post
I wasn't sure how to do that?

I thought the moderators made posts sticky?
Yeah... I don't see an option either. I hope that one of the moderators can help us.

Thanks for your effort! I'm sure this will answer many questions.
Laurentiu is offline   Reply With Quote
Advert
Old 04-30-2010, 06:33 PM   #6
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by Laurentiu View Post
Thanks for your effort! I'm sure this will answer many questions.
I hope so because I found myself saying the same things over and over again. I know the tutorial doesn't cover everything but I tried my best to explain and show my process through screencaps.
Amalthia is offline   Reply With Quote
Old 04-30-2010, 06:58 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Rather than make this thread a sticky (there are already too many stickies), I'm going to create a section in the calibre website help page with links to tutorials and add this and a couple of other tutorials as well.

So if you have written, or know of any other calibre tutorials, please let me know.
kovidgoyal is offline   Reply With Quote
Old 04-30-2010, 08:16 PM   #8
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by kovidgoyal View Post
Rather than make this thread a sticky (there are already too many stickies), I'm going to create a section in the calibre website help page with links to tutorials and add this and a couple of other tutorials as well.

So if you have written, or know of any other calibre tutorials, please let me know.
In the Links and Resources section of the website I linked to two posts at Teleread that give a basic rundown on how to convert ebooks using Calibre. I'm at work so don't have access to the links.

I'll keep my eye open for any other tutorials that relate to using Calibre.
Amalthia is offline   Reply With Quote
Old 04-30-2010, 08:17 PM   #9
Hamlet53
Nameless Being
 
Not something I had any part in, but if it is not on your list yet this (original post):https://www.mobileread.com/forums/showthread.php?t=71143
  Reply With Quote
Old 05-14-2010, 08:54 PM   #10
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Simplifying your "Cleanup Your RTF or Word Doc..." instructions

Hi Amalthia,

Congratulations on your tutorial.

I wish I'd had access to this a year ago when I was trying to combine MSWord and Calibre to create a standard way of creating my "perfect epub". Still, I suppose it forced me to learn a lot more about Word, HTML and CSS than I would otherwise have done.

If it's OK, I'd like to suggest a simplification of part of your "Cleanup Your RTF or Word Doc..." instructions.

This part:

Code:
Device Table of Contents Only

If you plan on only having a Device Table of Contents Then you only need to find your chapters and use a unique marker before and after: something like ##Chapter 1##

When your document is converted to HTML you can use the Find and Replace Function to search for ##Chapter and replace it with <h2>Chapter and then search for ## and replace that with </h2> The end result will give you the code <h2>Chapter 1</h2> which Calibre can then add to your device's table of contents.

The unique marker can be anything that's not normally in the body of the document.

Creating a macro to accomplish the Search and Replace isn't a bad idea if you plan on formatting many documents that share the same format.
can be simplified to something like:

Code:
Device Table of Contents Only

If you plan on only having a Device Table of Contents, then you only need to find your chapters and apply the MSWord built-in style "Heading 2" to each of them.

When your document is converted to HTML, your chapter headings will automatically be correctly wrapped in <h2>...</h2> tags which Calibre can then add to your device's table of contents.
i.e. you don't need to use a text editor to achieve the <h2>...</h2> tags. Nor do you need to have any standard text (e.g. "CHAPTER") as part of the chapter heading.

Similarly, if you want <h1>, <h3>, ..., <h6> tags then apply MSWord built-in style "Heading 1", "Heading 3", ..., "Heading 6" respectively. Calibre can also use these if you want a multi-level TOC.

Anyway, just a suggestion. Keep up the good work.
jackie_w is offline   Reply With Quote
Old 05-15-2010, 12:01 AM   #11
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by jackie_w View Post
Hi Amalthia,

Congratulations on your tutorial.

If it's OK, I'd like to suggest a simplification of part of your "Cleanup Your RTF or Word Doc..." instructions.
Thank you so much for taking the time to help. I do not mind at all if anyone comes up with a more clear cut way to describe what is happening. I will admit writing the directions was the hardest part of the tutorial even with the screencaps.



Quote:
Originally Posted by jackie_w View Post
i.e. you don't need to use a text editor to achieve the <h2>...</h2> tags. Nor do you need to have any standard text (e.g. "CHAPTER") as part of the chapter heading.
I think the problem I ran into is that not everyone is using MS Word to create their HTML. I'll have to test Word Perfect to see how it converts Headings. At one point I tried to set my headings in the RTF before I converted and it didn't work as I expected.

I went more for the approach of removing all excess code and manually inserting chapters...I get far fewer surprises this way. I noticed with Word when I apply Heading 2 to a word it sometimes applied it to the following sentences and other weird stuff like that. It could be because at the time I didn't have paragraph breaks between the Heading 2 and the following sentence?

Some people may be taking HTML files and directly editing the code.

I think I can add a section mentioning that a person can apply the heading styles within their document before converting might help. Most programs should automatically apply the correct tags.

Again thank you so much for writing! I'm going to see how to incorporate your advice into the tutorial.

Last edited by Amalthia; 05-15-2010 at 12:21 AM. Reason: typos
Amalthia is offline   Reply With Quote
Old 05-15-2010, 12:32 AM   #12
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by jackie_w View Post

Can be simplified to something like:

Code:
Device Table of Contents Only

If you plan on only having a Device Table of Contents, then you only need to find your chapters and apply the MSWord built-in style "Heading 2" to each of them.

When your document is converted to HTML, your chapter headings will automatically be correctly wrapped in <h2>...</h2> tags which Calibre can then add to your device's table of contents.
Okay I've edited the page to add some clarification.

Here is the new text.
Code:
If you plan on only having a Device Table of Contents There are two ways to do this. One is to apply Heading 2 style to all your chapters and let the program automatically create the <h2> tags for your chapters. 

If you are using a program that does not work well with applying styles to your chapter headers you can use a unique marker before and after your chapter: something like ##Chapter 1## 

When your document is converted to HTML you can use the Find and Replace Function to search for ##Chapter and replace it with <h2>Chapter and then search for ## and replace that with </h2> The end result will give you the code <h2>Chapter 1</h2> which Calibre can then add to your device's table of contents. 

The unique marker can be anything that's not normally in the body of the document. 

Creating a macro to accomplish the Search and Replace isn't a bad idea if you plan on formatting many documents that share the same format. 

Keep in mind <h2> is what I used as an example for this tutorial. You can use <h1> or <h3> for your chapter headers if you prefer. You also do not need to use the word chapter. Any text within the <h2> tags will be added to your Table of Contents.
Amalthia is offline   Reply With Quote
Old 05-15-2010, 04:38 AM   #13
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
P.S. Okay I tried to apply the Heading 2 style to my chapters in Word Perfect but when I converted to HTML the <h2> tags were not applied. I applied the Heading 2 style in MS Word saved as a doc, opened in Word Perfect to save as html and again the <h2> tags did not appear.

Now the weird part is when I made a test doc and applied the headers it worked.

So I'm not sure what is going on. Does it not work if the text is bolded? Or has other formatting?

This is something I ran into before and could not figure it out so that is why I manually insert the <h2> tags into the html.
Amalthia is offline   Reply With Quote
Old 05-15-2010, 08:56 AM   #14
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Hi Amalthia,

I only have MSWord (Office XP version, so quite old) so I'm afraid I can't try another word-processer.

I have never had any problem with the <h2> etc tags not appearing in the output HTML. However, I create my HTML direct from Word using the Web-Filtered save-as option to get rid of much of the MS excess baggage.

Contrary to popular belief you can get beautiful clean HTML out of Word with a bit -- OK, a LOT -- of effort.

I offer the following as info for yourself, but probably not suitable for a beginner's guide. My many hours of toil and strife resulted in the following:-
  1. Created my own MSWord ebook template containing
    - a limited number of styles set up to my taste
    - a large number of macros which I can use as required

  2. Created my own standard ebook CSS file which closely matches the ebook template styles - it doesn't have to be exact.

  3. When I want to clean up a file (RTF, HTML, DOC, TXT), I import the source into my ebook template and apply the styles strictly using the macros. Then I save as Web-Filtered HTML.

  4. Finally, I edit the HTML as a text file (using a macro) and:-
    - remove everything between (and including) the <style>...</style> tags
    - replace with a single line linking to a copy of my standard ebook CSS file
    Code:
    <link rel="stylesheet" type="text/css" href="ebook.css" />

Result - simple, clean, readable HTML to import to Calibre.

In short, I use Word merely to get the HTML tagged correctly. All the styling is contained in the CSS file, which can be tweaked for an individual book if I really want to.

Most of the effort went into steps 1 and 2 which is now complete - until I want to add new features.

Anyway, enough from me. I could discuss this stuff for hours but I don't suppose many people would be interested.

P.S. By the way, I use Notepad++ for text editing HTML files because of its automatic colour-coding. It makes it so much easier to find matching start/end tags.
jackie_w is offline   Reply With Quote
Old 05-15-2010, 09:12 AM   #15
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Amalthia View Post
I noticed with Word when I apply Heading 2 to a word it sometimes applied it to the following sentences and other weird stuff like that. It could be because at the time I didn't have paragraph breaks between the Heading 2 and the following sentence?
"Heading 2" style is a paragraph-style not a character-style so it should only be applied to a whole paragraph not a selection of words. I think styling info may be stored in the end-of-paragraph character for paragraph-styles.

I'm sure you have come across Word's vicious habit of losing all your carefully prepared styling when you start to delete what you think are redundant empty paragraphs.
jackie_w 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
Tutorial - How to Create a MobiPocket eBook HarryT Kindle Books 80 10-27-2016 11:32 AM
How do I fix formatting on this ebook lunixer General Discussions 9 08-16-2010 11:12 PM
Ebook Formatting Guide Amalthia Workshop 5 05-28-2010 09:06 AM
Strange formatting on ebook Salinger Sony Reader 2 12-22-2009 05:46 AM
eBook Library Formatting abermp Sony Reader 2 01-10-2009 07:49 PM


All times are GMT -4. The time now is 05:56 AM.


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