ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: ntg-context@ntg.nl, Rudolf Bahr <quasi@quasi.de>
Subject: Re: Moving horizontally a whole ensemble of layers in the same run?
Date: Tue, 17 Dec 2019 19:30:49 +0100	[thread overview]
Message-ID: <d71b93a3-af1d-b68d-78ea-070d29c7ab1f@xs4all.nl> (raw)
In-Reply-To: <20191217181832.GA6583@nan>

On 12/17/2019 7:18 PM, Rudolf Bahr wrote:
> 
> Hi Hans,
> 
> assume we fixed between "\definelayer" and "\flushlayer" a whole ensemble
> of layers on a page. And by calculating per luacode we determined the leftmost
> and the rightmost edge of the ensemble and would now like to horizontally centre
> the ensemble. We don't know the rightmost edge before we placed the last layer.
> By luacode we can calculate how much the centring movement should be, because we
> know "\textwidth", but we cannot save the calculated centring value in the context
> program for another run. Saving the luacode values of hundred of pages in flattened
> lua tables would be possible, but rather awkward; the problem of relating pages to
> tables would arise, especially when pages are taken out or additional pages are
> inserted.
> 
> Do you know a way to settle the centring in the same context run in which the layers
> are placed? Could "\flushlayer" perform it somehow?
you need to make a MWE to show what you mean

normally

\hbox to <somewidth>{\hss<come content>\hss}

is good enough for centering

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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-12-17 18:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 18:18 Rudolf Bahr
2019-12-17 18:30 ` Hans Hagen [this message]
2019-12-18 14:13 Rudolf Bahr
2019-12-18 17:13 ` Wolfgang Schuster
2019-12-18 18:46   ` Rudolf Bahr

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=d71b93a3-af1d-b68d-78ea-070d29c7ab1f@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    --cc=quasi@quasi.de \
    /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).