|
From: <mi...@us...> - 2019-11-05 13:32:15
|
Revision: 8411
http://sourceforge.net/p/docutils/code/8411
Author: milde
Date: 2019-11-05 13:32:13 +0000 (Tue, 05 Nov 2019)
Log Message:
-----------
New configuration section "[latex writers]".
Add "latex writers" to the `config_section_dependencies`
in the "latex2e" and "xetex" writers.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docs/user/latex.txt
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/odf_odt/__init__.py
trunk/docutils/docutils/writers/xetex/__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2019-11-04 21:14:43 UTC (rev 8410)
+++ trunk/docutils/HISTORY.txt 2019-11-05 13:32:13 UTC (rev 8411)
@@ -64,15 +64,19 @@
- Fix [ 339 ] don't use "alltt" or literal-block-environment
in admonitions and footnotes.
- Deprecation warning for ``\docutilsrole``-prefixed styling commands.
+ - Add "latex writers" to the `config_section_dependencies`.
+* docutils/writers/manpage.py
+
+ - Apply fix for [ 289 ], line starting with ``.`` in a text.
+
* docutils/writers/odf_odt/__init__.py:
- Fix: ElementTree.getchildren deprecated warning
-* docutils/writers/manpage.py
+* docutils/writers/xetex/__init__.py:
+ - Add "latex writers" to the `config_section_dependencies`.
- - Apply fix for [ 289 ], line starting with ``.`` in a text.
-
* test/alltests.py
- Fix: 377 ResourceWarning: unclosed file python3.8
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2019-11-04 21:14:43 UTC (rev 8410)
+++ trunk/docutils/docs/user/config.txt 2019-11-05 13:32:13 UTC (rev 8411)
@@ -343,9 +343,9 @@
id_prefix
---------
-Prefix prepended to all identifier keys generated within the document.
+Prefix prepended to all identifier keys generated within the document.
Ensure the value conforms to the restrictions on identifiers in the output
-format, as it is not subjected to the `identifier normalization`_.
+format, as it is not subjected to the `identifier normalization`_.
See also auto_id_prefix_.
Default: "" (empty).
@@ -780,7 +780,7 @@
Options: ``--trim-footnote-reference-space, --leave-footnote-reference-space``.
-__ `footnote_references [latex2e writer]`_
+__ `footnote_references [latex writers]`_
[readers]
@@ -890,7 +890,7 @@
Format for `block quote`_ attributions: one of "dash" (em-dash
prefix), "parentheses"/"parens", or "none". Also defined for the
-`LaTeX Writer <attribution [latex2e writer]_>`__.
+`LaTeX Writers <attribution [latex writers]_>`__.
Default: "dash". Options: ``--attribution``.
@@ -946,7 +946,7 @@
Embed the stylesheet in the output HTML file. The stylesheet file
must specified by the stylesheet_path__ setting and must be
accessible during processing.
-Also defined for the `LaTeX Writer <embed_stylesheet [latex2e writer]_>`__.
+Also defined for the `LaTeX Writers <embed_stylesheet [latex writers]_>`__.
Default: enabled. Options: ``--embed-stylesheet,
--link-stylesheet``.
@@ -968,7 +968,7 @@
~~~~~~~~~~~~~~~~~~~
Format for `footnote references`_, one of "superscript" or "brackets".
-Also defined for the `LaTeX Writer <footnote_references [latex2e writer]_>`__.
+Also defined for the `LaTeX Writers <footnote_references [latex writers]_>`__.
Overrides [#override]_ trim_footnote_reference_space_, if
applicable. [#footnote_space]_
@@ -1110,7 +1110,7 @@
~~~~~~~~~~
A comma-separated list of CSS stylesheet URLs, used verbatim.
-Also defined for the `LaTeX Writer <stylesheet [latex2e writer]_>`__.
+Also defined for the `LaTeX Writer <stylesheet [latex writers]_>`__.
Overrides also stylesheet-path__. [#override]_
@@ -1156,7 +1156,7 @@
Options: ``--stylesheet-path``.
__ `embed_stylesheet [html4css1 writer]`_
-__ `stylesheet_path [latex2e writer]`_
+__ `stylesheet_path [latex writers]`_
__ `stylesheet_dirs [html4css1 writer]`_
.. _table_style [html4css1 writer]:
@@ -1186,7 +1186,7 @@
Default: "". Option: ``--table-style``.
-__ `table_style [latex2e writer]`_
+__ `table_style [latex writers]`_
.. _table directive: ../ref/rst/directives.html#table
.. _template [html4css1 writer]:
@@ -1201,7 +1201,7 @@
directory (installed automatically; for the exact machine-specific
path, use the ``--help`` option). Options: ``--template``.
-__ `template [latex2e writer]`_
+__ `template [latex writers]`_
.. _xml_declaration [html4css1 writer]:
@@ -1358,9 +1358,11 @@
New in Docutils 0.13.
-[latex2e writer]
+[latex writers]
----------------
+Common settings for the `[latex2e writer]`_ and `[xetex writer]`_.
+
use_latex_toc
~~~~~~~~~~~~~
@@ -1442,21 +1444,9 @@
Default: "a4paper". Option: ``--documentoptions``.
-font_encoding
-~~~~~~~~~~~~~
-Specify LaTeX font encoding. Multiple options can be given, separated by
-commas. The last value becomes the document default.
-Possible values are "", "T1", "OT1", "LGR,T1" or any other combination of
-`LaTeX font encodings`_.
+.. _embed_stylesheet [latex writers]:
-Default: "T1". Option: ``--font-encoding``.
-
-.. _LaTeX font encodings:
- http://mirror.ctan.org/macros/latex/doc/encguide.pdf
-
-.. _embed_stylesheet [latex2e writer]:
-
embed_stylesheet
~~~~~~~~~~~~~~~~
@@ -1470,7 +1460,7 @@
__ `embed_stylesheet [html4css1 writer]`_
-.. _stylesheet [latex2e writer]:
+.. _stylesheet [latex writers]:
stylesheet
~~~~~~~~~~
@@ -1488,14 +1478,14 @@
Default: no stylesheet (""). Option: ``--stylesheet``.
-__ `stylesheet_path [latex2e writer]`_
-__ `embed_stylesheet [latex2e writer]`_
+__ `stylesheet_path [latex writers]`_
+__ `embed_stylesheet [latex writers]`_
__ `stylesheet [html4css1 writer]`_
.. _TeX input path:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=what-TDS
-.. _stylesheet_dirs [latex2e writer]:
+.. _stylesheet_dirs [latex writers]:
stylesheet_dirs
~~~~~~~~~~~~~~~
@@ -1508,7 +1498,7 @@
stylesheet_path__ setting with the meaning of a file location.
__
-__ `stylesheet_path [latex2e writer]`_
+__ `stylesheet_path [latex writers]`_
Default: the working directory of the process at launch and the directory
with default stylesheet files (writer and installation specific).
@@ -1515,7 +1505,7 @@
Use the ``--help`` option to get the exact value.
Option: ``--stylesheet-directories``.
-.. _stylesheet_path [latex2e writer]:
+.. _stylesheet_path [latex writers]:
stylesheet_path
~~~~~~~~~~~~~~~
@@ -1535,10 +1525,10 @@
Default: no stylesheet (""). Option: ``--stylesheet-path``.
-__ `stylesheet_dirs [latex2e writer]`_
-__ `embed_stylesheet [latex2e writer]`_
+__ `stylesheet_dirs [latex writers]`_
+__ `embed_stylesheet [latex writers]`_
__
-__ `stylesheet [latex2e writer]`_
+__ `stylesheet [latex writers]`_
latex_preamble
@@ -1548,16 +1538,10 @@
Can be used to load packages with options or (re-) define LaTeX
macros without writing a custom style file (new in Docutils 0.7).
-Default: Load the "PDF standard fonts" (Times, Helvetica,
-Courier)::
-
- \usepackage{mathptmx} % Times
- \usepackage[scaled=.90]{helvet}
- \usepackage{courier}
-
+Default: writer dependent (see `[latex2e writer]`_, `[xetex writer]`_).
Option: ``--latex-preamble``.
-.. _footnote_references [latex2e writer]:
+.. _footnote_references [latex writers]:
footnote_references
~~~~~~~~~~~~~~~~~~~
@@ -1572,7 +1556,7 @@
__ `footnote_references [html4css1 writer]`_
-.. _attribution [latex2e writer]:
+.. _attribution [latex writers]:
attribution
~~~~~~~~~~~
@@ -1631,7 +1615,7 @@
Default: "-". Option: ``--section-enumerator-separator``.
-.. _table_style [latex2e writer]:
+.. _table_style [latex writers]:
table_style
~~~~~~~~~~~
@@ -1668,36 +1652,81 @@
__ `table_style [html4css1 writer]`_
-.. _template [latex2e writer]:
+.. _template [latex writers]:
template
~~~~~~~~
-Path to template file, which must be encoded in UTF-8. [#pwd]_
+Path [#pwd]_ to template file, which must be encoded in UTF-8.
Also defined for the `HTML Writer`__.
-Default: "default.tex" in the docutils/writers/latex2e/
-directory (installed automatically; for the exact machine-specific
-path, use the ``--help`` option). Options: ``--template``.
+Default: writer dependent (see `[latex2e writer]`_, `[xetex writer]`_).
+Options: ``--template``.
__ `template [html4css1 writer]`_
+[latex2e writer]
+~~~~~~~~~~~~~~~~
+
+The `LaTeX2e writer`_ generates a LaTeX source for compilation with 8-bit
+LaTeX (pdfTeX_). It shares all settings defined in the `[latex writers]`_
+`configuration section`_.
+
+.. _LaTeX2e writer: latex.html#latex2e-writer
+.. _pdfTeX: https://www.tug.org/applications/pdftex/
+.. _configuration section: `Configuration File Sections & Entries`_
+
+
+Writer Specific Defaults
+""""""""""""""""""""""""
+
+latex_preamble_
+ Load the "PDF standard fonts" (Times, Helvetica, Courier)::
+
+ \usepackage{mathptmx} % Times
+ \usepackage[scaled=.90]{helvet}
+ \usepackage{courier}
+
+template__
+ "default.tex" in the ``docutils/writers/latex2e/`` directory
+ (installed automatically).
+
+ __ `template [latex writers]`_
+
+
+font_encoding
+"""""""""""""
+
+Specify `LaTeX font encoding`_. Multiple options can be given, separated by
+commas. The last value becomes the document default.
+Possible values are "", "T1", "OT1", "LGR,T1" or any other combination of
+`LaTeX font encodings`_.
+
+Default: "T1". Option: ``--font-encoding``.
+
+.. _LaTeX font encoding: latex.html#font-encoding
+.. _LaTeX font encodings:
+ http://mirror.ctan.org/macros/latex/doc/encguide.pdf
+
+
[xetex writer]
~~~~~~~~~~~~~~
-The xetex writer derives from the latex2e writer, and shares
-all settings defined in the `[latex2e writer]`_ section. The
-"[latex2e writer]" section of configuration files is processed
-before the "[xetex writer]" section.
+The `XeTeX writer`_ generates a LaTeX source for compilation with `XeTeX or
+LuaTeX`_. It derives from the latex2e writer, and shares all settings
+defined in the `[latex writers]`_ and `[latex2e writer]`_ `configuration
+sections`_.
-The following settings differ from those of the latex2e writer:
+.. _XeTeX writer: latex.html#xetex-writer
+.. _XeTeX or LuaTeX: https://texfaq.org/FAQ-xetex-luatex
+.. _configuration sections: `Configuration File Sections & Entries`_
-font_encoding_
- Disabled (Use Unicode-encoded fonts).
+Writer Specific Defaults
+""""""""""""""""""""""""
-latex_preamble_
- Default: Font setup for `Linux Libertine`_,::
+latex_preamble_:
+ Font setup for `Linux Libertine`_,::
% Linux Libertine (free, wide coverage, not only for Linux)
\setmainfont{Linux Libertine O}
@@ -1707,13 +1736,19 @@
The optional argument ``HyphenChar=None`` to the monospace font
prevents word hyphenation in literal text.
-template__
- Default: "xelatex.tex"
-
.. _Linux Libertine: http://www.linuxlibertine.org/
-__ `template [latex2e writer]`_
+template__:
+ "xelatex.tex" in the ``docutils/writers/latex2e/`` directory
+ (installed automatically).
+
+ .. TODO: show full path with --help (like in the HTML writers) and
+ add the following line:
+ for the exact machine-specific path, use the ``--help`` option).
+ __ `template [latex writers]`_
+
+
[odf_odt writer]
----------------
Modified: trunk/docutils/docs/user/latex.txt
===================================================================
--- trunk/docutils/docs/user/latex.txt 2019-11-04 21:14:43 UTC (rev 8410)
+++ trunk/docutils/docs/user/latex.txt 2019-11-05 13:32:13 UTC (rev 8411)
@@ -123,11 +123,13 @@
_`pdflatex`
Generates a PDF document directly from the LaTeX file.
+ Export your document with the _`LaTeX2e writer` (writer
+ name "``latex``", frontend tool rst2latex.py_).
_`xelatex` or _`lualatex`
The `XeTeX`_ and LuaTeX_ engines work with input files in UTF-8 encoding
- and system fonts. Export your document with the `xetex` writer
- (``rst2xetex``), if you want to go this route.
+ and system fonts. Export your document with the _`XeTeX writer` (writer
+ name "``xetex``", frontend tool rst2xetex.py_).
You may need to call latex two or three times to get internal references
correct.
@@ -135,8 +137,9 @@
.. _documentoptions: config.html#documentoptions
.. _xetex: http://tug.org/xetex/
.. _luatex: http://luatex.org/
+.. _rst2latex.py: tools.html#rst2latex-py
+.. _rst2xetex.py: tools.html#rst2xetex-py
-
_`rubber`
The Rubber__ wrapper for LaTeX and friends can be used to automatically
run all programs the required number of times and delete "spurious" files.
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2019-11-04 21:14:43 UTC (rev 8410)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2019-11-05 13:32:13 UTC (rev 8411)
@@ -223,7 +223,7 @@
settings_defaults = {'sectnum_depth': 0 # updated by SectNum transform
}
config_section = 'latex2e writer'
- config_section_dependencies = ('writers',)
+ config_section_dependencies = ('writers', 'latex writers')
head_parts = ('head_prefix', 'requirements', 'latex_preamble',
'stylesheet', 'fallbacks', 'pdfsetup', 'titledata')
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2019-11-04 21:14:43 UTC (rev 8410)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2019-11-05 13:32:13 UTC (rev 8411)
@@ -554,9 +554,7 @@
)
config_section = 'odf_odt writer'
- config_section_dependencies = (
- 'writers',
- )
+ config_section_dependencies = ('writers',)
def __init__(self):
writers.Writer.__init__(self)
Modified: trunk/docutils/docutils/writers/xetex/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/xetex/__init__.py 2019-11-04 21:14:43 UTC (rev 8410)
+++ trunk/docutils/docutils/writers/xetex/__init__.py 2019-11-05 13:32:13 UTC (rev 8411)
@@ -47,7 +47,8 @@
])
config_section = 'xetex writer'
- config_section_dependencies = ('writers', 'latex2e writer')
+ config_section_dependencies = ('writers', 'latex writers',
+ 'latex2e writer') # TODO: remove dependency on `latex2e writer`.
settings_spec = frontend.filter_settings_spec(
latex2e.Writer.settings_spec,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|