MAJOR=7 MINOR=0 DEVNAME=vcs ˆ¾�þBg Á7H?Ç ƒh¹ÌÂÉMAJOR=4 MINOR=9 DEVNAME=tty9 6ˆl–ßi~”Ð;ò‚À‚ão©‹Fÿ�þC)Y·’Vßq÷@?È ƒx,µÍÃÊÆ%D \module %D [ file=page-mrk, %D version=2011.05.23, % moved from page-lay %D title=\CONTEXT\ Page Macros, %D subtitle=Cutmarks and Colorbars, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. \writestatus{loading}{ConTeXt Page Macros / Cutmarks and Colorbars} \unprotect %D This module implements curmarks and depends on \METAPOST. %D %D \starttyping %D \setuplayout[marking=on,location=middle] %D \setuplayout[marking=page,location=middle] %D \setuplayout[marking=empty,location=middle] %D \setuplayout[marking={color,page},location=middle] %D \setuplayout[marking={one,page},location=middle] %D \setuplayout[marking={two,page},location=middle] %D \setuplayout[marking={four,page},location=middle] %D \stoptyping \def\pagecutmarklength {5mm} \def\pagecutmarkoffset {3mm} % slightly larger than before, and now a fixed size \def\pagecutmarkmargin{10cm} % maybe all these should be global \newconditional\c_page_marks_add_more_color \newconditional\c_page_marks_add_more_marking \newconditional\c_page_marks_add_more_lines \newconditional\c_page_marks_add_page_lines \newconditional\c_page_marks_add_more_number \newcount\c_page_marks_max \newcount\c_page_marks_nx \newcount\c_page_marks_ny \startuniqueMPgraphic{print:color}{w,h,l,o} loadmodule "crop" ; page_marks_add_color(\MPvar w,\MPvar h,\MPvar l,\MPvar o) ; \stopuniqueMPgraphic \startuniqueMPgraphic{print:marking}{w,h,l,o} loadmodule "crop" ; page_marks_add_marking(\MPvar w,\MPvar h,\MPvar l,\MPvar o) ; \stopuniqueMPgraphic \startuniqueMPgraphic{print:lines}{w,h,l,o,x,y} loadmodule "crop" ; page_marks_add_lines(\MPvar w,\MPvar h,\MPvar l,\MPvar o,\MPvar x,\MPvar y, \ifconditional\c_page_marks_add_page_lines tru\else fals\fi e) ; \stopuniqueMPgraphic \startuseMPgraphic{print:number}{w,h,l,o,n} loadmodule "crop" ; page_marks_add_number(\MPvar w,\MPvar h,\MPvar l,\MPvar o,\MPvar n) ; \stopuseMPgraphic \def\page_marks_add_color {\setlayoutcomponentattribute{\v!print:\v!color}% \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup \uniqueMPgraphic {print:color}% {w=\the\scratchwidth,h=\the\scratchheight,% l=\pagecutmarklength,o=\pagecutmarkoffset}% \egroup \wd\scratchbox\scratchwidth\ht\scratchbox\scratchheight\dp\scratchbox\scratchdepth \hskip-\scratchwidth\box\scratchbox} \def\page_marks_add_marking {\setlayoutcomponentattribute{\v!print:\v!marking}% \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup \uniqueMPgraphic {print:marking}% {w=\the\scratchwidth,h=\the\scratchheight,% l=\pagecutmarklength,o=\pagecutmarkoffset}% \egroup \wd\scratchbox\scratchwidth\ht\scratchbox\scratchheight\dp\scratchbox\scratchdepth \hskip-\scratchwidth\box\scratchbox} \def\page_marks_add_lines {\setlayoutcomponentattribute{\v!print:\v!lines}% \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup \uniqueMPgraphic {print:lines}% {w=\the\scratchwidth,h=\the\scratchheight,% l=\pagecutmarklength,o=\pagecutmarkoffset,% x=\the\c_page_marks_nx,y=\the\c_page_marks_ny}% \egroup \wd\scratchbox\scratchwidth\ht\scratchbox\scratchheight\dp\scratchbox\scratchdepth \hskip-\scratchwidth\box\scratchbox} \def\page_marks_add_number {\setlayoutcomponentattribute{\v!print:\v!number}% \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup \useMPgraphic {print:number}% {w=\the\scratchwidth ,h=\the\scratchheight,% l=\pagecutmarklength,o=\pagecutmarkoffset,% n=\number\ifcase\arrangeno\realpageno\else\arrangeno\fi}% \egroup \wd\scratchbox\scratchwidth\ht\scratchbox\scratc