Command/setupscale
Jump to navigation
Jump to search
Contents
\setupscale
Summary
The command \setupscale is used to define the general behaviour of \scale.
Settings
| \setupscale[...,...][...=...,...] | |
| [...,...] | name |
| scale | number |
| xscale | number |
| yscale | number |
| width | dimension |
| height | dimension |
| depth | yes no |
| lines | number |
| factor | fit broad max min auto default |
| hfactor | fit broad max min auto default |
| wfactor | fit broad max min auto default |
| maxwidth | dimension |
| maxheight | dimension |
| s | number |
| sx | number |
| sy | number |
| equalwidth | dimension |
| equalheight | dimension |
| grid | yes fit height depth halfline |
| Option | Explanation | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| scale |
| ||||||||||||||
| xscale |
| ||||||||||||||
| yscale |
| ||||||||||||||
| lines |
| ||||||||||||||
| factor |
| ||||||||||||||
| hfactor |
| ||||||||||||||
| wfactor |
| ||||||||||||||
| maxwidth |
| ||||||||||||||
| maxheight |
| ||||||||||||||
| s |
| ||||||||||||||
| sx |
| ||||||||||||||
| sy |
| ||||||||||||||
Description
Examples
factor=min
With factor=min and clipping to the max size you achieve proportional filling the max area.
% Wolfgang Schuster 2026-02-07 \startbuffer[Example] \setupexternalfigures[location=default] \setuppapersize[A4][A4,oversized] \setuplayout[location=middle] \showframe \starttext \startpagemakeup \centerbox{\scale[factor=min]{\externalfigure[mill]}}% \stoppagemakeup \startpagemakeup \clip[width=1pw,height=1ph]{\centerbox{\scale[factor=min]{\externalfigure[mill]}}}% \stoppagemakeup \stoptext \stopbuffer \startTEXpage \startcombination[2*1] {\typesetbuffer[Example][page=1,height=7cm,frame=on]}{without clipping} {\typesetbuffer[Example][page=2,height=7cm,frame=on]}{with clipping} \stopcombination \stopTEXpage
