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
___________________________________________________________________________________

Reply via email to