ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* reStructuredText module
@ 2013-03-11 23:28 Bill Meahan
  2013-03-12  0:31 ` Philipp Gesang
  0 siblings, 1 reply; 14+ messages in thread
From: Bill Meahan @ 2013-03-11 23:28 UTC (permalink / raw)
  To: ConTeXt Mailing List

Am I correct in thinking the rst module does not process the "class" 
and "container" directives?

I looked through the Lua source and didn't see anyplace where these 
directives are processed although I will be the first to admit I 
don't know much about Lua. I retired from software development 
before Lua became popular and never bothered to learn it. Assembler, 
FORTRAN, C, SQL, PL/SQL, Perl.... I know or knew, Lua I do not. :)

I use these directives heavily and pandoc ignores them so I'm 
beginning to think I have a problem generating EPUB + ConTeXt + 
HTML(5) versions of the same document from common rst source.

Thanks!  All information and suggestions welcome.

-- 
Bill Meahan
Westland, Michigan USA

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-11 23:28 reStructuredText module Bill Meahan
@ 2013-03-12  0:31 ` Philipp Gesang
  2013-03-12 12:28   ` Bill Meahan
  0 siblings, 1 reply; 14+ messages in thread
From: Philipp Gesang @ 2013-03-12  0:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2665 bytes --]

Hi Bill.

···<date: 2013-03-11, Monday>···<from: Bill Meahan>···

> Am I correct in thinking the rst module does not process the "class"
> and "container" directives?

When I wrote the module I was working with the reST spec [0] and
the syntax reference [1]. It’s been a while, but afair I
implemented the spec completely (with the limitations described
in the manual). It does not, to my knowledge, define the
directives you mention and I don’t know what they’re supposed to
do.

(Btw. like much of the spec, “container” and “class” sound
suspiciously HTML-specific. If that is true, they address one
output markup which happens to be -- not Context! I might find
the time to add a simple wrapper for the container thingy (to
boxes or framed?). However, I doubt that it’s possible to
replicate the behavior of HTML divs + CSS without a larger effort
[2]. In this case it might be preferable to have docutils
generate some XML and directly typeset the result with Context.)

Best regards
Philipp

[0] http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html
[1] http://docutils.sourceforge.net/docs/user/rst/quickref.html
[2] Also, I have reservations against such a step. My main reason
    for choosing reST over its competitors like md or wikitext is
    actually that it does not allow for inline HTML.


> I looked through the Lua source and didn't see anyplace where these
> directives are processed although I will be the first to admit I
> don't know much about Lua. I retired from software development
> before Lua became popular and never bothered to learn it. Assembler,
> FORTRAN, C, SQL, PL/SQL, Perl.... I know or knew, Lua I do not. :)
> 
> I use these directives heavily and pandoc ignores them so I'm
> beginning to think I have a problem generating EPUB + ConTeXt +
> HTML(5) versions of the same document from common rst source.
> 
> Thanks!  All information and suggestions welcome.
> 
> -- 
> Bill Meahan
> Westland, Michigan USA
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-12  0:31 ` Philipp Gesang
@ 2013-03-12 12:28   ` Bill Meahan
  2013-03-12 20:23     ` Philipp Gesang
  0 siblings, 1 reply; 14+ messages in thread
From: Bill Meahan @ 2013-03-12 12:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Philipp Gesang wrote:
> Hi Bill.
>
> ···<date: 2013-03-11, Monday>···<from: Bill Meahan>···
>
>> Am I correct in thinking the rst module does not process the "class"
>> and "container" directives?
> When I wrote the module I was working with the reST spec [0] and
> the syntax reference [1]. It’s been a while, but afair I
> implemented the spec completely (with the limitations described
> in the manual). It does not, to my knowledge, define the
> directives you mention and I don’t know what they’re supposed to
> do.
>
> (Btw. like much of the spec, “container” and “class” sound
> suspiciously HTML-specific. If that is true, they address one
> output markup which happens to be -- not Context! I might find
> the time to add a simple wrapper for the container thingy (to
> boxes or framed?). However, I doubt that it’s possible to
> replicate the behavior of HTML divs + CSS without a larger effort
> [2]. In this case it might be preferable to have docutils
> generate some XML and directly typeset the result with Context.)
>
> Best regards
> Philipp

Hi Philip

The .class and .container direectives are certainly there with *ML in mind but I think there might be analog situatins in ConTeXt.

.. class::  classname

	blah, blah, blah

exists to stick a class name on the following element for styling with an external stylesheet of some sort. CSS/CSS3 are probably the primary examles but other XML-bases markus apply just as well

.. class::classname

	blab, blab, blab

could yield

   <p class=classname>blab, blab, blab</p>
   <h2 class=classname>blab. blab, blab</h2>

or anything else that can take a class name attribute.

.. container:: containername

   Foo, bar, baz

   bunch of stuff

yields

   <div class=containername>

	foo, bar, baz

	bunch of stuff

   </div>

I would think ",, class:: "
ought to map quite well in ConTeXt:

   \setupsomething [classname] [attributelist]

    \startclassname

      Whatever

    \stopclassname

for suitable values of "something"


.. container:: probably maps to something like \frame[containername]
although frames as such cannot cross page boundaries. Perhaps there is (or could be) a more suitable construct. I'm trying to be exemplary not directive. :)

ConTeXt environment files are certainly analogus to CSS files and are used with the same end goals in mind.

"styling" markup elements through "class=" or equivalent is rapidly becoming the order of the day for a wide variety of documents. Certainly (X)HTML, epub2, epub3, ODT, DOCX and an increasing horde of others are either there or heading there very soon.


Am I way off base here?


-- 
Bill Meahan
Westland, Michigan USA

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-12 12:28   ` Bill Meahan
@ 2013-03-12 20:23     ` Philipp Gesang
  2013-03-12 20:57       ` Aditya Mahajan
  0 siblings, 1 reply; 14+ messages in thread
From: Philipp Gesang @ 2013-03-12 20:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 5578 bytes --]

···<date: 2013-03-12, Tuesday>···<from: Bill Meahan>···

> Philipp Gesang wrote:
> >···<date: 2013-03-11, Monday>···<from: Bill Meahan>···
> >>Am I correct in thinking the rst module does not process the "class"
> >>and "container" directives?
> >When I wrote the module I was working with the reST spec [0] and
> >the syntax reference [1]. It’s been a while, but afair I
> >implemented the spec completely (with the limitations described
> >in the manual). It does not, to my knowledge, define the
> >directives you mention and I don’t know what they’re supposed to
> >do.
> >
> >(Btw. like much of the spec, “container” and “class” sound
> >suspiciously HTML-specific. If that is true, they address one
> >output markup which happens to be -- not Context! I might find
> >the time to add a simple wrapper for the container thingy (to
> >boxes or framed?). However, I doubt that it’s possible to
> >replicate the behavior of HTML divs + CSS without a larger effort
> >[2]. In this case it might be preferable to have docutils
> >generate some XML and directly typeset the result with Context.)
> >
> >Best regards
> >Philipp
> 
> The .class and .container direectives are certainly there with *ML in mind but I think there might be analog situatins in ConTeXt.
> 
> .. class::  classname
> 
> 	blah, blah, blah
> 
> exists to stick a class name on the following element for styling with an external stylesheet of some sort. CSS/CSS3 are probably the primary examles but other XML-bases markus apply just as well
> 
> .. class::classname
> 
> 	blab, blab, blab
> 
> could yield
> 
>   <p class=classname>blab, blab, blab</p>
>   <h2 class=classname>blab. blab, blab</h2>
> 
> or anything else that can take a class name attribute.

From its description [0], the “class” directive appears to be
next to meaningless outside an HTML context. It’s supposed to set
“classes”. The doctree spec [1] explicitly states that “The
classes attribute's contents should be ignorable.”

To my knowledge, the closest thing in Context to CSS classes is
the “setups=” parameter. All macros don’t accept it, though, so
I can’t think of a general way of handling it. The list of macros
where it applies would have to be hardcoded ...

Docutils’ latex2 writer -- the reference implementation, mind
you -- btw. doesn’t take the “class” directive seriously at all:
it handles paragraphs but ignores it e.g. for section heads.

> .. container:: containername
> 
>   Foo, bar, baz
> 
>   bunch of stuff
> 
> yields
> 
>   <div class=containername>
> 
> 	foo, bar, baz
> 
> 	bunch of stuff
> 
>   </div>
> 
> .. container:: probably maps to something like
> \frame[containername]

> although frames as such cannot cross page boundaries. Perhaps
> there is (or could be) a more suitable construct. I'm trying to
> be exemplary not directive. :)

Fyi [2]: “container” is docutils for “div”. How’s a “div”
supposed to look? That depends on your browser (not the spec!),
and the HTML version being used (XHTML 1.1 for python2-docutils).
What does that mean for non-HTML targets? Apparently nothing:
again, docutils ignore the directive when writing LaTeX (and man
pages, for that matter).

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

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

So if there’s no \xyzzy, the contents are treated as a simple
group. Unnamed containers default to \framed. Let me know what
you think. The code is at:

  https://bitbucket.org/phg/context-rst/get/0df50df9c8fb.zip

> ConTeXt environment files are certainly analogus to CSS files and are used with the same end goals in mind.
> 
> "styling" markup elements through "class=" or equivalent is
> rapidly becoming the order of the day for a wide variety of
> documents. Certainly (X)HTML, epub2, epub3, ODT, DOCX and an
> increasing horde of others are either there or heading there very
> soon.

Sure. I have no problem with that as long as it stays
implementation-agnostic.

Thanks for the feedback.
Philipp



[0] http://docutils.sourceforge.net/docs/ref/rst/directives.html#class
[1] http://docutils.sourceforge.net/docs/ref/doctree.html#classes
[2] http://docutils.sourceforge.net/docs/ref/rst/directives.html#container


> 
-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-12 20:23     ` Philipp Gesang
@ 2013-03-12 20:57       ` Aditya Mahajan
  2013-03-12 21:42         ` Philipp Gesang
  0 siblings, 1 reply; 14+ messages in thread
From: Aditya Mahajan @ 2013-03-12 20:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1918 bytes --]

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

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-12 20:57       ` Aditya Mahajan
@ 2013-03-12 21:42         ` Philipp Gesang
  2013-03-12 23:21           ` Aditya Mahajan
  0 siblings, 1 reply; 14+ messages in thread
From: Philipp Gesang @ 2013-03-12 21:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1565 bytes --]

···<date: 2013-03-12, Tuesday>···<from: Aditya Mahajan>···

> On Tue, 12 Mar 2013, Philipp Gesang wrote:
> 
> A better way to handle this is to provide macros \startRSTcontainer
> ... \stopRSTcontainer and translate the above to

I considered adding a generator \defineRSTcontainer with the
usual interface (e.g. [command=\framed,frame=on]). This won’t
work because the output is supposed to be a self-contained
document. The goal is for the output to consist of ordinary
Context macros only so it can be imported without loading further
code. (I’m undecided regarding the requirement of the “\RST...”
prefix, though.)

> \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),

They are defined as HTML div’s.

>                               providing such a container might be as
> simple as
> 
> \let\startRSTcontainer=\startframedtext
> \let\stopRSTcontainer=\stopframedtext
> 
> or
> 
> \let\startRSTcontainer=\startparagraph
> \let\stopRSTcontainer=\stopparagraph

Honestly, I have no idea. Depending on the style sheet a div can
be a float or aligned or have a shaded background. The current
approach leaves the implementation to the user.

Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-12 21:42         ` Philipp Gesang
@ 2013-03-12 23:21           ` Aditya Mahajan
  2013-03-14  7:32             ` Keith J. Schultz
                               ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Aditya Mahajan @ 2013-03-12 23:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2208 bytes --]

On Tue, 12 Mar 2013, Philipp Gesang wrote:

> ···<date: 2013-03-12, Tuesday>···<from: Aditya Mahajan>···
>
>> On Tue, 12 Mar 2013, Philipp Gesang wrote:
>>
>> A better way to handle this is to provide macros \startRSTcontainer
>> ... \stopRSTcontainer and translate the above to
>
> I considered adding a generator \defineRSTcontainer with the
> usual interface (e.g. [command=\framed,frame=on]). This won’t
> work because the output is supposed to be a self-contained
> document. The goal is for the output to consist of ordinary
> Context macros only so it can be imported without loading further
> code. (I’m undecided regarding the requirement of the “\RST...”
> prefix, though.)

Personally, I think that it is reasonable to expect the users to import a 
module.

> Honestly, I have no idea. Depending on the style sheet a div can
> be a float or aligned or have a shaded background. The current
> approach leaves the implementation to the user.

Another option is to change the generated output to

     \start[xyzzy]
     ....
     \stop

When the environment xyzzy exists, this is (supposed to be, see below) 
equivalent to

     \startxyzzy
     ....
     \stopxyzzy

otherwise, this is equivalent to

     \bgroup
     ....
     \egroup

This way, you maintain your goal of having output that runs out of the 
box, but at the same time generate readable code. It can then be left upto 
the user to define the xyzzy environment (Of course, this method does not 
support passing arguments to environment, but then neither does your 
proposed solution).

@Hans, there is a bug in core-sys.mkiv: There is a missing \expandafter, and
currentstartstop should be changed to m_syst_start_stop.

\def\syst_start_yes[#1]%
   {\edef\m_syst_start_stop{#1}%
    \ifx\m_syst_start_stop\empty
      \let\syst_stop_indeed\donothing
    \else\ifcsname\e!start\m_syst_start_stop\endcsname
      \expandafter\let\expandafter\syst_stop_indeed\csname\e!stop\m_syst_start_stop\endcsname
      \csname\e!start\m_syst_start_stop\expandafter\expandafter\expandafter\endcsname
    \else
      \let\syst_stop_indeed\donothing
    \fi\fi}

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-12 23:21           ` Aditya Mahajan
@ 2013-03-14  7:32             ` Keith J. Schultz
  2013-03-14 16:02             ` Bug in \start (Re: reStructuredText module) Aditya Mahajan
  2013-03-14 17:17             ` reStructuredText module Philipp Gesang
  2 siblings, 0 replies; 14+ messages in thread
From: Keith J. Schultz @ 2013-03-14  7:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi All,

following this thread and with my beginners knowledge of
ConTeXt, I would say that div or container from RST should
be mapped to a combination in ConTeXt. 
Though I do admit that I have not looked into combinations
yet.

regards
	Keith.

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Bug in \start (Re:  reStructuredText module)
  2013-03-12 23:21           ` Aditya Mahajan
  2013-03-14  7:32             ` Keith J. Schultz
@ 2013-03-14 16:02             ` Aditya Mahajan
  2013-03-14 16:54               ` Hans Hagen
  2013-03-14 17:17             ` reStructuredText module Philipp Gesang
  2 siblings, 1 reply; 14+ messages in thread
From: Aditya Mahajan @ 2013-03-14 16:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Reposting this, as I think that it was missed in the previous thread. It 
is still present in the current beta.

On Tue, 12 Mar 2013, Aditya Mahajan wrote:

> @Hans, there is a bug in core-sys.mkiv: There is a missing \expandafter, and
> currentstartstop should be changed to m_syst_start_stop.
>
> \def\syst_start_yes[#1]%
>  {\edef\m_syst_start_stop{#1}%
>   \ifx\m_syst_start_stop\empty
>     \let\syst_stop_indeed\donothing
>   \else\ifcsname\e!start\m_syst_start_stop\endcsname
>     \expandafter\let\expandafter\syst_stop_indeed\csname\e!stop\m_syst_start_stop\endcsname
>     \csname\e!start\m_syst_start_stop\expandafter\expandafter\expandafter\endcsname
>   \else
>     \let\syst_stop_indeed\donothing
>   \fi\fi}
>
> 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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Bug in \start (Re:  reStructuredText module)
  2013-03-14 16:02             ` Bug in \start (Re: reStructuredText module) Aditya Mahajan
@ 2013-03-14 16:54               ` Hans Hagen
  0 siblings, 0 replies; 14+ messages in thread
From: Hans Hagen @ 2013-03-14 16:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 3/14/2013 5:02 PM, Aditya Mahajan wrote:
> Reposting this, as I think that it was missed in the previous thread. It
> is still present in the current beta.
>
> On Tue, 12 Mar 2013, Aditya Mahajan wrote:
>
>> @Hans, there is a bug in core-sys.mkiv: There is a missing
>> \expandafter, and
>> currentstartstop should be changed to m_syst_start_stop.
>>
>> \def\syst_start_yes[#1]%
>>  {\edef\m_syst_start_stop{#1}%
>>   \ifx\m_syst_start_stop\empty
>>     \let\syst_stop_indeed\donothing
>>   \else\ifcsname\e!start\m_syst_start_stop\endcsname
>>
>> \expandafter\let\expandafter\syst_stop_indeed\csname\e!stop\m_syst_start_stop\endcsname
>>
>>
>> \csname\e!start\m_syst_start_stop\expandafter\expandafter\expandafter\endcsname
>>
>>   \else
>>     \let\syst_stop_indeed\donothing
>>   \fi\fi}

you can check again

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-12 23:21           ` Aditya Mahajan
  2013-03-14  7:32             ` Keith J. Schultz
  2013-03-14 16:02             ` Bug in \start (Re: reStructuredText module) Aditya Mahajan
@ 2013-03-14 17:17             ` Philipp Gesang
  2013-03-14 17:40               ` Marco Patzer
  2 siblings, 1 reply; 14+ messages in thread
From: Philipp Gesang @ 2013-03-14 17:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1615 bytes --]

···<date: 2013-03-12, Tuesday>···<from: Aditya Mahajan>···

> On Tue, 12 Mar 2013, Philipp Gesang wrote:
> 
> >···<date: 2013-03-12, Tuesday>···<from: Aditya Mahajan>···
> >
> >>On Tue, 12 Mar 2013, Philipp Gesang wrote:
> >>
> >>A better way to handle this is to provide macros \startRSTcontainer
> >>... \stopRSTcontainer and translate the above to
> >
> >I considered adding a generator \defineRSTcontainer with the
> >usual interface (e.g. [command=\framed,frame=on]). This won’t
> >work because the output is supposed to be a self-contained
> >document. The goal is for the output to consist of ordinary
> >Context macros only so it can be imported without loading further
> >code. (I’m undecided regarding the requirement of the “\RST...”
> >prefix, though.)
> 
> Personally, I think that it is reasonable to expect the users to
> import a module.
> 
> >Honestly, I have no idea. Depending on the style sheet a div can
> >be a float or aligned or have a shaded background. The current
> >approach leaves the implementation to the user.
> 
> Another option is to change the generated output to
> 
>     \start[xyzzy]
>     ....
>     \stop
> 
> When the environment xyzzy exists, this is (supposed to be, see
> below) equivalent to
> 
>     \startxyzzy
>     ....
>     \stopxyzzy
> 
> otherwise, this is equivalent to
> 
>     \bgroup
>     ....
>     \egroup

Now that it’s fixed: Thanks for the pointer. I’ve been using
\start...\stop as a synonym for grouping for ages but never
realized it could take an argument.

Philipp


[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-14 17:17             ` reStructuredText module Philipp Gesang
@ 2013-03-14 17:40               ` Marco Patzer
  2013-03-14 17:57                 ` Hans Hagen
  2013-03-14 20:02                 ` Aditya Mahajan
  0 siblings, 2 replies; 14+ messages in thread
From: Marco Patzer @ 2013-03-14 17:40 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 195 bytes --]

On 2013–03–14 Philipp Gesang wrote:

> I’ve been using \start...\stop as a synonym for grouping for ages
> but never realized it could take an argument.

You're not alone :)

Marco

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-14 17:40               ` Marco Patzer
@ 2013-03-14 17:57                 ` Hans Hagen
  2013-03-14 20:02                 ` Aditya Mahajan
  1 sibling, 0 replies; 14+ messages in thread
From: Hans Hagen @ 2013-03-14 17:57 UTC (permalink / raw)
  To: ntg-context

On 3/14/2013 6:40 PM, Marco Patzer wrote:
> On 2013–03–14 Philipp Gesang wrote:
>
>> I’ve been using \start...\stop as a synonym for grouping for ages
>> but never realized it could take an argument.
>
> You're not alone :)

I'm pretty sure that there's more that is unknown ...

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: reStructuredText module
  2013-03-14 17:40               ` Marco Patzer
  2013-03-14 17:57                 ` Hans Hagen
@ 2013-03-14 20:02                 ` Aditya Mahajan
  1 sibling, 0 replies; 14+ messages in thread
From: Aditya Mahajan @ 2013-03-14 20:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 340 bytes --]

On Thu, 14 Mar 2013, Marco Patzer wrote:

> On 2013–03–14 Philipp Gesang wrote:
>
>> I’ve been using \start...\stop as a synonym for grouping for ages
>> but never realized it could take an argument.
>
> You're not alone :)

What! You guys don't the most comprehensive documentation of ConTeXt! The 
source code :)

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-03-14 20:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-11 23:28 reStructuredText module Bill Meahan
2013-03-12  0:31 ` Philipp Gesang
2013-03-12 12:28   ` Bill Meahan
2013-03-12 20:23     ` Philipp Gesang
2013-03-12 20:57       ` Aditya Mahajan
2013-03-12 21:42         ` Philipp Gesang
2013-03-12 23:21           ` Aditya Mahajan
2013-03-14  7:32             ` Keith J. Schultz
2013-03-14 16:02             ` Bug in \start (Re: reStructuredText module) Aditya Mahajan
2013-03-14 16:54               ` Hans Hagen
2013-03-14 17:17             ` reStructuredText module Philipp Gesang
2013-03-14 17:40               ` Marco Patzer
2013-03-14 17:57                 ` Hans Hagen
2013-03-14 20:02                 ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).