I'm using calibre 2.18. I have recently acquired a kindle PW2 and am in the process of converting my epub library to azw3. I have been experimenting with using the "Look & Feel/Extra CSS" field to add "html { margin-left: -30px; margin-right: -30px; }" to the azw3 css, which can reduce the margins on the kindle.
In almost every epub I convert to azw3, the "Extra CSS" appears to be ignored, and does not appear anywhere in any of the css files in the output azw3. No matter what css snippet I put in the "Extra CSS" box, it does not appear anywhere in the output azw3. However, in a very few cases, something stranger heppens:
1 - A third css file - 0003.css - is produced in the output azw3 (most conversions seem to only produce 2 css files). The 0003.css file
does contain the "Extra CSS" from the conversion dialog.
2 - An html table of contents page is generated as the last html/text file in the output azw3's spine. This html toc at the end of the spine is not present in the input epub and is the only html file in the azw3 that links to the 0003.css stylesheet with the "Extra CSS". None of the other html/text files in the output azw3 link to the 0003.css sheet.
I guess this html toc is related to the "table of contents" settings in the conversion dialog. I've made sure I don't have anything set there and that I press the "Restore defaults" button before setting the "Extra CSS" and starting the conversion. Below is the log from a conversion that produces this extra toc. Does anyone have any idea what's going on here?
Spoiler:
Convert book 1 of 1 (The Hound of the Baskervilles)
DeDRM v6.1.0: In __init__
DeDRM v6.1.0: In load_resources
DeDRM v6.1.0: verdir /home/john/.config/calibre/plugins/DeDRM/6.1.0
DeDRM v6.1.0: In initialize
Resolved conversion options
calibre version: 2.18.0
{'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|prologue|epilogue\\s+', 'i')) or @class = 'chapter']",
'chapter_mark': u'none',
'comments': None,
'cover': u'/tmp/calibre_2.18.0_tmp_JE9bMF/s9pYmt.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': False,
'disable_font_rescaling': False,
'dont_compress': False,
'duplicate_links_in_toc': False,
'embed_all_fonts': False,
'embed_font_family': None,
'enable_heuristics': False,
'expand_css': True,
'extra_css': u'html { margin-left: -30px; margin-right: -30px; }',
'extract_to': None,
'filter_css': u'',
'fix_indents': True,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.35,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x7f6f1b98b0d0>,
'insert_blank_line': False,
'insert_blank_line_size': 0.5,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 0.0,
'margin_left': 0.0,
'margin_right': 0.0,
'margin_top': 0.0,
'markup_chapter_headings': True,
'max_toc_links': 50,
'minimum_line_height': 110.0,
'mobi_toc_at_start': False,
'no_chapters_in_toc': False,
'no_inline_navbars': False,
'no_inline_toc': False,
'output_profile': <calibre.customize.profiles.TabletOutput object at 0x7f6f1b98bc50>,
'page_breaks_before': u'/',
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': u'/tmp/calibre_2.18.0_tmp_JE9bMF/IEYdun.opf',
'remove_fake_margins': False,
'remove_first_image': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': u'',
'search_replace': '[]',
'series': None,
'series_index': None,
'share_not_sync': False,
'smarten_punctuation': False,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'start_reading_at': None,
'subset_embedded_fonts': False,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: EPUB Input running
on /tmp/calibre_2.18.0_tmp_JE9bMF/uAw2e7.epub
Parsing all content...
Parsing OEBPS/Text/HoB-10.xhtml ...
Parsing OEBPS/Text/HoB-11.xhtml ...
Parsing OEBPS/Text/HoB-12.xhtml ...
Parsing OEBPS/Text/HoB-13.xhtml ...
Parsing OEBPS/Text/HoB-3.xhtml ...
Parsing OEBPS/Text/HoB-14.xhtml ...
Parsing OEBPS/Text/HoB-1.xhtml ...
Parsing OEBPS/Text/HoB.xhtml ...
Parsing OEBPS/Text/CoverImage.xhtml ...
Parsing OEBPS/Text/HoB-20.xhtml ...
Parsing OEBPS/Text/HoB-2.xhtml ...
Parsing OEBPS/Text/HoB-4.xhtml ...
Parsing OEBPS/Text/HoB-5.xhtml ...
Parsing OEBPS/Text/HoB-6.xhtml ...
Parsing OEBPS/Text/HoB-7.xhtml ...
Parsing OEBPS/Styles/HoB_idstyles.css ...
Parsing OEBPS/Text/HoB-8.xhtml ...
Parsing OEBPS/Text/HoB-9.xhtml ...
Parsing OEBPS/Text/HoB-21.xhtml ...
Parsing OEBPS/Text/HoB-15.xhtml ...
Parsing OEBPS/Text/HoB-16.xhtml ...
Parsing OEBPS/Text/HoB-18.xhtml ...
Parsing OEBPS/Text/HoB-19.xhtml ...
Parsing OEBPS/Text/HoB-22.xhtml ...
Parsing OEBPS/Text/HoB-17.xhtml ...
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...
Trimming unused files from manifest...
Creating AZW3 Output...
Serializing resources...
Splitting markup on page breaks and flow limits, if any...
Creating KF8 output
Generating in-line ToC
Generating KF8 markup...
Compressing markup...
Creating indices...
AZW3 output written to /tmp/calibre_2.18.0_tmp_JE9bMF/Iz1Mof.azw3