diff --git a/src/calibre/ebooks/conversion/plumber.py b/src/calibre/ebooks/conversion/plumber.py index 3d345b50f3..7f38106229 100644 --- a/src/calibre/ebooks/conversion/plumber.py +++ b/src/calibre/ebooks/conversion/plumber.py @@ -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', diff --git a/src/calibre/ebooks/oeb/transforms/flatcss.py b/src/calibre/ebooks/oeb/transforms/flatcss.py index 1493a647ae..078174218e 100644 --- a/src/calibre/ebooks/oeb/transforms/flatcss.py +++ b/src/calibre/ebooks/oeb/transforms/flatcss.py @@ -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()