Guenter Milde
2017-02-10 13:14:38 UTC
Dear Engelbert, dear Docutils developers,
ignored class arguments for block-level elements are a long standing issue
of the LaTeX writer (cf. https://sourceforge.net/p/docutils/patches/99/).
The "LaTeX class handling emulation" for inline elements (roles) uses the
dispatcher function \DUrole{<class arg>}{<content>} which in turn calls the
function \DUrole<class arg>, if it exists. However, this does not work for
block-level elements if there are paragraph breaks.
In LaTeX, block level markup is done using "environments". I propose
wrapping block elements in an environment if there are class arguments
present, e.g. ::
\begin{DUclass}{<class arg>}
<content>
\end{DUclass}{<class arg>}
Again, the "DUclass" dispatcher environment calls an optional custom
declaration or environment "DUCLASS<class arg>".
This way, class arguments can be used to style the content via
definitions in the LaTeX preamble, stylesheet, or raw latex
elements.
An earlier proposal and example output is appended to ticket
https://sourceforge.net/p/docutils/patches/99/.
Questions
*********
Is there a better alternative or suggestion?
How to name the dispatcher "class environment"?
a) DUenv -- it's an enviroment ...
b) DUclass -- ... for class handling
b) DUcls -- (short for "class") see also next question.
...
How to name the optional environment (the one users will have to define
when styling content)?
a) DUclass... e.g. DUclasscompact
+1 consistent
-1 no visible separation between prefix and class argument
b) DUCLASS... e.g. DUCLASScompact
+1 visible separtion of prefix and class argument
-1 different upcasing in dispatcher and called environment
c) DUCLS... e.g. DUCLScompact
+1 visible separtion of prefix and class argument
-1 different name of dispatcher and called environment
+1 shorter
My preference is c.
What do you think?
Whould this be stuff for v. 0.13.2, 0.14, or 1.0?
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-develop mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-develop
Please use "Reply All" to reply
ignored class arguments for block-level elements are a long standing issue
of the LaTeX writer (cf. https://sourceforge.net/p/docutils/patches/99/).
The "LaTeX class handling emulation" for inline elements (roles) uses the
dispatcher function \DUrole{<class arg>}{<content>} which in turn calls the
function \DUrole<class arg>, if it exists. However, this does not work for
block-level elements if there are paragraph breaks.
In LaTeX, block level markup is done using "environments". I propose
wrapping block elements in an environment if there are class arguments
present, e.g. ::
\begin{DUclass}{<class arg>}
<content>
\end{DUclass}{<class arg>}
Again, the "DUclass" dispatcher environment calls an optional custom
declaration or environment "DUCLASS<class arg>".
This way, class arguments can be used to style the content via
definitions in the LaTeX preamble, stylesheet, or raw latex
elements.
An earlier proposal and example output is appended to ticket
https://sourceforge.net/p/docutils/patches/99/.
Questions
*********
Is there a better alternative or suggestion?
How to name the dispatcher "class environment"?
a) DUenv -- it's an enviroment ...
b) DUclass -- ... for class handling
b) DUcls -- (short for "class") see also next question.
...
How to name the optional environment (the one users will have to define
when styling content)?
a) DUclass... e.g. DUclasscompact
+1 consistent
-1 no visible separation between prefix and class argument
b) DUCLASS... e.g. DUCLASScompact
+1 visible separtion of prefix and class argument
-1 different upcasing in dispatcher and called environment
c) DUCLS... e.g. DUCLScompact
+1 visible separtion of prefix and class argument
-1 different name of dispatcher and called environment
+1 shorter
My preference is c.
What do you think?
Whould this be stuff for v. 0.13.2, 0.14, or 1.0?
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-develop mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-develop
Please use "Reply All" to reply