![]() |
#1 |
J
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 205
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 |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
J
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 205
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 |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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} |
![]() |
![]() |
![]() |
#5 |
J
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 205
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
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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?
|
![]() |
![]() |
![]() |
#7 |
J
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 205
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. |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#9 | ||
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,888
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
@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:
Quote:
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 02:35 AM. |
||
![]() |
![]() |
![]() |
#10 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#11 | ||||
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,888
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
Quote:
Kovid responded to a user inquiring about creating a patch below. Quote:
|
||||
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 08:32 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
First paragraph line indents | jhempel24 | Sigil | 10 | 11-23-2010 07:26 PM |
Adding indents / removing line spacing for news | jubcoo | Calibre | 4 | 10-27-2010 04:39 PM |
Sony PRS-505, text indents, paragraph spacing | pdurrant | Sigil | 7 | 08-03-2009 06:03 AM |
convert to lrf : paragraph indents, line breaks | karo02 | Calibre | 4 | 01-27-2009 09:19 AM |
Paragraph indents from command line | JSWolf | Calibre | 4 | 11-06-2008 08:41 PM |