mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1448433 [New option for footnotes in docx input](https://bugs.launchpad.net/calibre/+bug/1448433)
This commit is contained in:
parent
be4d44c3d8
commit
b0e51635f5
@ -19,9 +19,8 @@ class DOCXInput(InputFormatPlugin):
|
||||
help=_('Normally, if a large image is present at the start of the document that looks like a cover, '
|
||||
'it will be removed from the document and used as the cover for created ebook. This option '
|
||||
'turns off that behavior.')),
|
||||
OptionRecommendation(name='docx_notes_nopb', recommended_value=False,
|
||||
help=_('Normally, a page break is added after every footnote, '
|
||||
'This option turns off that behavior.')),
|
||||
OptionRecommendation(name='docx_no_pagebreaks_between_notes', recommended_value=False,
|
||||
help=_('Do not insert a page break after every endnote.')),
|
||||
|
||||
}
|
||||
|
||||
@ -29,5 +28,5 @@ class DOCXInput(InputFormatPlugin):
|
||||
|
||||
def convert(self, stream, options, file_ext, log, accelerators):
|
||||
from calibre.ebooks.docx.to_html import Convert
|
||||
return Convert(stream, detect_cover=not options.docx_no_cover, log=log, notes_nopb=options.docx_notes_nopb)()
|
||||
return Convert(stream, detect_cover=not options.docx_no_cover, log=log, notes_nopb=options.docx_no_pagebreaks_between_notes)()
|
||||
|
||||
|
@ -18,6 +18,6 @@ class PluginWidget(Widget, Ui_Form):
|
||||
|
||||
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
|
||||
Widget.__init__(self, parent,
|
||||
['docx_no_cover', 'docx_notes_nopb'])
|
||||
['docx_no_cover', 'docx_no_pagebreaks_between_notes'])
|
||||
self.initialize_options(get_option, get_help, db, book_id)
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="opt_docx_notes_nopb">
|
||||
<widget class="QCheckBox" name="opt_docx_no_pagebreaks_between_notes">
|
||||
<property name="text">
|
||||
<string>Do not add a page after before every footnote</string>
|
||||
<string>Do not add a page after after every endnote</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user