ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: Michal Kvasnicka <qasar@econ.muni.cz>, Context <ntg-context@ntg.nl>
Subject: Re: New \setup... / sgml processing
Date: Tue, 29 Aug 2000 13:31:38 +0200	[thread overview]
Message-ID: <3.0.6.32.20000829133138.017ab350@pop.wxs.nl> (raw)
In-Reply-To: <39AAB9F1.48A5D847@pobox.com>

Hi Michal and Berend, 

Concerning sgml or more general ml processing, I can say that for some
years now I've tried several approached to this. Basically, there are the
following alternatives, all of which I've implemented with more or less
success: 

1 convert the <> things into \begML[command][args] \endML[command] things
and provide ways to handle the command
2 directly let tex interpret <> things and map those to tex commands
3 use an xsl processor (xt, perl) and an xsl style sheet to convert the
file to one with tex commands

None of these methos is complicated to implement. There should be methods
for handling and mapping sttributes, picking up arguments, either delimited
or not, and most complicated of all, handle nested delimited commands,
[needed for nested tables]. 

Now, if one has complete control over the input, it's not so much a
problem, but take for instance html, where one find all kind of strange
usages (think of dl's with one dt and many dd's) you should really have
access to all kind of trickery. 

The best way so far seems to be 

(1) convert the input into a more robust intermediate format
(2) process the resulting data directly

which is why I'm currently playing with something 

(1) define basic transformation in the tex style [<> => tex] 
(2) generate xsl style sheets that handle the transformation into tex
(3) if needed convert documents at runtime, which can then even be done
under different regimes
(4) provide methods to handle delimited and grouped commands

if there is enoigh interest for this, we may consider starting a discussion
on this. 

Hans   

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


  reply	other threads:[~2000-08-29 11:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-28 15:42 New \setup Michal Kvasnicka
2000-08-28 19:13 ` Berend de Boer
2000-08-29 11:31   ` Hans Hagen [this message]
2000-08-29 17:24     ` New \setup... / sgml processing Berend de Boer
2000-08-29 22:04       ` Hans Hagen
2000-08-30 10:23       ` Michal Kvasnicka
2000-08-30 12:16         ` Hans Hagen
2000-08-30 13:37     ` Johannes Huesing
2000-08-31 11:03       ` Radhakrishnan C V

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=3.0.6.32.20000829133138.017ab350@pop.wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    --cc=qasar@econ.muni.cz \
    /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).