Hi Hans,

Thank you for the new upload.

The teaser examples work fine, many thanks !
I have a question though: how can one center within a page a text, for example 
typeset in a circular shape? I tried with \startalignment, and also with 
\startplacefigure but none of these gives a centered circular shape.

Also I noticed that if one removes the comment at the end of 
\startshapedparagraph, or add a blank line after that, then the circular shape 
is destroyed: is this on purpose ?

Best regards: Otared

% begin example-circular-shape.tex
\starttext

%\startuseMPgraphic{circle}
%       lmt_parshape [
%               path       = fullcircle scaled 136mm,
%               offset     = 2mm,
%               bottomskip = - 1.5LineHeight,
%       ] ;
%\stopuseMPgraphic

\startuseMPgraphic{circleBis}
        lmt_parshape [
                path       = fullcircle scaled 90mm,
                offset     = 2mm,
                bottomskip = - 1.5LineHeight,
        ] ;
\stopuseMPgraphic

\startalignment[middle]
%\startplacefigure[align=middle,number=no]
\start
\startshapedparagraph[list=circle,mp=circleBis,repeat=yes,method=repeat]%
        \setupalign[verytolerant,stretch,last]
        \dontcomplain
                {\darkred     \samplefile{thuan}}
\stopshapedparagraph
\stop
%\stopplacefigure
\stopalignment 

\stoptext
% end example-circular-shape.tex

> On 1 Mar 2021, at 15:44, Hans Hagen <j.ha...@xs4all.nl> wrote:
> 
> Hi,
> 
> I uploaded a new lmtx. As I'm currently going through the metafun todo files 
> I ended up at the fancy shape part (parshapes) running over multiple 
> paragraphs and decided to provide a (kind of low level) interface that 
> integrates that. The example code is a few decades old but still works ok (i 
> might try to improve them a bit some day). Anyway, here is a teaser:
> 
> \starttext
> 
> \startuseMPgraphic{circle}
>    lmt_parshape [
>        path       = fullcircle scaled 136mm,
>        offset     = 2mm,
>        bottomskip = - 1.5LineHeight,
>    ] ;
> \stopuseMPgraphic
> 
> \start
> \startshapedparagraph[list=circle,mp=circle,repeat=yes,method=cycle]%
>    \setupalign[verytolerant,stretch,last]\dontcomplain
>    {\darkred     \samplefile{tufte}}\par
>    {\darkgreen   \samplefile{tufte}}\par
>    {\darkblue    \samplefile{tufte}}\par
>    {\darkcyan    \samplefile{tufte}}\par
>    {\darkmagenta \samplefile{tufte}}\par
> \stopshapedparagraph
> \stop
> 
> \page
> 
> \start
> \startshapedparagraph[list=circle,mp=circle,repeat=yes,method=repeat]%
>    \setupalign[verytolerant,stretch,last]\dontcomplain
>    {\darkred     \samplefile{tufte}}
>    {\darkgreen   \samplefile{tufte}}
>    {\darkblue    \samplefile{tufte}}
>    {\darkcyan    \samplefile{tufte}}
>    {\darkmagenta \samplefile{tufte}}
> \stopshapedparagraph
> \stop
> 
> \stoptext
> 
> The interface is still somewhat rough (no grouping for instance, not a real 
> envrionment so that might change) but seems to work ok. One can also go the 
> tex route and say:
> 
> \startparagraphshape[test]
>    left 1mm right 1mm
>    left 2mm right 2mm
>    left 3mm right 3mm
>    copy 8
>    left 4mm right 4mm
>    left 5mm right 5mm
>    left 5mm hsize 10cm
> \stopparagraphshape
> 
> or
> 
> \startparagraphshape[test]
>    left 1mm right 1mm
>    right 3mm
>    left 5mm right 5mm
>    repeat
> \stopparagraphshape
> 
> or
> 
> \startparagraphshape[test]
>    both 1mm both 2mm both 3mm both 4mm both 5mm both 6mm
>    both 7mm both 6mm both 5mm both 4mm both 3mm both 2mm
> \stopparagraphshape
> 
> or
> 
> \startparagraphshape[test-repeat]
>    both 1mm both 2mm both 3mm both 4mm both 5mm both 6mm
>    both 7mm both 6mm both 5mm both 4mm both 3mm both 2mm
>    repeat
> \stopparagraphshape
> 
> and use that with:
> 
> \startshapedparagraph[list=test]
>    \dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
> \stopshapedparagraph
> 
> or
> 
> \startshapedparagraph[list=test-repeat]
>    \dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
> \stopshapedparagraph
> 
> Some more info is in the lowlevel-paragrsph document (part of the low level 
> series).
> 
> This kind of features falls into the category 'fancy' (no one reqtested it), 
> nice for posters and covers. It might evolve depending on needs for fancy 
> features, but as said, it's currently a side track of metafun, so it's also 
> in the category 'fun'. It's code for 'controlled' usage.
> 
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to