diff --git a/src/calibre/ebooks/txt/output.py b/src/calibre/ebooks/txt/output.py index 4d0d176fe4..29b3d899bc 100644 --- a/src/calibre/ebooks/txt/output.py +++ b/src/calibre/ebooks/txt/output.py @@ -51,12 +51,12 @@ class TXTOutput(OutputFormatPlugin): recommended_value=False, level=OptionRecommendation.LOW, help=_('Do not remove links within the document. This is only ' \ 'useful when paired with the markdown-format option because' \ - 'links are always removed with plain text output.')), + ' links are always removed with plain text output.')), OptionRecommendation(name='keep_image_references', recommended_value=False, level=OptionRecommendation.LOW, help=_('Do not remove image references within the document. This is only ' \ 'useful when paired with the markdown-format option because' \ - 'image references are always removed with plain text output.')), + ' image references are always removed with plain text output.')), ]) def convert(self, oeb_book, output_path, input_plugin, opts, log): diff --git a/src/calibre/gui2/convert/txt_output.py b/src/calibre/gui2/convert/txt_output.py index a16dd68014..0e6a6b9574 100644 --- a/src/calibre/gui2/convert/txt_output.py +++ b/src/calibre/gui2/convert/txt_output.py @@ -23,9 +23,9 @@ class PluginWidget(Widget, Ui_Form): ['newline', 'max_line_length', 'force_max_line_length', 'inline_toc', 'markdown_format', 'keep_links', 'keep_image_references', 'txt_output_encoding']) - self.db, self.book_id = db, book_id + self.db, self.book_id = db, book_id for x in get_option('newline').option.choices: - self.opt_newline.addItem(x) + self.opt_newline.addItem(x) self.initialize_options(get_option, get_help, db, book_id) self.opt_markdown_format.stateChanged.connect(self.enable_markdown_format) @@ -33,17 +33,14 @@ class PluginWidget(Widget, Ui_Form): def break_cycles(self): Widget.break_cycles(self) - + try: self.opt_markdown_format.stateChanged.disconnect() except: pass - + def enable_markdown_format(self, state): - if state == Qt.Checked: - state = True - else: - state = False + state = state == Qt.Checked self.opt_keep_links.setEnabled(state) self.opt_keep_image_references.setEnabled(state) - \ No newline at end of file + diff --git a/src/calibre/gui2/convert/xexp_edit.ui b/src/calibre/gui2/convert/xexp_edit.ui index 4b26eb8dcf..18b7c39b52 100644 --- a/src/calibre/gui2/convert/xexp_edit.ui +++ b/src/calibre/gui2/convert/xexp_edit.ui @@ -6,7 +6,7 @@ 0 0 - 434 + 430 74 @@ -59,7 +59,7 @@ ... - + :/images/wizard.png:/images/wizard.png diff --git a/src/calibre/manual/conversion.rst b/src/calibre/manual/conversion.rst index 2bc5687262..de27a5f5bb 100644 --- a/src/calibre/manual/conversion.rst +++ b/src/calibre/manual/conversion.rst @@ -266,14 +266,14 @@ from bad formatting. Because these functions rely on common patterns, be aware t option may lead to worse results, so use with care. As an example, several of these options will remove all non-breaking-space entities. -:guilabel:`Preprocess input` - This option activates various activates |app|'s Heuristic Processing stage of the conversion pipeline. +:guilabel:`Enable heuristic processing` + This option activates |app|'s Heuristic Processing stage of the conversion pipeline. This must be enabled in order for various sub-functions to be applied :guilabel:`Unwrap lines` Enabling this option will cause |app| to attempt to detect and correct hard line breaks that exist - within a document using punctuation clues and line length. |app| will first attempt to detect whether - hard line breaks exist, if they do not appear to exist |app| will not attempt to unwrap lines. The + within a document using punctuation clues and line length. |app| will first attempt to detect whether + hard line breaks exist, if they do not appear to exist |app| will not attempt to unwrap lines. The line-unwrap factor can be reduced if you want to 'force' |app| to unwrap lines. :guilabel:`Line-unwrap factor` @@ -284,21 +284,21 @@ remove all non-breaking-space entities. :guilabel:`Detect and markup unformatted chapter headings and sub headings` If your document does not have Chapter Markers and titles formatted differently from the rest of the text, - |app| can use this option to attempt detection them and surround them with heading tags. <h2> tags are used - for chapter headings; <h3> tags are used for any titles that are detected. + |app| can use this option to attempt detection them and surround them with heading tags.

tags are used + for chapter headings;

tags are used for any titles that are detected. This function will not create a TOC, but in many cases it will cause |app|'s default chapter detection settings - to correctly detect chapters and build a TOC. Adjust the Xpath under Structure Detection if a TOC is not automatically + to correctly detect chapters and build a TOC. Adjust the XPath under Structure Detection if a TOC is not automatically created. If there are no other headings used in the document then setting "//h:h2" under Structure Detection would be the easiest way to create a TOC for the document. - The inserted headings are not formatted, to apply formatting use the 'extra_css' option under + The inserted headings are not formatted, to apply formatting use the :guilabel:`Extra CSS` option under the Look and Feel conversion settings. For example, to center heading tags, use the following:: h2, h3 { text-align: center } -:guilabel:`Renumber sequences of <h1> or <h2> tags` - Some publishers format chapter headings using multiple <h1> or <h2> tags sequentially. +:guilabel:`Renumber sequences of

or

tags` + Some publishers format chapter headings using multiple

or

tags sequentially. |app|'s default conversion settings will cause such titles to be split into two pieces. This option will re-number the heading tags to prevent splitting. @@ -345,7 +345,7 @@ specifying a replacement expression. The search works by using a python regular expression. All matched text is simply removed from the document or replaced using the replacement pattern. You can learn more about regular expressions and -their syntax at http://docs.python.org/library/re.html. +their syntax at :ref:`regexptutorial`. .. _structure-detection: diff --git a/src/calibre/manual/faq.rst b/src/calibre/manual/faq.rst index b473893673..37d18ea329 100644 --- a/src/calibre/manual/faq.rst +++ b/src/calibre/manual/faq.rst @@ -107,10 +107,10 @@ My device is not being detected by |app|? Follow these steps to find the problem: * Make sure that you are connecting only a single device to your computer at a time. Do not have another |app| supported device like an iPhone/iPad etc. at the same time. - * Make sure you are running the latest version of |app|. The latest version can always be downloaded from `http://calibre-ebook.com/download`_. + * Make sure you are running the latest version of |app|. The latest version can always be downloaded from `the calibre website `_. * Ensure your operating system is seeing the device. That is, the device should be mounted as a disk that you can access using Windows explorer or whatever the file management program on your computer is * In calibre, go to Preferences->Plugins->Device Interface plugin and make sure the plugin for your device is enabled. - * If all the above steps fail, go to Preferences->Miscellaneous and click debug device detection with your device attached and post the output as a ticket on `http://bugs.calibre-ebook.com`_. + * If all the above steps fail, go to Preferences->Miscellaneous and click debug device detection with your device attached and post the output as a ticket on `the calibre bug tracker `_. How does |app| manage collections on my SONY reader? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~