|
From: <mi...@us...> - 2021-05-18 21:33:35
|
Revision: 8728
http://sourceforge.net/p/docutils/code/8728
Author: milde
Date: 2021-05-18 21:33:28 +0000 (Tue, 18 May 2021)
Log Message:
-----------
Default of "legacy_class_functions" setting changed to "False".
- The setting `legacy_class_functions`_ now defaults to "False".
- latex2e/docutils.sty: Fix excessive padding above sidebar titles.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/latex2e/docutils.sty
trunk/docutils/test/functional/expected/latex_leavevmode.tex
trunk/docutils/test/functional/expected/standalone_rst_latex.tex
trunk/docutils/test/functional/tests/latex_literal_block.py
trunk/docutils/test/functional/tests/latex_literal_block_fancyvrb.py
trunk/docutils/test/functional/tests/latex_literal_block_listings.py
trunk/docutils/test/functional/tests/latex_literal_block_verbatim.py
trunk/docutils/test/functional/tests/latex_literal_block_verbatimtab.py
trunk/docutils/test/functional/tests/latex_memoir.py
trunk/docutils/test/functional/tests/standalone_rst_xetex.py
trunk/docutils/test/test_writers/test_latex2e.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/HISTORY.txt 2021-05-18 21:33:28 UTC (rev 8728)
@@ -16,10 +16,6 @@
Changes Since 0.17.1
====================
-* docutils/writers/pseudoxml.py:
-
- - Fix option "detailled" under Python 2.7.
-
* docutils/tools/math/math2html, docutils/writers/html5_polyglot/math.css
- Fix bug #244 Wrong subscript/superscript order with
@@ -27,6 +23,19 @@
- Don't use <tt> element (deprecated in HTML5).
- Support commands ``\Bbbk`` and ``operatorname``.
+* docutils/writers/latex2e/__init__.py
+
+ - The setting `legacy_class_functions`_ now defaults to "False".
+ Adapt stylesheets modifying ``\DUadmonition`` and/or ``\DUtitle``.
+
+* docutils/writers/latex2e/docutils.sty
+
+ - Fix excessive padding above sidebar titles.
+
+* docutils/writers/pseudoxml.py:
+
+ - Fix option "detailled" under Python 2.7.
+
Release 0.17.1 (2021-04-16)
===========================
@@ -144,7 +153,7 @@
- Add a `viewport meta tag`__ to fix rendering in mobile browsers.
__ https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag
-
+
- Use <video> for images with video MIME types supported by HTML5.
* docutils/writers/html5_polyglot/minimal.css
@@ -151,9 +160,9 @@
- Move non-essential styling to ``plain.css``.
Small fixes and tweaks.
-
+
- Support "captionbelow" class value for tables.
-
+
- Display code line numbers as pseudo-elements which are skipped
when copying text from code blocks. Solves feature request #32.
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/RELEASE-NOTES.txt 2021-05-18 21:33:28 UTC (rev 8728)
@@ -20,10 +20,6 @@
Future changes
==============
-* `latex` writer: The default for the configuration setting
- `legacy_class_functions`_ will change to "False". Adapt stylesheets
- modifying ``\DUadmonition`` and/or ``\DUtitle`` or set to "True".
-
* `html5` writer:
- Use semantic tags <aside> for footnote text, citations, for topics
@@ -100,6 +96,12 @@
.. _html_writer: docs/user/config.html#html-writer
+Release 0.18.dev
+================
+
+* Config setting `legacy_class_functions`_: default changed to "False".
+
+
Release 0.17.1 (2021-04-16)
===========================
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/docs/user/config.txt 2021-05-18 21:33:28 UTC (rev 8728)
@@ -1581,7 +1581,7 @@
values are handled with wrappers and admonitions use the ``DUadmonition``
environment. See `Generating LaTeX with Docutils`__ for details.
-Default: True (this will change to False in version 0.18).
+Default: False.
Options: ``--legacy-class-functions``, ``--new-class-functions``.
New in Docutils 0.17.
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2021-05-18 21:33:28 UTC (rev 8728)
@@ -216,7 +216,7 @@
('Use legacy functions with class value list for '
'\\DUtitle and \\DUadmonition (current default). ',
['--legacy-class-functions'],
- {'default': True,
+ {'default': False,
'action': 'store_true',
'validator': frontend.validate_boolean}),
('Use \\DUrole and "DUclass" wrappers for class values. '
Modified: trunk/docutils/docutils/writers/latex2e/docutils.sty
===================================================================
--- trunk/docutils/docutils/writers/latex2e/docutils.sty 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/docutils/writers/latex2e/docutils.sty 2021-05-18 21:33:28 UTC (rev 8728)
@@ -17,7 +17,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{docutils}
- [2020/08/28 macros for Docutils LaTeX output]
+ [2021/05/18 macros for Docutils LaTeX output]
% Helpers
% -------
@@ -196,7 +196,8 @@
% title::
% title for topics, admonitions, unsupported section levels, and sidebar
-\providecommand*{\DUtitle}[1]{\subsubsection*{#1}}
+\providecommand*{\DUtitle}[1]{%
+ \smallskip\noindent\textbf{#1}\smallskip}
% subtitle::
Modified: trunk/docutils/test/functional/expected/latex_leavevmode.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_leavevmode.tex 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/functional/expected/latex_leavevmode.tex 2021-05-18 21:33:28 UTC (rev 8728)
@@ -41,21 +41,25 @@
\ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{}
}
-% abstract title
-\providecommand*{\DUtitleabstract}[1]{\centerline{\textbf{#1}}}
-
-% admonition (specially marked topic)
-\providecommand{\DUadmonition}[2][class-arg]{%
- % try \DUadmonition#1{#2}:
- \ifcsname DUadmonition#1\endcsname%
- \csname DUadmonition#1\endcsname{#2}%
- \else
- \begin{center}
- \fbox{\parbox{0.9\linewidth}{#2}}
- \end{center}
- \fi
+\providecommand*{\DUCLASSabstract}{
+ \renewcommand{\DUtitle}[1]{\centerline{\textbf{##1}}}
}
+% admonition environment (specially marked topic)
+\ifx\DUadmonition\undefined % poor man's "provideenvironment"
+ \newbox{\DUadmonitionbox}
+ \newenvironment{DUadmonition}%
+ {\begin{center}
+ \begin{lrbox}{\DUadmonitionbox}
+ \begin{minipage}{0.9\linewidth}
+ }%
+ { \end{minipage}
+ \end{lrbox}
+ \fbox{\usebox{\DUadmonitionbox}}
+ \end{center}
+ }
+\fi
+
% width of docinfo table
\DUprovidelength{\DUdocinfowidth}{0.9\linewidth}
@@ -123,14 +127,8 @@
\providecommand*{\DUrubric}[1]{\subsubsection*{\emph{#1}}}
% title for topics, admonitions, unsupported section levels, and sidebar
-\providecommand*{\DUtitle}[2][class-arg]{%
- % call \DUtitle#1{#2} if it exists:
- \ifcsname DUtitle#1\endcsname%
- \csname DUtitle#1\endcsname{#2}%
- \else
- \smallskip\noindent\textbf{#2}\smallskip%
- \fi
-}
+\providecommand*{\DUtitle}[1]{%
+ \smallskip\noindent\textbf{#1}\smallskip}
% titlereference standard role
\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}
@@ -177,7 +175,7 @@
\begin{DUclass}{abstract}
\begin{quote}
-\DUtitle[abstract]{Abstract}
+\DUtitle{Abstract}
Test that \texttt{\textbackslash{}leavevmode} is inserted after the term or field-name
when required for correct placement of the item.
@@ -305,8 +303,9 @@
\DUrubric{A Rubric}
\item[{Admonition}] \leavevmode
-\DUadmonition[note]{
-\DUtitle[note]{Note}
+\begin{DUclass}{note}
+\begin{DUadmonition}
+\DUtitle{Note}
Admonitions need to be preceded by \texttt{\textbackslash{}leavevmode}.
Otherwise, the term ends up centered above the admonition box.
@@ -313,7 +312,8 @@
So do \emph{System Messages}, as they use the “DUadmonition”
LaTeX environment.
-}
+\end{DUadmonition}
+\end{DUclass}
\end{description}
Modified: trunk/docutils/test/functional/expected/standalone_rst_latex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2021-05-18 21:33:28 UTC (rev 8728)
@@ -52,21 +52,25 @@
\ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{}
}
-% abstract title
-\providecommand*{\DUtitleabstract}[1]{\centerline{\textbf{#1}}}
-
-% admonition (specially marked topic)
-\providecommand{\DUadmonition}[2][class-arg]{%
- % try \DUadmonition#1{#2}:
- \ifcsname DUadmonition#1\endcsname%
- \csname DUadmonition#1\endcsname{#2}%
- \else
- \begin{center}
- \fbox{\parbox{0.9\linewidth}{#2}}
- \end{center}
- \fi
+\providecommand*{\DUCLASSabstract}{
+ \renewcommand{\DUtitle}[1]{\centerline{\textbf{##1}}}
}
+% admonition environment (specially marked topic)
+\ifx\DUadmonition\undefined % poor man's "provideenvironment"
+ \newbox{\DUadmonitionbox}
+ \newenvironment{DUadmonition}%
+ {\begin{center}
+ \begin{lrbox}{\DUadmonitionbox}
+ \begin{minipage}{0.9\linewidth}
+ }%
+ { \end{minipage}
+ \end{lrbox}
+ \fbox{\usebox{\DUadmonitionbox}}
+ \end{center}
+ }
+\fi
+
% special topic for dedications
\providecommand*{\DUCLASSdedication}{%
\renewenvironment{quote}{\begin{center}}{\end{center}}%
@@ -79,8 +83,7 @@
\providecommand*{\DUdocumentsubtitle}[1]{{\large #1}}
\newcounter{enumv}
-% error admonition title
-\providecommand*{\DUtitleerror}[1]{\DUtitle{\color{red}#1}}
+\providecommand*{\DUCLASSerror}{\color{red}}
% field list environment (for separate configuration of `field lists`)
\ifthenelse{\isundefined{\DUfieldlist}}{
@@ -161,14 +164,8 @@
\providecommand*{\DUsubtitle}[1]{\par\emph{#1}\smallskip}
% title for topics, admonitions, unsupported section levels, and sidebar
-\providecommand*{\DUtitle}[2][class-arg]{%
- % call \DUtitle#1{#2} if it exists:
- \ifcsname DUtitle#1\endcsname%
- \csname DUtitle#1\endcsname{#2}%
- \else
- \smallskip\noindent\textbf{#2}\smallskip%
- \fi
-}
+\providecommand*{\DUtitle}[1]{%
+ \smallskip\noindent\textbf{#1}\smallskip}
% titlereference standard role
\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}
@@ -254,7 +251,7 @@
\begin{DUclass}{dedication}
\begin{quote}
-\DUtitle[dedication]{Dedication}
+\DUtitle{Dedication}
For Docutils users \& co-developers.
\end{quote}
@@ -262,7 +259,7 @@
\begin{DUclass}{abstract}
\begin{quote}
-\DUtitle[abstract]{Abstract}
+\DUtitle{Abstract}
This is a test document, containing at least one example of each
reStructuredText construct.
@@ -1119,38 +1116,49 @@
\label{admonitions}%
}
-\DUadmonition[attention]{
-\DUtitle[attention]{Attention!}
+\begin{DUclass}{attention}
+\begin{DUadmonition}
+\DUtitle{Attention!}
Directives at large.
-}
+\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[caution]{
-\DUtitle[caution]{Caution!}
+\begin{DUclass}{caution}
+\begin{DUadmonition}
+\DUtitle{Caution!}
Don’t take any wooden nickels.
-}
+\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[danger]{
-\DUtitle[danger]{!DANGER!}
+\begin{DUclass}{danger}
+\begin{DUadmonition}
+\DUtitle{!DANGER!}
Mad scientist at work!
-}
+\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[error]{
-\DUtitle[error]{Error}
+\begin{DUclass}{error}
+\begin{DUadmonition}
+\DUtitle{Error}
Does not compute.
-}
+\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[hint]{
-\DUtitle[hint]{Hint}
+\begin{DUclass}{hint}
+\begin{DUadmonition}
+\DUtitle{Hint}
It’s bigger than a bread box.
-}
+\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[important]{
-\DUtitle[important]{Important}
+\begin{DUclass}{important}
+\begin{DUadmonition}
+\DUtitle{Important}
\begin{itemize}
\item Wash behind your ears.
@@ -1161,32 +1169,41 @@
\item Back up your data.
\end{itemize}
-}
+\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[note]{
-\DUtitle[note]{Note}
+\begin{DUclass}{note}
+\begin{DUadmonition}
+\DUtitle{Note}
This is a note.
-}
+\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[tip]{
-\DUtitle[tip]{Tip}
+\begin{DUclass}{tip}
+\begin{DUadmonition}
+\DUtitle{Tip}
15\% if the service is good.
-}
+\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[warning]{
-\DUtitle[warning]{Warning}
+\begin{DUclass}{warning}
+\begin{DUadmonition}
+\DUtitle{Warning}
Strong prose may provoke extreme mental exertion.
Reader discretion is strongly advised.
-}
+\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[admonition-and-by-the-way]{
-\DUtitle[admonition-and-by-the-way]{And, by the way…}
+\begin{DUclass}{admonition-and-by-the-way}
+\begin{DUadmonition}
+\DUtitle{And, by the way…}
You can make up your own admonition too.
-}
+\end{DUadmonition}
+\end{DUclass}
\subsubsection{2.14.5 Topics, Sidebars, and Rubrics%
@@ -1196,7 +1213,7 @@
\emph{Sidebars} are like miniature, parallel documents.
\DUsidebar{
-\DUtitle[sidebar]{Optional Sidebar Title}
+\DUtitle{Optional Sidebar Title}
\DUsubtitle{Optional Subtitle}
@@ -1214,7 +1231,7 @@
\begin{DUclass}{topic}
\begin{quote}
-\DUtitle[topic]{Topic Title}
+\DUtitle{Topic Title}
This is a topic.
\end{quote}
@@ -1396,12 +1413,13 @@
a paragraph followed by a comment,
% this is a comment
a paragraph, a
+\begin{DUclass}{note}
+\begin{DUadmonition}
+\DUtitle{Note}
-\DUadmonition[note]{
-\DUtitle[note]{Note}
-
with content
-}
+\end{DUadmonition}
+\end{DUclass}
and the final paragraph of the compound 7.
\end{DUclass}
@@ -2769,8 +2787,9 @@
\item[] \href{A:DOS\\path\\}{file with DOS path}\DUfootnotemark{footnote-reference-20}{footnote-12}{11} \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-21}{footnote-12}{11}
\end{DUlineblock}
-\DUadmonition[note]{
-\DUtitle[note]{Note}
+\begin{DUclass}{note}
+\begin{DUadmonition}
+\DUtitle{Note}
These URLs are typeset inside a LaTeX command without error.
@@ -2779,7 +2798,8 @@
\item[] \url{http://example.org/Schema\%dev}
\item[] \url{A:DOS\\path\\}\DUfootnotemark{footnote-reference-22}{footnote-12}{11}
\end{DUlineblock}
-}
+\end{DUadmonition}
+\end{DUclass}
\end{itemize}
\begin{itemize}
@@ -2851,9 +2871,11 @@
(depending on the document class)
-\DUtitle[sectionVI]{3.11.1.1.1.1 level 6%
+\begin{DUclass}{sectionVI}
+\DUtitle{3.11.1.1.1.1 level 6%
\label{level-6}%
}
+\end{DUclass}
an unsupported level.
@@ -2878,8 +2900,9 @@
\section[Docutils System Messages]{\color{red}Docutils System Messages%
}
-\DUadmonition[system-message]{
-\DUtitle[system-message]{system-message
+\begin{DUclass}{system-message}
+\begin{DUadmonition}
+\DUtitle{system-message
\raisebox{1em}{\hypertarget{system-message-1}{}}}
{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~99
@@ -2886,10 +2909,12 @@
\hyperlink{problematic-1}{
Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}.
-}}
+}\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[system-message]{
-\DUtitle[system-message]{system-message
+\begin{DUclass}{system-message}
+\begin{DUadmonition}
+\DUtitle{system-message
\raisebox{1em}{\hypertarget{system-message-2}{}}}
{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~387
@@ -2896,10 +2921,12 @@
\hyperlink{footnote-reference-8}{
Unknown target name: \textquotedbl{}5\textquotedbl{}.
-}}
+}\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[system-message]{
-\DUtitle[system-message]{system-message
+\begin{DUclass}{system-message}
+\begin{DUadmonition}
+\DUtitle{system-message
\raisebox{1em}{\hypertarget{system-message-3}{}}}
{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~396
@@ -2906,10 +2933,12 @@
\hyperlink{citation-reference-3}{
Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}.
-}}
+}\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[system-message]{
-\DUtitle[system-message]{system-message
+\begin{DUclass}{system-message}
+\begin{DUadmonition}
+\DUtitle{system-message
\raisebox{1em}{\hypertarget{system-message-4}{}}}
{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~423
@@ -2916,10 +2945,12 @@
\hyperlink{problematic-2}{
Unknown target name: \textquotedbl{}hyperlink reference without a target\textquotedbl{}.
-}}
+}\end{DUadmonition}
+\end{DUclass}
-\DUadmonition[system-message]{
-\DUtitle[system-message]{system-message
+\begin{DUclass}{system-message}
+\begin{DUadmonition}
+\DUtitle{system-message
\raisebox{1em}{\hypertarget{system-message-5}{}}}
{\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~436
@@ -2926,6 +2957,7 @@
\hyperlink{problematic-3}{
Duplicate target name, cannot be used as a unique reference: \textquotedbl{}duplicate target names\textquotedbl{}.
-}}
+}\end{DUadmonition}
+\end{DUclass}
\end{document}
Modified: trunk/docutils/test/functional/tests/latex_literal_block.py
===================================================================
--- trunk/docutils/test/functional/tests/latex_literal_block.py 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/functional/tests/latex_literal_block.py 2021-05-18 21:33:28 UTC (rev 8728)
@@ -9,5 +9,4 @@
# Extra setting we need
settings_overrides['syntax_highlight'] = 'none'
-settings_overrides['legacy_class_functions'] = False
settings_overrides['stylesheet'] = 'docutils'
Modified: trunk/docutils/test/functional/tests/latex_literal_block_fancyvrb.py
===================================================================
--- trunk/docutils/test/functional/tests/latex_literal_block_fancyvrb.py 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/functional/tests/latex_literal_block_fancyvrb.py 2021-05-18 21:33:28 UTC (rev 8728)
@@ -9,7 +9,6 @@
# Extra setting we need
settings_overrides['syntax_highlight'] = 'none'
-settings_overrides['legacy_class_functions'] = False
settings_overrides['stylesheet'] = 'docutils'
settings_overrides['literal_block_env'] = 'Verbatim'
Modified: trunk/docutils/test/functional/tests/latex_literal_block_listings.py
===================================================================
--- trunk/docutils/test/functional/tests/latex_literal_block_listings.py 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/functional/tests/latex_literal_block_listings.py 2021-05-18 21:33:28 UTC (rev 8728)
@@ -8,7 +8,6 @@
writer_name = "latex"
# Extra setting we need
-settings_overrides['legacy_class_functions'] = False
settings_overrides['stylesheet'] = 'docutils'
settings_overrides['syntax_highlight'] = 'none'
Modified: trunk/docutils/test/functional/tests/latex_literal_block_verbatim.py
===================================================================
--- trunk/docutils/test/functional/tests/latex_literal_block_verbatim.py 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/functional/tests/latex_literal_block_verbatim.py 2021-05-18 21:33:28 UTC (rev 8728)
@@ -9,7 +9,6 @@
# Extra setting we need
settings_overrides['syntax_highlight'] = 'none'
-settings_overrides['legacy_class_functions'] = False
settings_overrides['stylesheet'] = 'docutils'
settings_overrides['literal_block_env'] = 'verbatim'
Modified: trunk/docutils/test/functional/tests/latex_literal_block_verbatimtab.py
===================================================================
--- trunk/docutils/test/functional/tests/latex_literal_block_verbatimtab.py 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/functional/tests/latex_literal_block_verbatimtab.py 2021-05-18 21:33:28 UTC (rev 8728)
@@ -9,7 +9,6 @@
# Extra setting we need
settings_overrides['syntax_highlight'] = 'none'
-settings_overrides['legacy_class_functions'] = False
settings_overrides['stylesheet'] = 'docutils'
settings_overrides['literal_block_env'] = 'verbatimtab'
Modified: trunk/docutils/test/functional/tests/latex_memoir.py
===================================================================
--- trunk/docutils/test/functional/tests/latex_memoir.py 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/functional/tests/latex_memoir.py 2021-05-18 21:33:28 UTC (rev 8728)
@@ -12,3 +12,6 @@
settings_overrides['use_latex_docinfo'] = 1
settings_overrides['documentclass'] = "memoir"
settings_overrides['template'] = "titlingpage.tex"
+
+# test the legacy class functions (since 0.18 default is False )
+settings_overrides['legacy_class_functions'] = True
Modified: trunk/docutils/test/functional/tests/standalone_rst_xetex.py
===================================================================
--- trunk/docutils/test/functional/tests/standalone_rst_xetex.py 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/functional/tests/standalone_rst_xetex.py 2021-05-18 21:33:28 UTC (rev 8728)
@@ -12,5 +12,4 @@
# use "smartquotes" transition:
settings_overrides['smart_quotes'] = True
# use docutils.sty and up-to-date class functions:
-settings_overrides['legacy_class_functions'] = False
settings_overrides['stylesheet'] = 'docutils'
Modified: trunk/docutils/test/test_writers/test_latex2e.py
===================================================================
--- trunk/docutils/test/test_writers/test_latex2e.py 2021-05-18 21:33:04 UTC (rev 8727)
+++ trunk/docutils/test/test_writers/test_latex2e.py 2021-05-18 21:33:28 UTC (rev 8728)
@@ -189,18 +189,12 @@
requirements=parts['requirements'] + '\\setcounter{secnumdepth}{0}\n',
fallbacks=r"""
% title for topics, admonitions, unsupported section levels, and sidebar
-\providecommand*{\DUtitle}[2][class-arg]{%
- % call \DUtitle#1{#2} if it exists:
- \ifcsname DUtitle#1\endcsname%
- \csname DUtitle#1\endcsname{#2}%
- \else
- \smallskip\noindent\textbf{#2}\smallskip%
- \fi
-}
+\providecommand*{\DUtitle}[1]{%
+ \smallskip\noindent\textbf{#1}\smallskip}
""")) + r"""
\phantomsection\label{table-of-contents}
\pdfbookmark[1]{Table of Contents}{table-of-contents}
-\DUtitle[contents]{Table of Contents}
+\DUtitle{Table of Contents}
\begin{list}{}{}
\item \hyperref[title-1]{Title 1}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|