KOMA-scrartcl Type Area
Revision as of 09:56, 21 July 2004 by Patrick Gundlach (talk | contribs)
LaTeX:
\documentclass[DIVcalc,twoside]{scrartcl} \begin{document} \noindent\framebox{\rule{0pt}{\textheight}\rule{\textwidth}{0pt}} \end{document}
ConTeXt:
\def\BCOR{3mm}% eventual bounding correction \newdimen\PageWidth \PageWidth=\paperwidth \doifmode{BCOR}{\PageWidth=\dimexpr(\PageWidth-\BCOR)} \edef\Ratio{\withoutpt{\the\dimexpr(2\paperheight/(\PageWidth/32768))}} \setbox\scratchbox\hbox{\dorecurse{26}{\character\recurselevel}} \newdimen\Width \newdimen\Height \newdimen\Back \Width=\dimexpr(2.6\wd\scratchbox) \Height=\dimexpr(\Ratio\Width) \doifmodeelse{oneside}{\Back=\dimexpr((\PageWidth - \Width) / 2)} {\Back=\dimexpr((\PageWidth - \Width) / 3)} \doifmode{BCOR}{\Back=\dimexpr(\Back + \BCOR)} \edef\Top{\the\dimexpr((\paperheight - \Height) / 3 - 3\lineheight)} \Height=\dimexpr(\Height + 8\lineheight) \setuplayout[backspace=\the\Back,height=\the\Height,width=\the\Width, header=2\lineheight,headerdistance=\lineheight, footer=2\lineheight,footerdistance=3\lineheight,topspace=\Top] \starttext \framed[width=\textwidth,height=\textheight]{} \stoptext
In the beta version of ConTeXt, there is probably a better way to achieve the same...