From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: [NTG-context] Re: about : setuplayout[width=fit or height=fit]
Date: Sat, 11 Jan 2025 00:31:47 +0100 [thread overview]
Message-ID: <90801d08-7889-4e11-8394-d9ca13c6e141@freedom.nl> (raw)
In-Reply-To: <189853117.47920.1736497737079@189mail-nwebmail-180524-dep-b7456985-9sk6p>
On 1/10/2025 9:28 AM, wangzhongtian wrote:
> hi,hans ,
>
> Maybe I find some bug in file page-lay.mkxl, in
> \def\page_layouts_synchronize.
>
> 1. Here is the source code snippet from the above code file. I think it
> is reasonable if change the last line of code to:
>
> \global\advanceby\makeupheight\dimexpr-\topdistance-\topheight-
> \scratchdimen\relax
>
> \orelse\ifx\p_page_layouts_height\v!fit
> \ifzeropt\bottomspace
> \global\bottomspace\topspace
> \fi
> \global\makeupheight\dimexpr\paperheight-\bottomspace\relax
> \scratchdimen\dimexpr\topspace-\topheight-\topdistance\relax
> \ifdim\scratchdimen<\zeropoint
> \scratchdimen\zeropoint
> \fi
> \global\advanceby\makeupheight\dimexpr-\bottomdistance-\bottomheight-
> \scratchdimen\relax
you mean
\global\advanceby\makeupheight
\dimexpr-\bottomdistance-\bottomheight-\scratchdimen\relax
becomes
\global\advanceby\makeupheight
\dimexpr-\topdistance-\topheight-\scratchdimen\relax
but the top values are actually in scratchdimen so
\global\advanceby\makeupheight
\dimexpr-\topdistance-\topheight-\topspace-\topheight-\topdistance\relax
or
\global\advanceby\makeupheight
\dimexpr-2\topdistance-2\topheight-\topspace\relax
which is wrong, so the question is: what is the issue you try to fix
> 2. Here is the source code snippet from above code file. I think it is
> reasonable if change the last line of code to:
>
> \global\advanceby\makeupwidth\dimexpr
> -\leftmargindistance-\leftmarginwidth
> -\leftedgedistance -\leftedgewidth
> -\scratchdimen\relax
>
> \orelse\ifx\p_page_layouts_width\v!fit
> \ifzeropt\cutspace
> \global\cutspace\backspace
> \fi
> \global\makeupwidth\dimexpr\paperwidth-\cutspace\relax
> \scratchdimen\dimexpr\backspace
> -\leftedgewidth-\leftedgedistance
> -\leftmarginwidth-\leftmargindistance\relax
> \ifdim\scratchdimen<\zeropoint
> \scratchdimen\zeropoint
> \fi
>
> \global\advanceby\makeupwidth\dimexpr
>
> -\rightmargindistance-\rightmarginwidth
>
> -\rightedgedistance-\rightedgewidth
> -\scratchdimen\relax
>
>
> ----------------------------
>
> zhongtian wang
>
> Shijiazhuang YouWen Information Technology Co.,Ltd,China
>
> 13311202589 wangzht@189.cn
> <mailto:wangzhongtian@189.cn>
>
>
>
>
>
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
--
-----------------------------------------------------------------
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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2025-01-10 23:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 8:28 [NTG-context] " wangzhongtian
2025-01-10 23:31 ` Hans Hagen via ntg-context [this message]
2025-01-11 6:56 [NTG-context] " wangzhongtian
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=90801d08-7889-4e11-8394-d9ca13c6e141@freedom.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@freedom.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).