ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* lmtx update / teaser
@ 2021-03-01 14:44 Hans Hagen
  2021-03-01 17:27 ` Otared Kavian
  2021-03-02 10:15 ` mf
  0 siblings, 2 replies; 6+ messages in thread
From: Hans Hagen @ 2021-03-01 14:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-02 10:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 14:44 lmtx update / teaser Hans Hagen
2021-03-01 17:27 ` Otared Kavian
2021-03-01 18:13   ` Hans Hagen
2021-03-02 10:15 ` mf
2021-03-02 10:33   ` Hans Hagen
2021-03-02 10:47   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).