summaryrefslogtreecommitdiff
path: root/tex/context/modules/common
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2016-11-17 15:04:15 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-11-17 15:04:15 +0100
commit2d2fd9322ed83babf699d548166e43ffa10f3413 (patch)
tree5d6f27777bcc91d3574c95f278d7bb08fadf5784 /tex/context/modules/common
parenta1f166da06ae1a6bb6be7a1d4ee23d00751165a9 (diff)
downloadcontext-2d2fd9322ed83babf699d548166e43ffa10f3413.tar.gz
2016-11-17 14:26:00
Diffstat (limited to 'tex/context/modules/common')
-rw-r--r--tex/context/modules/common/s-pre-14.tex263
-rw-r--r--tex/context/modules/common/s-pre-15.tex186
-rw-r--r--tex/context/modules/common/s-pre-19.tex347
3 files changed, 0 insertions, 796 deletions
diff --git a/tex/context/modules/common/s-pre-14.tex b/tex/context/modules/common/s-pre-14.tex
deleted file mode 100644
index 4dae6c009..000000000
--- a/tex/context/modules/common/s-pre-14.tex
+++ /dev/null
@@ -1,263 +0,0 @@
-%D \module
-%D [ file=s-pre-14,
-%D version=1999.08.20,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 14,
-%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.
-
-%D In the process of making a couple of simple styles for
-%D \EUROTEX\ 99, I came to this one. The joke is in the
-%D pagenumber. This style can be used for short presentations
-%D with much text.
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-%D Since we expect text, we can best be very tolerant.
-
-\setuptolerance
- [verytolerant,stretch]
-
-%D As most styles we choose a large screen page size.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [width=fit,
- rightedge=3cm,
- margin=0pt,
- rightedgedistance=2cm,
- height=middle,
- header=0pt,
- footer=0pt,
- topspace=1cm,
- backspace=1cm]
-
-%D We only use two colors, named \type {One} and \type
-%D {Two}:
-
-\setupcolors
- [state=start]
-
-\definecolor [One] [r=.6,g=.4,b=.4]
-\definecolor [Two] [r=.4,g=.6,b=.6]
-
-%D If you've looked at the demo file, you will have noticed
-%D that the background consists of four pieces: two filled
-%D rectangles and two half numbers. These are put on th epage
-%D using four overlays:
-
-\setupbackgrounds
- [page]
- [background={one,two,three,four}]
-
-%D When we code this in \TEX, we get the following
-%D definitions. As an alternative we coudl have used layers
-%D but I'm afraid that it would not have led to less code.
-
-\defineoverlay
- [one]
- [{\framed
- [frame=off,background=color,backgroundcolor=Two,
- width=\overlaywidth,height=\overlayheight]
- {}}]
-
-\defineoverlay
- [three]
- [{\hbox to \overlaywidth
- {\hfill\SetOverlayWidth
- \framed
- [frame=off,background=color,backgroundcolor=One,
- width=\overlaywidth,height=\overlayheight]
- {}}}]
-
-%D We could have used the main backgroundcolor instead of
-%D overlay \type {one}.
-
-\definefont[NumberFont][RegularBold at 3cm]
-
-\defineoverlay
- [two]
- [{\framed
- [frame=off,width=\overlaywidth,height=\overlayheight,
- offset=overlay]
- {\vfill
- \NumberFont\setstrut\SetOverlayWidth
- \hbox to \hsize
- {\hfill
- \setupinteraction[style=,color=]%
- \setbox0=\hbox{\strut\One\pagenumber}%
- \hbox to 0pt{\hss\gotobox{\box0}[previouspage]\hss}%
- \hskip\overlaywidth}}}]
-
-\defineoverlay
- [four]
- [{\framed
- [frame=off,width=\overlaywidth,height=\overlayheight,offset=overlay]
- {\vfill
- \hbox to \hsize
- {\hfill
- \SetOverlayWidth
- \framed
- [frame=off,width=\overlaywidth,height=\overlayheight,offset=overlay]
- {\vfill\NumberFont\setstrut
- \setbox0=\hbox{\strut\Two\pagenumber}%
- \setbox2=\hbox{\clip[nx=2,ny=1,x=2,y=1]{\copy0}}%
- \dp2=\dp0
- \hbox to \hsize{\hbox to 0pt{\hss\hskip.5\wd0\box2\hss}\hfill}}}}}]
-
-\def\SetOverlayWidth%
- {\scratchdimen = \rightedgedistance
- \divide\scratchdimen by 2
- \advance\scratchdimen by \rightedgewidth
- \advance\scratchdimen by \backspace
- \edef\overlaywidth{\the\scratchdimen}}
-
-%D A much cleaner implementation is the following. If you hate
-%D \METAPOST, you can run this style in the specified mode:
-
-\startnotmode[no-metapost]
-
-\setupbackgrounds
- [page]
- [background={number}]
-
-\defineoverlay[number][\useMPgraphic{number}]
-
-\startuseMPgraphic{number}
- StartPage ;
- path Vage ; picture Left, Right ;
- x1 = x2 = xpart (llcorner Field[Text][RightEdge] shifted (-RightEdgeDistance/2,0)) ;
- y1 = ypart llcorner Page ;
- y2 = ypart ulcorner Page ;
- Vage := llcorner Page -- z1 -- z2 -- ulcorner Page -- cycle ;
- fill Page withcolor \MPcolor {One} ;
- fill Vage withcolor \MPcolor {Two} ;
- if PageNumber>0 :
- defaultfont := "\truefontname{RegularBold}" ;
- Left := Right := thelabel("\folio",origin) ysized 3cm ;
- clip Right to boundingbox Right shifted (bbwidth(Right)/2,0) ;
- draw Left shifted z1 shifted (0,2.25cm) withcolor \MPcolor {One} ;
- draw Right shifted z1 shifted (0,2.25cm) withcolor \MPcolor {Two} ;
- fi ;
- StopPage ;
-\stopuseMPgraphic
-
-\stopnotmode
-
-%D We use the simple label typesetting present in \METAPOST\
-%D because digits are seldom kerned so real \TEX ing is not
-%D needed. As in the previous method, we let the graphics
-%D overlap so that we don't get white lines due to rounding
-%D problems in viewers.
-%D
-%D We put a button behind the text (this overlay is calculated
-%D each page).
-
-\defineoverlay
- [nextpage]
- [\overlaybutton{nextpage}]
-
-\setupbackgrounds
- [text]
- [backgroundoffset=.5cm,
- background=nextpage]
-
-%D We still have to turn on interaction mode.
-
-\setupinteraction
- [state=start,
- display=new,
- menu=on]
-
-\setupinteraction
- [color=,
- contrastcolor=]
-
-%D Next we define structuring commands.
-
-\definehead[Topic] [chapter] \setuphead[Topic] [style=\bfc]
-\definehead[Subject][section] \setuphead[Subject][style=\bfa]
-
-\setuphead
- [Topic, Subject]
- [number=no,
- after={\blank[big]}]
-
-%D Because we will provide a menu, we don't offer lists.
-
-\let\Topics \gobbleoneargument
-\let\Subjects\relax
-
-%D The table of contents goes to the right edge.
-
-\startinteractionmenu[right]
- \setupinteraction
- [color=black,
- contrastcolor=Two]
- \placelist
- [Topic]
- [alternative=e,
- frame=off,
- criterium=all]
- \vfill
-\stopinteractionmenu
-
-\setuplist
- [Topic]
- [width=\rightedgewidth,
- maxwidth=\rightedgewidth,
- style=\bfa]
-
-%D We safe some space:
-
-\setupwhitespace
- [medium]
-
-\setupblank
- [medium]
-
-%D In the titlepage, we still use the \TEX\ overlays,
-%D so that we don't have to define a second graphic.
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-\def\StartTitlePage%
- {\bgroup
- \setupbackgrounds[page][background={one,three}]
- \startstandardmakeup
- \setupalign[middle]
- \def\\{\vfil\bfb\setupinterlinespace}
- \bfd\setupinterlinespace
- \vfil}
-
-\def\StopTitlePage%
- {\vfil\vfil\vfil
- \stopstandardmakeup
- \egroup}
-
-%D This is it.
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\TitlePage{Some Quotes\\(that you probably know by now)}
-
-\Topic{Tufte} \input tufte
-\Topic{Knuth} \input knuth
-\Topic{Reich} \input reich
-\Topic{Zapf} \input zapf
-\Topic{Materie} \input materie
-%Topic{Stork} \input stork
-
-\stoptext
diff --git a/tex/context/modules/common/s-pre-15.tex b/tex/context/modules/common/s-pre-15.tex
deleted file mode 100644
index 90d428243..000000000
--- a/tex/context/modules/common/s-pre-15.tex
+++ /dev/null
@@ -1,186 +0,0 @@
-%D \module
-%D [ file=s-pre-15,
-%D version=1999.09.01,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 15,
-%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.
-
-%D This is one of the styles I made for the presentation on
-%D the \NTS\ project at Euro\TeX\ 1998. You need balls to let
-%D \TEX\ typeset graphics, but this style demonstrates that it
-%D can be done.
-%D
-%D This presentation is meant for presentations that build up
-%D an idea stepwise.
-%D
-%D \starttyping
-%D \TitlePage{Do you know \TEX ?}
-%D
-%D \StartIdea
-%D \StartItem We use \TEX\ for typesetting \unknown \StopItem
-%D \StartItem mathematical text \unknown \StopItem
-%D \StartItem but also for text that has no math \unknown \StopItem
-%D \StartItem or presentations like this \unknown \StopItem
-%D \StartItem and whatever you can come up with! \StopItem
-%D \StopIdea
-%D \stoptyping
-
-%D The basic layout is rather simple and used as much of the
-%D screen as possible.
-
-\setuppapersize
- [S6][S6]
-
-\setuplayout
- [backspace=25pt,
- topspace=25pt,
- width=middle,
- height=middle,
- header=0pt,
- footer=0pt]
-
-\setupinteraction
- [state=start,
- display=new,
- color=LineColor,
- contrastcolor=LineColor,
- click=no]
-
-\setupinteractionscreen
- [option=max]
-
-\startmode[asintended] \setupbodyfont[lbr] \stopmode
-
-\setupbodyfont[14.4pt]
-
-%D We use a lot of color. You can remap them if you want
-%D differend ones. The ideas circulate over the colors.
-
-\setupcolors
- [state=start]
-
-\definecolor[TextColor][s=.8]
-\definecolor[PageColor][s=.6]
-\definecolor[LineColor][s=.4]
-
-\definecolor[red] [r=.4] \definecolor[cyan] [g=.4,b=.4]
-\definecolor[green][g=.4] \definecolor[magenta][r=.4,b=.4]
-\definecolor[blue] [b=.4] \definecolor[yellow] [r=.4,g=.4]
-
-\definecolor[linecolor 1][red] \definecolor[linecolor 5][cyan]
-\definecolor[linecolor 2][green] \definecolor[linecolor 6][magenta]
-\definecolor[linecolor 3][blue] \definecolor[linecolor 4][yellow]
-
-%D We use variables to make sure that the graphics are reused
-%D but unique.
-
-\setupMPvariables[pageframe][pagecolor=PageColor,linecolor=LineColor]
-\setupMPvariables[textframe][textcolor=TextColor,linecolor=LineColor]
-
-\setupbackgrounds
- [page]
- [background={pageframe,nextpage}]
-
-\defineoverlay [pageframe] [\uniqueMPgraphic{pageframe}]
-\defineoverlay [textframe] [\uniqueMPgraphic{textframe}]
-\defineoverlay [nextpage] [\overlaybutton{forward}]
-
-\startuniqueMPgraphic{pageframe}{pagecolor,linecolor}
- path p ; p := fullsquare xyscaled (\overlaywidth,\overlayheight) ;
- pickup pencircle scaled 10pt ;
- fill p withcolor \MPvar{pagecolor} ;
- draw p withcolor \MPvar{linecolor} ;
-\stopuniqueMPgraphic
-
-\startuniqueMPgraphic{textframe}{textcolor,linecolor}
- path p ; p := fullcircle xyscaled (\overlaywidth,\overlayheight) ;
- pickup pencircle scaled 10pt ;
- fill p withcolor \MPvar{textcolor} ;
- draw p withcolor \MPvar{linecolor} ;
-\stopuniqueMPgraphic
-
-%D The rest of the file implements the nasty part: typesetting
-%D text embedded in a graphic. The text is collected in a box
-%D so that we can reuse it.
-
-\newbox\CollectedIdeas
-\newcounter\CurrentTopic
-
-\def\StartItem%
- {\setbox\CollectedIdeas=\hbox\bgroup
- \ifdim\wd\CollectedIdeas>0pt \unhbox\CollectedIdeas\hskip25pt \fi
- \setbox\scratchbox=\hbox\bgroup
- \framed
- [width=160pt,height=160pt,align=middle,frame=off,
- background=textframe,offset=15pt,top=\vfill,bottom=\vfill]
- \bgroup}
-
-\def\StopItem%
- {\egroup
- \egroup
- \setbox\scratchbox=\hbox{\lower.5\ht\scratchbox\box\scratchbox}%
- \ht\scratchbox=.5\ht\scratchbox
- \dp\scratchbox= \ht\scratchbox
- \box\scratchbox
- \egroup
- \startstandardmakeup
- \dontcomplain
- \leftskip 0pt plus 50pt
- \rightskip 0pt plus 50pt
- \parfillskip 0pt
- \baselineskip 100pt
- \unhcopy\CollectedIdeas
- \stopstandardmakeup}
-
-\def\StartIdea%
- {\ifnum\CurrentTopic=6 \doglobal\newcounter\CurrentTopic \fi
- \doglobal\increment\CurrentTopic
- \definecolor[LineColor][linecolor \CurrentTopic]
- \setbox\CollectedIdeas=\null}
-
-\def\StopIdea%
- {}
-
-\def\StartTitlePage%
- {\startstandardmakeup
- \setupalign[middle]
- \def\\{\vfil\bfb\setupinterlinespace}
- \bfd\setupinterlinespace
- \vfil}
-
-\def\StopTitlePage%
- {\vfil\vfil
- \stopstandardmakeup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-\doifnotmode{demo}{\endinput}
-
-%D A simple test on functionality.
-
-\setupoutput[pdftex]
-
-\starttext
-
-\TitlePage{Do you know \TEX ?}
-
-\startbuffer
-\StartIdea
- \StartItem We use \TEX\ for typesetting \unknown \StopItem
- \StartItem mathematical text \unknown \StopItem
- \StartItem but also for text that has no math \unknown \StopItem
- \StartItem or presentations like this \unknown \StopItem
- \StartItem and whatever you can come up with! \StopItem
-\StopIdea
-\stopbuffer
-
-\dorecurse{6}{\getbuffer}
-
-\stoptext
diff --git a/tex/context/modules/common/s-pre-19.tex b/tex/context/modules/common/s-pre-19.tex
deleted file mode 100644
index 991d311ce..000000000
--- a/tex/context/modules/common/s-pre-19.tex
+++ /dev/null
@@ -1,347 +0,0 @@
-%D \module
-%D [ file=s-pre-19,
-%D version=2000.07.31,
-%D title=\CONTEXT\ Style File,
-%D subtitle=Presentation Environment 19,
-%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.
-
-%D This style is made in the process or writing the \METAFUN\
-%D manual. It exploits a few tricks, like graphics calculated
-%D using positional information. It also uses the (at that
-%D moment) new menu list placement alternative. If you forget
-%D about the definition of the button shapes, which is
-%D complicated in any system, this style is not even that hard
-%D to follow. Watch how the left side of the buttons follow
-%D the right side of the text graphic.
-%D
-%D While playing bit with this style, the random alternative
-%D made me think of those organic building with non equal
-%D windows (we have a few in The Netherlands), so I decided to
-%D label this style as \type {pre-organic}.
-%D
-%D At the end of this file, there is a small test file, so
-%D when you process this file with \TEXEXEC\ and the options
-%D \type {--mode=demo} and \type {--pdf}, you will get a demo
-%D document.
-
-%D We use one of the standard screen \quote {paper} sizes, and
-%D map it onto the same size, so that we get a nicely cropped
-%D page.
-
-\setuppapersize
- [S6][S6]
-
-%D Like in the \METAFUN\ manual, we use the Palatino as main
-%D bodyfont. This font is quite readable on even low
-%D resolution screens, although I admit that this style is
-%D developed using an $1400\times1050$ pixel LCD screen, so I
-%D may be biased.
-
-%\startmode[asintended] \setupbodyfont[ppl] \stopmode
-
-%D The layout specification sets up a text area and a right
-%D edge area where the menus will go. Watch the rather large
-%D edge distance. By setting the header and footer dimensions
-%D to zero, we automatically get rid of page body ornaments,
-%D like the pagenumber.
-
-\setuplayout
- [topspace=48pt,
- backspace=48pt,
- cutspace=12pt,
- width=400pt,
- margin=0cm,
- rightedge=88pt,
- rightedgedistance=48pt,
- header=0cm,
- footer=0cm,
- height=middle]
-
-%D We use a moderate, about a line height, interparagraph
-%D white space.
-
-\setupwhitespace
- [big]
-
-%D Of course we use colors, since on computer displays they
-%D come for free.
-
-\setupcolors
- [state=start]
-
-\definecolor [red] [r=.75]
-\definecolor [yellow] [r=.75,g=.75]
-\definecolor [gray] [s=.50]
-\definecolor [white] [s=.85]
-
-\definecolor [PageColor] [yellow]
-\definecolor [TextColor] [white]
-\definecolor [OrnamentColor] [red]
-\definecolor [InteractionColor] [red]
-\definecolor [ContrastColor] [gray]
-
-%D This is an interactive document, so we enable interaction.
-%D In this style, we disable the viewer's \quote {highlight a
-%D hyperlink when it's clicked on} feature. We will use a
-%D menu, so we enable menus. Later we will see the contract
-%D color |<|hyperlinks gets that color when we are already on
-%D the location|>| in action.
-
-\setupinteraction
- [state=start,
- click=off,
- color=InteractionColor,
- contrastcolor=ContrastColor,
- menu=on]
-
-%D The menu itself is set up as follows. Because we will
-%D calculate menubuttons based on their position on the page,
-%D we have to keep track of the positions. Therefore, we set
-%D the \type {position} variable to \type {yes}.
-
-\setupinteractionmenu
- [right]
- [frame=off,
- position=yes,
- align=middle,
- topoffset=-.75cm,
- bottomoffset=-.75cm,
- color=gray,
- contrastcolor=gray,
- style=bold,
- before=,
- after=]
-
-%D The menu content is rather sober: a list of topics (later
-%D we will define the command that generates topic entries),
-%D and a close button.
-
-\startinteractionmenu[right]
- \placelist[Topic][alternative=right]
- \vfill
- \but [CloseDocument] close \\
-\stopinteractionmenu
-
-%D We have now arived at the more interesting part of the style
-%D definition: the graphic that goes in the page background.
-%D Because this graphic will change, we define a usable
-%D \METAPOST\ graphic. Page backgrounds are recalculated each
-%D page, opposite to the other backgrounds that are calculated
-%D when a new background is defined, or when repetitive
-%D calculation is turned on.
-
-\setupbackgrounds
- [page]
- [background=page]
-
-\defineoverlay
- [page]
- [\useMPgraphic{page}]
-
-\setupMPvariables
- [page]
- [alternative=3]
-
-\startuseMPgraphic{page}
-
- \includeMPgraphic{rightsuperbutton}
-
- StartPage ;
-
- path p, q ; pickup pencircle scaled 3pt ;
-
- p := Field[Text][Text] enlarged 36pt superellipsed .90 ;
-
- fill Page withcolor \MPcolor{PageColor} ;
- fill p withcolor \MPcolor{TextColor} ;
- draw p withcolor \MPcolor{OrnamentColor} ;
-
- p := Field[Text][Text] enlarged 48pt superellipsed .90 ;
-
- def right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) =
- if (pp>0) and (rr>0) :
- q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ;
- fill q withcolor \MPcolor{TextColor} ;
- draw q withcolor if rr=2 : \MPcolor{ContrastColor}
- else : \MPcolor{InteractionColor} fi ;
- fi ;
- enddef ;
-
- \MPmenubuttons{right}
-
- StopPage ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{page}
-
- \includeMPgraphic{rightsuperbutton}
-
- StartPage ;
-
- numeric alternative, seed, superness, squeezeness, randomness ;
- path p, q ; transform t ;
-
- alternative := \MPvar{alternative} ;
- seed := uniformdeviate 100 ;
-
- if alternative > 10 :
- superness := .85 + ((\realfolio-1)/\lastpage) * .15 ;
- squeezeness := 12pt - ((\realfolio-1)/\lastpage) * 10pt ;
- else :
- superness := .90 ;
- squeezeness := 12pt ;
- fi ;
-
- randomness := squeezeness ;
-
- alternative := alternative mod 10 ;
-
- t := identity if alternative=3: shifted (9pt,-9pt) fi ;
-
- % first we draw the shape that surrounds the text
-
- randomseed := seed ;
-
- p := Field[Text][Text] enlarged if
- alternative = 1 : 36pt superellipsed superness elseif
- alternative = 2 : 36pt squeezed squeezeness elseif
- alternative = 3 : 36pt randomized randomness else
- : 36pt fi ;
- pickup pencircle scaled 3pt ;
-
- fill Page withcolor \MPcolor{PageColor} ;
- fill p withcolor \MPcolor{TextColor} ;
- draw p withcolor \MPcolor{OrnamentColor} ;
-
- % we set p to the wider shape from which we will chip off pieces
-
- randomseed := seed ;
-
- p := ( Field[Text][Text] enlarged if
- alternative = 1 : 48pt superellipsed superness elseif
- alternative = 2 : 48pt squeezed squeezeness elseif
- alternative = 3 : 36pt randomized randomness else
- : 48pt fi ) transformed t ;
-
- % calls to *_menu_button are generated automatically ...
-
- vardef right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) =
- save q ; path q ;
- if (pp>0) and (rr>0) :
- q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ; % \MPw{menu:right:\realfolio}
- fill q withcolor \MPcolor{TextColor} ;
- draw q withcolor if rr=2 : \MPcolor{ContrastColor}
- else : \MPcolor{InteractionColor} fi ;
- fi ;
- enddef ;
-
- % ... and inserted when the graphic data is flushed here ...
-
- \MPmenubuttons{right}
-
- StopPage ;
-\stopuseMPgraphic
-
-\startuseMPgraphic{rightsuperbutton}
-
-vardef rightsuperbutton (expr pat, xpos, ypos, wid, hei) =
-
- save p, ptop, pbot, t, b, edge, shift, width, height ;
- path p, ptop, pbot ; pair t, b ; numeric edge, shift, width, height ;
-
- edge := xpos + wid ; shift := ypos + hei ;
-
- p := rightpath pat ;
-
- ptop := ((-infinity,shift)--(edge,shift)) ;
- pbot := ((-infinity,shift-hei)--(edge,shift-hei)) ;
-
- t := p intersection_point ptop ;
- b := p intersection_point pbot ;
-
- p := subpath(0,xpart (p intersectiontimes ptop)) of p ;
- p := subpath(xpart (p intersectiontimes pbot),length(p)) of p ;
-
- (p -- t -- point 1 of ptop &
- point 1 of ptop -- point 1 of pbot &
- point 1 of pbot -- b
- -- cycle)
-
-enddef ;
-
-\stopuseMPgraphic
-
-%D Topics are identified with \type {\Topic}, which is an
-%D instance of chapter headings. The number is made invisible.
-%D Since it still is a numbered section header, \CONTEXT\ will
-%D write the header to the table of contents.
-
-\definehead
- [Topic]
- [chapter]
-
-\setuphead
- [Topic]
- [number=no]
-
-%D We will use a bold font in the table of contents. We also
-%D force a complete list.
-
-\setuplist
- [Topic]
- [criterium=all,
- style=bold,
- before=,
- after=]
-
-%D The \type {\TitlePage} macro looks horrible, because we
-%D want to keep the interface simple: a list of small
-%D sentences, separated by \type {\\}.
-
-\def\StartTitlePage
- {\startstandardmakeup
- \switchtobodyfont[big]
- \def\\{\vfill\bfb\let\\=\par}
- \bfd\setupinterlinespace\gray
- \vskip.5cm}
-
-\def\StopTitlePage
- {\\\vskip.5cm % the \\ is really needed
- \stopstandardmakeup}
-
-\def\TitlePage#1%
- {\StartTitlePage#1\StopTitlePage}
-
-%D A couple of goodies:
-
-\def\Subject {\Topic}
-\def\Topics #1{}
-\def\Subjects {}
-
-%D For those who want to test:
-
-\doifnotmode{demo}{\endinput}
-
-\starttext
-
-\setupMPvariables[page][alternative=3]
-
-\TitlePage
- {A Few Nice Quotes\\
- A Simple Style Demo\\
- Hans Hagen, August 2000}
-
-
-\Topic {Douglas R. Hofstadter} \input douglas \page
-\Topic {Donald E. Knuth} \input knuth \page
-\Topic {Edward R. Tufte} \input tufte \page
-\Topic {Hermann Zapf} \input zapf \page
-%Topic {David F. Stork} \input stork \page
-
-\stoptext