ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* What do \start and \stop mean?
@ 2013-09-30 15:38 Lars Huttar
  2013-09-30 15:44 ` Aditya Mahajan
  2013-09-30 16:00 ` luigi scarso
  0 siblings, 2 replies; 5+ messages in thread
From: Lars Huttar @ 2013-09-30 15:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I found \start and \stop referenced in the context reference manual
(e.g. section 5.5).
While \startXYZ - \stopXYZ pairs are discussed earlier, I can't find any
place that \start and \stop (with no suffix) are described.
They seem to be used like \bgroup and \egroup. Is that right?
They are defined in core-sys.mkiv, but I can't figure out from there
what they actually do.

I'll contribute documentation for them if someone can tell me what they
mean.

Thanks,
Lars


___________________________________________________________________________________
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] 5+ messages in thread

* Re: What do \start and \stop mean?
  2013-09-30 15:38 What do \start and \stop mean? Lars Huttar
@ 2013-09-30 15:44 ` Aditya Mahajan
  2013-09-30 17:53   ` Lars Huttar
  2013-09-30 16:00 ` luigi scarso
  1 sibling, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2013-09-30 15:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 30 Sep 2013, Lars Huttar wrote:

> I found \start and \stop referenced in the context reference manual
> (e.g. section 5.5).
> While \startXYZ - \stopXYZ pairs are discussed earlier, I can't find any
> place that \start and \stop (with no suffix) are described.
> They seem to be used like \bgroup and \egroup. Is that right?
> They are defined in core-sys.mkiv, but I can't figure out from there
> what they actually do.

(Untested, based on what I remember):

\start = \bgroup
\stop  = \egroup

but \start scans the next argument, so there are situations when 
\start may fail but \bgroup works.

\start[whatever] ... \stop = \startwhatever ... \stopwhatever


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] 5+ messages in thread

* Re: What do \start and \stop mean?
  2013-09-30 15:38 What do \start and \stop mean? Lars Huttar
  2013-09-30 15:44 ` Aditya Mahajan
@ 2013-09-30 16:00 ` luigi scarso
  2013-09-30 16:32   ` luigi scarso
  1 sibling, 1 reply; 5+ messages in thread
From: luigi scarso @ 2013-09-30 16:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Mon, Sep 30, 2013 at 5:38 PM, Lars Huttar <lars_huttar@sil.org> wrote:

> I found \start and \stop referenced in the context reference manual
> (e.g. section 5.5).
> While \startXYZ - \stopXYZ pairs are discussed earlier, I can't find any
> place that \start and \stop (with no suffix) are described.
> They seem to be used like \bgroup and \egroup. Is that right?
> They are defined in core-sys.mkiv, but I can't figure out from there
> what they actually do.
>
> I'll contribute documentation for them if someone can tell me what they
> mean.
>
> Thanks,
> Lars
>




core-sys.mkiv :


\unexpanded\def\start
  {\dosingleempty\syst_start}

\def\syst_start
  {\bgroup
   \iffirstargument
     \expandafter\syst_start_yes
   \else
     \expandafter\syst_start_nop
   \fi}

\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}

\def\syst_start_nop[#1]%
  {\let\syst_stop_indeed\donothing}

\unexpanded\def\stop
  {\syst_stop_indeed
   \egroup}


(it should be \let\donothing\empty)



-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 1925 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] 5+ messages in thread

* Re: What do \start and \stop mean?
  2013-09-30 16:00 ` luigi scarso
@ 2013-09-30 16:32   ` luigi scarso
  0 siblings, 0 replies; 5+ messages in thread
From: luigi scarso @ 2013-09-30 16:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Mon, Sep 30, 2013 at 6:00 PM, luigi scarso <luigi.scarso@gmail.com>wrote:

>
>
>
> On Mon, Sep 30, 2013 at 5:38 PM, Lars Huttar <lars_huttar@sil.org> wrote:
>
>> I found \start and \stop referenced in the context reference manual
>> (e.g. section 5.5).
>> While \startXYZ - \stopXYZ pairs are discussed earlier, I can't find any
>> place that \start and \stop (with no suffix) are described.
>> They seem to be used like \bgroup and \egroup. Is that right?
>> They are defined in core-sys.mkiv, but I can't figure out from there
>> what they actually do.
>>
>> I'll contribute documentation for them if someone can tell me what they
>> mean.
>>
>> Thanks,
>> Lars
>>
>
>
>
>
> core-sys.mkiv :
>
>
> \unexpanded\def\start
>   {\dosingleempty\syst_start}
>
> \def\syst_start
>   {\bgroup
>    \iffirstargument
>      \expandafter\syst_start_yes
>    \else
>      \expandafter\syst_start_nop
>    \fi}
>
> \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}
>
> \def\syst_start_nop[#1]%
>   {\let\syst_stop_indeed\donothing}
>
> \unexpanded\def\stop
>   {\syst_stop_indeed
>    \egroup}
>
>
> (it should be \let\donothing\empty)
>
> sorry, hit return too early.
\start <...> \stop without argument is

\bgroup % from\def\syst_start
\expandafter\syst_start_nop

\syst_start_nop is
{\let\syst_stop_indeed\donothing}

and \stop is hence
\syst_stop_indeed
\egroup
i.e.
\donothing
\egroup


are like \bgroup <...> \egroup

It seems that there are no examples of \start[]<..>\stop .

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 3057 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] 5+ messages in thread

* Re: What do \start and \stop mean?
  2013-09-30 15:44 ` Aditya Mahajan
@ 2013-09-30 17:53   ` Lars Huttar
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Huttar @ 2013-09-30 17:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 9/30/2013 11:44 AM, Aditya Mahajan wrote:
> On Mon, 30 Sep 2013, Lars Huttar wrote:
>
>> I found \start and \stop referenced in the context reference manual
>> (e.g. section 5.5).
>> While \startXYZ - \stopXYZ pairs are discussed earlier, I can't find any
>> place that \start and \stop (with no suffix) are described.
>> They seem to be used like \bgroup and \egroup. Is that right?
>> They are defined in core-sys.mkiv, but I can't figure out from there
>> what they actually do.
>
> (Untested, based on what I remember):
>
> \start = \bgroup
> \stop  = \egroup
>
> but \start scans the next argument, so there are situations when
> \start may fail but \bgroup works.
>
> \start[whatever] ... \stop = \startwhatever ... \stopwhatever
>

Ouch, that sounds like two very different behaviors, depending on
whether an argument is present.


I think I'll document \start at
    http://wiki.contextgarden.net/Command/start
but take the usage of it out of the ref man's examples, replacing it
with { and }, as long as the examples still work. It's not important to
any of the examples.

Thanks, Aditya and Luigi, for the quick assist.

Lars


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

___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2013-09-30 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-30 15:38 What do \start and \stop mean? Lars Huttar
2013-09-30 15:44 ` Aditya Mahajan
2013-09-30 17:53   ` Lars Huttar
2013-09-30 16:00 ` luigi scarso
2013-09-30 16:32   ` luigi scarso

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).