ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Metafun::followtokens : more than one path; possible enhancements; notes
@ 2001-01-28 21:02 Giuseppe Bilotta
  2001-01-29 12:51 ` Hans Hagen
  2001-01-29 16:26 ` Giuseppe Bilotta
  0 siblings, 2 replies; 3+ messages in thread
From: Giuseppe Bilotta @ 2001-01-28 21:02 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2073 bytes --]

Hello,

as I've already said, I began to play with MetaFun. First of all, I solved the
problem of \MPprologues being undefined by defining it in my doc (setting it to
2), but it would be better if this patch was added to the distribution.

Secondly, I instantly found a limitation :-) in \followtokens: you cannot make
text follow two paths; let me explain with an example. I can build a full
circle, with the first half written clockwise, and the second half written
counterclockwise, by using two \followtokens tricks; by putting the drawings one
under the other I get the full circle. But what if I want the two halves to be
not the upper and lower, but some other (e.g., upper left and lower right)? You
cannot merge the two paths, since they don't touch, so ...

At first I designed a \doublefollowtokens; then I turned it in the couple
of macros that you might see in the attached file, together with a test.

A future enhancements could be a \longfollowtokens that automatically splits a
(single) token list into as much paths as necessary (the user should
preventively define enough paths), more like a parshape (actually, the splitting
could be done by parshaping the text using the lengths of the paths as
parshape...). But this is definitely too much for me, at least at the current
stage of knowledge of both TeX and ConTeXt.

Final note: I suspect that some fine tuning on these macro group could render
TeX--XeT useless. I mean, you can reflect a whole paragraph: first typeset it
to get the linebreaks, then apply \followtokens to each line ... you don't even
need a reflected font! Actually, any kind of rotatation/skewing/etc, normally
achieved with PSTricks, could be achieved this way, in a driver-independent way
(if Hans Hagen fixes the undefined \MPprologues with the DVI drivers).

And possibly even multidirectional typesetting could be implemented ... of
course, "native" multidirectional would be much much much faster, but ...
something like a "poor man's Omega" (ok, Omega does much more than that, with
the OCP lists etc ...)

Giuseppe Bilotta

[-- Attachment #2: fun.zip --]
[-- Type: application/x-zip-compressed, Size: 1323 bytes --]

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

end of thread, other threads:[~2001-01-29 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-28 21:02 Metafun::followtokens : more than one path; possible enhancements; notes Giuseppe Bilotta
2001-01-29 12:51 ` Hans Hagen
2001-01-29 16:26 ` Giuseppe Bilotta

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