mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:54:28 +02: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
2 changed files with 6 additions and 3 deletions
|
|
@ -368,7 +368,9 @@ def __init__(self, input, output, log, report_progress=DummyReporter(),
|
|||
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 @@ def force_int(raw):
|
|||
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…
Reference in a new issue