Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle

Notices

Reply
 
Thread Tools Search this Thread
Old 01-05-2014, 11:53 PM   #1
Strahan
Junior Member
Strahan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2012
Device: Kindle
Chapter markers in text file?

Hi. I have some large text files that I threw on my Kindle. I'd love to be able to edit the text file and insert some sort of code so the Kindle knows where chapter breaks are.

Is that possible? I was Googling and some page said to put "<mbpagebreak />" but that doesn't appear to have any effect.

Thanks!
Strahan is offline   Reply With Quote
Old 01-06-2014, 01:42 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Strahan View Post
Hi. I have some large text files that I threw on my Kindle. I'd love to be able to edit the text file and insert some sort of code so the Kindle knows where chapter breaks are.

Is that possible? I was Googling and some page said to put "<mbpagebreak />" but that doesn't appear to have any effect.

Thanks!
Text files are displayed as-is. You can't use advanced formatting -- you will have to convert to azw3 first. Then insert page-breaks by editing the book with calibre's Edit Book feature (shortcut key is "T") and "Split File" (see screenshot) to create chapter breaks. In ebooks, a new file = pagebreak, and it is the recommended way to format a new chapter.

While you're at it, you may want to take the opportunity to tweak the files for all kinds of fun stuff! Use the code <h1>Chapter Name</h1> to set headings saying "Chapter Name", (and create ToCs based on them), bold stuff, add paragraph indents, and more! There are many guides out there to writing html code.
Attached Thumbnails
Click image for larger version

Name:	calibre-edit-book-split-file.png
Views:	221
Size:	158.1 KB
ID:	117636  

Last edited by eschwartz; 01-06-2014 at 01:50 AM. Reason: forgot to add screenshot. :)
eschwartz is offline   Reply With Quote
Advert
Old 01-06-2014, 03:27 AM   #3
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: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
If you have recognisable chapter markers in the file (eg "Chapter XXX" at the start of each chapter), then a conversion with heuristic processing enabled should do a decent job of conversion for you, without needing to manually edit.
HarryT is offline   Reply With Quote
Old 01-06-2014, 05:04 AM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Strahan View Post
Hi. I have some large text files that I threw on my Kindle. I'd love to be able to edit the text file and insert some sort of code so the Kindle knows where chapter breaks are.
Since Calibre supports Markdown input, you could use Markdown to mark chapters with # signs in your text files and do a TXT->MOBI conversion. For example:

Code:
### Chapter 1
will be converted to:

Code:
<h3>Chapter 1</h3>
if you change the input file Formatting style option to markdown in Calibre.
Unfortunately, Calibre doesn't seem to be able to automatically generate a Kindle TOC, even if the Generate TOC option is enabled.

If you're not afraid of command line utilities, also check out pandoc, which can convert Markdown text files to epubs, which you can then convert to Kindle books with Calibre.
Doitsu is offline   Reply With Quote
Old 01-09-2014, 01:06 AM   #5
Strahan
Junior Member
Strahan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2012
Device: Kindle
Thanks all, appreciate the help

PS, I'll def check out pandoc. I -far- prefer command line stuff to GUI; I'm a 39 year old systems engineer, so I grew up in the DOS days and I've never given up love of that type of environment hehe.
Strahan is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter Markers jakann86 Kindle Formats 5 09-01-2013 09:32 AM
Lack of chapter markers on KT gers1978 Amazon Kindle 16 07-16-2012 03:18 PM
Can't add chapter markers to MOBI file gers1978 Conversion 7 06-26-2012 08:27 AM
Chapter markers for chapters with the same name JohnFreeman Conversion 3 02-25-2011 04:14 PM
Chapter Markers? djulian Calibre 3 11-20-2010 11:15 PM


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


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