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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-03-2011, 06:08 PM   #1
jjansen
J
jjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 156
Karma: 12590
Join Date: Mar 2009
Location: Canada
Device: SONY PRS 505/300, iRex DR800SG, Nook
LRF - losing indents and paragraph spacing

I am very sorry if this is answered in the forums somewhere. I did try and look.

I have a couple of books in LRF format. I want to convert them to epub. When I view the LRF document in Calibre the paragraphs are indented and the only time there are blank lines between the paragraphs is when there is a scene change. I would like to keep that formatting. Every time I convert to epub I get left justified paragraphs with a blank line between each one which I don't want.

On the conversion I took the defaults which means that Look & Feel default to not inserting blank lines and not removing spacing between paragraphs. I thought this would do what I wanted. Is there an option that I am missing that I need keep the paragraph formatting the same as it is in the LRF?

Thanks
Jackie
jjansen is offline   Reply With Quote
Old 02-03-2011, 10:09 PM   #2
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
What other settings do you haven enabled during conversion? If you're not sure you can go to the job details for one of the conversions(click on the lower right corner of the main window) and copy/paste that here. The first part of that log lists all the settings that were enabled.
ldolse is offline   Reply With Quote
 
Advertisement
Old 02-03-2011, 10:47 PM   #3
jjansen
J
jjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 156
Karma: 12590
Join Date: Mar 2009
Location: Canada
Device: SONY PRS 505/300, iRex DR800SG, Nook
Thanks - here are the conversion job details........Jackie

Convert book 1 of 1 (The Whitechapel Conspiracy)
Resolved conversion options
calibre version: 0.7.42
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': u'original',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part\\s+', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': 'c:\\docume~1\\jjansen\\locals~1\\temp\\calibre_0. 7.42_tmp_x4hcbp\\calibre_0.7.42_whwetp.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_split_on_page_breaks': False,
'enable_heuristics': False,
'epub_flatten': False,
'extra_css': None,
'extract_to': None,
'fix_indents': True,
'flow_size': 260,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x042C4210>,
'insert_blank_line': False,
'insert_metadata': True,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': True,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_chapter_headings': True,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'no_chapters_in_toc': False,
'no_default_epub_cover': False,
'no_inline_navbars': False,
'no_svg_cover': False,
'output_profile': <calibre.customize.profiles.SonyReaderOutput object at 0x042C4610>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'prefer_metadata_cover': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'c:\\docume~1\\jjansen\\locals~1\\temp\\calibre_0. 7.42_tmp_x4hcbp\\calibre_0.7.42_znsavn.opf',
'remove_first_image': True,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 0.0,
'renumber_headings': True,
'series': None,
'series_index': None,
'smarten_punctuation': True,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: LRF Input running
jjansen is offline   Reply With Quote
Old 02-03-2011, 11:42 PM   #4
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Well, I don't see anything enabled that could be causing a problem. Without knowing how the indents are defined in the lrf it's difficult to know if there is a specfic fix. There is a 'fix indents' option under heuristics that can repair them if they were defined a certain way, but I don't think the normal lrf conversion would have hurt that.

You could open a bug with the book if you want, as it sounds like there may be some problem with the conversion and how these books are defined, but there is a potential fix using extra css.

Add this line to the extra css box under 'Look and Feel':
Code:
p {margin-top:0.3em; margin-bottom:0.3em; text-indent:3%; text-align:justify}
That 'should' indent every single paragraph, not sure if every one was indented before. You can also tweak the top and bottom margins as you see fit - I prefer a very small amount of space, hence .3em.
ldolse is offline   Reply With Quote
Old 02-04-2011, 12:14 AM   #5
jjansen
J
jjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 156
Karma: 12590
Join Date: Mar 2009
Location: Canada
Device: SONY PRS 505/300, iRex DR800SG, Nook
Thank-you. Actually my main concern wasn't the indents but the changing of the spacing between paragraphs. In the LRF There was no spaces between most paragraphs. When there was a space it was indicative of a scene change. Now every paragraph has a space between it and the next paragraph and you can't tell when it means something and when it doesn't. That is what I was trying to prevent happening.........Jackie
jjansen is offline   Reply With Quote
Old 02-04-2011, 12:25 AM   #6
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Ah, ok. Theoretically that extra css I proposed should fix that too, but there are a lot of ways scene breaks could be defined, I can't guarantee it will work. Basically my suggestion will work if the scene break is defined as it's own empty paragraph. Do you have larger spaces around scene breaks in the conversion, or is the space identical to the rest of the paragraph spacing?
ldolse is offline   Reply With Quote
Old 02-04-2011, 12:50 AM   #7
jjansen
J
jjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterjjansen can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 156
Karma: 12590
Join Date: Mar 2009
Location: Canada
Device: SONY PRS 505/300, iRex DR800SG, Nook
In the LRF there are larger spaces in the scene breaks. After conversion in epub there are not. The paragraph spacing doesn't change using the extra css line.

All I really want to do is tell Calibre not to change the existing paragraph spacing. The document looks great when I open the original LRF file in Calibre.
jjansen is offline   Reply With Quote
Old 02-04-2011, 01:37 AM   #8
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Sounds like a bug to me. bugs.calibre-ebook.com - please attach an example file so someone can figure out what's going wrong.
ldolse is offline   Reply With Quote
Old 02-04-2011, 03:32 AM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
@jjansen You might find this post (and the next 9) in this thread interesting.

Kovid's response to bugs created in that thread was,

Quote:
"calibre's LRF input plugin only supports LRF created by calibre. I have no interest in addng support for BD LRF files. Patches welcome."
Maybe a developer will have a need or some time and supply a patch.

Quote:
Originally Posted by jjansen View Post
All I really want to do is tell Calibre not to change the existing paragraph spacing. The document looks great when I open the original LRF file in Calibre.
While I understand your sentiment the problem is that LRF isn't a nice container for html like lit, mobi or epub. It is a proprietary format based on objects and the calibre conversion produces a very readable output. This might be as good as it gets, the code in calibre is final and the odds are that it is not going to be updated (But you can always ask).

Have you tried converting with the Remove spacing between paragraphs option checked? Then looking at the code in Sigil and see if Scene breaks are indicated in some manner that makes Search and Replace feasible.

Good Luck.

Last edited by DoctorOhh; 02-04-2011 at 03:35 AM.
DoctorOhh is online now   Reply With Quote
Old 02-04-2011, 04:26 AM   #10
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Quote:
Originally Posted by dwanthny View Post
Maybe a developer will have a need or some time and supply a patch.
User_None and I have just been working improving Calibre's support for preserving scene breaks across input formats, so if I get an example book and can figure out how they're defined in LRF I'll be happy to wrap it into the other scene break improvements.

The next release will be improved quite a bit in this department in general, preserving them across a lot more input formats using some of the heuristic processing, but I wasn't aware LRF was a problem in some cases. The LRF code I've seen looks like pretty decent xhtml, but not sure if it's been massaged by Calibre already when it winds up in the debug folder.
ldolse is offline   Reply With Quote
Old 02-04-2011, 04:38 AM   #11
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by ldolse View Post
User_None and I have just been working improving Calibre's support for preserving scene breaks across input formats, so if I get an example book and can figure out how they're defined in LRF I'll be happy to wrap it into the other scene break improvements.
I've already converted all my lrf files but this will be excellent news to many.

Quote:
Originally Posted by ldolse View Post
The LRF code I've seen looks like pretty decent xhtml, but not sure if it's been massaged by Calibre already when it winds up in the debug folder.
I'm relatively sure it is messaged prior to the input folder.

Kovid responded to a user inquiring about creating a patch below.

Quote:
Originally Posted by kovidgoyal View Post
Quote:
Originally Posted by Ticallion View Post
Could anyone give some idea about how to make a user patch or even what specific files would need tweaking for fixing up the LRF to EPUB conversion? i know next to nothing about programming, but thought it'd be worth a try unless there would be a lot of lines of code that need to be changed.
All the LRF related files are in src/calibre/ebooks/lrf but this would be a far from trivial change.
DoctorOhh is online now   Reply With Quote
Old 02-04-2011, 05:09 AM   #12
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
I found a lrf in my library that seems to have the same problem - There is enough information preserved that putting a scene break back should be doable. I'll add the pattern to the 'format scene breaks' option in Heuristics. Not sure if it will work across all LRF files, but it's worth a shot.
ldolse is offline   Reply With Quote
Old 02-04-2011, 08:45 AM   #13
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Edit: Fix is in 7.44, let me know if it works.

The fix will require heuristics and the option 'format scene breaks' to be enabled.

Last edited by ldolse; 02-04-2011 at 09:32 PM.
ldolse 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
First paragraph line indents jhempel24 Sigil 10 11-23-2010 08:26 PM
Adding indents / removing line spacing for news jubcoo Calibre 4 10-27-2010 05:39 PM
Sony PRS-505, text indents, paragraph spacing pdurrant Sigil 7 08-03-2009 07:03 AM
convert to lrf : paragraph indents, line breaks karo02 Calibre 4 01-27-2009 10:19 AM
Paragraph indents from command line JSWolf Calibre 4 11-06-2008 09:41 PM


All times are GMT -4. The time now is 01:27 AM.


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