From: Keith McKay <mckaymeister@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Text on curves
Date: Tue, 23 Apr 2019 20:07:46 +0100 [thread overview]
Message-ID: <42efcefb-d6f9-96f4-834e-2b6f0a4a8b95@gmail.com> (raw)
[-- 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
___________________________________________________________________________________
reply other threads:[~2019-04-23 19:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42efcefb-d6f9-96f4-834e-2b6f0a4a8b95@gmail.com \
--to=mckaymeister@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).