From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25146 Path: news.gmane.org!not-for-mail From: Alexandre Billon Newsgroups: gmane.comp.tex.context Subject: followtokens Date: Fri, 13 Jan 2006 18:39:54 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_17761_1477736.1137173994722" X-Trace: sea.gmane.org 1137174106 31181 80.91.229.2 (13 Jan 2006 17:41:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2006 17:41:46 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 13 18:41:44 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1ExSuB-0004Jo-0H for gctc-ntg-context-518@m.gmane.org; Fri, 13 Jan 2006 18:40:03 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8405A127DC; Fri, 13 Jan 2006 18:40:02 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04789-01; Fri, 13 Jan 2006 18:40:00 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3F125127D9; Fri, 13 Jan 2006 18:40:00 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8AA5A127D9 for ; Fri, 13 Jan 2006 18:39:59 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04481-06 for ; Fri, 13 Jan 2006 18:39:58 +0100 (CET) Original-Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by ronja.ntg.nl (Postfix) with SMTP id 9478F127B5 for ; Fri, 13 Jan 2006 18:39:58 +0100 (CET) Original-Received: by wproxy.gmail.com with SMTP id i4so627236wra for ; Fri, 13 Jan 2006 09:39:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=VpCpAobtYrN3u2vni+nRR8+5YXPX/Jh16+vI9+c/LIFZHdHB3EesjleUvj1F6qud/wswBi2iVrvJEosb05fqyI+5eSzaS342SZG6DlF5HlXx/NNznoumq2CtvWaDCPqPe5IWBfsyrQ3B57Jn4NaNiURHTmpzot9iGlfxqaSt81M= Original-Received: by 10.54.94.16 with SMTP id r16mr5185973wrb; Fri, 13 Jan 2006 09:39:54 -0800 (PST) Original-Received: by 10.54.91.4 with HTTP; Fri, 13 Jan 2006 09:39:54 -0800 (PST) Original-To: mailing list for ConTeXt users X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:25146 Archived-At: ------=_Part_17761_1477736.1137173994722 Content-Type: multipart/alternative; boundary="----=_Part_17762_6031384.1137173994722" ------=_Part_17762_6031384.1137173994722 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Dear all, I am quite new to context (but love it) and i am trying tind a way to typeset texts "properly kerned" in such a way that the characters be all rotated with tiny randomized angle (strange project indeed). I tried to do it by writing a macro inspired by \followtokens. I have two questions : 1. It works but just for text within a single line : I have no clue how t= o manage the line breaking, and I have to admit that I don't know eanough TeX ConTeXt to find out. 2. In playing with the macro followtoken I happened to write two files with no apparent significant difference (I mean for me) but which give quite different results : one properly kerned, and another that is not. Could someone explain me what's happening here ? (files attached) Thanks a lot, Alexandre Billon ------=_Part_17762_6031384.1137173994722 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Dear all,

I am quite new to context (but love it) and i am trying tind a way to typeset texts "properly kerned" in such a way that the characters= be all rotated with tiny randomized angle (strange project indeed). I tried to do it by writing a macro inspired by \followtokens. I have two questions :

1. It works but just for text within a single line :  I have no clue how  to manage the line breaking, and I have to admit that I don't know eanough TeX ConTeXt to find out.

2. In playing with the macro followtoken I happened to write two files with no apparent significant difference (I mean for me) but which give quite different results : one properly kerned, and another that is not. Could someone explain me what's happening here ? (files attached)



Thanks a lot,
Alexandre Billon
------=_Part_17762_6031384.1137173994722-- ------=_Part_17761_1477736.1137173994722 Content-Type: application/x-tex; name=dontwork.tex Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dontwork.tex" \startMPenvironment \definefont[RotFont][RegularBold] \stopMPenvironment \definefont[RotFont][RegularBold] \def\whatever#1% {\appendtoks#1 \to\MPtoks \setbox\MPbox=\hbox{\RotFont\setstrut\strut\the\MPtoks}% \startMPdrawing n := n + 1 ; len[n] := \the\wd\MPbox ; \stopMPdrawing \startMPdrawing[-] pic[n] := btex \RotFont\setstrut\strut#1 etex ; \stopMPdrawing} \def\funnywriting#1% { \bgroup \resetMPdrawing \startMPdrawing picture pic[] ; numeric wid[], len[], pos[], n ; wid[0] := len[0] := pos[0] := n := 0 ; \stopMPdrawing \handletokens#1\with\whatever \startMPdrawing for i=1 upto n : wid[i] := abs(xpart lrcorner pic[i] - xpart llcorner pic[i]) ; pos[i] := len[i]-wid[i] ; %pic[i] := pic[i] rotatedaround(0, -10 randomized 20) ; pic[i] := pic[i] shifted (pos[i],0) ; draw pic[i]; endfor ; \stopMPdrawing \MPdrawingdonetrue \getMPdrawing \resetMPdrawing \egroup} \starttext \funnywriting{La vie est belle} \RotFont La vie est belle \stoptext ------=_Part_17761_1477736.1137173994722 Content-Type: application/x-tex; name=work.tex Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="work.tex" \startMPenvironment \definefont[RotFont][RegularBold] \stopMPenvironment \definefont[RotFont][RegularBold] \def\whatever#1% strut toegevoegd {\appendtoks#1\to\MPtoks \setbox\MPbox=\hbox{\RotFont\setstrut\strut\the\MPtoks}% \startMPdrawing n := n + 1 ; len[n] := \the\wd\MPbox ; \stopMPdrawing \startMPdrawing[-] pic[n] := btex \RotFont\setstrut\strut#1 etex ; \stopMPdrawing} \def\funnywriting#1% { \bgroup \resetMPdrawing \startMPdrawing picture pic[] ; numeric len[], n ; n := 0 ; \stopMPdrawing \handletokens#1\with\whatever \startMPdrawing for i=1 upto n : wid := abs(xpart lrcorner pic[i] - xpart llcorner pic[i]) ; pos := len[i]-wid ; %pic[i] := pic[i] rotatedaround(0, -10 randomized 20) ; draw pic[i] shifted (pos,0); endfor ; \stopMPdrawing \MPdrawingdonetrue \getMPdrawing \resetMPdrawing \egroup} \starttext \funnywriting {La vie est belle} \RotFont La vie est belle \stoptext ------=_Part_17761_1477736.1137173994722 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ------=_Part_17761_1477736.1137173994722--