diff options
author | Hans Hagen <pragma@wxs.nl> | 2003-03-04 00:00:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2003-03-04 00:00:00 +0100 |
commit | 5dcd64b5b404b7dec26fecfd76f8cf25a885ab13 (patch) | |
tree | 043908dae31f350aaf3d15a40bc03d773dd9e962 /tex | |
parent | 76c1d3fbb08e9b34c68f4b326b538f5802802500 (diff) | |
download | context-5dcd64b5b404b7dec26fecfd76f8cf25a885ab13.tar.gz |
stable 2003.03.04
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/core-box.tex | 20 | ||||
-rw-r--r-- | tex/context/base/core-ntb.tex | 4 | ||||
-rw-r--r-- | tex/context/base/meta-pag.tex | 2 | ||||
-rw-r--r-- | tex/context/base/page-bck.tex | 7 | ||||
-rw-r--r-- | tex/context/base/s-mag-01.tex | 390 | ||||
-rw-r--r-- | tex/context/base/supp-mpe.tex | 47 | ||||
-rw-r--r-- | tex/context/base/syst-ext.tex | 30 | ||||
-rw-r--r-- | tex/context/extra/mag-0000.tex | 40 |
9 files changed, 481 insertions, 61 deletions
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index b3ed031df..f10dee3f5 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -15,7 +15,7 @@ \catcode`\{=1 \catcode`\}=2 -\def\contextversion{2003.3.3} +\def\contextversion{2003.3.4} %D Welcome to the main module. When this module is ran through %D \type{initex} or \type{tex -i} or \type{whatevertex} using diff --git a/tex/context/base/core-box.tex b/tex/context/base/core-box.tex index 668b0e9a9..86a7c16ab 100644 --- a/tex/context/base/core-box.tex +++ b/tex/context/base/core-box.tex @@ -567,6 +567,26 @@ % \setlayer[pagefigures][preset=righttop] % \setlayer[pagefigures][preset=leftbottom] % \setlayer[pagefigures][preset=rightbottom] + +\definelayerpreset + [\v!links\v!boven] + [\c!hoek={\v!links,\v!boven},% + \c!plaats={\v!rechts,\v!onder}] + +\definelayerpreset + [\v!rechts\v!boven] + [\c!hoek={\v!rechts,\v!boven},% + \c!plaats={\v!links,\v!onder}] + +\definelayerpreset + [\v!links\v!onder] + [\c!hoek={\v!links,\v!onder},% + \c!plaats={\v!rechts,\v!boven}] + +\definelayerpreset + [\v!rechts\v!onder] + [\c!hoek={\v!rechts,\v!onder},% + \c!plaats={\v!links,\v!boven}] \def\alignedbox {\dodoubleempty\doalignedbox[]} diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex index 04f1b52fc..e97e12955 100644 --- a/tex/context/base/core-ntb.tex +++ b/tex/context/base/core-ntb.tex @@ -96,8 +96,8 @@ \def\settblhei#1#2{\setxvalue{\@@tblprefix#1:h}{#2}} % global ! \def\settblaut#1#2{\setxvalue{\@@tblprefix#1:a}{#2}} % global ! -%def\gettblwid#1{\ifundefined{\@@tblprefix#1:w}\!!zeropoint\else\getvalue{\@@tblprefix#1:w}\fi} -%def\gettblhei#1{\ifundefined{\@@tblprefix#1:h}\!!zeropoint\else\getvalue{\@@tblprefix#1:h}\fi} +%\def\gettblwid#1{\ifundefined{\@@tblprefix#1:w}\!!zeropoint\else\getvalue{\@@tblprefix#1:w}\fi} +%\def\gettblhei#1{\ifundefined{\@@tblprefix#1:h}\!!zeropoint\else\getvalue{\@@tblprefix#1:h}\fi} \def\gettblwid#1{\executeifdefined{\@@tblprefix#1:w}\zeropoint} \def\gettblhei#1{\executeifdefined{\@@tblprefix#1:h}\zeropoint} diff --git a/tex/context/base/meta-pag.tex b/tex/context/base/meta-pag.tex index acafd66ad..6edca4e47 100644 --- a/tex/context/base/meta-pag.tex +++ b/tex/context/base/meta-pag.tex @@ -207,7 +207,7 @@ \appendtoks \global\MPsavedtextareadata\MPtextareadata - \global\MPtextareadata\emptytoks + \global\MPtextareadata \emptytoks \global\MPlocaltextareadata\emptytoks \to \everyshipout diff --git a/tex/context/base/page-bck.tex b/tex/context/base/page-bck.tex index c6d2e90ed..9e99be34a 100644 --- a/tex/context/base/page-bck.tex +++ b/tex/context/base/page-bck.tex @@ -130,7 +130,7 @@ %D features can be used. \def\addsomebackground#1#2#3#4% area box width height / zero test added - {\ifdim#3>\zeropoint\ifdim#4>\zeropoint\ifsomebackgroundfound#1% + {\ifsomebackgroundfound#1\ifdim#3>\zeropoint\ifdim#4>\zeropoint \setbox#2\vbox\localframed [\??ma#1] [\c!strut=\v!nee,\c!offset=\v!overlay, @@ -355,7 +355,7 @@ \hskip#1% \fi \else - \hskip#1% + \hskip#1% \fi} %D The background mechanism is quite demanding in terms or @@ -536,6 +536,9 @@ %D following comma separated list. This only happens in core %D modules. +% todo page-2 .. page+2 achter pagina -> bleed +% spread-2 .. spread+2 achter spread -> spread (repeat 2 times) + \def\enablehiddenbackground {\global\settrue\hiddenbackgroundenabled \global\somebackgroundtrue diff --git a/tex/context/base/s-mag-01.tex b/tex/context/base/s-mag-01.tex new file mode 100644 index 000000000..0cc33c83d --- /dev/null +++ b/tex/context/base/s-mag-01.tex @@ -0,0 +1,390 @@ +% interface=english + +%D \module +%D [ file=s-mag-01, +%D version=2002.12.14, +%D title=\CONTEXT\ Style File, +%D subtitle=\CONTEXT\ Magazine Base Style, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% This style is used for producing explanationary documents. +% Don't misuse it for other purposes, since it may confuse +% users. Don't change the title either, since it provides a +% way to categorize documents. Numbers are disabled in +% instances produced outside PRAGMA ADE. +% +% The layout setup is such that one has several text areas +% available: headers and footers, margins and edges as well +% as the main text area. The surrounding (gray) makes the +% main page stand out and is suitable for viewing in spread +% mode. +% +% Since this style is under constant construction, messing +% around with settings will produce unwanted side effects. +% So, if some feature or settings is needed, let me know. + +% todo: mp frames + +\setvariables[magazine][number=123] +\setvariables[magazine][author=] +\setvariables[magazine][title={Zero Issue}] +\setvariables[magazine][date=\currentdate] + +% These are reserved for PRAGMA-ADE, don't use them yourself! + +% \setvariables[magazine][main=Tricky] +% \setvariables[magazine][main=Update] +% \setvariables[magazine][main=HOWTO] + +% \setvariables[magazine][main=This Way] % preludes to a/the manual +% \setvariables[magazine][main=A Better Way] % dirty versus clean +% \setvariables[magazine][main=No Way] % how users should not do it +% \setvariables[magazine][main=Your Way] % how users do it +% \setvariables[magazine][main=My Way] % how users do it +% \setvariables[magazine][main=Our Way] % how we do things at pragma +% \setvariables[magazine][main=Their Way] % how to do latex things in context + +\setvariables[magazine][main=My Way] + +\startmode[atpragma] + \setvariables[magazine][main=This Way] +\stopmode + +\definepapersize + [magazine] + [width=\dimexpr(\paperwidth-.1\paperwidth), + height=\dimexpr(\paperheight-.1\paperheight)] + +\setuppapersize + [magazine] + [A4] + +\setupinteractionscreen + [option=doublesided] + +\definecolor[OuterColor][s=.3] +\definecolor[InnerColor][s=.8] +\definecolor[MainColor] [s=.2] +\definecolor[TitleColor][s=.7] + +\definecolor[MyRed] [r=.6] +\definecolor[MyGreen][g=.6] +\definecolor[MyBlue] [b=.6] + +\startuseMPgraphic{paper} + sh := define_circular_shade(a,a,0,bbheight(OverlayBox), + \MPcolor{InnerColor},\MPcolor{OuterColor}) ; + fill OverlayBox withshade sh ; +\stopuseMPgraphic + +\startreusableMPgraphic{middlepaper} + pair a ; a := center OverlayBox ; + \includeMPgraphic{paper} +\stopreusableMPgraphic + +\startreusableMPgraphic{rightpaper} + pair a ; a := .5[urcorner OverlayBox,lrcorner OverlayBox] ; + \includeMPgraphic{paper} +\stopreusableMPgraphic + +\startreusableMPgraphic{leftpaper} + pair a ; a := .5[ulcorner OverlayBox,llcorner OverlayBox] ; + \includeMPgraphic{paper} +\stopreusableMPgraphic + +\startreusableMPgraphic{page} + fill OverlayBox withcolor white ; +\stopreusableMPgraphic + +\startusableMPgraphic{text} + StartPage ; + for i = Header,Text,Footer : + for j = LeftEdge, LeftMargin, Text, RightMargin, RightEdge : + draw Field[i][j] withpen pencircle scaled .5pt ; + endfor ; + endfor ; + StopPage ; + setbounds currentpicture to Field[Text][Text] ; +\stopusableMPgraphic + +\startsetups[paper] + + \doifmodeelse{*makeup} + {\reuseMPgraphic{middlepaper}} + {\doifoddpageelse + {\reuseMPgraphic{rightpaper}} + {\reuseMPgraphic{leftpaper}}} + +\stopsetups + +\defineoverlay[paper] [\setups{paper}] +\defineoverlay[page] [\reuseMPgraphic{page}] +\defineoverlay[text] [\doifmode{frame}{\useMPgraphic{text}}] + +\setupbackgrounds [paper] [background=paper] +\setupbackgrounds [page] [background={page,title}] +\setupbackgrounds [text] [background=text] + +\definelayer + [title] + [state=repeat, + hoffset=-1cm, + voffset=1cm, + width=\paperwidth, + height=\paperheight] + +\setupoutput + [pdftex] + +\setuplayout + [width=middle, + topspace=1.5cm, + height=middle, + header=1.5cm, + footer=1cm, + %grid=yes, + headerdistance=.25cm, + footerdistance=.5cm, + backspace=3cm, + margin=1.5cm, + margindistance=.25cm, + edge=.75cm, + edgedistance=.25cm, + bottomdistance=1.5cm, + bottom=.1\printpaperheight] + +\definelayout + [makeup] + [topspace=1cm, + backspace=1cm, + header=0pt, + footer=0pt, + bottom=0pt] + +\setuppagenumbering + [alternative=doublesided] + +\setupcolors + [state=start] + +\usetypescript + [palatino][\defaultencoding] % [texnansi] + +\setupbodyfont + [palatino,10pt] + +\setuptolerance + [verytolerant] + +\appendtoks\setups[papershift]\to\beforeeverypage + +\startsetups[papershift] + + \setuppapersize[top=\vskip.5cm,bottom=\vss] + + \doifmodeelse{*makeup} + {\setuppapersize[left=\hfill,right=\hfill]} + {\doifoddpageelse + {\setuppapersize[right=\hfill]} + {\setuppapersize[left=\hfill]}} + +\stopsetups + +\setupbottomtexts + [\RightBanner][] + [][\LeftBanner] + +\def\LeftBanner + {\definedfont[Regular at \bottomheight]% + \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}% + \ht\scratchbox1ex + \dp\scratchbox\zeropoint + \MainColor + \definedfont[Regular sa 2]% + \doifmode{atpragma}{\#\getvariable{magazine}{number}}% + \quad + \currentdate + \quad + \scale[height=.25\bottomheight]{\box\scratchbox}% + \quad + \hbox to 1.5em{\hss\pagenumber\hss}% + \quad + \hskip-\backspace} + +\def\RightBanner + {\definedfont[Regular at \bottomheight]% + \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}% + \ht\scratchbox1ex + \dp\scratchbox\zeropoint + \MainColor + \hskip-\backspace + \definedfont[Regular sa 2]% + \quad + \hbox to 1.5em{\hss\pagenumber\hss}% + \quad + \scale[height=.25\bottomheight]{\box\scratchbox}% + \quad + \currentdate + \quad + \doifmode{atpragma}{\#\getvariable{magazine}{number}}} + +\startsetups[titlepage] + + \disablemode[frame] + + \setuplayout[makeup] + + \startstandardmakeup[doublesided=no] + + \definelayer + [makeup] + [width=\textwidth, + height=\textheight] + + \setlayerframed + [makeup] + [corner={left,top},location={right,bottom}] + [frame=off, + foregroundcolor=MainColor] + {\scale + [width=\makeupwidth] + {\definedfont[Regular sa 10]% + \getvariable{magazine}{main}}} + + \setlayerframed + [makeup] + [corner={right,top},location={left},y=.4\textheight] + [frame=off, + foregroundcolor=MainColor, + width=\textwidth, + align=left] + {\definedfont[Regular sa 2.5]\setupinterlinespace + \startmode[atpragma] + \strut \ConTeXt\ magazine \#\getvariable{magazine}{number}\endgraf + \stopmode + \strut \getvariable{magazine}{date} \endgraf + \blank + \strut \getvariable{magazine}{title}\endgraf + \doifsomething{\getvariable{magazine}{author}} + {\strut \getvariable{magazine}{author}\endgraf} + \doifsomething{\getvariable{magazine}{affiliation}} + {\strut \getvariable{magazine}{affiliation}\endgraf}} + + \setlayerframed + [makeup] + [corner={right,bottom},location={left,top}] + [frame=off, + align=normal, % left, + width=.8\textwidth, + foregroundcolor=MainColor] + {\getbuffer[abstract]} + + \flushlayer[makeup] + + \stopstandardmakeup + + \setuplayout[reset] + +\stopsetups + +\startsetups[listing] + + \page \disablemode[frame] + + \setuptexttexts [][] \setuptexttexts [] + \setupheadertexts[][] \setupheadertexts[source code of this document] + \setupfootertexts[][] \setupfootertexts[] + + \typefile[TEX]{\inputfilename} % \jobname + +\stopsetups + +\startsetups[lastpage] + + \page \disablemode[frame] \page[even] + + \doifoddpageelse + {} + {\setuplayout[makeup] + \startstandardmakeup[doublesided=no,page=] + \stopstandardmakeup + \setuplayout[reset]} + +\stopsetups + +\startsetups[title] + + \disablemode[frame] + + \setlayerframed + [title] + [corner={left,top},location={left,bottom}, + rotation=90] + [frame=off, + foregroundcolor=MainColor] + {\definedfont[RegularBold sa 2]\strut\getvariable{magazine}{title}} + + \setlayerframed + [title] + [corner={right,top}, + rotation=270] + [frame=off, + foregroundcolor=MainColor] + {\definedfont[RegularBold sa 2]\strut\getvariable{magazine}{title}} + +\stopsetups + +\startbuffer[abstract] + % no abstract +\stopbuffer + +\setuphead + [chapter] + [page=yes, + after={\blank[2*big]}, + color=MainColor, + style=\bfc] + +\setuphead + [section] + [before={\blank[2*big]}, + after=\blank, + color=MainColor, + style=\bfb] + +\setuphead + [subsection] + [before=\blank, + after=, + color=MainColor, + style=\bf] + +\setupwhitespace + [big] + +\doifnotmode{demo}{\endinput} + +\startbuffer[abstract] + \input tufte +\stopbuffer + +\starttext + + % \showframe + + \setups[titlepage] \setups[title] + + \chapter{E.R. Tufte} \input tufte \page + \chapter{D.E.K. Knuth} \input knuth \page + \chapter{H. Zapf} \input zapf \page + \chapter{D. Hofstadter} \input douglas \page + + \setups[lastpage] + +\stoptext diff --git a/tex/context/base/supp-mpe.tex b/tex/context/base/supp-mpe.tex index 3068b94e0..3d92961f9 100644 --- a/tex/context/base/supp-mpe.tex +++ b/tex/context/base/supp-mpe.tex @@ -65,6 +65,7 @@ %D specified in \type {size}. The \type {number} is the number %D of the fill that needs the special treatment. For a type~2 %D and~3 shaded fill, the datablock contains the following + %D data: %D %D \starttypen @@ -591,6 +592,19 @@ \ifMPspotcolors \expanded{\resolveMPspotcolor\getvalue{\@@MPSP\number\MPrgbnumber\tempMPbvalue}}\end \fi + \or + % 3 = rgb transparency + % to do + \or + % 4 == cmyk transparency + % \ifMPcmykcolors + % to do + % \fi + \or + % 5 == spot transparency + % \ifMPspotcolors + % to do + % \fi \fi \else \ifx\tempMPrvalue\tempMPgvalue @@ -609,39 +623,6 @@ %D We also need to make sure that we have two \RGB\ or %D \CMYK colors, since we have to set the colorspace. -% \def\setMPshadingcolors#1#2#3#4#5#6% -% {\checkMPshadingcolor{#1}{#2}{#3}\MPshadeA\MPshadeAA -% \checkMPshadingcolor{#4}{#5}{#6}\MPshadeB\MPshadeBB -% \ifx\MPshadeA\empty -% \ifx\MPshadeB\empty -% \edef\MPshadeA{\gMPs{#1} \gMPs{#2} \gMPs{#3}}% -% \edef\MPshadeB{\gMPs{#4} \gMPs{#5} \gMPs{#6}}% -% \def \MPshadeC{RGB}% -% \else -% \ifx\MPshadeAA\empty -% \let\MPshadeA\MPcmykWhite -% \let\MPshadeB\MPcmykBlack -% \else -% \scratchdimen\!!onepoint -% \advance\scratchdimen -\MPshadeAA\s!pt -% \edef\MPshadeA{0 0 0 \withoutpt\the\scratchdimen}% -% \fi -% \def\MPshadeC{CMYK}% -% \fi -% \else -% \ifx\MPshadeB\empty -% \ifx\MPshadeBB\empty -% \let\MPshadeA\MPcmykWhite -% \let\MPshadeB\MPcmykBlack -% \else -% \scratchdimen\!!onepoint -% \advance\scratchdimen -\MPshadeBB\s!pt -% \edef\MPshadeB{0 0 0 \withoutpt\the\scratchdimen}% -% \fi -% \fi -% \def\MPshadeC{CMYK}% -% \fi} - \def\setMPshadingcolors#1#2#3#4#5#6% color space {\checkMPshadingcolor{#1}{#2}{#3}\MPshadeAc\MPshadeAs \checkMPshadingcolor{#4}{#5}{#6}\MPshadeBc\MPshadeBs diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex index c8eb03955..0bb8eb49d 100644 --- a/tex/context/base/syst-ext.tex +++ b/tex/context/base/syst-ext.tex @@ -69,16 +69,13 @@ \def\@@dodoglobal {\resetglobal\global} -% for the moment only one level: - -\def\saveglobal % slower but safer - {\let\@@dodoglobal\dodoglobal % \pushmacro\dodoglobal - \let\@@redoglobal\redoglobal % \pushmacro\redoglobal - \resetglobal} - -\def\restoreglobal % slower but safer - {\let\redoglobal\@@redoglobal % \popmacro\redoglobal - \let\dodoglobal\@@dodoglobal} % \popmacro\dodoglobal +\def\saveglobal + {\let\@@dodoglobal\dodoglobal + \let\@@redoglobal\redoglobal} + +\def\restoreglobal + {\let\redoglobal\@@redoglobal + \let\dodoglobal\@@dodoglobal} %D A very useful application of this macro is \type {\newif}, %D \TEX's fake boolean type. Not being a primitive, @@ -2184,21 +2181,10 @@ %D \stoptypen %D %D Even better: -%D -%D \starttypen -%D \def\doifintokselse#1#2% #1 en #2 zijn toks -%D {\@EA\convertargument\the#1\to\asciiA -%D \@EA\convertargument\the#2\to\asciiB -%D \doifstringinstringelse\asciiA\asciiB} -%D \stoptypen -%D -%D The correct one (with regards to global): \def\doifintokselse#1#2% #1 en #2 zijn toks - {\saveglobal - \@EA\convertargument\the#1\to\asciiA + {\@EA\convertargument\the#1\to\asciiA \@EA\convertargument\the#2\to\asciiB - \restoreglobal \doifstringinstringelse\asciiA\asciiB} %D Also: diff --git a/tex/context/extra/mag-0000.tex b/tex/context/extra/mag-0000.tex new file mode 100644 index 000000000..52cff1eea --- /dev/null +++ b/tex/context/extra/mag-0000.tex @@ -0,0 +1,40 @@ +\usemodule[mag-01] + +\setvariables + [magazine] + [title={Introduction}, + author=Hans Hagen, + affiliation=PRAGMA ADE, + date=Januari 2003, + number=0] + +\startbuffer[abstract] + This is the zero issue of a semi periodical. The + associated style can be used by \CONTEXT\ users to + typeset and publish their own issues. +\stopbuffer + +\starttext \setups [titlepage] \setups [title] + +\setupheadertexts[welcome] + +This is the zero issue of a range of \CONTEXT\ related +publications, in most cases short introductions to new +functionality. The style may be used by users for providing +similar documents, but preferably not for other purposes, +since it may confuse readers in their expectations. + +We've chosen a layout which is more functional than +beautiful. This layout provides several text areas: headers +and footers, margins and edges as well as a main text area. +The surrounding (gray) makes the main page (which is +slightly smaller than A4) stand out and is suitable for +viewing in spread mode. + +The documents produced at \PRAGMA\ are called {\bf This +Way}, user documents gets the title {\bf My Way}. The +\PRAGMA\ issues are numbered. We strongly advise you not to +use the \type {mag-} prefix for your issues, since this may +lead to clashes with files distributed by \PRAGMA. + +\setups [listing] \setups [lastpage] \stoptext |