diff options
Diffstat (limited to 'Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-cover.tex')
-rw-r--r-- | Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-cover.tex | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-cover.tex b/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-cover.tex new file mode 100644 index 00000000000..75a033b5fa9 --- /dev/null +++ b/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-cover.tex @@ -0,0 +1,133 @@ +% language=uk + +\startcomponent languages-cover + +\environment languages-environment + +\startbuffer[abstract] + +This book explains how we support languages (and +scripts) in \CONTEXT\ \MKIV\ and \LUATEX. Some of +the mechanisms discussed are generic and not +\CONTEXT\ specific. We discuss the way languages are +dealt with in the engine, hyphenation, standard +features and additional goodies. Tracing and the +extensibility of code are also discussed. + +\stopbuffer + +\startsetups document:abstract + \framed [ + foregroundstyle=bold, + foregroundcolor=white, + width=7.5cm, + align={normal,tolerant}, + frame=off, + strut=no, + ] { + \getbuffer[abstract] + } +\stopsetups + +\startMPextensions + + def DrawCoverPage (expr what) = + + begingroup ; + + save SpineWidth ; numeric SpineWidth ; SpineWidth := 8mm ; + save PaperBleed ; numeric PaperBleed ; PaperBleed := 2mm ; % todo + + StartCover ; + + save width, size, anchor ; + + numeric width, size ; pair anchor, offset ; + + color ColorVariant[] ; + + % ColorVariant[1] := \MPcolor{darkred} ; + % ColorVariant[2] := \MPcolor{darkgreen} ; + % ColorVariant[3] := \MPcolor{darkblue} ; + % ColorVariant[4] := \MPcolor{darkyellow} ; + + ColorVariant[1] := \MPcolor{darkmagenta} ; + ColorVariant[2] := \MPcolor{darkorange} ; + ColorVariant[3] := \MPcolor{darkyellow} ; + ColorVariant[4] := \MPcolor{darkcyan} ; + + fill CoverPage enlarged PaperBleed withcolor \MPcolor{darkgray} ; + + fill Spine bottomenlarged -.5CoverHeight withcolor ColorVariant[3] ; + fill Spine topenlarged -.5CoverHeight withcolor ColorVariant[2] ; + + width := FrontPageWidth ; + height := FrontPageHeight ; + size := 4 * width / 3 ; + offset := (-1cm,1cm) ; + anchor := .5[lrcorner CoverPage,urcorner CoverPage] ; + + fill anchored.llft(lltriangle scaled size, urcorner FrontPage) withcolor ColorVariant[1] ; + fill anchored.urt (urtriangle scaled size, llcorner FrontPage) withcolor ColorVariant[2] ; + fill anchored.lrt (lrtriangle scaled size, ulcorner FrontPage) withcolor ColorVariant[3] ; + fill anchored.ulft(ultriangle scaled size, lrcorner FrontPage) withcolor ColorVariant[4] ; + + fill anchored.lrt (lrtriangle scaled size, ulcorner BackPage) withcolor ColorVariant[1] ; + fill anchored.llft(lltriangle scaled size, urcorner BackPage) withcolor ColorVariant[3] ; + fill anchored.ulft(ultriangle scaled size, lrcorner BackPage) withcolor ColorVariant[2] ; + fill anchored.urt (urtriangle scaled size, llcorner BackPage) withcolor ColorVariant[4] ; + + draw thetextext.llft(textext("\bf Languages in \ConTeXt\hskip-.1em") rotated 45 ysized .350height, anchor shifted (6*offset+offset)) withcolor white ; + draw thetextext.llft(textext("\bf explaining luatex and mkiv") rotated 45 ysized .275height, anchor shifted (5*offset+offset)) withcolor white ; + draw thetextext.llft(textext("\bf Hans Hagen") rotated 45 ysized .200height, anchor shifted (2*offset+offset)) withcolor white ; + draw thetextext.llft(textext("\bf PRAGMA ADE") rotated 45 ysized .200height, anchor shifted (1*offset+offset)) withcolor white ; + + % for the moment + + draw thetextext.top(textext("\bf work in progress") xsized 4cm, lrcorner Page shifted (-3cm,1cm)) withcolor white ; + + % till here + + width := BackPageWidth ; + + draw thetextext(textext("\bf\setups[document:abstract]") xsized .65width rotated 45 , center BackPage) withcolor white ; + + anchor := .5[ulcorner Spine,urcorner Spine] shifted (0,-1cm); + + draw thetextext.bot(textext("\bf Languages in \ConTeXt\hskip-.1em") rotated 90 xsized .8SpineWidth, anchor) withcolor white ; + + anchor := .5[llcorner Spine,lrcorner Spine] shifted (0,1cm); + + draw thetextext.top(textext("\bf Hans Hagen") rotated 90 xsized .8SpineWidth, anchor) withcolor white ; + + StopCover ; + + if what = "front" : + clip currentpicture to FrontPage ; + elseif what = "back" : + clip currentpicture to BackPage ; + else : + drawboundary CoverPage ; + fi ; + + endgroup ; + + enddef ; + +\stopMPextensions + +\doifmodeelse {simple} { + + \startMPpage + DrawCoverPage("front") ; + \stopMPpage + +} { + + \startMPpage + DrawCoverPage("cover") ; + \stopMPpage + +} + +\stopcomponent |