ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Text on curves
@ 2019-04-23 19:07 Keith McKay
  0 siblings, 0 replies; only message in thread
From: Keith McKay @ 2019-04-23 19:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2043 bytes --]

I have been trying to typeset text onto curves and have been successful 
with the help of the MetaFun manual, and the followtext command which I 
saw in some correspondence between dr Hans van der Meer and Hans Hagen 
on the mailing list in January this year ( the subject was Double Follow 
Tokens).

The followtext command seems to used for a simple line of text and if I 
increase the number of words in the line the font size is reduced to 
make it fit to the length of the curve (see MWE below). I would like to 
typeset complete paragraphs on the curve(s) and the only way I see of 
doing this without the font size changing is to manually create each 
line separately.

Is their a way where this can be done by MetaFun automatically rather 
than manually? It would be really nice if I could create a number of 
curves and then MetaFun typsets a paragraph of text on to them. Also, 
can other options be used with followtext e.g. \input file?

I'm a complete novice with MetaFun so any advice appreciated.

Best Wishes

Keith McKay

----Minimum Working Example----

\starttext

Two different lengths of text on the same curve showing font size being 
reduced.

\blank

\startMPcode

path q; q := function (1, "x", "sin(2x)" , 1, 10, .01) scaled 1.5cm ;

draw followtext(q, "some text but not that long. But here and there and 
everywhere the text can become longer");

draw followtext (q shifted (0cm,-2cm), "some text but not that long. But 
here and there and everywhere the text can become longer and longer and 
longer finally ending here.");

\stopMPcode

Some other examples of text on a curve

\blank

\startMPcode

path p; p := reverse halfcircle xyscaled 55mm ;

draw followtext(p, "some text but not that long");

\stopMPcode

nice spiral shape with text

\startMPcode

z0 = (0,0); z1 = (60,40);

z2 = (40,90); z3 = (10,70);

z4 = (30,50);

path p; p = (z0..z1..z2..z3..z4) ;

draw followtext(p scaled 1mm, "some text but not that long. But here and 
there and everywhere the text can become longer");

\stopMPcode

\stoptext


[-- Attachment #1.2: Type: text/html, Size: 5147 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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] only message in thread

only message in thread, other threads:[~2019-04-23 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 19:07 Text on curves Keith McKay

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).