ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* XML pretty printer?
@ 2010-11-12 20:22 Peter Davis
  2010-11-13 11:13 ` Renaud AUBIN
  2010-11-13 11:23 ` Renaud AUBIN
  0 siblings, 2 replies; 18+ messages in thread
From: Peter Davis @ 2010-11-12 20:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Anybody have an XML pretty printer ConTeXt document?  That would make a
great example of generic XML processing.

Thanks,
-pd

[-- Attachment #1.2: Type: text/html, Size: 176 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-12 20:22 XML pretty printer? Peter Davis
@ 2010-11-13 11:13 ` Renaud AUBIN
  2010-11-13 11:23 ` Renaud AUBIN
  1 sibling, 0 replies; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-13 11:13 UTC (permalink / raw)
  To: ntg-context


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

I'm currently working on a pret-xml.lua if you are interested…
I have started it last year, forgot it, then began to rewrite it from
scratch last week…
I would like to obtain a rendering similar to oXygen xml.

That is a work in progress, but you can check it out:
http://www.nibua-r.org/gitsnap/pret-xml/

Le 12/11/2010 21:22, Peter Davis a écrit :
> Anybody have an XML pretty printer ConTeXt document?  That would make a
> great example of generic XML processing.
>
> Thanks,
> -pd
>
>   
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>   


[-- Attachment #1.2: Type: text/html, Size: 2026 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-12 20:22 XML pretty printer? Peter Davis
  2010-11-13 11:13 ` Renaud AUBIN
@ 2010-11-13 11:23 ` Renaud AUBIN
  2010-11-13 12:52   ` Peter Davis
  1 sibling, 1 reply; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-13 11:23 UTC (permalink / raw)
  To: ntg-context


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

Some precision. I don't think you could consider any pret-xml.lua as an
example of XML processing. What processing would you apply to your XML
file? Are considering to use directly lua to process your XML inputs?
Sorry, but that's not clear to me… You are certainly aware of the fact
that there is a plenty of SAX / XmlPulParser / CodeSynthesis Tree or
parser samples around on the www.

Renaud

Le 12/11/2010 21:22, Peter Davis a écrit :
> Anybody have an XML pretty printer ConTeXt document?  That would make a
> great example of generic XML processing.
>
> Thanks,
> -pd
>
>   
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>   


[-- Attachment #1.2: Type: text/html, Size: 2002 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  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 13:29     ` XML pretty printer? Renaud AUBIN
  0 siblings, 2 replies; 18+ messages in thread
From: Peter Davis @ 2010-11-13 12:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I was thinking of doing all the XML parsing in TeX/ConTeXt, so I was looking
for examples of that.  I'm still trying to learn my way around ConTeXt, and
XML handling in particular, so I thought a pretty printer would be a good
example.

Thank you!
-pd

On Sat, Nov 13, 2010 at 6:23 AM, Renaud AUBIN <aubin@nibua-r.org> wrote:

>  Some precision. I don't think you could consider any pret-xml.lua as an
> example of XML processing. What processing would you apply to your XML file?
> Are considering to use directly lua to process your XML inputs? Sorry, but
> that's not clear to me… You are certainly aware of the fact that there is a
> plenty of SAX / XmlPulParser / CodeSynthesis Tree or parser samples around
> on the www.
>
> Renaud
>
>
> Le 12/11/2010 21:22, Peter Davis a écrit :
>
> Anybody have an XML pretty printer ConTeXt document?  That would make a
> great example of generic XML processing.
>
> Thanks,
> -pd
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 1347 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Another Correspendence question
  2010-11-13 12:52   ` Peter Davis
@ 2010-11-13 13:28     ` Russell Urquhart
  2010-11-13 17:10       ` Florian Wobbe
  2010-11-13 13:29     ` XML pretty printer? Renaud AUBIN
  1 sibling, 1 reply; 18+ messages in thread
From: Russell Urquhart @ 2010-11-13 13:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Hi,

Another Correspondence question. In the default, I'd like the body text to be left justified rather than both left and right justified.

Does the 

\setupletterstyle [content][align=left]


do this? (or some form thereof)? I can't get this to work. 

Also, how can I have the 'Date' word not show up, just the actual date itself.

Thanks again.


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-13 12:52   ` Peter Davis
  2010-11-13 13:28     ` Another Correspendence question Russell Urquhart
@ 2010-11-13 13:29     ` Renaud AUBIN
  2010-11-13 18:39       ` Renaud AUBIN
  1 sibling, 1 reply; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-13 13:29 UTC (permalink / raw)
  To: ntg-context


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

I'm currently working on my pret-xml… just implementing attributes parsing…
I will upload that asap (even if my lua is… really bad ;) )

My two cents: depending of the complexity of the underlying data model
tranported by your xml medium, you should consider another tool
(xsltproc, saxon, xsdcxx, …) and integrate it in your production chain.

Could you describe in detail what your need is (in or off-list)?

Renaud

Le 13/11/2010 13:52, Peter Davis a écrit :
> I was thinking of doing all the XML parsing in TeX/ConTeXt, so I was looking
> for examples of that.  I'm still trying to learn my way around ConTeXt, and
> XML handling in particular, so I thought a pretty printer would be a good
> example.
>
> Thank you!
> -pd
>
> On Sat, Nov 13, 2010 at 6:23 AM, Renaud AUBIN <aubin@nibua-r.org> wrote:
>
>   
>>  Some precision. I don't think you could consider any pret-xml.lua as an
>> example of XML processing. What processing would you apply to your XML file?
>> Are considering to use directly lua to process your XML inputs? Sorry, but
>> that's not clear to me… You are certainly aware of the fact that there is a
>> plenty of SAX / XmlPulParser / CodeSynthesis Tree or parser samples around
>> on the www.
>>
>> Renaud
>>
>>
>> Le 12/11/2010 21:22, Peter Davis a écrit :
>>
>> Anybody have an XML pretty printer ConTeXt document?  That would make a
>> great example of generic XML processing.
>>
>> Thanks,
>> -pd
>>
>>
>>
>>     
>   
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>   


[-- Attachment #1.2: Type: text/html, Size: 3047 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Another Correspendence question
  2010-11-13 13:28     ` Another Correspendence question Russell Urquhart
@ 2010-11-13 17:10       ` Florian Wobbe
  2010-11-13 21:46         ` Russell Urquhart
  0 siblings, 1 reply; 18+ messages in thread
From: Florian Wobbe @ 2010-11-13 17:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Nov 13, 2010, at 14:28 , Russell Urquhart wrote:

> Hi,
> 
> Another Correspondence question. In the default, I'd like the body text to be left justified rather than both left and right justified.
> 
> Does the 
> 
> \setupletterstyle [content][align=left]

Hi,

\setupletterstyle [content]
                  [align=flushleft]

should do the trick.

> do this? (or some form thereof)? I can't get this to work.
> 
> Also, how can I have the 'Date' word not show up, just the actual date itself.

Do you mean the label in the reference line? Then try

\setuplabeltext[letter:date={}]

Florian

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-13 13:29     ` XML pretty printer? Renaud AUBIN
@ 2010-11-13 18:39       ` Renaud AUBIN
  2010-11-13 20:18         ` Thomas Schmitz
  0 siblings, 1 reply; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-13 18:39 UTC (permalink / raw)
  To: ntg-context


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

Hi folks,

My custom XML pretty printer: http://www.nibua-r.org/gitsnap/pret-xml/
A direct link to the sample:
http://www.nibua-r.org/gitsnap/pret-xml/pret-xml_test.pdf

I'm sorry, the lua code is quite bad but I will improve it as soon as I
will figure out how to implement functors…

Feel free to improve…

Renaud

Le 13/11/2010 14:29, Renaud AUBIN a écrit :
> I'm currently working on my pret-xml… just implementing attributes parsing…
> I will upload that asap (even if my lua is… really bad ;) )
>
> My two cents: depending of the complexity of the underlying data model
> tranported by your xml medium, you should consider another tool
> (xsltproc, saxon, xsdcxx, …) and integrate it in your production chain.
>
> Could you describe in detail what your need is (in or off-list)?
>
> Renaud
>
> Le 13/11/2010 13:52, Peter Davis a écrit :
>   
>> I was thinking of doing all the XML parsing in TeX/ConTeXt, so I was looking
>> for examples of that.  I'm still trying to learn my way around ConTeXt, and
>> XML handling in particular, so I thought a pretty printer would be a good
>> example.
>>
>> Thank you!
>> -pd
>>
>> On Sat, Nov 13, 2010 at 6:23 AM, Renaud AUBIN <aubin@nibua-r.org> wrote:
>>
>>   
>>     
>>>  Some precision. I don't think you could consider any pret-xml.lua as an
>>> example of XML processing. What processing would you apply to your XML file?
>>> Are considering to use directly lua to process your XML inputs? Sorry, but
>>> that's not clear to me… You are certainly aware of the fact that there is a
>>> plenty of SAX / XmlPulParser / CodeSynthesis Tree or parser samples around
>>> on the www.
>>>
>>> Renaud
>>>
>>>
>>> Le 12/11/2010 21:22, Peter Davis a écrit :
>>>
>>> Anybody have an XML pretty printer ConTeXt document?  That would make a
>>> great example of generic XML processing.
>>>
>>> Thanks,
>>> -pd
>>>
>>>
>>>
>>>     
>>>       
>>   
>>
>>
>> ___________________________________________________________________________________
>> 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
>> ___________________________________________________________________________________
>>   
>>     
>
>   
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>   


[-- Attachment #1.2: Type: text/html, Size: 4673 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-13 18:39       ` Renaud AUBIN
@ 2010-11-13 20:18         ` Thomas Schmitz
  2010-11-13 20:32           ` Renaud AUBIN
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Schmitz @ 2010-11-13 20:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, 13 Nov 2010 19:39:31 +0100
  Renaud AUBIN <aubin@nibua-r.org> wrote:
> Hi folks,
> 
> My custom XML pretty printer: 
>http://www.nibua-r.org/gitsnap/pret-xml/
> A direct link to the sample:
> http://www.nibua-r.org/gitsnap/pret-xml/pret-xml_test.pdf
> 
> I'm sorry, the lua code is quite bad but I will improve 
>it as soon as I
> will figure out how to implement functors…
> 
>Feel free to improve…
> 
> Renaud
> 
Pardon my ignorance, but where in your test file is your 
pretty printer invoked? Aren't the colors you get the 
default ConTeXt colors?

Thomas

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-13 20:18         ` Thomas Schmitz
@ 2010-11-13 20:32           ` Renaud AUBIN
  2010-11-13 20:40             ` Thomas Schmitz
  0 siblings, 1 reply; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-13 20:32 UTC (permalink / raw)
  To: ntg-context

The local pret-xml.lua is used when running context on pret-xml_test
from the basedir.
To get the original pret-xml.lua and check the differences, just rename
pret-xml.lua to pret-xml.new and re-run context…
You should see some differences between the good ol'pret-xml and the
draft of mine… I don't remember if that's due to my configuration or if
that's the default behavior…

The color used is indeed the default one… See my last post
"[NTG-context] Dummy buff-ver.mkiv question".

Renaud

Le 13/11/2010 21:18, Thomas Schmitz a écrit :
> On Sat, 13 Nov 2010 19:39:31 +0100
>  Renaud AUBIN <aubin@nibua-r.org> wrote:
>> Hi folks,
>>
>> My custom XML pretty printer: http://www.nibua-r.org/gitsnap/pret-xml/
>> A direct link to the sample:
>> http://www.nibua-r.org/gitsnap/pret-xml/pret-xml_test.pdf
>>
>> I'm sorry, the lua code is quite bad but I will improve it as soon as I
>> will figure out how to implement functors…
>>
>> Feel free to improve…
>>
>> Renaud
>>
> Pardon my ignorance, but where in your test file is your pretty
> printer invoked? Aren't the colors you get the default ConTeXt colors?
>
> Thomas
>
> ___________________________________________________________________________________
>
> 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
> ___________________________________________________________________________________
>

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-13 20:32           ` Renaud AUBIN
@ 2010-11-13 20:40             ` Thomas Schmitz
  2010-11-13 20:46               ` Renaud AUBIN
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Schmitz @ 2010-11-13 20:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, 13 Nov 2010 21:32:09 +0100
  Renaud AUBIN <aubin@nibua-r.org> wrote:
> The local pret-xml.lua is used when running context on 
>pret-xml_test
> from the basedir.
> To get the original pret-xml.lua and check the 
>differences, just rename
> pret-xml.lua to pret-xml.new and re-run context…
> You should see some differences between the good 
>ol'pret-xml and the
> draft of mine… I don't remember if that's due to my 
>configuration or if
> that's the default behavior…
> 
> The color used is indeed the default one… See my last 
>post
> "[NTG-context] Dummy buff-ver.mkiv question".
> 
> Renaud

Ah OK, now I see. But I don't think this is a good idea - 
creating your own file with the same name as files in the 
core. You should at least add a "t-" to the name so people 
see it's a "third party" addition.

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-13 20:40             ` Thomas Schmitz
@ 2010-11-13 20:46               ` Renaud AUBIN
  2010-11-14 22:54                 ` Renaud AUBIN
  0 siblings, 1 reply; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-13 20:46 UTC (permalink / raw)
  To: ntg-context

This is a draft for review, not yet even the beginning of a real third
party module…
As soon as I will integrate the reviews from interested people, I will
properly set the third module stuff…
Thank you for your advice.

Renaud

Le 13/11/2010 21:40, Thomas Schmitz a écrit :
> On Sat, 13 Nov 2010 21:32:09 +0100
>  Renaud AUBIN <aubin@nibua-r.org> wrote:
>> The local pret-xml.lua is used when running context on pret-xml_test
>> from the basedir.
>> To get the original pret-xml.lua and check the differences, just rename
>> pret-xml.lua to pret-xml.new and re-run context…
>> You should see some differences between the good ol'pret-xml and the
>> draft of mine… I don't remember if that's due to my configuration or if
>> that's the default behavior…
>>
>> The color used is indeed the default one… See my last post
>> "[NTG-context] Dummy buff-ver.mkiv question".
>>
>> Renaud
>
> Ah OK, now I see. But I don't think this is a good idea - creating
> your own file with the same name as files in the core. You should at
> least add a "t-" to the name so people see it's a "third party" addition.
>
> Thomas
> ___________________________________________________________________________________
>
> 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
> ___________________________________________________________________________________
>

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Another Correspendence question
  2010-11-13 17:10       ` Florian Wobbe
@ 2010-11-13 21:46         ` Russell Urquhart
  0 siblings, 0 replies; 18+ messages in thread
From: Russell Urquhart @ 2010-11-13 21:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

That did the trick! 

Thank you very much!


Russ


On Sat, Nov 13, 2010 at 06:10:42PM +0100, Florian Wobbe wrote:
> On Nov 13, 2010, at 14:28 , Russell Urquhart wrote:
> 
> > Hi,
> > 
> > Another Correspondence question. In the default, I'd like the body text to be left justified rather than both left and right justified.
> > 
> > Does the 
> > 
> > \setupletterstyle [content][align=left]
> 
> Hi,
> 
> \setupletterstyle [content]
>                   [align=flushleft]
> 
> should do the trick.
> 
> > do this? (or some form thereof)? I can't get this to work.
> > 
> > Also, how can I have the 'Date' word not show up, just the actual date itself.
> 
> Do you mean the label in the reference line? Then try
> 
> \setuplabeltext[letter:date={}]
> 
> Florian
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-13 20:46               ` Renaud AUBIN
@ 2010-11-14 22:54                 ` Renaud AUBIN
  2010-11-20 19:40                   ` Renaud AUBIN
  0 siblings, 1 reply; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-14 22:54 UTC (permalink / raw)
  To: ntg-context

Hi folks,

For imormation, I'm curently rewritting the pret-xml.lua file pointed on
that list previously… So don't miss too much time to review!

I'm using LPEG now and I hope to submit something operational last week
for those interested… The result will be far better than the previous
version…

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-14 22:54                 ` Renaud AUBIN
@ 2010-11-20 19:40                   ` Renaud AUBIN
  2010-11-20 20:11                     ` Renaud AUBIN
  2010-11-21 11:58                     ` Hans Hagen
  0 siblings, 2 replies; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-20 19:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi ConTeXters,

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

1 − That pretty printer will type only partially valid xml file
    <test></other> will be considered valid
    <test att="test"some invalid text /> is not considered valid
    …

2 − A real namespace management is missing, thus foons declarations will
be prettyfied as standard attribute and foo: will be processed just as
plain tag name.

3 − Endlines within CharData are not yet supported.

As I'm a lua and lpeg beginner, the code provided is not subtle nor
optimized…

That pretty printer is slightly different of standard pretty printer
since a lpeg grammar is applied on a full buffer, i.e. not on a
line-pre-line based approach. The main drawback, not verified, is that
if you have a huge xml file to process, it will just explode the stack…
An analogy: in memory tree xml vs. parser…

It's far from perfect but you are welcome to use, review and give feedbacks…

(… and OK, it's not packaged as a third party module yet…)

Renaud

Le 14/11/2010 23:54, Renaud AUBIN a écrit :
> Hi folks,
>
> For imormation, I'm curently rewritting the pret-xml.lua file pointed on
> that list previously… So don't miss too much time to review!
>
> I'm using LPEG now and I hope to submit something operational last week
> for those interested… The result will be far better than the previous
> version…
>
> Renaud
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>   

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  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
  1 sibling, 1 reply; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-20 20:11 UTC (permalink / raw)
  To: ntg-context

Ooops, it's not a detail but I need to precise that if the xml input is
not valid (from my custom pret-xml pov), nothing will be processed!

Renaud

Le 20/11/2010 20:40, Renaud AUBIN a écrit :
> Hi ConTeXters,
>
> I have a first "operational" version of my lpeg-based xml pretty
> printer: http://www.nibua-r.org/gitsnap/pret-xml/
> "operational" means:
>
> 1 − That pretty printer will type only partially valid xml file
>     <test></other> will be considered valid
>     <test att="test"some invalid text /> is not considered valid
>     …
>
> 2 − A real namespace management is missing, thus foons declarations will
> be prettyfied as standard attribute and foo: will be processed just as
> plain tag name.
>
> 3 − Endlines within CharData are not yet supported.
>
> As I'm a lua and lpeg beginner, the code provided is not subtle nor
> optimized…
>
> That pretty printer is slightly different of standard pretty printer
> since a lpeg grammar is applied on a full buffer, i.e. not on a
> line-pre-line based approach. The main drawback, not verified, is that
> if you have a huge xml file to process, it will just explode the stack…
> An analogy: in memory tree xml vs. parser…
>
> It's far from perfect but you are welcome to use, review and give feedbacks…
>
> (… and OK, it's not packaged as a third party module yet…)
>
> Renaud
>   
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-20 20:11                     ` Renaud AUBIN
@ 2010-11-20 21:43                       ` Renaud AUBIN
  0 siblings, 0 replies; 18+ messages in thread
From: Renaud AUBIN @ 2010-11-20 21:43 UTC (permalink / raw)
  To: ntg-context

+ zip and tar.gz available

http://www.nibua-r.org/gitsnap/

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

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: XML pretty printer?
  2010-11-20 19:40                   ` Renaud AUBIN
  2010-11-20 20:11                     ` Renaud AUBIN
@ 2010-11-21 11:58                     ` Hans Hagen
  1 sibling, 0 replies; 18+ messages in thread
From: Hans Hagen @ 2010-11-21 11:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-11-21 11:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-12 20:22 XML pretty printer? 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 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).