|
From: <mi...@us...> - 2023-06-29 13:49:35
|
Revision: 9418
http://sourceforge.net/p/docutils/code/9418
Author: milde
Date: 2023-06-29 13:49:33 +0000 (Thu, 29 Jun 2023)
Log Message:
-----------
Update ODT writer configuration settings documentation.
Use the conventions of config.txt also for the ODF/ODT writer:
- one sub section per configuration setting
(also if there are 2 corresponding command line options).
- sort settings alphabetically.
- Specify default and options at end of section.
Add links to the detailled ODT writer documentation.
More concise help output. Consistent meta-variable format ``XYZ -> <xyz>``.
Modified Paths:
--------------
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/writers/odf_odt/__init__.py
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2023-06-27 20:04:54 UTC (rev 9417)
+++ trunk/docutils/docs/user/config.txt 2023-06-29 13:49:33 UTC (rev 9418)
@@ -2020,137 +2020,145 @@
[odf_odt writer]
----------------
-The `ODF/ODT Writer`__ generates documents in the
+The ODF/`ODT Writer`_ generates documents in the
OpenDocument_ Text format (.odt).
The output_encoding_ setting is ignored, the output encoding is
always "UTF-8".
-__
-.. _ODT Writer for Docutils: odt.html
+.. _ODT Writer: odt.html
.. _OpenDocument: https://en.wikipedia.org/wiki/OpenDocument
-stylesheet
-~~~~~~~~~~
+add-syntax_highlighting
+~~~~~~~~~~~~~~~~~~~~~~~
-Specify a stylesheet URL, used verbatim.
-See section `Styles and Classes`_ in the `Odt Writer for Docutils`_
-document for details.
+Add syntax highlighting in literal code blocks.
+See section "`Syntax highlighting`__" in the ODT Writer documentation
+for details.
-Default: writers/odf_odt/styles.odt in the installation directory.
+Default: disabled (False).
+Options: ``--add-syntax-highlighting, --no-syntax-highlighting``.
-odf-config-file
+__ odt.html#syntax-highlighting
+
+
+create_links
+~~~~~~~~~~~~
+
+Create links.
+
+Default: disabled (False).
+Options: ``--create-links, --no-links``.
+
+
+create_sections
~~~~~~~~~~~~~~~
-Specify a configuration/mapping file relative to the current working
-directory for additional ODF options. In particular, this file may
-contain a section named "Formats" that maps default style names to names
-to be used in the resulting output file allowing for adhering to external
-standards. For more info and the format of the configuration/mapping
-file, see section `How to use custom style names`_ in the
-`Odt Writer for Docutils`_ document.
+Create sections for headers.
-cloak-email-addresses
+Default: enabled (True).
+Options: ``--create-sections, --no-sections``.
+
+
+cloak_email_addresses
~~~~~~~~~~~~~~~~~~~~~
Obfuscate email addresses to confuse harvesters while still
keeping email links usable with standards-compliant browsers.
-no-cloak-email-addresses
-~~~~~~~~~~~~~~~~~~~~~~~~
+Default: disabled (False).
+Options: ``--cloak-email-addresses, --no-cloak-email-addresses``.
-Do not obfuscate email addresses.
-table-border-thickness
-~~~~~~~~~~~~~~~~~~~~~~
+custom_header
+~~~~~~~~~~~~~
-Specify the thickness of table borders in thousands of a cm.
-Default is 35.
+Specify the contents of a custom header line.
+See section "`Custom header/footers`_" in the ODT Writer documentation
+for details.
-add-syntax-highlighting
-~~~~~~~~~~~~~~~~~~~~~~~
+Default: none ('').
+Option: ``--custom-odt-header``.
-Add syntax highlighting in literal code blocks.
-no-syntax-highlighting
-~~~~~~~~~~~~~~~~~~~~~~
+custom_footer
+~~~~~~~~~~~~~
-Do not add syntax highlighting in literal code blocks.
-(default)
+Specify the contents of a custom footer line.
+See section "`Custom header/footers`_" in the ODT Writer documentation
+for details.
-create-sections
-~~~~~~~~~~~~~~~
+Default: none ('').
+Option: ``--custom-odt-footer``.
-Create sections for headers. (default)
+.. _custom header/footers:
+ odt.html#custom-header-footers-inserting-page-numbers-date-time-etc
-no-sections
-~~~~~~~~~~~
-Do not create sections for headers.
+endnotes_end_doc
+~~~~~~~~~~~~~~~~
-create-links
-~~~~~~~~~~~~
+Generate endnotes at end of document, not footnotes at bottom of page.
-Create links.
+Default: disabled (False).
+Options: ``--endnotes-end-doc, --no-endnotes-end-doc``.
-no-links
-~~~~~~~~
-Do not create links. (default)
+generate_oowriter_toc
+~~~~~~~~~~~~~~~~~~~~~
-endnotes-end-doc
-~~~~~~~~~~~~~~~~
+Generate a native ODF table of contents, not a bullet list.
+See section "`Table of contents`__" in the ODT Writer documentation
+for details.
-Generate endnotes at end of document, not footnotes at bottom of page.
+Default: enabled (True).
+Options: ``--generate-oowriter-toc, --generate-list-toc``.
-no-endnotes-end-doc
-~~~~~~~~~~~~~~~~~~~
+__ odt.html#table-of-contents
-Generate footnotes at bottom of page, not endnotes at end of
-document. (default)
-generate-list-toc
-~~~~~~~~~~~~~~~~~
+odf_config_file
+~~~~~~~~~~~~~~~
-Generate a bullet list table of contents, not an
-ODF/``oowriter`` table of contents.
+Specify a configuration/mapping file relative to the current working
+directory for additional ODF options.
+In particular, this file may contain a mapping of default style names to
+names used in the resulting output file.
+See section `How to use custom style names`__ in the
+ODT Writer documentation for details.
-generate-oowriter-toc
-~~~~~~~~~~~~~~~~~~~~~
+Default: None.
+Option: ``--odf-config-file``.
-Generate an ODF/``oowriter`` table of contents, not a bullet
-list. (default) **Note:** ``odtwriter`` is not able to
-determine page numbers, so you will need to open the generated
-document in ``oowriter``, then right-click on the table of
-contents and select "Update" to insert page numbers.
+__ odt.html#how-to-use-custom-style-names
-custom-odt-header
-~~~~~~~~~~~~~~~~~
-Specify the contents of a custom header line. For details about
-custom headers and about special field character sequences, see
-section "`Custom header/footers`_: inserting page numbers, date,
-time, etc" in the `Odt Writer for Docutils`_ document for
-details.
+stylesheet
+~~~~~~~~~~
+Specify a stylesheet URL, used verbatim.
+See section `Styles and Classes`_ in the ODT Writer documentation
+for details.
-custom-odt-footer
-~~~~~~~~~~~~~~~~~
+Default: writers/odf_odt/styles.odt in the installation directory.
+Option: ``--stylesheet``.
-Specify the contents of a custom footer line. For details about
-custom footers and about special field character sequences, see
-section "`Custom header/footers`_: inserting page numbers, date,
-time, etc" in the `Odt Writer for Docutils`_ document for
-details.
+.. _styles and classes: odt.html#styles-and-classes
-.. _custom header/footers:
- odt.html#custom-header-footers-inserting-page-numbers-date-time-etc
-.. _how to use custom style names:
- odt.html#how-to-use-custom-style-names
-.. _styles and classes:
- odt.html#styles-and-classes
+table_border_thickness
+~~~~~~~~~~~~~~~~~~~~~~
+Specify the thickness of table borders in thousands of a centimetre.
+The `Table styles`__ section in the ODT Writer documentation describes
+alternatives for additional customisation of the table style.
+
+Default: 35 (0.35 mm).
+Option: ``--table-border-thickness``.
+
+__ odt.html#table-styles
+
+
[pseudoxml writer]
------------------
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2023-06-27 20:04:54 UTC (rev 9417)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2023-06-29 13:49:33 UTC (rev 9418)
@@ -379,7 +379,7 @@
os.path.join(os.path.dirname(__file__), default_template))
settings_spec = (
- 'ODF-Specific Options',
+ 'ODF-Specific Options.',
None,
(
('Specify a stylesheet. '
@@ -389,21 +389,11 @@
'default': default_stylesheet_path,
'dest': 'stylesheet'
}),
- ('Specify a configuration/mapping file relative to the '
- 'current working '
- 'directory for additional ODF options. '
- 'In particular, this file may contain a section named '
- '"Formats" that maps default style names to '
- 'names to be used in the resulting output file allowing for '
- 'adhering to external standards. '
- 'For more info and the format of the '
- 'configuration/mapping file, '
- 'see the odtwriter doc.',
+ ('Specify an ODF-specific configuration/mapping file '
+ 'relative to the current working directory.',
['--odf-config-file'],
{'metavar': '<file>'}),
- ('Obfuscate email addresses to confuse harvesters while still '
- 'keeping email links usable with '
- 'standards-compliant browsers.',
+ ('Obfuscate email addresses to confuse harvesters.',
['--cloak-email-addresses'],
{'default': False,
'action': 'store_true',
@@ -415,10 +405,11 @@
'action': 'store_false',
'dest': 'cloak_email_addresses',
'validator': frontend.validate_boolean}),
- ('Specify the thickness of table borders in thousands of a cm. '
+ ('Specify the thickness of table borders in thousands of a cm. '
'Default is 35.',
['--table-border-thickness'],
{'default': None,
+ 'metavar': '<int>',
'validator': frontend.validate_nonnegative_int}),
('Add syntax highlighting in literal code blocks.',
['--add-syntax-highlighting'],
@@ -427,7 +418,7 @@
'dest': 'add_syntax_highlighting',
'validator': frontend.validate_boolean}),
('Do not add syntax highlighting in '
- 'literal code blocks. (default)',
+ 'literal code blocks. (default)',
['--no-syntax-highlighting'],
{'default': False,
'action': 'store_false',
@@ -471,15 +462,14 @@
'action': 'store_false',
'dest': 'endnotes_end_doc',
'validator': frontend.validate_boolean}),
- ('Generate a bullet list table of contents, not '
- 'an ODF/oowriter table of contents.',
+ ('Generate a bullet list table of contents, '
+ 'not a native ODF table of contents.',
['--generate-list-toc'],
- {'default': True,
- 'action': 'store_false',
+ {'action': 'store_false',
'dest': 'generate_oowriter_toc',
'validator': frontend.validate_boolean}),
- ('Generate an ODF/oowriter table of contents, not '
- 'a bullet list. (default)',
+ ('Generate a native ODF table of contents, '
+ 'not a bullet list. (default)',
['--generate-oowriter-toc'],
{'default': True,
'action': 'store_true',
@@ -486,17 +476,18 @@
'dest': 'generate_oowriter_toc',
'validator': frontend.validate_boolean}),
('Specify the contents of an custom header line. '
- 'See odf_odt writer documentation for details '
+ 'See ODF/ODT writer documentation for details '
'about special field character sequences.',
['--custom-odt-header'],
{'default': '',
- 'dest': 'custom_header', }),
+ 'dest': 'custom_header',
+ 'metavar': '<custom header>'}),
('Specify the contents of an custom footer line. '
- 'See odf_odt writer documentation for details '
- 'about special field character sequences.',
+ 'See ODF/ODT writer documentation for details.',
['--custom-odt-footer'],
{'default': '',
- 'dest': 'custom_footer', }),
+ 'dest': 'custom_footer',
+ 'metavar': '<custom footer>'}),
)
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|