ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Rogers, Michael K" <mroge02@emory.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: clutter with \start and \stop
Date: Thu, 5 Jul 2012 13:40:57 +0000	[thread overview]
Message-ID: <50A97F1E-3B94-4737-A1F0-F31A4D65AC7C@emory.edu> (raw)
In-Reply-To: <CAG5iGsASbsMW3JBv9GPp-XffjKA1cuQdtjVUSHRutPYYRK+bsA@mail.gmail.com>


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


On Jul 5, 2012, at 1:23 AM, luigi scarso wrote:
On Thu, Jul 5, 2012 at 12:44 AM, Rogers, Michael K <mroge02@emory.edu<mailto:mroge02@emory.edu>> wrote:
XML documents should form a tree, so a structure like

\startA % <A>
\startB % <B>
\stopA % </A>
\stopB % </B>

won't translate to XML.

Grouping in TeX follows the same restrictions, and \start... and \stop... behave like \begingroup and \endgroup.  The \stop... is supposed to restore the state before the corresponding \start... (at least I assume so -- \endgroup works that way).  One cannot stop A in the middle of B and return to the state before \startA without also stopping B.  So one should put \stopB before \stopA, not after it.

It depends.

\starttext
\long\def\startA#1\stopA{<\low{A}#1>\low{A}}
\long\def\startB#1\stopB{<\low{B}#1>\low{B}}

\startA
textAA
\startB
textAB
\stopA
textBB
\stopB
\stoptext


is ok  (not the context way, btw: real code is more complex).


The meaning of this can be
content of \startA..\stopA = textAA ⋃ textAB
content of \startB..\stopB = textAB ⋃ textBB
\startA..\stopA ⋂  \startB..\stopB = textAB

If we are describing programs, textAB can be the common code between the function A and B.



--
luigi

Again, I agree with what you write.  Somewhere I must have expressed myself poorly and I apologize.  It seems like a side issue (my issue with XML), and I did not mean to hijack the thread.  Sorry.

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).

[-- Attachment #1.2: Type: text/html, Size: 3226 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
___________________________________________________________________________________

      reply	other threads:[~2012-07-05 13:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03 22:51 Peter Münster
2012-07-04  8:07 ` Hans Hagen
2012-07-04 20:29   ` Peter Münster
2012-07-04 21:49     ` Hans Hagen
2012-07-04 22:44     ` Rogers, Michael K
2012-07-05  4:42       ` Peter Münster
2012-07-05  5:42         ` Rogers, Michael K
2012-07-05  5:56       ` luigi scarso
2012-07-05  7:16         ` Rogers, Michael K
2012-07-05  8:23       ` luigi scarso
2012-07-05 13:40         ` Rogers, Michael K [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A97F1E-3B94-4737-A1F0-F31A4D65AC7C@emory.edu \
    --to=mroge02@emory.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).