Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 11-05-2014, 03:27 AM   #1
copaw
Member
copaw began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2014
Location: Port Macquarie, NSW
Device: ipad
Text Indent

Hi, Sorry if this question has been asked before, but I am relatively new to using Calibre to edit my books. I normally copy them to RTF, edit them and then convert back to epub.

Question
Using Calibre; if I edit in RTF format and have a paragraph break at the end of every paragraph, then when I transfer to epub and edit, Calibre indents the first line but leaves a line between each paragraph. I am seeking a solution to this problem please?

Attempts
If I use the Line Break in RTF and then convert, Calibre removes the line between each paragraph but won't indent the first line.

In the Common Options it shows indent size: 1.5 em but is greyed out??

I also copied this - p { margin: 0; padding: 0 0 5px 0; text-indent: 1.5em;
} into the Extra CSS, but it doesn't seem to make much difference.

Any help would be greatly appreciated.

Thanks Copaw
copaw is offline   Reply With Quote
Old 11-05-2014, 10:49 AM   #2
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by copaw View Post
Question
Using Calibre; if I edit in RTF format and have a paragraph break at the end of every paragraph, then when I transfer to epub and edit, Calibre indents the first line but leaves a line between each paragraph. I am seeking a solution to this problem please?
That indentation and extra line are just for your comfort while looking at the HTML code. They have no effect whatsoever in the rendered book.

I do not think you have any way to avoid that indentation or that separation between successive paragraphs. Remember the TRUE text of the paragraph is the text inside the <p> ... </p> pair. It doesn't matter how you type those paragraphs. (You could even type them in a single huge line, and the rendered text would be the same).

Last edited by arspr; 11-05-2014 at 10:52 AM.
arspr is offline   Reply With Quote
Advert
Old 11-05-2014, 03:29 PM   #3
copaw
Member
copaw began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2014
Location: Port Macquarie, NSW
Device: ipad
Thanks for the information. Do you know of any way to solve this issue so my book format doesn't have extra lines and the first line of the paragraph can be indented?
copaw is offline   Reply With Quote
Old 11-05-2014, 03:49 PM   #4
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,185
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by copaw View Post
Thanks for the information. Do you know of any way to solve this issue so my book format doesn't have extra lines and the first line of the paragraph can be indented?
Edit the paragraph styles in your word processor, so that you have no spaces above or below the paragraphs and set your preferred indention.

Example from LibreOffice.
Spoiler:
Click image for larger version

Name:	Screenshot from 2014-11-05 15:46:14.png
Views:	337
Size:	44.2 KB
ID:	130659


bernie
gbm is offline   Reply With Quote
Old 11-05-2014, 11:23 PM   #5
copaw
Member
copaw began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2014
Location: Port Macquarie, NSW
Device: ipad
I have edited the RTF file in Word 2010. I then deleted the old EPUB file and converted my RTF to a new EPUB file. When I bring up the edit book function, there are no extra lines showing, but it does not indent the paragraphs.

In the EPUB Output Format I have selected the 'remove spacing between paragraphs' which automatically sets the paragraph indent. Only this does not seem to work.

Thanks Copaw
copaw is offline   Reply With Quote
Advert
Old 11-05-2014, 11:33 PM   #6
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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Dont use RTF, use DOCX. Save your document as docx in word and convert that. And remove spacing between paragraphs will only work if your document actually has paragraphs as opposed to hard line breaks.
kovidgoyal is offline   Reply With Quote
Old 11-06-2014, 01:04 AM   #7
copaw
Member
copaw began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2014
Location: Port Macquarie, NSW
Device: ipad
Thanks for that. The remove line spacing worked on another ePub file which was fine except for the double spacing between paragraphs.

As there is no output file for docx, what would you recommend.
copaw is offline   Reply With Quote
Old 11-06-2014, 02:03 AM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by copaw View Post
As there is no output file for docx, what would you recommend.
I'm assuming the RTF is in calibre Book Folder, and RTF is associated with Word 2010
  1. In calibre open the RTF - Alt/V, select RTF
  2. In Word save in default format - Alt/F/F->Word Document, the one at top, that will save a DOCX file in the book folder
  3. In Word close the file - Alt/F/C
  4. In calibre open the book folder - press 'o'
  5. Drag the DOCX file over to the Book Details panel (where the cover is) and drop it there, now you have a DOCX in your library, close the file manager window.
  6. Now work on DOCX in Word, and convert it to EPUB in calibre - I'd throw the RTF away.

Not only will the DOCX convert better than an RTF, if it's primarily text it will be typically be a lot smaller, up to 90% smaller!

BR

Last edited by BetterRed; 11-06-2014 at 03:08 AM.
BetterRed is offline   Reply With Quote
Old 11-07-2014, 04:01 AM   #9
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 576
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
I used to convert to RTF and fiddle about, but as I've got more used to Calibre I now do it all with the EPUB editor:

* joining split paras: the second para of the split generally starts with a lower-case letter, so use use find-and-replace for All Text Files, Regex mode, Case sensitive, Wrap, Dot all and use the following RE: replace "</p>\s*<p[^>]+>([a-z])" by " \1" (that's "space backslash one")

* indenting paras: click on a word in a para of the same style as you want to indent, look at the Live CSS panel (open from View menu if necessary) to find the CSS style name and edit the corresponding entry in the CSS stylesheet to use styles like "text-indent: 1.5em; margin: 0;" or similar

* make the first para in a chapter unindented by copying the basic style (e.g. calibre2 to calibre2a) and replace the original "text-indent: 1.5em; margin: 0;" by "text-indent: 0; margin: 1em 0 0;". Now change every para after </h2> to calibre2a using an RE like "</h2>\s*<p class="calibre2">" and replace with "</h2>\s*<p class="calibre2a">"

There are *so* many things you can do with a well-chosen RE! Test them first with "Find" and then "Replace" before hitting "Replace all", but if necessary you can revert a "replace all" from the Edit menu.

HTH!
Phssthpok is offline   Reply With Quote
Old 11-07-2014, 04:04 AM   #10
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 576
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
using an RE like "</h2>\s*<p class="calibre2">" and replace with "</h2>\s*<p class="calibre2a">"
Ooops, I meant replace with "</h2>\n<p class="calibre2a">"... which shows why testing your RE first is so important!
Phssthpok is offline   Reply With Quote
Old 11-09-2014, 11:44 AM   #11
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 576
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by copaw View Post
Using Calibre; if I edit in RTF format and have a paragraph break at the end of every paragraph, then when I transfer to epub and edit, Calibre indents the first line but leaves a line between each paragraph.
Edit the EPUB, click on a paragraph and find the CSS style name from the para header (or the Live CSS panel). Open stylesheet.css and edit the offending style to say this:
text-indent: 1.5em;
margin: 0;
Also generally good to say "text-align: justify" whenever necessary.
Phssthpok is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug converting html css text-indent and left-margin bhoyt Conversion 15 01-24-2014 07:28 PM
Cannot get rid of text-indent dawood Conversion 3 10-21-2013 10:10 PM
How do you turn off default text-indent <p> in Nook DAntkowiak Barnes & Noble NOOK 9 07-11-2013 10:43 AM
Border and text indent problem ePub to mobi AlexBell Conversion 12 04-08-2012 08:37 AM


All times are GMT -4. The time now is 01:34 PM.


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