ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Floris van Manen <vm@klankschap.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [rotate question]
Date: Fri, 1 May 2020 16:28:27 +0200	[thread overview]
Message-ID: <6fdf9b4c-5fc5-ad19-2325-da8b98441d94@klankschap.nl> (raw)

[-- 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
___________________________________________________________________________________

                 reply	other threads:[~2020-05-01 14:28 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=6fdf9b4c-5fc5-ad19-2325-da8b98441d94@klankschap.nl \
    --to=vm@klankschap.nl \
    --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).