1,542 bytes added
, 09:11, 1 December 2007
== Sample Code ==
=== Full page figures ===
The following macro allows me to include figures in my document and adjust them to have the size of a normal page.
<texcode>
\unprotect
\definesystemvariable{xx}
\def\fullpagebox
{\dosingleempty\dofullpagebox}
\def\dofullpagebox[#1]%
{\bgroup
\getparameters[\??xx][\c!nx=1,\c!ny=1,#1]%
\dowithnextbox
{\!!widtha\dimexpr\paperwidth/\nextboxwd\relax
\!!widthb\dimexpr\paperheight/\nextboxht\relax
\ifdim\!!widtha>\!!widthb
\setbox\nextbox\vbox\!!to\@@xxny\paperheight{\vss\expanded{\scale[\c!width=\@@xxnx\paperwidth]{\flushnextbox}}\vss}%
\else
\setbox\nextbox\hbox\!!to\@@xxnx\paperwidth{\hss\expanded{\scale[\c!height=\@@xxny\paperheight]{\flushnextbox}}\hss}%
\fi
\setbox\nextbox\hbox{\clip[\c!width=\@@xxnx\paperwidth,\c!height=\@@xxny\paperheight]{\flushnextbox}}%
\startTEXpage
\flushnextbox
\stopTEXpage
\egroup}%
\hbox}
\def\fullpagefigure
{\dodoubleempty\dofullpagefigure}
\def\dofullpagefigure[#1][#2]%
{\ifsecondargument
\fullpagebox[#1]{\externalfigure[#2]}%
\else
\fullpagebox[]{\externalfigure[#1]}%
\fi}
\protect
\starttext
\fullpagefigure[image]
\fullpagefigure[nx=2][image]
\fullpagefigure[ny=2][image]
\stoptext
</texcode>
== Feature Requests ==
* <code>grid=yes</code> option for <code>\definelayout</code>,
* temporary user variable for privat macros (see above),
* macro <code>\defineuvervariable{...}</code> to define namespaces for third party modules.