* \starttyping while processing XML causing error
@ 2014-03-27 8:46 Xan
2014-03-27 21:49 ` Hans Hagen
2014-03-28 8:13 ` Xan
0 siblings, 2 replies; 7+ messages in thread
From: Xan @ 2014-03-27 8:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
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:
<?xml version='1.0' standalone='yes' encoding="UTF-8"?>
<things>
<code>
[root@serviedre ~]# pacman -Syu
:: Synchronizing package databases...
core 193.0 KiB 50.0K/s 00:04 [######################] 100%
extra 2037.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%
aur 64.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
</code>
</things>
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \starttyping while processing XML causing error
2014-03-27 8:46 \starttyping while processing XML causing error Xan
@ 2014-03-27 21:49 ` Hans Hagen
2014-03-28 8:13 ` Xan
1 sibling, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2014-03-27 21:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \starttyping while processing XML causing error
2014-03-27 8:46 \starttyping while processing XML causing error Xan
2014-03-27 21:49 ` Hans Hagen
@ 2014-03-28 8:13 ` Xan
2014-03-28 8:56 ` Hans Hagen
1 sibling, 1 reply; 7+ messages in thread
From: Xan @ 2014-03-28 8:13 UTC (permalink / raw)
To: Xan; +Cc: mailing list for ConTeXt users
> 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \starttyping while processing XML causing error
2014-03-28 8:13 ` Xan
@ 2014-03-28 8:56 ` Hans Hagen
2014-03-28 13:59 ` Xan
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Hans Hagen @ 2014-03-28 8:56 UTC (permalink / raw)
To: mailing list for ConTeXt users, Xan
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \starttyping while processing XML causing error
2014-03-28 8:56 ` Hans Hagen
@ 2014-03-28 13:59 ` Xan
2014-03-28 14:04 ` Xan
2014-03-28 14:41 ` Xan
2 siblings, 0 replies; 7+ messages in thread
From: Xan @ 2014-03-28 13:59 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
On Fri, 28 Mar 2014 09:56:12 +0100
Hans Hagen <pragma@wxs.nl> 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \starttyping while processing XML causing error
2014-03-28 8:56 ` Hans Hagen
2014-03-28 13:59 ` Xan
@ 2014-03-28 14:04 ` Xan
2014-03-28 14:41 ` Xan
2 siblings, 0 replies; 7+ messages in thread
From: Xan @ 2014-03-28 14:04 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \starttyping while processing XML causing error
2014-03-28 8:56 ` Hans Hagen
2014-03-28 13:59 ` Xan
2014-03-28 14:04 ` Xan
@ 2014-03-28 14:41 ` Xan
2 siblings, 0 replies; 7+ messages in thread
From: Xan @ 2014-03-28 14:41 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
>
> > 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-03-28 14:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-27 8:46 \starttyping while processing XML causing error Xan
2014-03-27 21:49 ` Hans Hagen
2014-03-28 8:13 ` Xan
2014-03-28 8:56 ` Hans Hagen
2014-03-28 13:59 ` Xan
2014-03-28 14:04 ` Xan
2014-03-28 14:41 ` Xan
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).