|
From: <mi...@us...> - 2019-11-13 13:45:46
|
Revision: 8413
http://sourceforge.net/p/docutils/code/8413
Author: milde
Date: 2019-11-13 13:45:43 +0000 (Wed, 13 Nov 2019)
Log Message:
-----------
Ignore classes for `rubric` elements
Class wrapper interferes with LaTeX formatting of text following
the "rubric" heading.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docs/ref/rst/directives.txt
trunk/docutils/docs/user/latex.txt
trunk/docutils/docutils/writers/latex2e/__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2019-11-06 18:15:21 UTC (rev 8412)
+++ trunk/docutils/HISTORY.txt 2019-11-13 13:45:43 UTC (rev 8413)
@@ -65,6 +65,8 @@
in admonitions and footnotes.
- Deprecation warning for ``\docutilsrole``-prefixed styling commands.
- Add "latex writers" to the `config_section_dependencies`.
+ - Ignore classes for `rubric` elements
+ (class wrapper interferes with LaTeX formatting).
* docutils/writers/manpage.py
Modified: trunk/docutils/docs/ref/rst/directives.txt
===================================================================
--- trunk/docutils/docs/ref/rst/directives.txt 2019-11-06 18:15:21 UTC (rev 8412)
+++ trunk/docutils/docs/ref/rst/directives.txt 2019-11-13 13:45:43 UTC (rev 8413)
@@ -715,7 +715,7 @@
=========
:Directive Type: "container"
-:Doctree Element: container_
+:Doctree Element: `container <container element_>`__
:Directive Arguments: One or more, optional (class names).
:Directive Options: `:name:`_
:Directive Content: Interpreted as body elements.
@@ -1978,7 +1978,7 @@
.. _block_quote: ../doctree.html#block-quote
.. _caption: ../doctree.html#caption
.. _compound: ../doctree.html#compound
-.. _container: ../doctree.html#container
+.. _container element: ../doctree.html#container
.. _decoration: ../doctree.html#decoration
.. _figure: ../doctree.html#figure
.. _footnote: ../doctree.html#footnote
Modified: trunk/docutils/docs/user/latex.txt
===================================================================
--- trunk/docutils/docs/user/latex.txt 2019-11-06 18:15:21 UTC (rev 8412)
+++ trunk/docutils/docs/user/latex.txt 2019-11-13 13:45:43 UTC (rev 8413)
@@ -34,8 +34,8 @@
.. _LaTeX packages:
-LaTeX classes and packages
---------------------------
+LaTeX document classes and packages
+-----------------------------------
Unlike HTML with CSS, LaTeX uses one common language for markup and style
definitions. Separation of content and style is realized by collecting style
@@ -178,10 +178,12 @@
Docutils elements.
In HTML, the common use is to provide selection criteria for style rules in
CSS stylesheets. As there is no comparable framework for LaTeX, Docutils
-mimics some of this behaviour via `Docutils specific LaTeX macros`_.
+emulates some of this behaviour via `Docutils specific LaTeX macros`_.
+Due to LaTeX limitations, class arguments are ignored for
+some elements (e.g. a rubric_).
*Inline elements*
- are handled via the ``\DUrole{}`` macro, that calls the optional styling
+ are handled via the ``\DUrole{}`` macro that calls the optional styling
command ``\DUrole«classargument»`` with one argument (the role content).
See `custom interpreted text roles`_.
@@ -1548,17 +1550,22 @@
``\DUrubric``
Default:
- subsubsection style, italic, centred
+ subsubsection style (unnumbered), italic
-Example:
- set flushleft and red::
+Example1:
+ Set centred and red::
\newcommand*{\DUrubric}[1]{%
- \subsubsection*{{\color{red}#1}\hfill}}
+ \subsubsection*{\centerline{\color{red}#1}}}
+.. note::
+ Class attribute values are ignored because the "classes_ wrapper"
+ interferes with LaTeX's formatting (spacing/indendation) of text following
+ a section heading. Consider using a `topic element`_ or a container_.
+
__ ../ref/rst/directives.html#rubric
+.. _container: ../ref/rst/directives.html#container
-
section numbering
-----------------
@@ -1640,7 +1647,7 @@
setting or set for individual tables via a `class directive`_ or the class
option of the `table directive`_.
-.. _table-style: config.html#table-style-latex2e-writer
+.. _table-style: config.html#table-style-latex-writers
.. _table directive: ../ref/rst/directives.html#table
topic element
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2019-11-06 18:15:21 UTC (rev 8412)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2019-11-13 13:45:43 UTC (rev 8413)
@@ -2823,12 +2823,12 @@
def visit_rubric(self, node):
self.fallbacks['rubric'] = PreambleCmds.rubric
- self.duclass_open(node)
- self.out.append('\\DUrubric{')
+ # class wrapper would interfere with ``\section*"`` type commands
+ # (spacing/indent of first paragraph)
+ self.out.append('\n\\DUrubric{')
def depart_rubric(self, node):
self.out.append('}\n')
- self.duclass_close(node)
def visit_section(self, node):
self.section_level += 1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|