Re: [NTG-context] xml entities and trailing space

2010-02-09 Thread Hans Hagen

On 7-2-2010 22:19, Thomas A. Schmitz wrote:

\startbuffer[xmltest]
pAtextbar; B/p
\stopbuffer

\startxmlsetups xml:mysetups
 \xmlsetsetup{\xmldocument}{p}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:mysetups}

\startxmlsetups xml:p
 \xmlflush{#1} \par
\stopxmlsetups

\xmlsetentity{textbar}{\textbar}

\starttext
\xmlprocessbuffer{main}{xmltest}{}
\stoptext


this is not that easy as effectively

Atextbar; B

becomes

A\textbar B

and tex will normally gobble that space as part of parsing the input and 
changing that aspect will not happen


chicken or egg so use:

\xmlsetentity{textbar}{\textbar{}}


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] xml entities and trailing space

2010-02-09 Thread Thomas A. Schmitz

On Feb 9, 2010, at 6:50 PM, Hans Hagen wrote:

 this is not that easy as effectively
 
 Atextbar; B
 
 becomes
 
 A\textbar B
 
 and tex will normally gobble that space as part of parsing the input and 
 changing that aspect will not happen
 
 chicken or egg so use:
 
 \xmlsetentity{textbar}{\textbar{}}
 
 
 Hans

OK, will do that - I was just curious because the behavior changed a while ago. 
I have older pdfs where  the space after such entities was preserved. But 
you're right, it's no big deal.

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
___


Re: [NTG-context] xml entities and trailing space

2010-02-09 Thread Hans Hagen

On 9-2-2010 19:04, Thomas A. Schmitz wrote:


On Feb 9, 2010, at 6:50 PM, Hans Hagen wrote:


this is not that easy as effectively

Atextbar; B

becomes

A\textbar B

and tex will normally gobble that space as part of parsing the input and 
changing that aspect will not happen

chicken or egg so use:

\xmlsetentity{textbar}{\textbar{}}


Hans


OK, will do that - I was just curious because the behavior changed a while ago. 
I have older pdfs where  the space after such entities was preserved. But 
you're right, it's no big deal.


i might cook up something some day


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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
___