1% language=us runpath=texruns:manuals/luametafun 2 3\environment luametafun-style 4 5\startcomponent luametafun-synchronizers 6 7\startchapter[title={Synchronizers}] 8 9{Work in progress.} \blank 10 11 12\definesyncpositions[1] 13\definesyncpositions[2] 14 15% \startuseMPgraphic{sync1} 16% StartPage ; 17% lmt_synchronizer [ 18% index = 1, 19% hoffset = 0, 20% width = BackSpace - LeftMarginDistance, 21% extend = false, 22% prune = true, 23% draw = false, 24% fill = true, 25% ] ; 26% clip currentpicture to Page ; 27% setbounds currentpicture to Page ; 28% StopPage ; 29% \stopuseMPgraphic 30 31% \startuseMPgraphic{sync1} 32% lmt_synchronizer [ 33% % page = "yes", 34% index = 1, 35% hoffset = 0, 36% width = BackSpace - LeftMarginDistance, 37% extend = false, 38% prune = true, 39% draw = false, 40% fill = true, 41% ] ; 42% \stopuseMPgraphic 43 44% \definecolor[redshade] [.5(darkred,white)] 45% \definecolor[greenshade] [.5(darkgreen,white)] 46% \definecolor[blueshade] [.5(darkblue,white)] 47% \definecolor[yellowshade] [.5(darkyellow,white)] 48 49% \startuseMPgraphic{sync1} 50% lmt_synchronizer [ 51% % page = "yes", 52% index = 1, 53% hoffset = 0, 54% width = BackSpace - LeftMarginDistance, 55% extend = false, 56% prune = true, 57% draw = false, 58% fill = true, 59% colors = { "redshade", "greenshade", "blueshade", "yellowshade" } 60% ] ; 61% \stopuseMPgraphic 62 63{sync2} 64 lmt_synchronizer [ 65 index = 2, 66 region = OverlayRegion, 67 hoffset = -1cm, 68 width = 1cm, 69 extend = true, 70 prune = false, 71 draw = false, 72 fill = true, 73 ] ; 74 clip currentpicture to OverlayBox leftenlarged 1cm; 75 setbounds currentpicture to OverlayBox ; 76 77 78\defineoverlay[tempoverlay1][{sync1}] 79\defineoverlay[tempoverlay2][{sync2}] 80 81% \setupbackgrounds[page][background=tempoverlay1] 82 83\startlinecorrection 84\framed 85 [region=yes,background=tempoverlay2,width=14cm,align=normal] 86 \bgroup 87 \syncposition[2][1]\samplefile{ward}\endgraf 88 \syncposition[2][2]\samplefile{ward}\endgraf 89 \syncposition[2][3]\samplefile{ward}\endgraf 90 \egroup 91\stoplinecorrection 92 93% \vskip1cm \hskip1cm \framed[region=yes,background=tempoverlay2,width=16cm,align=normal]{% 94% \syncposition[2][1]\samplefile{ward}\endgraf 95% \syncposition[2][2]\samplefile{ward}\endgraf 96% \syncposition[2][3]\samplefile{ward}\endgraf 97% } 98 99% \vskip1cm \hskip1cm \framed[region=yes,background=tempoverlay2,width=10cm,align=normal]{% 100% \syncposition[2][1]\samplefile{ward}\endgraf 101% \syncposition[2][2]\samplefile{ward}\endgraf 102% \syncposition[2][3]\samplefile{ward}\endgraf 103% } 104 105% \dorecurse {100} { 106% \dorecurse {1} { 107% \startchapter[title={Test #1}] 108% \syncposition[1][1,reset]\dorecurse{20}{\samplefile{ward}\endgraf} 109% \syncposition[1][2]\dorecurse {4}{\samplefile{ward}\endgraf} 110% \syncposition[1][3]\dorecurse {7}{\samplefile{ward}\endgraf} 111% \syncposition[1][4]\dorecurse {3}{\samplefile{ward}\endgraf} 112% \stopchapter 113% } 114 115% \dorecurse {100} { 116% \dorecurse {1} { 117% \startchapter[title={Test #1}] 118% \syncposition[1][1]\dorecurse{1}{\samplefile{ward}\endgraf} 119% \syncposition[1][2]\dorecurse{1}{\samplefile{ward}\endgraf} 120% \syncposition[1][3]\dorecurse{1}{\samplefile{ward}\endgraf} 121% \syncposition[1][4]\dorecurse{1}{\samplefile{ward}\endgraf} 122% \stopchapter 123% } 124 125\stopchapter 126 127\stopcomponent 128 |