Re: [NTG-context] Troubles installing on windows

2016-03-24 Thread adrian
Hans Hagen  wxs.nl> writes:

> 
> On 12/24/2015 5:28 PM, Vya. Y. wrote:
> >  > looks like a new binary and old context .. .maybe something went
> > wrong in the update? Hans
> >
> > Thank you, Hans. Where can I download the latest ConTeXt, with 
Windows
> > binaries? I cannot find it on Pragma Ade and, unfortunatelly, many 
links
> > in the garden are broken.
> 
> http://wiki.contextgarden.net/ConTeXt_Standalone
> 
> -
>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
> 

___



Any solution to this? 
I'm having the same error. Windows 10 and downloading latest ConTeXt 
standalone

___
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] Are nested sections possible?

2016-03-24 Thread Hans Hagen

On 3/15/2016 8:09 PM, Alan BRASLAU wrote:

On Tue, 15 Mar 2016 18:10:27 +0100
"Thomas A. Schmitz"  wrote:


But don't let anyone
tell you that explicit names are "antiquated." They make TeX or xml
source documents so much more readable! And when you have to retrace
five levels of \startsectionlevels because you want to change the
structure of your document, you will rue the day you abandoned proper
names.


When you want to change the structure of your document when using
structure levels, all that you need do is add or subtract a level of
nesting. With named levels, it is easy to create complicated documents
that jump around in level, which would be pretty messy.


on the other hand, when you look at a piece of coded document you no 
longer know if you're in an important chapter or unimportant 
subsubsubsubsubsubsection


so, in the end it all boils down to circumstances and usage which is why 
we have several methods



What a nightmare it would be to add or subtract a named structure level
in a complicated document.

This being said, I still mostly use named structure levels myself, as
old habits are hard to change (but don't tell Hans this!).


ha, well, if i remember right this nested anonymous sectioning was added 
on your request .. so it is now one of those orphaned features


anyway, i tend to replace

\chapter{foo}

by

\startchapter[title=foo]

\stopchapter

but at a much lower level keep using \subsubsection and alike

(also because then with chapters one can more conveniently set other 
properties)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] Are nested sections possible?

2016-03-24 Thread Hans Hagen

On 3/15/2016 6:10 PM, Thomas A. Schmitz wrote:

On 03/15/2016 05:54 PM, Alan BRASLAU wrote:

Indeed, Hans, it would be nice to be able to nest sectionlevels within
a chapter...section... scheme (which is NOT depreciated, although
antiquated).


Oooh, shiny! In the TEI community, there are also people who repeat that
having s all the way down is modern, and  etc. is old
hat. Well, I like to think about the way I structure my texts before I
write them. I'm old fashioned that way...

But seriously: by all means, let's allow nesting. But don't let anyone
tell you that explicit names are "antiquated." They make TeX or xml
source documents so much more readable! And when you have to retrace
five levels of \startsectionlevels because you want to change the
structure of your document, you will rue the day you abandoned proper
names.


they are not antiquated at all

the main benefit from using \startchapter ... \stopchapter instead of 
\chapter is that we then know where something end which is handy when 
you want to finish things before starting something new (esp when 
grouping is involved it can get messy otherwise) ... it's also easier on 
the export


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] Length range control of the last line of paragraph

2016-03-24 Thread Hans Hagen

On 3/24/2016 8:36 PM, Jan Tosovsky wrote:

On 2016-03-24 Hans Hagen wrote:

On 3/23/2016 8:14 PM, Jan Tosovsky wrote:

On 2016-03-22 Hans Hagen wrote:

On 3/22/2016 9:57 PM, Jan Tosovsky wrote:

On 2016-03-22 Hans Hagen wrote:

On 3/21/2016 8:14 PM, Jan Tosovsky wrote:


when paragraphs are separated by indenting the first line
(instead of an empty line), these rules should be followed:

(2) the last line is shorter than block width

xx
  xx


(ad 2) This can be done using \parfillskip XXpt plus 1fil
(where XX is required gap)


setting the XXpt is tricky as it might lead to underful or
overful cases when that amount start interfering with an optimal
solution (as it's seen as acceptable overflow in some direction)


underful or overful where? in previous lines? I am quite lost here


\starttext

\setupalign[tolerant,stretch]
\dorecurse{100}{
   \hsize\dimexpr\textwidth-#1pt\relax
   \parfillskip -4em plus 1 fill
   \input tufte
   \page
}

\stoptext

page 43


In my output I can see overful of the last line on pages 38-46.

How can this happen? Isn't it a clear bug?

What exactly mean 'that amount start interfering with an optimal
solution'? Isn't parfillskip settings taken already into an
account when composing the paragraph?


it's just a skip added at the end of the line ... so like any skip
and if you give it a fill that will be taken into account in
linebreaks (just like other fill)

\starttext

\dorecurse{100}{testtesttesttesttest #1 \hskip0ptplus1fill\relax}

\stoptext



To be honest, I can't still decipher the reason why the line is not broken...

We basically need:


and I thought this is exactly what \parfillskip ensures
\parfillskip XX plus (hsize - 3*indent)

Or is it impossible in TeX to achieve such rule?


the fil is taken into account when calculating the best break points and 
then the XX is fixed but plus/minus can lead to if being less or more, 
all relative to other fill (distributed)


so, XX plus (hsize - 3*indent) is not a fixed value, it's XX or more

take this:

\ruledhbox to 10cm {x\hskip0pt plus 1cm x}

the skip will stretch more than 1cm

\ruledhbox to 10cm {x\hskip0pt plus 1cm\relax x%
x\hskip0pt plus 2cm\relax x}

now the glue gets distributed 1:2, so now you can guess

\ruledhbox to 10cm {x\hskip1mm plus 1cm\relax x%
x\hskip8mm plus 2cm\relax x}


Are there other ways? I can think of:


But in this case that space at the end can be completely swallowed (by negative 
glue). I've tried it in the following example, but there is another problem 
from page 58 - blank line. But my TeX interpretation of the above pseudo code 
may be inappropriate...


you can see what glue eventually is used with:

\showmakeup[glue]

\start

\parfillskip  123pt   \relax \input tufte \par
\parfillskip  123pt plus 1fil \relax \input tufte \par
\parfillskip  123pt   \relax \input tufte \par
\parfillskip -123pt plus 1fil \relax \input tufte \par

\stop


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] Length range control of the last line of paragraph

2016-03-24 Thread Jan Tosovsky
On 2016-03-24 Hans Hagen wrote:
> On 3/23/2016 8:14 PM, Jan Tosovsky wrote:
> > On 2016-03-22 Hans Hagen wrote:
> >> On 3/22/2016 9:57 PM, Jan Tosovsky wrote:
> >>> On 2016-03-22 Hans Hagen wrote:
>  On 3/21/2016 8:14 PM, Jan Tosovsky wrote:
> >
> > when paragraphs are separated by indenting the first line
> > (instead of an empty line), these rules should be followed:
> >
> > (2) the last line is shorter than block width
> >
> >xx
> >  xx
> >
> >
> > (ad 2) This can be done using \parfillskip XXpt plus 1fil
> > (where XX is required gap)
> 
>  setting the XXpt is tricky as it might lead to underful or
>  overful cases when that amount start interfering with an optimal
>  solution (as it's seen as acceptable overflow in some direction)
> >>>
> >>> underful or overful where? in previous lines? I am quite lost here
> >>
> >> \starttext
> >>
> >> \setupalign[tolerant,stretch]
> >> \dorecurse{100}{
> >>   \hsize\dimexpr\textwidth-#1pt\relax
> >>   \parfillskip -4em plus 1 fill
> >>   \input tufte
> >>   \page
> >> }
> >>
> >> \stoptext
> >>
> >> page 43
> >
> > In my output I can see overful of the last line on pages 38-46.
> >
> > How can this happen? Isn't it a clear bug?
> >
> > What exactly mean 'that amount start interfering with an optimal
> > solution'? Isn't parfillskip settings taken already into an 
> > account when composing the paragraph?
> 
> it's just a skip added at the end of the line ... so like any skip 
> and if you give it a fill that will be taken into account in 
> linebreaks (just like other fill)
> 
> \starttext
> 
> \dorecurse{100}{testtesttesttesttest #1 \hskip0ptplus1fill\relax}
> 
> \stoptext
> 

To be honest, I can't still decipher the reason why the line is not broken...

We basically need:


and I thought this is exactly what \parfillskip ensures
\parfillskip XX plus (hsize - 3*indent)

Or is it impossible in TeX to achieve such rule?

Are there other ways? I can think of:


But in this case that space at the end can be completely swallowed (by negative 
glue). I've tried it in the following example, but there is another problem 
from page 58 - blank line. But my TeX interpretation of the above pseudo code 
may be inappropriate...

\showmakeup

\starttext

\setupindenting[yes, 30pt]

\edef\ward{\cldloadfile{ward}}

%\setupalign[verytolerant,stretch]

\dorecurse{100}{
 \hsize\dimexpr\textwidth-#1mm\relax
 \dimen0=\dimexpr\availablehsize-3\parindent
 \advance\dimen0 by -\parindent

 \parfillskip \zeropoint plus \dimen0
 \ward\hbox to 10pt{}

 \ward\hbox to 10pt{}

 \startnarrower[left]
\parfillskip \zeropoint plus \dimen0
\ward\hbox to 10pt{}

\parfillskip \zeropoint plus \dimen0
\ward\hbox to 10pt{}

 \stopnarrower

 \page
}

\stoptext

Any idea?

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

2016-03-24 Thread Hans Hagen

On 3/24/2016 6:24 PM, Piotr Kopszak wrote:

P.S.

For your conveniance, the minimal example:

\startMPpositiongraphic{mypos:arrow}
pair c[] ;
initialize_box(\MPpos{\MPvar{self}});
c[1] := cxy ;
initialize_box(\MPpos{\MPvar{to}});
c[2] := cxy ;
drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
\stopMPpositiongraphic
\startpositionoverlay{arrow}
\setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
\setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
\stoppositionoverlay
\defineoverlay[arrow][\positionoverlay{arrow}]
\setupbackgrounds[page][background=arrow]


\starttext

\section {Anchors and layers}

In a previous section we saw that some \hpos{X-1}{words} were
\hpos{X-2}{circled} and connected by an \hpos{X-3}{arrow}.
As with most things in \CONTEXT, marking these words is separated
from declaring what to do with those words. This paragraph is keyed
in as:

\stoptext


The interface changed a bit

\setupMPvariables
  [mpos:encircle]
  [fillcolor=lightgray,
   filloffset=0pt,
   linecolor=blue,
   lineoffset=5pt,
   linewidth=1pt]

\startMPpositiongraphic{mpos:encircle}{linecolor,fillcolor,linewidth,lineoffset}
if unknown context_apos : input mp-apos.mpiv ; fi ;
\MPgetposboxes{\MPvar{self}}{\MPanchorid}
if nofposboxes = 1 :
posboxes[1] := posboxes[1] enlarged \MPvar{lineoffset} cornered 
\MPvar{lineoffset}  ;

fill posboxes[1] withcolor \MPvar{fillcolor} ;
draw posboxes[1] withpen pencircle scaled \MPvar{linewidth} 
withcolor \MPvar{linecolor} ;

fi ;
\stopMPpositiongraphic

\setupMPvariables
  [mpos:connect]
  [linecolor=red,
   lineoffset=.25ex,
   linewidth=1pt]

\startMPpositiongraphic{mpos:connect}{linecolor,lineoffset,linewidth}
if unknown context_apos : input mp-apos.mpiv ; fi ;
boxlinewidth  := \MPvar{linewidth} ;
boxlineoffset := \MPvar{lineoffset} ;
def boxlineoptions = withcolor \MPvar{linecolor} enddef ;
\MPgetposboxes{\MPvar{from},\MPvar{to}}{\MPanchorid}
connect_positions ;
\stopMPpositiongraphic

\starttext

\startpositionoverlay{text-1}

\setMPpositiongraphic{connect-1-b}{mpos:connect}{from=connect-1-b,to=connect-1-e}

\setMPpositiongraphic{connect-1-e}{mpos:connect}{from=connect-1-b,to=connect-1-e}
\stoppositionoverlay

\startpositionoverlay{text-1}
\setMPpositiongraphic{encircle-1}{mpos:encircle}{self=encircle-1}
\stoppositionoverlay

test \hpos{connect-1-b}{START}
\dorecurse{10}{\input ward}
\hpos{encircle-1}{\strut HERE}
\dorecurse{10}{\input ward}
\hpos{connect-1-e}{STOP} test

\stoptext






2016-03-24 18:23 GMT+01:00 Piotr Kopszak :

Hello list,

The solution shown here no longer works with recent beta (indeed, it
probably ceased to work some time ago). How should it be corrected?

Best

Piotr

2010-10-24 0:14 GMT+02:00 Aditya Mahajan :

On Sat, 23 Oct 2010, Herbert Voss wrote:


It is a hard job to understand how all works ...



I agree. That chapter is confusing if you do not know already how the
mechanism
works.


I tried to create the first example of the
documentation "Page 257 Anchors and layers",
but failed with mkii and iv. The page is created,
but without the graphical elements. Not using
\startbuffer--\stopbuffer makes no difference.



You are simply setting the positions. You also need to tell ConTeXt to do
something with the positions.

1. First define a position graphic that does something with the anchors that
it is passed.

\startMPpositiongraphic{mypos:arrow}
   pair c[] ;
   initialize_box(\MPpos{\MPvar{self}});
   c[1] := cxy ;
   initialize_box(\MPpos{\MPvar{to}});
   c[2] := cxy ;
   drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
\stopMPpositiongraphic

cxy is the center of the box. See the defn of initialize_box in mp-core.mp
for other values. I wish these were better documented.

2. Then define a position overlay that specifies the relation between the
anchors.

\startpositionoverlay{arrow}
\setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
\setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
\stoppositionoverlay


3. Define an overlay that is mapped to MP position overlay.

\defineoverlay[arrow][\positionoverlay{arrow}]

4. Hook the overlay as a page background

\setupbackgrounds[page][background=arrow]

5. Then everything will work.

\starttext

\section {Anchors and layers}

In a previous section we saw that some \hpos{X-1} {words} were
\hpos{X-2}{circled} and connected by an \hpos{X-3} {arrow}.
As with most things in \CONTEXT, marking these words is separated
from declaring what to do with those words. This paragraph is keyed
in as:

\stoptext

Aditya
___
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 : htt

Re: [NTG-context] metafun

2016-03-24 Thread luigi scarso
On Thu, Mar 24, 2016 at 6:24 PM, Piotr Kopszak  wrote:

> P.S.
>
> For your conveniance, the minimal example:
>
> \startMPpositiongraphic{mypos:arrow}
>pair c[] ;
>initialize_box(\MPpos{\MPvar{self}});
>c[1] := cxy ;
>initialize_box(\MPpos{\MPvar{to}});
>c[2] := cxy ;
>drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
> \stopMPpositiongraphic
> \startpositionoverlay{arrow}
> \setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
> \setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
> \stoppositionoverlay
> \defineoverlay[arrow][\positionoverlay{arrow}]
> \setupbackgrounds[page][background=arrow]
>
>
> \starttext
>
> \section {Anchors and layers}
>
> In a previous section we saw that some \hpos{X-1}{words} were
> \hpos{X-2}{circled} and connected by an \hpos{X-3}{arrow}.
> As with most things in \CONTEXT, marking these words is separated
> from declaring what to do with those words. This paragraph is keyed
> in as:
>
> \stoptext
>
>
>
context testsuite
http://www.pragma-ade.nl/context/latest/cont-tst.7z

doc/context/tests/mkiv/metafun/connected-001.tex

\startMPdefinitions
% I don't know why this does not get loaded automatically. Answer:
seldom needed.
input mp-abck.mpiv;
\stopMPdefinitions

\startMPpositiongraphic{mypos:arrow}
   %if unknown context_apos : input mp-apos.mpiv ; fi ;
   pair c[] ;
   initialize_box(\MPpos{\MPvar{self}});
   c[1] := cxy ;
   initialize_box(\MPpos{\MPvar{to}});
   c[2] := cxy ;
   drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
\stopMPpositiongraphic
\startpositionoverlay{arrow}
\setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
\setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
\stoppositionoverlay
\defineoverlay[arrow][\positionoverlay{arrow}]
\setupbackgrounds[page][background=arrow]


\starttext

\section {Anchors and layers}

In a previous section we saw that some \hpos{X-1}{words} were
\hpos{X-2}{circled} and connected by an \hpos{X-3}{arrow}.
As with most things in \CONTEXT, marking these words is separated
from declaring what to do with those words. This paragraph is keyed
in as:

\stoptext

-- 
luigi
___
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] metafun

2016-03-24 Thread Piotr Kopszak
P.S.

For your conveniance, the minimal example:

\startMPpositiongraphic{mypos:arrow}
   pair c[] ;
   initialize_box(\MPpos{\MPvar{self}});
   c[1] := cxy ;
   initialize_box(\MPpos{\MPvar{to}});
   c[2] := cxy ;
   drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
\stopMPpositiongraphic
\startpositionoverlay{arrow}
\setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
\setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
\stoppositionoverlay
\defineoverlay[arrow][\positionoverlay{arrow}]
\setupbackgrounds[page][background=arrow]


\starttext

\section {Anchors and layers}

In a previous section we saw that some \hpos{X-1}{words} were
\hpos{X-2}{circled} and connected by an \hpos{X-3}{arrow}.
As with most things in \CONTEXT, marking these words is separated
from declaring what to do with those words. This paragraph is keyed
in as:

\stoptext

2016-03-24 18:23 GMT+01:00 Piotr Kopszak :
> Hello list,
>
> The solution shown here no longer works with recent beta (indeed, it
> probably ceased to work some time ago). How should it be corrected?
>
> Best
>
> Piotr
>
> 2010-10-24 0:14 GMT+02:00 Aditya Mahajan :
>> On Sat, 23 Oct 2010, Herbert Voss wrote:
>>
>>> It is a hard job to understand how all works ...
>>
>>
>> I agree. That chapter is confusing if you do not know already how the
>> mechanism
>> works.
>>
>>> I tried to create the first example of the
>>> documentation "Page 257 Anchors and layers",
>>> but failed with mkii and iv. The page is created,
>>> but without the graphical elements. Not using
>>> \startbuffer--\stopbuffer makes no difference.
>>
>>
>> You are simply setting the positions. You also need to tell ConTeXt to do
>> something with the positions.
>>
>> 1. First define a position graphic that does something with the anchors that
>> it is passed.
>>
>> \startMPpositiongraphic{mypos:arrow}
>>   pair c[] ;
>>   initialize_box(\MPpos{\MPvar{self}});
>>   c[1] := cxy ;
>>   initialize_box(\MPpos{\MPvar{to}});
>>   c[2] := cxy ;
>>   drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
>> \stopMPpositiongraphic
>>
>> cxy is the center of the box. See the defn of initialize_box in mp-core.mp
>> for other values. I wish these were better documented.
>>
>> 2. Then define a position overlay that specifies the relation between the
>> anchors.
>>
>> \startpositionoverlay{arrow}
>> \setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
>> \setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
>> \stoppositionoverlay
>>
>>
>> 3. Define an overlay that is mapped to MP position overlay.
>>
>> \defineoverlay[arrow][\positionoverlay{arrow}]
>>
>> 4. Hook the overlay as a page background
>>
>> \setupbackgrounds[page][background=arrow]
>>
>> 5. Then everything will work.
>>
>> \starttext
>>
>> \section {Anchors and layers}
>>
>> In a previous section we saw that some \hpos{X-1} {words} were
>> \hpos{X-2}{circled} and connected by an \hpos{X-3} {arrow}.
>> As with most things in \CONTEXT, marking these words is separated
>> from declaring what to do with those words. This paragraph is keyed
>> in as:
>>
>> \stoptext
>>
>> Aditya
>> ___
>> 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
>> ___
>
>
>
> --
> http://okle.pl



-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] metafun

2016-03-24 Thread Piotr Kopszak
Hello list,

The solution shown here no longer works with recent beta (indeed, it
probably ceased to work some time ago). How should it be corrected?

Best

Piotr

2010-10-24 0:14 GMT+02:00 Aditya Mahajan :
> On Sat, 23 Oct 2010, Herbert Voss wrote:
>
>> It is a hard job to understand how all works ...
>
>
> I agree. That chapter is confusing if you do not know already how the
> mechanism
> works.
>
>> I tried to create the first example of the
>> documentation "Page 257 Anchors and layers",
>> but failed with mkii and iv. The page is created,
>> but without the graphical elements. Not using
>> \startbuffer--\stopbuffer makes no difference.
>
>
> You are simply setting the positions. You also need to tell ConTeXt to do
> something with the positions.
>
> 1. First define a position graphic that does something with the anchors that
> it is passed.
>
> \startMPpositiongraphic{mypos:arrow}
>   pair c[] ;
>   initialize_box(\MPpos{\MPvar{self}});
>   c[1] := cxy ;
>   initialize_box(\MPpos{\MPvar{to}});
>   c[2] := cxy ;
>   drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
> \stopMPpositiongraphic
>
> cxy is the center of the box. See the defn of initialize_box in mp-core.mp
> for other values. I wish these were better documented.
>
> 2. Then define a position overlay that specifies the relation between the
> anchors.
>
> \startpositionoverlay{arrow}
> \setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
> \setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
> \stoppositionoverlay
>
>
> 3. Define an overlay that is mapped to MP position overlay.
>
> \defineoverlay[arrow][\positionoverlay{arrow}]
>
> 4. Hook the overlay as a page background
>
> \setupbackgrounds[page][background=arrow]
>
> 5. Then everything will work.
>
> \starttext
>
> \section {Anchors and layers}
>
> In a previous section we saw that some \hpos{X-1} {words} were
> \hpos{X-2}{circled} and connected by an \hpos{X-3} {arrow}.
> As with most things in \CONTEXT, marking these words is separated
> from declaring what to do with those words. This paragraph is keyed
> in as:
>
> \stoptext
>
> Aditya
> ___
> 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
> ___



-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Why does 0.0001pt make such a big difference?

2016-03-24 Thread Hans Hagen

On 3/24/2016 8:58 AM, Peter Münster wrote:

Hi,

Please compare \setupwhitespace[0.0001pt plus 2ex] with
\setupwhitespace[0pt plus 2ex] here:

\showframe
\setuphead[section][style={\switchtobodyfont[72pt]}]
\setupalign[height]
\setupwhitespace[0.0001pt plus 2ex]  % desired result
%\setupwhitespace[0pt plus 2ex]  % "plus 2ex" is unused
\starttext
\dorecurse{5}{\dorecurse{150}{bla }\par}
\section{test}
bla
\stoptext

Why is there such a difference please?


because the zero glue is discarded (in context) due to another one 
taking precedence; i'll be a bit more tolerant but i'm not sure of side 
effects


(for now using 1sp plus 2ex is quite ok)

Hans




-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] Length range control of the last line of paragraph

2016-03-24 Thread Hans Hagen

On 3/24/2016 3:10 AM, Aditya Mahajan wrote:

On Tue, 22 Mar 2016, Hans Hagen wrote:


a next beta will provide three new keywords (related to n times
parindent filling, fwiw)

\startnarrower[left] \setupalign[four]  4>\the\parfillskip \ward
\par \stopnarrower
\startnarrower[left] \setupalign[three] 3>\the\parfillskip \ward
\par \stopnarrower
\startnarrower[left] \setupalign[two]   2>\the\parfillskip \ward
\par \stopnarrower


I think that two, three, four are not very descriptive. An easier to
remember interface could be \setupalign[3*parindent], etc.


- i don't wanted new keywords

- we don't scan for n* in setupalign (and "3*parindent" could be a 
keyword of course but messes the interface)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] Why does 0.0001pt make such a big difference?

2016-03-24 Thread Peter Münster
Hi,

Please compare \setupwhitespace[0.0001pt plus 2ex] with
\setupwhitespace[0pt plus 2ex] here:

\showframe
\setuphead[section][style={\switchtobodyfont[72pt]}]
\setupalign[height]
\setupwhitespace[0.0001pt plus 2ex]  % desired result
%\setupwhitespace[0pt plus 2ex]  % "plus 2ex" is unused
\starttext
\dorecurse{5}{\dorecurse{150}{bla }\par}
\section{test}
bla
\stoptext

Why is there such a difference please?

TIA,
-- 
   Peter
___
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
___