ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: XML pretty printer?
Date: Sun, 21 Nov 2010 12:58:21 +0100	[thread overview]
Message-ID: <4CE9095D.5030807@wxs.nl> (raw)
In-Reply-To: <4CE8242E.30306@nibua-r.org>

On 20-11-2010 8:40, Renaud AUBIN wrote:

> I have a first "operational" version of my lpeg-based xml pretty
> printer: http://www.nibua-r.org/gitsnap/pret-xml/
> "operational" means:

A remark:

I'm currently replacing the current pretty printing interface
and the new infrastructure is based on lpeg (which was not around when I 
did the first implementation). This is part of the work on cld (where 
verbatim has its own niche).

As I think that there are different demands for pretty printing it will 
be easier for users to plug in code. Also, there will be less tex code 
involved as the cld interface is used at the lua end, i.e. there are 
regular lua functions for dealing with it.

As you already are playing with pretty printing I'm sure that you will 
be able to plug in your code. But, naming is important and may not 
override the built in methods.

By default there will be the following pretty printers:

- v-tex
- v-metapost
- v-lua
- v-xml

These are dumb variants, insensitive for syntax errors which is handy 
for manuals. In addition there will be:

- v-lua-plus (name can change)
- v-xml-plus (name can change)

where the first one replaces the cdx code now used for documenting (so 
this targets at luigi) and can mix lua code with documentation. The 
second one is used by myself when documenting xml code and uses the 
built in parser.

Now, additional pretty printers can be plugged in as well (there is a 
register function for that) and can have names not starting with v-. 
Even better, they can be regular user modules, so in your case

   u-pretty-ra-xml.tex

or so will do. There are already some basic pretty lpeg helpers that 
will take care of (visualizing) spacing, lines, and more. In principle 
one can also mix pretty printers (so, lua code inside tex code and 
alike).

It also means that other pret-* code has to be adapted (and ends up in 
the u-pretty-* namespace).

Sorry for the inconvenience. More later.

Hans

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


      parent reply	other threads:[~2010-11-21 11:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12 20:22 Peter Davis
2010-11-13 11:13 ` Renaud AUBIN
2010-11-13 11:23 ` Renaud AUBIN
2010-11-13 12:52   ` Peter Davis
2010-11-13 13:28     ` Another Correspendence question Russell Urquhart
2010-11-13 17:10       ` Florian Wobbe
2010-11-13 21:46         ` Russell Urquhart
2010-11-13 13:29     ` XML pretty printer? Renaud AUBIN
2010-11-13 18:39       ` Renaud AUBIN
2010-11-13 20:18         ` Thomas Schmitz
2010-11-13 20:32           ` Renaud AUBIN
2010-11-13 20:40             ` Thomas Schmitz
2010-11-13 20:46               ` Renaud AUBIN
2010-11-14 22:54                 ` Renaud AUBIN
2010-11-20 19:40                   ` Renaud AUBIN
2010-11-20 20:11                     ` Renaud AUBIN
2010-11-20 21:43                       ` Renaud AUBIN
2010-11-21 11:58                     ` Hans Hagen [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=4CE9095D.5030807@wxs.nl \
    --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).