![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2011
Location: Europe
Device: Amazon Kindle
|
Is it possible to define rules for non break space?
I try to find way, how automatically insert non break space after some Czech language one letter words (prepositions, conjunctions) as "s", "a", "v", "z" which cannot be alone at the end od line as an orphan and must be (because of typographic rules) connected with following word using non break space. Is there any way, how to define on user level such rules in Calibre? Another problem is with quotes. English quotes the same at the beginning and at the end of quoted phrase e.g. "something", but in Czech proper quotes are „something“ (left alt + 0132, left alt + 0147)
|
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
You can use the search and replace feature to do something like this. You could try this for a start:
Code:
(?<=\b(s|a|v|z)\b)\s Code:
Last edited by ldolse; 02-22-2011 at 04:28 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
For quotes you could do 1 or two steps - if your book already uses curly or 'smart' quotes then you can use search and replace to replace the open quote with a czech style one. If it is using ASCII quotes then you can do a two step conversion - first convert with the 'Smarten Punctuation' option enabled under look and feel. Then re-convert a second time, and use the Search and Replace feature to replace the open quote.
|
![]() |
![]() |
![]() |
#4 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2011
Location: Europe
Device: Amazon Kindle
|
Quote:
calibre, version 0.7.46 ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Válka s Mloky) Convert book 1 of 1 (Válka s Mloky) Resolved conversion options calibre version: 0.7.46 {'asciiize': False, 'author_sort': None, 'authors': None, 'base_font_size': 0.0, 'book_producer': None, 'change_justification': u'left', 'chapter': u"//*[(name()='h1' or name()='h2') or @class = 'chapter']", 'chapter_mark': u'pagebreak', 'comments': None, 'cover': 'c:\\users\\userxxx\\appdata\\local\\temp\\calibre _0.7.46_tmp_e40dlm\\calibre_0.7.46_qpcxra.jpeg', 'debug_pipeline': u'D:\\Books-import\\Debug', 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'dont_compress': False, 'enable_heuristics': False, 'extra_css': None, 'fix_indents': True, 'font_size_mapping': None, 'format_scene_breaks': False, 'html_unwrap_factor': 0.4, 'input_encoding': u'utf-8', 'input_profile': <calibre.customize.profiles.InputProfile object at 0x05659050>, 'insert_blank_line': True, 'insert_metadata': False, 'isbn': None, 'italicize_common_cases': True, 'keep_ligatures': True, 'language': None, 'level1_toc': u'//h:h1', 'level2_toc': u'//h:h2', 'level3_toc': None, 'line_height': 0.0, 'linearize_tables': True, 'margin_bottom': 4.0, 'margin_left': 4.0, 'margin_right': 2.0, 'margin_top': 2.0, 'markup_chapter_headings': True, 'max_toc_links': 50, 'minimum_line_height': 120.0, 'mobi_ignore_margins': False, 'no_chapters_in_toc': False, 'no_inline_navbars': True, 'no_inline_toc': False, 'output_profile': <calibre.customize.profiles.KindleOutput object at 0x05659370>, 'page_breaks_before': u'/', 'personal_doc': u'[PDOC]', 'prefer_author_sort': False, 'prefer_metadata_cover': False, 'pretty_print': False, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': 'c:\\users\\userxxx\\appdata\\local\\temp\\calibre _0.7.46_tmp_e40dlm\\calibre_0.7.46_bgnjop.opf', 'remove_first_image': False, 'remove_paragraph_spacing': True, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': u'', 'rescale_images': False, 'series': None, 'series_index': None, 'smarten_punctuation': True, 'sr1_replace': u' ', 'sr1_search': u'(?<=\\b(s|a|v|z)\\b)\\s', '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, 'toc_title': None, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} Python function terminated unexpectedly [Error 32] The process cannot access the file because it is being used by another process: u'D:\\Books-import\\Debug\\input\\OEBPS\\Text' (Error Code: 1) Traceback (most recent call last): File "site.py", line 103, in main File "site.py", line 85, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 110, in main File "site-packages\calibre\gui2\convert\gui_conversion.py", line 31, in gui_convert_override File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert File "site-packages\calibre\ebooks\conversion\plumber.py", line 878, in run File "shutil.py", line 244, in rmtree File "shutil.py", line 244, in rmtree File "shutil.py", line 253, in rmtree File "shutil.py", line 251, in rmtree WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'D:\\Books-import\\Debug\\input\\OEBPS\\Text' |
|
![]() |
![]() |
![]() |
#5 | |
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:
|
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
10x10 / 100 Words and Pictures that Define the Time | Colin Dunstan | Lounge | 2 | 12-16-2013 04:36 PM |
An observation on ratings...how do you define your scale? | texasnightowl | Calibre | 12 | 08-18-2010 01:59 PM |
@page rules | mtravellerh | Calibre | 1 | 12-28-2008 05:01 PM |
How define my favorite connection ? | Kiba | iRex | 0 | 07-22-2008 09:29 AM |
Rules | Alexander Turcic | Flea Market | 0 | 05-13-2008 03:35 AM |