![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,163
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. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,263
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Cool
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() 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.
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,163
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
|
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() Posts: 94
Karma: 78
Join Date: Nov 2009
Location: Germany
Device: iPad 2, Sony PRS-600 (no longer used)
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,163
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,263
Karma: 23661992
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. |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,163
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
I'll keep my eye open for any other tutorials that relate to using Calibre. |
|
![]() |
![]() |
![]() |
#9 |
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
|
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,212
Karma: 16534894
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. 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. 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. ![]() |
![]() |
![]() |
![]() |
#11 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,163
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
![]() Quote:
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 |
||
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,163
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,163
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. |
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,212
Karma: 16534894
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 ![]() 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:-
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. |
![]() |
![]() |
![]() |
#15 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
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. ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |