about : setuplayout[width=fit or height=fit]
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
wangzhongtian