Re: [NTG-context] bug in parsed-xml?

2016-11-01 Thread Pablo Rodriguez
On 11/01/2016 08:47 PM, Hans Hagen wrote:
> [...]
> you can test with
> 
> local verbosed  = (space + newline * (emptyline^0) * beginline + newline 
> * emptyline + newline + anything)^0
> 
> in line 557 in buff-ver.lua

Hans,

many thanks for your fast fix.

It works for extra lines, but indenting is still applied (I cannot see
why this might make sense).

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in parsed-xml?

2016-11-01 Thread Hans Hagen

On 11/1/2016 1:38 PM, Pablo Rodriguez wrote:

Dear list,

I have the following sample:

\setupindenting[yes, big]
\starttext
\starttyping[option=parsed-xml]

text
  body
pword/p
  /body
/text

\stoptyping
\stoptext

I’m afraid I found two issues:

For some reason, ConTeXt adds extra space before the last line. I think
this may be a bug.

With indenting set for the rest of the document, ConTeXt applies it also
to typing. As far as I know, typing shouldn’t be automatically indented.

Could anyone confirm whether the issues are bugs in parsed-xml?


you can test with

local verbosed  = (space + newline * (emptyline^0) * beginline + newline 
* emptyline + newline + anything)^0


in line 557 in buff-ver.lua

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Vim wiki page updated

2016-11-01 Thread Nicola

I have updated the Vim page at ConTeXt Garden:

http://wiki.contextgarden.net/Vim

It may be considered as the official documentation of the ConTeXt 
scripts in Vim, as the only other documentation is the source code :)


Happy editing!
Nicola

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] bug in parsed-xml?

2016-11-01 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupindenting[yes, big]
\starttext
\starttyping[option=parsed-xml]

text
  body
pword/p
  /body
/text

\stoptyping
\stoptext

I’m afraid I found two issues:

For some reason, ConTeXt adds extra space before the last line. I think
this may be a bug.

With indenting set for the rest of the document, ConTeXt applies it also
to typing. As far as I know, typing shouldn’t be automatically indented.

Could anyone confirm whether the issues are bugs in parsed-xml?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Framedtext in a float

2016-11-01 Thread Fabrice Couvreur
Okay, so to change locally, I do this :


\placerecipe{}{
\setupframedtexts[MyFrame][width=10cm]
\startMyFrame[Title=One]

  \stopMyFrame}
  \placerecipe{}{
\setupframedtexts[MyFrame][width=8cm]
\startMyFrame[Title=Two]

  \stopMyFrame}
  \placerecipe{}{
\startMyFrame[Title=Three]

  \stopMyFrame}

2016-11-01 11:17 GMT+01:00 Piotr Kopszak :

> You mean, you effectively want ConTeXt to choose best proportions for
> the framed text on its own? I guess very few designers would agree for
> that, if any.
>
> 2016-11-01 10:47 GMT+01:00 Fabrice Couvreur :
> > Hello,
> > The option align = tolerant rule one of the problems I may encounter.
> But I
> > wonder if it's possible that I should not choose myself width = 6cm to
> fit
> > the text. If I have to use the command several times with different
> content,
> > how make ?
> > Thank you
> > Fabrice
> >
> > 2016-11-01 9:23 GMT+01:00 Piotr Kopszak :
> >>
> >> Just use
> >> ...
> >> \startMyFrame[Title=Info]
> >> \setupalign[hyphenated,morehyphenation,verytolerant]
> >> ...
> >>
> >> Piotr
> >>
> >> 2016-11-01 0:12 GMT+01:00 Fabrice Couvreur  >:
> >> > Hello,
> >> > How to make the width of framedtext automatically adapts to its
> >> > contents.
> >> > Fabrice
> >> >
> >> > \definefloat
> >> >[recipe]
> >> >[figure]
> >> >
> >> > \setupfloat
> >> >[recipe]
> >> >[default={right,none}]
> >> >
> >> > \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
> >> > \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00]
> >> >
> >> >
> >> > \defineframedtext
> >> >   [MyFrame]
> >> >   [before={\blank},
> >> >after={\blank},
> >> >frame=off,
> >> >background=MyFrame,
> >> >width=6cm,
> >> >height=fit]
> >> >
> >> > \startuseMPgraphic{MyFrame}
> >> >  path b;
> >> >  picture p;
> >> >  p := textext.rt("\tfx\white\framedtextparameter{Title}");
> >> >  p := p shifted (2BodyFontSize,OverlayHeight-ypart center
> >> > p+.25ExHeight);
> >> >  b := boundingbox p enlarged .3EmWidth ;
> >> >  fill OverlayBox withcolor \MPcolor{MyColorA};
> >> >  fill b withcolor \MPcolor{MyColorB} ;
> >> >  draw p ;
> >> >  setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
> >> > \stopuseMPgraphic
> >> >
> >> > \defineoverlay
> >> >   [MyFrame]
> >> >   [\useMPgraphic{MyFrame}]
> >> >
> >> >   \starttext
> >> >
> >> >   \placerecipe{}{
> >> >   \startMyFrame[Title=Info]
> >> >   L'histogramme est constitué de rectangles dont les bases
> correspondent
> >> > aux
> >> > classes et dont les aires sont proportionnelles aux effectifs ou
> >> > fréquences
> >> > des classes.
> >> >   \stopMyFrame}
> >> >
> >> >   \input Knuth
> >> >
> >> >   \stoptext
> >> >
> >> >
> >> > 
> ___
> >> > 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://context.aanhet.net
> >> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> >> > wiki : http://contextgarden.net
> >> >
> >> > 
> ___
> >>
> >>
> >>
> >> --
> >> http://okle.pl
> >>
> >> 
> ___
> >> 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://context.aanhet.net
> >> archive  : https://bitbucket.org/phg/context-mirror/commits/
> >> 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> > 
> ___
>
>
>
> --
> http://okle.pl
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : 

Re: [NTG-context] Framedtext in a float

2016-11-01 Thread Piotr Kopszak
You mean, you effectively want ConTeXt to choose best proportions for
the framed text on its own? I guess very few designers would agree for
that, if any.

2016-11-01 10:47 GMT+01:00 Fabrice Couvreur :
> Hello,
> The option align = tolerant rule one of the problems I may encounter. But I
> wonder if it's possible that I should not choose myself width = 6cm to fit
> the text. If I have to use the command several times with different content,
> how make ?
> Thank you
> Fabrice
>
> 2016-11-01 9:23 GMT+01:00 Piotr Kopszak :
>>
>> Just use
>> ...
>> \startMyFrame[Title=Info]
>> \setupalign[hyphenated,morehyphenation,verytolerant]
>> ...
>>
>> Piotr
>>
>> 2016-11-01 0:12 GMT+01:00 Fabrice Couvreur :
>> > Hello,
>> > How to make the width of framedtext automatically adapts to its
>> > contents.
>> > Fabrice
>> >
>> > \definefloat
>> >[recipe]
>> >[figure]
>> >
>> > \setupfloat
>> >[recipe]
>> >[default={right,none}]
>> >
>> > \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
>> > \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00]
>> >
>> >
>> > \defineframedtext
>> >   [MyFrame]
>> >   [before={\blank},
>> >after={\blank},
>> >frame=off,
>> >background=MyFrame,
>> >width=6cm,
>> >height=fit]
>> >
>> > \startuseMPgraphic{MyFrame}
>> >  path b;
>> >  picture p;
>> >  p := textext.rt("\tfx\white\framedtextparameter{Title}");
>> >  p := p shifted (2BodyFontSize,OverlayHeight-ypart center
>> > p+.25ExHeight);
>> >  b := boundingbox p enlarged .3EmWidth ;
>> >  fill OverlayBox withcolor \MPcolor{MyColorA};
>> >  fill b withcolor \MPcolor{MyColorB} ;
>> >  draw p ;
>> >  setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
>> > \stopuseMPgraphic
>> >
>> > \defineoverlay
>> >   [MyFrame]
>> >   [\useMPgraphic{MyFrame}]
>> >
>> >   \starttext
>> >
>> >   \placerecipe{}{
>> >   \startMyFrame[Title=Info]
>> >   L'histogramme est constitué de rectangles dont les bases correspondent
>> > aux
>> > classes et dont les aires sont proportionnelles aux effectifs ou
>> > fréquences
>> > des classes.
>> >   \stopMyFrame}
>> >
>> >   \input Knuth
>> >
>> >   \stoptext
>> >
>> >
>> > ___
>> > 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://context.aanhet.net
>> > archive  : https://bitbucket.org/phg/context-mirror/commits/
>> > wiki : http://contextgarden.net
>> >
>> > ___
>>
>>
>>
>> --
>> http://okle.pl
>>
>> ___
>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___



-- 
http://okle.pl
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Framedtext in a float

2016-11-01 Thread Fabrice Couvreur
Hello,
The option align = tolerant rule one of the problems I may encounter.
But I wonder
if it's possible that I should not choose myself width = 6cm to fit the
text. If I have to use the command several times with different content,
how make ?
Thank you
Fabrice

2016-11-01 9:23 GMT+01:00 Piotr Kopszak :

> Just use
> ...
> \startMyFrame[Title=Info]
> \setupalign[hyphenated,morehyphenation,verytolerant]
> ...
>
> Piotr
>
> 2016-11-01 0:12 GMT+01:00 Fabrice Couvreur :
> > Hello,
> > How to make the width of framedtext automatically adapts to its contents.
> > Fabrice
> >
> > \definefloat
> >[recipe]
> >[figure]
> >
> > \setupfloat
> >[recipe]
> >[default={right,none}]
> >
> > \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
> > \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00]
> >
> >
> > \defineframedtext
> >   [MyFrame]
> >   [before={\blank},
> >after={\blank},
> >frame=off,
> >background=MyFrame,
> >width=6cm,
> >height=fit]
> >
> > \startuseMPgraphic{MyFrame}
> >  path b;
> >  picture p;
> >  p := textext.rt("\tfx\white\framedtextparameter{Title}");
> >  p := p shifted (2BodyFontSize,OverlayHeight-ypart center
> p+.25ExHeight);
> >  b := boundingbox p enlarged .3EmWidth ;
> >  fill OverlayBox withcolor \MPcolor{MyColorA};
> >  fill b withcolor \MPcolor{MyColorB} ;
> >  draw p ;
> >  setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
> > \stopuseMPgraphic
> >
> > \defineoverlay
> >   [MyFrame]
> >   [\useMPgraphic{MyFrame}]
> >
> >   \starttext
> >
> >   \placerecipe{}{
> >   \startMyFrame[Title=Info]
> >   L'histogramme est constitué de rectangles dont les bases correspondent
> aux
> > classes et dont les aires sont proportionnelles aux effectifs ou
> fréquences
> > des classes.
> >   \stopMyFrame}
> >
> >   \input Knuth
> >
> >   \stoptext
> >
> > 
> ___
> > 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> > 
> ___
>
>
>
> --
> http://okle.pl
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Framedtext in a float

2016-11-01 Thread Piotr Kopszak
Just use
...
\startMyFrame[Title=Info]
\setupalign[hyphenated,morehyphenation,verytolerant]
...

Piotr

2016-11-01 0:12 GMT+01:00 Fabrice Couvreur :
> Hello,
> How to make the width of framedtext automatically adapts to its contents.
> Fabrice
>
> \definefloat
>[recipe]
>[figure]
>
> \setupfloat
>[recipe]
>[default={right,none}]
>
> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
> \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00]
>
>
> \defineframedtext
>   [MyFrame]
>   [before={\blank},
>after={\blank},
>frame=off,
>background=MyFrame,
>width=6cm,
>height=fit]
>
> \startuseMPgraphic{MyFrame}
>  path b;
>  picture p;
>  p := textext.rt("\tfx\white\framedtextparameter{Title}");
>  p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight);
>  b := boundingbox p enlarged .3EmWidth ;
>  fill OverlayBox withcolor \MPcolor{MyColorA};
>  fill b withcolor \MPcolor{MyColorB} ;
>  draw p ;
>  setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
> \stopuseMPgraphic
>
> \defineoverlay
>   [MyFrame]
>   [\useMPgraphic{MyFrame}]
>
>   \starttext
>
>   \placerecipe{}{
>   \startMyFrame[Title=Info]
>   L'histogramme est constitué de rectangles dont les bases correspondent aux
> classes et dont les aires sont proportionnelles aux effectifs ou fréquences
> des classes.
>   \stopMyFrame}
>
>   \input Knuth
>
>   \stoptext
>
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___



-- 
http://okle.pl
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] ConTeXt and duotone graphics

2016-11-01 Thread Hans Hagen

On 10/31/2016 9:27 PM, Piotr Kopszak wrote:

Hello list,

I have just came across this little script which allows to create
duotone pdfs with DeviceN channel. The script takes two grayscale tifs
as arguments and returns a pdf duotone. I guess it shouldn't be too
difficult to include it in the ConTeXt processing chain. Probably one
could include a command in a source file which would reference both
files used for  creation of a duotone image and the resulting image
would be used in the final pdf. How would you go about implementing
such a coupling?


there is a plugin mechanism for conversions ... (it's how we deal with 
eps and svg input)



Here is the link to the script

http://stdin.fr/Bazar/SpotColorImages


see chapter 3 in the colors-mkiv.pdf manual in the distribution; this 
kind of magic is already present for a while (we actually did it in 
pdftex / mkii in some projects)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Framedtext in a float

2016-11-01 Thread Marco Patzer
On Tue, 1 Nov 2016 00:12:37 +0100
Fabrice Couvreur  wrote:

> How to make the width of framedtext automatically adapts to its
> contents.
> 
> […]
> 
> \defineframedtext
>   [MyFrame]
>   [before={\blank},
>after={\blank},
>frame=off,
>background=MyFrame,
>width=6cm,
   align=tolerant,
>height=fit]
> 
> […]

You can use \showframe to visualise the frames and check what's
going on.

Marco
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___