Re: [NTG-context] \starttyping while processing XML causing error

2014-03-28 Thread Xan
On Fri, 28 Mar 2014 09:56:12 +0100
Hans Hagen  ha escrit:

> On 3/28/2014 9:13 AM, Xan wrote:
> >> On 3/27/2014 9:46 AM, Xan wrote:
> >>> \starttext
> >>>
> >>> A
> >>> \xmlprocessfile{demo}{./dades.xml}{}
> >>> B
> >>> \stoptext
> >>
> >> \startxmlsetups xml:demo:code
> >> \blank
> >> \start \ttx
> >>   \xmlverbatim{#1}
> >> \stop
> >> \blank
> >> \stopxmlsetups
> >
> > First of all, thank you very much, Hans.
> >
> > But why can't I use
> >
> > \defineframedtext[framedcode][strut=yes,offset=2mm,width=7cm,align=right]
> >
> > \definetyping[code][numbering=line,bodyfont=small,before={\startframedcode},after={\stopframedcode}]
> >
> > \setuplinenumbering[location=intext]
> > \setuptyping[option=color]
> >
> >
> > startxmlsetups xml:demo:codi
> >\blank
> >\startcode\xmlverbatim{#1}\stopcode
> >\blank
> > \stopxmlsetups
> >
> 
> different catcode regimes
> 
> > How can I achieve this results? (numbering line and color basically)
> 
> \startlinenumbering
> 
> etc

Many thanks.

But  \setuplinenumbering[location=intext,prefix=codi] seems to have no effect in

\startxmlsetups xml:demo:codi
\blank
\startlinenumbering\xmlverbatim{#1}\stoplinenumbering
   \blank
\stopxmlsetups

the numbers seems that always are inmargin.

Thanks,
Xan.
___
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
___


Re: [NTG-context] \starttyping while processing XML causing error

2014-03-28 Thread Xan

> 
> > How can I achieve this results? (numbering line and color basically)
> 
> \startlinenumbering
> 
> etc
> 
How can I disable hyphenize and wrap large lines?

Thanks,
Xan.
___
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
___


Re: [NTG-context] \starttyping while processing XML causing error

2014-03-28 Thread Xan
I can circumvent it with

\defineframedtext[framedcode][strut=yes,width=local,align=flushleft,frame=off]


\startxmlsetups xml:demo:codi
  \blank
  \startframedcode
  \startlinenumbering\xmlverbatim{#1}\stoplinenumbering
  \stopframedcode
  \blank
\stopxmlsetups

Xan.
___
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
___


Re: [NTG-context] \starttyping while processing XML causing error

2014-03-28 Thread Hans Hagen

On 3/28/2014 9:13 AM, Xan wrote:

On 3/27/2014 9:46 AM, Xan wrote:

\starttext

A
\xmlprocessfile{demo}{./dades.xml}{}
B
\stoptext


\startxmlsetups xml:demo:code
\blank
\start \ttx
  \xmlverbatim{#1}
\stop
\blank
\stopxmlsetups


First of all, thank you very much, Hans.

But why can't I use

\defineframedtext[framedcode][strut=yes,offset=2mm,width=7cm,align=right]

\definetyping[code][numbering=line,bodyfont=small,before={\startframedcode},after={\stopframedcode}]

\setuplinenumbering[location=intext]
\setuptyping[option=color]


startxmlsetups xml:demo:codi
   \blank
   \startcode\xmlverbatim{#1}\stopcode
   \blank
\stopxmlsetups



different catcode regimes


How can I achieve this results? (numbering line and color basically)


\startlinenumbering

etc

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


Re: [NTG-context] \starttyping while processing XML causing error

2014-03-28 Thread Xan
> On 3/27/2014 9:46 AM, Xan wrote:
> > \starttext
> >
> > A
> > \xmlprocessfile{demo}{./dades.xml}{}
> > B
> > \stoptext
> 
> \startxmlsetups xml:demo:code
>\blank
>\start \ttx
>  \xmlverbatim{#1}
>\stop
>\blank
> \stopxmlsetups

First of all, thank you very much, Hans.

But why can't I use

\defineframedtext[framedcode][strut=yes,offset=2mm,width=7cm,align=right]

\definetyping[code][numbering=line,bodyfont=small,before={\startframedcode},after={\stopframedcode}]

\setuplinenumbering[location=intext]
\setuptyping[option=color]


startxmlsetups xml:demo:codi
  \blank
  \startcode\xmlverbatim{#1}\stopcode
  \blank
\stopxmlsetups


How can I achieve this results? (numbering line and color basically)

Thanks,
Xan
___
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
___


Re: [NTG-context] \starttyping while processing XML causing error

2014-03-27 Thread Hans Hagen

On 3/27/2014 9:46 AM, Xan wrote:

\starttext

A
\xmlprocessfile{demo}{./dades.xml}{}
B
\stoptext


\startxmlsetups xml:demo:code
  \blank
  \start \ttx
\xmlverbatim{#1}
  \stop
  \blank
\stopxmlsetups



--

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


[NTG-context] \starttyping while processing XML causing error

2014-03-27 Thread Xan
Hi,

I have this minimal example:

1) Tasques.context:

\environment ./entorn-xml

\starttext

A
\xmlprocessfile{demo}{./dades.xml}{}
B
\stoptext


2) entorn-xml.tex:

\startxmlsetups xml:demo:base
  \xmlsetsetup{demo}{*}{-}
  \xmlsetsetup{demo}{things|code|}{xml:demo:*}
\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:things
  \xmlflush{#1}
\stopxmlsetups


%TODO: startcode: http://www.ntg.nl/pipermail/ntg-context/2012/064750.html
\startxmlsetups xml:demo:code
  \bigskip
  \startlines\xmlflush{#1}\stoplines
\stopxmlsetups


3) dades.xml:



  
  [root@serviedre ~]# pacman -Syu
:: Synchronizing package databases...
 core 193.0 KiB  50.0K/s 00:04 [##] 100%
 extra2037.1 KiB   166K/s 00:12 
[##] 100%
 community   2.2 MiB   374K/s 00:06 
[##] 100%
 alarm  55.6 KiB   242K/s 00:00 
[##] 100%
 aur64.0 KiB   288K/s 00:00 
[##] 100%
:: Starting full system upgrade...
warning: linux-sun4i: ignoring package upgrade (3.4.79-1 => 3.4.79-2)
warning: linux-sun4i-headers: ignoring package upgrade (3.4.79-1 => 3.4.79-2)
 there is nothing to do
  




When I compile tasques.context, all is ok, but when I substitute the 
\startlines \stoplines with \starttyping \stoptyping context never ends.

Is that a bug? 
I just found [this](http://www.ntg.nl/pipermail/ntg-context/2012/064750.html), 
but really no solution. Since 2012 I suppose many things are changed so I ask.

Why doesn't it work?

Thanks in advance,
Xan.

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