mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-08 23:34:26 +01:00
EPUB output:Set --remove-paragraph-spacing to off by default
This commit is contained in:
parent
383d33e6aa
commit
e3115f03cf
3 changed files with 3 additions and 2 deletions
|
|
@ -156,7 +156,7 @@ def config(defaults=None, name='epub'):
|
|||
help=_('Set the right margin in pts. Default is %default'))
|
||||
layout('base_font_size2', ['--base-font-size'], default=12.0,
|
||||
help=_('The base font size in pts. Default is %defaultpt. Set to 0 to disable rescaling of fonts.'))
|
||||
layout('remove_paragraph_spacing', ['--remove-paragraph-spacing'], default=True,
|
||||
layout('remove_paragraph_spacing', ['--remove-paragraph-spacing'], default=False,
|
||||
help=_('Remove spacing between paragraphs. Will not work if the source file forces inter-paragraph spacing.'))
|
||||
layout('preserve_tag_structure', ['--preserve-tag-structure'], default=False,
|
||||
help=_('Preserve the HTML tag structure while splitting large HTML files. This is only neccessary if the HTML files contain CSS that uses sibling selectors. Enabling this greatly slows down processing of large HTML files.'))
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ def convert(opts, recipe_arg, notification=None):
|
|||
|
||||
print 'Generating epub...'
|
||||
opts.encoding = 'utf-8'
|
||||
opts.remove_paragraph_spacing = True
|
||||
html2epub(opf, opts, notification=notification)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ def get_id(chapter, counter, prefix='calibre_css_'):
|
|||
# Workaround for anchor rendering bug in ADE
|
||||
css += '\n\na { color: inherit; text-decoration: inherit; cursor: default; }\na[href] { color: blue; text-decoration: underline; cursor:pointer; }'
|
||||
if self.opts.remove_paragraph_spacing:
|
||||
css += '\n\np {text-indent: 2em; margin-top:0pt; margin-bottom:0pt; padding:0pt; border:0pt;}'
|
||||
css += '\n\np {text-indent: 1.5em; margin-top:0pt; margin-bottom:0pt; padding:0pt; border:0pt;}'
|
||||
if self.opts.override_css:
|
||||
css += '\n\n' + self.opts.override_css
|
||||
self.override_css = self.css_parser.parseString(self.preprocess_css(css))
|
||||
|
|
|
|||
Loading…
Reference in a new issue