mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Remove paragraph spacing: If you set the indent size to 0, calibre will now leave the indents specified in the input document
This commit is contained in:
parent
2b31560377
commit
371db4901f
@ -368,7 +368,9 @@ OptionRecommendation(name='remove_paragraph_spacing_indent_size',
|
||||
recommended_value=1.5, level=OptionRecommendation.LOW,
|
||||
help=_('When calibre removes blank lines between paragraphs, it automatically '
|
||||
'sets a paragraph indent, to ensure that paragraphs can be easily '
|
||||
'distinguished. This option controls the width of that indent (in em).')
|
||||
'distinguished. This option controls the width of that indent (in em). '
|
||||
'If you set this value to 0, then the indent specified in the input '
|
||||
'document is used.')
|
||||
),
|
||||
|
||||
OptionRecommendation(name='prefer_metadata_cover',
|
||||
|
@ -320,9 +320,10 @@ class CSSFlattener(object):
|
||||
if self.context.insert_blank_line:
|
||||
cssdict['margin-top'] = cssdict['margin-bottom'] = \
|
||||
'%fem'%self.context.insert_blank_line_size
|
||||
if (self.context.remove_paragraph_spacing and
|
||||
indent_size = self.context.remove_paragraph_spacing_indent_size
|
||||
if (self.context.remove_paragraph_spacing and indent_size != 0.0 and
|
||||
cssdict.get('text-align', None) not in ('center', 'right')):
|
||||
cssdict['text-indent'] = "%1.1fem" % self.context.remove_paragraph_spacing_indent_size
|
||||
cssdict['text-indent'] = "%1.1fem" % indent_size
|
||||
|
||||
if cssdict:
|
||||
items = cssdict.items()
|
||||
|
Loading…
x
Reference in New Issue
Block a user