Re: [NTG-context] Strange behavior !

2018-07-15 Thread Alan Braslau
MyColor is undefined and defaults to black.

Alan


On Mon, 16 Jul 2018 00:03:33 +0200
Fabrice Couvreur  wrote:

> Good evening,
> In the code below, I get frames filled in black
> ​ ​
> !
> Thank you
> Fabrice
> 
> \setupbodyfont [palatino,11pt]
> 
> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> \definecolor[MyColorA][.75(MyColorB,white)]
> 
> \defineframedtext
>[MyText]
>[frame=off,
> background=MyFrame,
> width=\textwidth,
> location=right]
> 
> \defineoverlay
>[MyFrame]
>[\useMPgraphic{MyFrame}]
> 
> \definelabel
>[Définition]
>[headstyle=\bf\smallcaps]
> 
> 
> \startuseMPgraphic{MyFrame}
>  picture p ;
>  p := textext.rt(\MPstring{MyFrame}) ;
>  p := p shifted (0,OverlayHeight-ypart center p) ;
>  fill OverlayBox leftenlarged .1TextWidth withcolor
> \MPcolor{MyColor} ; fill boundingbox p withcolor \MPcolor{myColor} ;
>  draw p withcolor white ;
>  setbounds currentpicture to OverlayBox ;
> \stopuseMPgraphic
> 
> 
> \starttext
> 
> \startMyText
>  \input knuth
> \stopMyText
> 
> \startMyText
>  \input knuth
> \stopMyText
> 
> \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
___

Re: [NTG-context] Disproportion in initializing user counters

2018-07-15 Thread Jaroslav Hajtmar
Thank very much to explain the problem and to example with labels - very useful 
information for me.
Thanks to all.
Jaroslav Hajtmar

15. 7. 2018 v 19:20, Wolfgang Schuster 
mailto:schuster.wolfg...@gmail.com>>:

Hi Pablo,

when you use the label mechanism to create a counter context ensures to print 
the right counter value in the table.

___
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] Strange behavior with font pagella

2018-07-15 Thread Rik Kabel

On 7/15/2018 17:39, Fabrice Couvreur wrote:

\setupbodyfont[pagella,11pt]

\defineframed
   [ACFRAME]
   [frame=off,
    offset=0pt,
    location=low,
    width=\struttotal,
    background=color,
    backgroundcolor=black,
    foregroundcolor=white,
    forgroundstyle=bold]


\defineprocessor[ACPROCESSOR][command=\ACFRAME]
\defineconversionset[ACCONVERSION][][ACPROCESSOR->n]

\defineenumeration
   [ex]
   [text=,
    distance=0.3em,
    width=fit,
    numberconversionset=ACCONVERSION,
    alternative=serried]

\starttext

\dorecurse{5}
   {\startex
    \input knuth
    \stopex}

\stoptext


Looks like a font issue -- it does not happen with LM or ebgaramond.

--
Rik

___
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] Strange behavior !

2018-07-15 Thread Fabrice Couvreur
Good evening,
In the code below, I get frames filled in black
​ ​
!
Thank you
Fabrice

\setupbodyfont [palatino,11pt]

\definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
\definecolor[MyColorA][.75(MyColorB,white)]

\defineframedtext
   [MyText]
   [frame=off,
background=MyFrame,
width=\textwidth,
location=right]

\defineoverlay
   [MyFrame]
   [\useMPgraphic{MyFrame}]

\definelabel
   [Définition]
   [headstyle=\bf\smallcaps]


\startuseMPgraphic{MyFrame}
 picture p ;
 p := textext.rt(\MPstring{MyFrame}) ;
 p := p shifted (0,OverlayHeight-ypart center p) ;
 fill OverlayBox leftenlarged .1TextWidth withcolor \MPcolor{MyColor} ;
 fill boundingbox p withcolor \MPcolor{myColor} ;
 draw p withcolor white ;
 setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic


\starttext

\startMyText
 \input knuth
\stopMyText

\startMyText
 \input knuth
\stopMyText

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

[NTG-context] Strange behavior with font pagella

2018-07-15 Thread Fabrice Couvreur
Good evening,
In the code below, why is the text in bold ?
Thank you
Fabrice

\setupbodyfont[pagella,11pt]

\defineframed
   [ACFRAME]
   [frame=off,
offset=0pt,
location=low,
width=\struttotal,
background=color,
backgroundcolor=black,
foregroundcolor=white,
forgroundstyle=bold]


\defineprocessor[ACPROCESSOR][command=\ACFRAME]
\defineconversionset[ACCONVERSION][][ACPROCESSOR->n]

\defineenumeration
   [ex]
   [text=,
distance=0.3em,
width=fit,
numberconversionset=ACCONVERSION,
alternative=serried]

\starttext

\dorecurse{5}
   {\startex
\input knuth
\stopex}

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

Re: [NTG-context] Disproportion in initializing user counters

2018-07-15 Thread Pablo Rodriguez
On 07/15/2018 07:54 PM, Rik wrote:
> Easier than counters:
> 
> \definelabel [QQ][text=,headcolor=red]
> \starttext
> \startxtable
>   \startxrow
> \startxcell one \stopxcell
> \startxcell two \QQ[there] \stopxcell
>   \stopxrow
>   \startxrow
> \startxcell alpha \QQ\stopxcell
> \startxcell beta \QQ[here]  \stopxcell
>   \stopxrow
> \stopxtable
> 
> See entry \in[here].
> 
> \stoptext

Hi Rik,

I totally agree: this is much easier than counters.

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] Disproportion in initializing user counters

2018-07-15 Thread Rik

On 7/15/2018 13:34, Pablo Rodriguez wrote:

On 07/15/2018 07:20 PM, Wolfgang Schuster wrote:


Hi Pablo,

when you use the label mechanism to create a counter context ensures to
print the right counter value in the table.


Hi Wolfgang,

would it be possible to provide me with a minimal sample?

I don‘t use labels and I don’t know how to use them with counters in
xtables.

Many thanks for your help,

Pablo


Easier than counters:

   \definelabel [QQ][text=,headcolor=red]
   \starttext
   \startxtable
  \startxrow
\startxcell one \stopxcell
\startxcell two \QQ[there] \stopxcell
  \stopxrow
  \startxrow
\startxcell alpha \QQ\stopxcell
\startxcell beta \QQ[here]  \stopxcell
  \stopxrow
   \stopxtable

   See entry \in[here].

   \stoptext

--

Rik

___
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] Disproportion in initializing user counters

2018-07-15 Thread Pablo Rodriguez
On 07/15/2018 07:20 PM, Wolfgang Schuster wrote:
> Hi Pablo,
> 
> when you use the label mechanism to create a counter context ensures to
> print the right counter value in the table.

Hi Wolfgang,

would it be possible to provide me with a minimal sample?

I don‘t use labels and I don’t know how to use them with counters in
xtables.

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] Disproportion in initializing user counters

2018-07-15 Thread Wolfgang Schuster

Hi Pablo,

when you use the label mechanism to create a counter context ensures to 
print the right counter value in the table.


Wolfgang

Pablo Rodriguez 
15. Juli 2018 um 16:47

Many thanks for your reply, Hans.

The original issue was mine, using with the handlecsv module. And I had
no idea about what was wrong there.

Many thanks for your help,

Pablo


___
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] issue with balanced columns

2018-07-15 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\showframe
\showgrid

\setuplanguage[agr][patterns={agr, us}]
\mainlanguage[agr]

\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]

\setupbodyfont[dejavu, 13pt]

\setupbodyfontenvironment[default][em=italic, x=.95]

\setupregister[index]
[language=gr,
 indicator=no,
 before=,
 after=,
 distance=3ex,
 textstyle=\tfx,
 pagenumber=no,
 n=2,
 align={verybroad, hz,hanging},
 method={zm,zc}]

\starttext
\mbox{}
\index{ἀδελφός, ὁ: brother}
\index{ἀδικίη, ἡ: wrongdoing, injustice}
\index{ἀκρόησις, –ιος, ἡ: hearing, listening}
\index{ἄνευ: without (\char43\ gen.)}
\index{ἄρρην, –εν: male}
\index{γένος, –εος, τό: race, family}
\index{δήλησις, –ιος, ἡ: ruin, bane}
\index{διαίτημα, –ατος, τό: regimen, diet}
\index{ἐπικρίνω: decide, consider}
\index{ἰητρικός, –ή, –όν: of a physician, medical}
\index{κάμνω: be sick, suffer from illness}
\index{λοιπός, –ή, –όν: remaining, rest}
\index{μάθησις, –ιος, ἡ: learning}
\index{μαθητής, –οῦ, ὁ: learner, pupil}
\index{μανθάνω: learn}
\index{μισθός, ὁ: wages, pay, hire}
\index{νόμος, ὁ: custom, law}
\index{ὁρκίζω: bind by oath}
\index{υἱός, ὁ: son}
\index{χρέομαι: use}
\index{ὠφέλειη, ἡ: help, aid, benefit}
\placeindex
\stoptext

Although colums are balanced, I get unbalanced columns.

Is there a command that prevents the wrong balanced columns?

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] Disproportion in initializing user counters

2018-07-15 Thread Pablo Rodriguez
On 07/15/2018 03:49 PM, Hans Hagen wrote:
> On 7/15/2018 12:33 PM, Jaroslav Hajtmar wrote:
>> Hello ConTeXist.
>>
>> I encountered a disproportion in initializing user counters. Why 
>> initialization at the beginning of the source text does not work and 
>> what is the mechanism of how the user counters work.
>> [...]
>> \starttext
>>
>> %\setcounter[mycounter][0] % initializing at this point not working (the 
>> counter is 10 more than it should be). WHY?
> 
> tables take multiple passes so you need to decrement when still 
> trialtypesetting
> 
> \iftrialtypesetting .. \fi

Many thanks for your reply, Hans.

The original issue was mine, using with the handlecsv module. And I had
no idea about what was wrong there.

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] Disproportion in initializing user counters

2018-07-15 Thread Hans Hagen

On 7/15/2018 12:33 PM, Jaroslav Hajtmar wrote:

Hello ConTeXist.

I encountered a disproportion in initializing user counters. Why 
initialization at the beginning of the source text does not work and 
what is the mechanism of how the user counters work.


Thanx Jaroslav Hajtmar

Here is a sample example:

\definecounter[mycounter]

\def\getmycounter{\incrementcounter[mycounter]\getnumber[mycounter]}

\startbuffer[groups]

     \startxrow

     \startxcell \getmycounter\stopxcell

     \startxcell Content of column\stopxcell

\stopxrow

\stopbuffer

\starttext

%\setcounter[mycounter][0] % initializing at this point not working (the 
counter is 10 more than it should be). WHY?


\startxtable

     \startxrow

     \startxcell Column 1\stopxcell

     \startxcell Column 2\stopxcell

     \stopxrow

\setcounter[mycounter][0] % initializing at this point works fine

\dorecurse{5}{\getbuffer[groups]}

\stopxtable

\stoptext


tables take multiple passes so you need to decrement when still 
trialtypesetting


\iftrialtypesetting .. \fi



--

-
  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] Compile problem after update

2018-07-15 Thread Hans Hagen

On 7/15/2018 10:05 AM, Fabrice Couvreur wrote:

I just updated context standalone and this file does not compile 
anymore, but I do not see why.



     \setuppagenumbering
     [alternative=,
  location={footer,right]


missing a } ... so are you sure it ever compiled?

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
___

[NTG-context] Disproportion in initializing user counters

2018-07-15 Thread Jaroslav Hajtmar
Hello ConTeXist.
I encountered a disproportion in initializing user counters. Why initialization 
at the beginning of the source text does not work and what is the mechanism of 
how the user counters work.

Thanx Jaroslav Hajtmar

Here is a sample example:

\definecounter[mycounter]

\def\getmycounter{\incrementcounter[mycounter]\getnumber[mycounter]}

\startbuffer[groups]
\startxrow
\startxcell \getmycounter\stopxcell
\startxcell Content of column\stopxcell
\stopxrow
\stopbuffer



\starttext

%\setcounter[mycounter][0] % initializing at this point not working (the 
counter is 10 more than it should be). WHY?



\startxtable
\startxrow
\startxcell Column 1\stopxcell
\startxcell Column 2\stopxcell
\stopxrow

\setcounter[mycounter][0] % initializing at this point works fine
\dorecurse{5}{\getbuffer[groups]}
\stopxtable

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

[NTG-context] Compile problem after update

2018-07-15 Thread Fabrice Couvreur
Hello,
I just updated context standalone and this file does not compile anymore,
but I do not see why.
Thank you
Fabrice

\switchtobodyfont[11pt]

\definelayout
  [noheader]
  [header=26pt,
   headerdistance=25pt,
   backspace=2cm,
   width=middle,
   topspace=\dimexpr 2cm-\headerheight-\headerdistance\relax,
   footer=16pt,
   height=middle]

\setuplayout
  [header=\zeropoint,
   headerdistance=25pt,
   backspace=2cm,
   width=middle,
   topspace=\dimexpr 2cm-\headerheight-\headerdistance\relax,
   footer=16pt,
   height=middle]

\definelayout[1][noheader]

\setuppagenumbering
[alternative=,
 location={footer,right]

\setupbackgrounds[header][text]
 [frame=off,
  bottomframe=on,
  framecolor=gray,
  rulethickness=2pt]

\defineframed[headerframed]
 [frame=off,
  location=depth,
  bottomoffset=\lineheight,
  align=middle,
  width=fit]

\setupheadertexts[\headerframed{\ss\sc\bf\red Contrôle n\high{o}\,1 \\
}]

\setupheadertexts
[\headerframed{\tfx\ss Lycée JANSON DE SAILLY\\ 31 juillet
2017}]
[\headerframed{\tfx\ss T\high{le} ES 2 \\ Durée 1 heure 30}]

\starttext
\dorecurse{10}{\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
___