ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context <ntg-context@ntg.nl>
Subject: Re: XML processing
Date: Mon, 26 Aug 2002 21:25:16 +0200	[thread overview]
Message-ID: <5.1.0.14.1.20020826212104.02030810@remote-1> (raw)
In-Reply-To: <20020826205312.B649@scaprea>

At 08:53 PM 8/26/2002 +0200, Simon Pepping wrote:
>On Mon, Aug 26, 2002 at 12:33:44PM +0100, Robbie Pickering wrote:
> > We have for example definitions DEFN which are sometimes followed by an
> > example EGPH and sometimes not.
> >
> > ...
> > <DNUM>3</DNUM>
> > <DEFN>a large body, esp. of a person</DEFN>
> > <EGPH>he eased his bulk out of the chair</EGPH>
> > <DNUM>4</DNUM>
> > <DEFN>unpackaged cargo or goods</DEFN>
> >
> > I have setup DEFN very simply
> >
> > \defineXMLenvironment [DEFN] {}{.}
> > to add a full stop after the definition. It would be nice, though, to be
> > able to automatically add a colon instead in those cases where the DEFN
> > environment is immediately followed by a EGPH.
>
>This is very difficult, because your tagging has no moment at which
>this can be concluded: </DEFN> is too early to know, but when there is
>no following EGPH, there is nothing that can trigger the period or
>colon. It would be easier if the whole definition would be in a
>container: <definition><DNUM/><DEFN/><EGPH/></definition>. Then you
>can save EGPH, and </definition> could typeset it with preceding
>colon, or it could typeset a period.

actually, there is a trick:

say that you add a signal:

\newsignal\MySignal

bla bla\hskip\MySignal

then you can test for this signal:

\ifdim\lastskip\MySignal
   ...
\else
   ...
\fi

so, here EGPH should do the test, and DEFN add the skip

of course a little bit of hmode testing and removing of spaces helps

[if needed i can make a mechanism for that since i use it myself occasionally]

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


  reply	other threads:[~2002-08-26 19:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-26 11:33 Robbie Pickering
2002-08-26 14:40 ` Hans Hagen
2002-08-26 18:53 ` Simon Pepping
2002-08-26 19:25   ` Hans Hagen [this message]
2003-05-20 16:35 XML Processing Alexandre Enkerli
2003-05-21  8:11 ` Berend de Boer
2003-05-21 19:56 ` Simon Pepping
2003-05-21 20:12 ` Johannes Hüsing
2003-05-23 12:46   ` Hans Hagen
2011-12-31 20:55 xml processing Meer, H. van der
2012-01-01 12:14 ` Hans Hagen

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=5.1.0.14.1.20020826212104.02030810@remote-1 \
    --to=pragma@wxs.nl \
    --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).