Discussion:
[Docutils-users] new latex-writer class handling - please test
Guenter Milde
2017-03-13 16:06:41 UTC
Permalink
Dear Docutils users,

today I ask for feedback on a new feature of the latex writer.

Since `SVN revision 8044`__, the Docutils LaTeX writer handles class
arguments for block-level elements by wrapping them in a "DUclass"
environment.

__ https://sourceforge.net/p/docutils/code/8044/

With this addition, inline elements are handled via the ``\DUrole{}`` macro,
block level elements are wrapped in ``DUclass`` environments. Customization
is done by defining matching macros or environments.

Example: Use small caps font inside elements with class value "custom".

Inline elements
The LaTeX function ``\textsc`` sets the argument in small caps::

\newcommand{\DUrolesmallcaps}[1]{\textsc{#1}}

Block-level elements
The LaTeX directive (macro without argument) ``\scshape`` switches to
the small caps font. Its effect is confined to the wrapper ``DUclass``
environment::

\newcommand*{\DUCLASScustom}{\scshape}

For details and more examples, see latex.txt__

__ https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docs/user/latex.txt?format=raw


The "DUclass" wrapper also replaces the special handling for "epigraph" and
"topic" elements. (Failure to compile epigraphs with more than one
paragraph triggered the change.)


Qustions:

a) Change the class handling of paragraphs to "CUclass" environment?

Currently, paragraphs with a class argument are wrapped in
\DUrole{<classargument>}{<content>}

Should we change this to
\begin{DUclass}{<classargument>}
<content>
\end{DUclass}
or leave as-is for backwards compatibility.

b) Adjust the naming of the optional styling commands styling an element with
class value "spam" from
\DUrolespam \begin{DUCLASSspam} \end{DUCLASSspam}
to
\DUROLEspam \begin{DUCLASSspam} \end{DUCLASSspam}
or
\DUrolespam \begin{DUclassspam} \end{DUclassspam}
?

c) other ideas, problems, and suggestions?

Thanks,
Günter


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Pl

Loading...