On Tue, 12 Mar 2013, Philipp Gesang wrote:

Nevertheless, I added some code to handle container directives:
at the moment they simply map to macros of the same name.
Existence of the macro is tested for at runtime, so you can place
the definitions in your preamble. Example:

·································································

This is a paragraph.

.. container:: xyzzy

   whatever

   foo **bar** baz

This is another paragraph.

·································································

This will generate the output:

·································································

\startparagraph
This is a paragraph.
\stopparagraph

\ifcsname xyzzy\endcsname%
 \csname xyzzy\endcsname%
 {whatever foo {\sc bar} baz}%
\else
 {whatever foo {\sc bar} baz}%
\fi


\startparagraph
This is another paragraph.
\stopparagraph

·································································

A better way to handle this is to provide macros \startRSTcontainer ... \stopRSTcontainer and translate the above to

\startRSTcontainer[xyzzy][...settings ....]
....
\stopRSTcontainer

It should be responsiblility of the document author to make sure that the containers work correctly.

Depending on what containers are supposed to do (I have not read the links posted in this thread), providing such a container might be as simple as

\let\startRSTcontainer=\startframedtext
\let\stopRSTcontainer=\stopframedtext

or

\let\startRSTcontainer=\startparagraph
\let\stopRSTcontainer=\stopparagraph


Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to