ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [rotate question]
@ 2020-05-01 14:28 Floris van Manen
  0 siblings, 0 replies; only message in thread
From: Floris van Manen @ 2020-05-01 14:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

I try to introduce a per character rotation using lua.
But a negative rotation angle seems to introduce a vertical offset to
the base line.
It might be intended, but how to get it gone?
Any hints?
.Floris

\def\streepA{%
\rotate[rotation=\ctxlua{context(math.random(1,15))}]{\|}%
}
\def\streepB{%
\rotate[rotation=\ctxlua{context(math.random(-15,-1))}]{\|}%
}
\def\stapA#1{\dorecurse{#1}{\streepA}}
\def\stapB#1{\dorecurse{#1}{\streepB}}
\starttext
\startTEXpage[offset=20mm, width=297mm]
\startalignment[width]~
\dorecurse{50}{\stapA{10}\stapB{10}}
\stopalignment
\stopTEXpage
\stoptext



[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 2456 bytes --]

[-- Attachment #3: 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:[~2020-05-01 14:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01 14:28 [rotate question] Floris van Manen

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