summaryrefslogtreecommitdiff
path: root/tex/context/base/page-mak.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-10-20 00:20:14 +0300
committerMarius <mariausol@gmail.com>2011-10-20 00:20:14 +0300
commitb0f6c985f61771b2d115f1632ceeccbd7dc2f1d1 (patch)
tree6b9050431ad0c9b1798e1d165094abb85b3080f0 /tex/context/base/page-mak.mkiv
parentc7071b17e99c543f0480726468420f9ee88e7435 (diff)
downloadcontext-b0f6c985f61771b2d115f1632ceeccbd7dc2f1d1.tar.gz
beta 2011.10.19 23:10
Diffstat (limited to 'tex/context/base/page-mak.mkiv')
-rw-r--r--tex/context/base/page-mak.mkiv224
1 files changed, 0 insertions, 224 deletions
diff --git a/tex/context/base/page-mak.mkiv b/tex/context/base/page-mak.mkiv
deleted file mode 100644
index f27a979e8..000000000
--- a/tex/context/base/page-mak.mkiv
+++ /dev/null
@@ -1,224 +0,0 @@
-%D \module
-%D [ file=page-mak, % copied from main-001,
-%D version=1997.03.31,
-%D title=\CONTEXT\ Page Macros,
-%D subtitle=Simple MakeUp,
-%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 / MakeUp}
-
-\unprotect
-
-%D \macros
-%D {definemakeup, setupmakeup, startmakeup}
-%D
-%D A makeup is a separate page, like a title page or colofon.
-%D There is one standard makeup page, but you can define more
-%D if needed.
-%D
-%D \starttyping
-%D \startstandardmakeup
-%D My Fancy Title
-%D \stopstandardmakeup
-%D \stoptyping
-%D
-%D The associated commands are:
-%D
-%D \showsetup{definemakeup}
-%D \showsetup{setupmakeup}
-%D \showsetup{startmakeup}
-
-\unexpanded\def\definemakeup
- {\dodoubleargument\dodefinemakeup}
-
-\def\dodefinemakeup[#1][#2]%
- {\getparameters
- [\??do#1]%
- [\c!width=\innermakeupwidth, % example in manual / was \makeupwidth
- \c!height=\textheight, % example in manual
- \c!commands=,
- \c!setups=,
- \c!page=\v!right,
- \c!doublesided=\v!empty,
- \c!before=,
- \c!top=\vss,
- \c!bottom=\vss,
- \c!after=,
- \c!bottomstate=\v!normal,
- \c!topstate=\v!normal,
- \c!textstate=\v!normal,
- \c!headerstate=\v!stop,
- \c!footerstate=\v!stop,
- \c!pagestate=\v!stop, % in manual ! ! !
- \c!color=,
- \c!align=,
- #2]%
- \setvalue{\e!start#1\e!makeup}{\startmakeup[#1]}%
- \setvalue{\e!stop #1\e!makeup}{\stopmakeup}}
-
-\unexpanded\def\setupmakeup
- {\dodoubleargument\dosetupmakeup}
-
-\def\dosetupmakeup[#1]%
- {\getparameters[\??do#1]}
-
-%D This will save us some 375 bytes in the format file.
-
-\def\makeupparameter#1{\getvalue{\??do\currentmakeup#1}}
-
-%D The \type{\start}||\type{\stop} macros are used for both
-%D the direct and indirect way. The parameterless call will
-%D build a simple box.
-
-\newtoks\everymakeup
-
-\let\currentmakeup\empty
-
-\unexpanded\def\startmakeup
- {\dodoubleempty\dostartmakeup}
-
-\def\dostartmakeup[#1][#2]%
- {\bgroup
- \edef\currentmakeup{#1}%
- \the\everymakeup
- \iffirstargument
- \setupmakeup[\currentmakeup][#2]%
- \let\stopmakeup\dodostopmakeup
- \expandafter \dodostartmakeup
- \else
- \let\stopmakeup\donostopmakeup
- \expandafter \donostartmakeup
- \fi}
-
-%D The simple case:
-
-\def\donostartmakeup % textwidth ?
- {\page
- \setupheader[\c!state=\v!empty]%
- \setupfooter[\c!state=\v!empty]%
- \setsystemmode\v!makeup
- \vbox to \textheight\bgroup\hsize\textwidth}
-
-\def\donostopmakeup
- {\egroup
- \page
- \egroup}
-
-%D The normal one:
-
-\newbox\makeupbox
-
-\def\dodostartmakeup
- {\doifvaluesomething{\??do\currentmakeup\c!page}
- {\page[\makeupparameter\c!page]}%
- \setsystemmode\v!makeup
- \setupmakeuplayout
- \makeupparameter\c!commands % hm, what is this one doing here ?
- \forgetall % else indented flush
- \global\setbox\makeupbox\vbox to \makeupparameter\c!height
- \bgroup
- \doifsomething{\makeupparameter\c!color}{\startcolor[\makeupparameter\c!color]}% can be made faster
- \doprocesslocalsetups{\makeupparameter\c!setups}%
- \hsize\makeupparameter\c!width
- \doifsomething{\makeupparameter\c!align}
- {\setupalign[\makeupparameter\c!align]}%
- \makeupparameter\c!top}
-
-\def\dodostopmakeup
- {\endgraf
- \makeupparameter\c!bottom
- \doifsomething{\makeupparameter\c!color}{\stopcolor}%
- \egroup
- \doflushmakeup
- \egroup
- \calculatehsizes
- \calculatevsizes}
-
-%D Selective page processing is handled here. (Why?)
-
-\def\doflushmakeup
- {\ifprocessingpages
- \ifpageselected
- \doshipoutmakeup
- \fi
- \else
- \ifpageselected \else
- \doshipoutmakeup
- \fi
- \fi
- \ifselectingpages
- \global\pageselectedfalse
- \fi}
-
-% \def\pushpagestate{\globalpushmacro\@@pnstate}
-% \def\poppagestate {\globalpopmacro \@@pnstate}
-
-\def\doshipoutmakeup
- {\pushpagestate % new
- \makeupparameter\c!before
- \setbox\makeupbox\vbox{\hbox{\color[\makeupparameter\c!color]{\box\makeupbox}}}%
- % \ifgridsnapping
- % new per 22/6/2006
- \ifdim\ht\makeupbox>\vsize
- \ht\makeupbox\vsize
- \fi
- % \fi
- \box\makeupbox
- \setuppagenumber[\c!state=\makeupparameter\c!pagestate]%
- \setupmakeuplayout
- \page
- \makeupparameter\c!after
- \relax % voor fi
- \ifdoublesided \ifodd\realpageno\else
- \processaction
- [\makeupparameter\c!doublesided]
- [ \v!yes=>\emptyhbox
- \page,
- \v!empty=>{\setupmakeuplayout
- \page[\v!blank]%
- \emptyhbox
- \page}]%
- \fi \fi
- \poppagestate} % new
-
-%D The text surrounding the main body text can be influenced
-%D by setting their associated status variables. The
-%D connection between them is made by the following macro
-
-\unexpanded\def\setupmakeuplayout
- {\setupfooter[\c!state=\makeupparameter\c!footerstate]%
- \setupheader[\c!state=\makeupparameter\c!headerstate]%
- \setuptext [\c!state=\makeupparameter\c!textstate]%
- \setupbottom[\c!state=\makeupparameter\c!bottomstate]%
- \setuptop [\c!state=\makeupparameter\c!topstate]%
- % this is needed, but no \setuplayout here; fails in texexec --fig=c
- \recalculatelayout}
-
-%D The standard page template is defined as follows:
-
-\definemakeup
- [\v!standard]
- [\c!width=\innermakeupwidth,
- \c!height=\textheight,
- \c!page=\v!right,
- \c!doublesided=\v!empty]
-
-\definemakeup
- [\v!text]
- [\c!topstate=\v!start,
- \c!headerstate=\v!start,
- \c!textstate=\v!start,
- \c!footerstate=\v!start,
- \c!bottomstate=\v!start,
- \c!doublesided=\v!no,
- \c!page=\v!yes,
- \c!top=\pseudostrut\ignorespaces,
- \c!bottom=\obeydepth\vss]
-
-\protect \endinput