From 551c89289d267c2d8901f3375e57ed1fe2508de5 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 2 Oct 2018 23:41:59 +0200 Subject: 2018-10-02 23:25:00 --- doc/context/documents/general/manuals/texit.pdf | Bin 163963 -> 163390 bytes doc/context/documents/general/qrcs/setup-cs.pdf | Bin 853283 -> 853260 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 853946 -> 853887 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 857242 -> 857249 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 849852 -> 849721 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 856344 -> 856256 bytes .../documents/general/qrcs/setup-mapping-cs.pdf | Bin 347078 -> 346962 bytes .../documents/general/qrcs/setup-mapping-de.pdf | Bin 431351 -> 431246 bytes .../documents/general/qrcs/setup-mapping-en.pdf | Bin 345045 -> 344851 bytes .../documents/general/qrcs/setup-mapping-fr.pdf | Bin 347533 -> 347377 bytes .../documents/general/qrcs/setup-mapping-it.pdf | Bin 346524 -> 346372 bytes .../documents/general/qrcs/setup-mapping-nl.pdf | Bin 345459 -> 345408 bytes .../documents/general/qrcs/setup-mapping-ro.pdf | Bin 508395 -> 508246 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 846592 -> 846609 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 851440 -> 851378 bytes doc/context/examples/clock/clock.pdf | Bin 0 -> 65731 bytes doc/context/examples/clock/clock.tex | 156 +++++++++++++++++++++ .../general/manuals/luatex/luatex-nodes.tex | 2 + .../general/manuals/texit/texit-introduction.tex | 4 +- .../general/manuals/texit/texit-lookahead.tex | 6 +- .../general/manuals/texit/texit-titlepage.tex | 2 +- 21 files changed, 164 insertions(+), 6 deletions(-) create mode 100644 doc/context/examples/clock/clock.pdf create mode 100644 doc/context/examples/clock/clock.tex (limited to 'doc') diff --git a/doc/context/documents/general/manuals/texit.pdf b/doc/context/documents/general/manuals/texit.pdf index e5c67ebdb..e89fa1caf 100644 Binary files a/doc/context/documents/general/manuals/texit.pdf and b/doc/context/documents/general/manuals/texit.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf index 495058550..4e9d547c5 100644 Binary files a/doc/context/documents/general/qrcs/setup-cs.pdf and b/doc/context/documents/general/qrcs/setup-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf index 3b57402ac..0941e1f49 100644 Binary files a/doc/context/documents/general/qrcs/setup-de.pdf and b/doc/context/documents/general/qrcs/setup-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf index ddec39373..7137482f0 100644 Binary files a/doc/context/documents/general/qrcs/setup-en.pdf and b/doc/context/documents/general/qrcs/setup-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf index b44f5019a..cfdd71b78 100644 Binary files a/doc/context/documents/general/qrcs/setup-fr.pdf and b/doc/context/documents/general/qrcs/setup-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf index 80e35c65a..93e68397f 100644 Binary files a/doc/context/documents/general/qrcs/setup-it.pdf and b/doc/context/documents/general/qrcs/setup-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf index 0ec1d9d99..746595024 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf and b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf index 194eb640b..4b463d18a 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-de.pdf and b/doc/context/documents/general/qrcs/setup-mapping-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf index 49149e8cd..d9bddbfc0 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-en.pdf and b/doc/context/documents/general/qrcs/setup-mapping-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf index 427af2e8a..af22546f6 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf and b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf index 572adc050..8027468ab 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-it.pdf and b/doc/context/documents/general/qrcs/setup-mapping-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf index 71df849db..e87d00337 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf and b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf index da4157af7..61d893e81 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf and b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf index 8e771658f..c25f2cbff 100644 Binary files a/doc/context/documents/general/qrcs/setup-nl.pdf and b/doc/context/documents/general/qrcs/setup-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf index a162fb882..5714672c7 100644 Binary files a/doc/context/documents/general/qrcs/setup-ro.pdf and b/doc/context/documents/general/qrcs/setup-ro.pdf differ diff --git a/doc/context/examples/clock/clock.pdf b/doc/context/examples/clock/clock.pdf new file mode 100644 index 000000000..9ce83b407 Binary files /dev/null and b/doc/context/examples/clock/clock.pdf differ diff --git a/doc/context/examples/clock/clock.tex b/doc/context/examples/clock/clock.tex new file mode 100644 index 000000000..6b70de585 --- /dev/null +++ b/doc/context/examples/clock/clock.tex @@ -0,0 +1,156 @@ +%D This example dates from late 2001, and ws probaby made for some \TEX\ related +%D meeting. It's a relative simple example that uses a few function from a general +%D \JAVASCRIPT\ preamble. In fact forcing the \type {FieldStack} code into the +%D is the only adaptation from \MKII\ to \MKIV\ (because we load on demand and here +%D the code is ude sindirectly). +%D +%D Nowadays we could layers instead which is probably a bit more ligthweight than +%D widgets. Also, we should actually synchronize the time but on the other hand, but +%D on the other hand, now it's a sort of stopwatch. + +% \nopdfcompression + +\starttext + +\useJSscripts[fld] + +\useJSpreamble[FieldStack] + +\definepapersize + [clock] + [width=2.5cm, + height=2.5cm] + +\setuppapersize + [clock][clock] + +\setuplayout + [header=0pt, + footer=0pt, + backspace=.25cm, + topspace=.25cm, + width=middle, + height=middle] + +\startJSpreamble stepper used now + + var state = 0 ; + var more = 0 ; + var step = 0 ; + + function step_clock() { + try { + if (more == 60) { + more = 0 ; + Walk_Field("more") ; + } else { + } + more += 1 ; + Walk_Field("clock") ; + this.dirty = false ; + } catch (e) { + } + } + + function start_clock() { + try { + if (state == 0) { + step = app.setInterval ("step_clock()", 1000) ; + step.count = 0 ; + state = 1 ; + } else if (state == 1) { + app.clearInterval (step) ; + state = 2 ; + } else if (state == 2) { + app.clearInterval (step) ; + Reset_Fields("more") ; + Reset_Fields("clock") ; + Set_Field("more", "1") ; + Set_Field("clock", "1") ; + more = 0 ; + state = 0 ; + } + } catch(e) { + } + } + + function stop_clock () { + try { + app.clearInterval(step) ; + } catch(e) { + } + } + +\stopJSpreamble + +\definereference[StopClock] [JS(stop_clock)] +\definereference[StartClock][JS(start_clock)] + +\setupinteraction + [state=start, + closeaction={StopClock,ForgetChanges}, + closepageaction={StopClock}] + +\startreusableMPgraphic{common} + drawoptions(withpen pencircle scaled 1mm withcolor .4white) ; + fill fullsquare scaled 2.5cm ; + drawoptions(withpen pencircle scaled 1mm withcolor .6green) ; + draw fullsquare scaled 2.5cm ; + drawoptions(withpen pencircle scaled 1mm withcolor .6red) ; + draw fullcircle scaled 2cm ; + drawoptions(withpen pencircle scaled 2mm withcolor .6yellow) ; + for i=1 upto 12 : + draw (0,1cm) rotated ((i-1)*(360/12)) ; + endfor ; +\stopreusableMPgraphic + +\startuseMPgraphic{clock} + numeric stp ; stp := (\MPvar{n}-1)*(360/60) ; + pair p ; p := (0,\MPvar{l}-.5mm) ; + drawoptions(withpen pencircle scaled 1mm withcolor .6\MPvar{c}) ; + draw (origin -- p) rotated -stp ; + draw (p shifted (-2mm,-2.5mm)--p--p shifted (2mm,-2.5mm)) rotated -stp ; + setbounds currentpicture to fullsquare scaled 2cm ; + drawoptions(withpen pencircle scaled 2mm withcolor .6white) ; + draw origin ; +\stopuseMPgraphic + +\defineoverlay [common] [\reuseMPgraphic{common}] +\defineoverlay [start] [\overlaybutton{StartClock}] + +\setupbackgrounds + [page] + [background={common,start}] + +\let\clocklist\empty +\let\morelist \empty + +\dorecurse {60} { + \appendtocommalist{step:#1}\clocklist + \definesymbol + [step:#1] + [\useMPgraphic{clock}{n=#1,l=1cm,c=blue}] + \appendtocommalist{more:#1}\morelist + \definesymbol + [more:#1] + [\useMPgraphic{clock}{n=#1,l=.75cm,c=green}] +} + +\definefieldstack + [clock] + [\clocklist] + [width=2cm,height=2cm,offset=overlay,frame=off] + +\definefieldstack + [more] + [\morelist] + [width=2cm,height=2cm,offset=overlay,frame=off] + +\starttext + + \startoverlay + {\fieldstack[more]} + {\fieldstack[clock]} + \stopoverlay + +\stoptext diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex index 40324cd7b..34a2aebe8 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex @@ -2274,6 +2274,8 @@ Some accessors are used frequently and for these we provide more efficient helpe \NC \type{getfield} \NC generic getter, sufficient for the rest (other field names are often shared so a specific getter makes no sense then) \NC \NR \NC \type{getbox} \NC gets the given box (a list node) \NC \NR +\NC \type{getoffsets} \NC gets the \type {xoffset} and \type {yoffset} of a glyph or + \type {left} and \type {right} values of a rule \NC \NR \LL \stoptabulate diff --git a/doc/context/sources/general/manuals/texit/texit-introduction.tex b/doc/context/sources/general/manuals/texit/texit-introduction.tex index 6b33437ec..cfe87c25a 100644 --- a/doc/context/sources/general/manuals/texit/texit-introduction.tex +++ b/doc/context/sources/general/manuals/texit/texit-introduction.tex @@ -8,10 +8,10 @@ I needed a place to collect examples of \TEX\ coding and this is it. The example presented here are an unorganized bunch. Some originate in questions asked on the mailing list. Others are byproducts of tests made when playing with some (new) functionality. When you plan to use \TEX\ for a long time, it doesn't hurt to see -a bit of \TEX coding but when possible I will also show the \CONTEXT\ way. +a bit of \TEX\ coding but when possible I will also show the \CONTEXT\ way. I hope that this document is useful. You can of course always try to challenge me -for more examples. Hopefully I will nto forget about this document and extend it +for more examples. Hopefully I will not forget about this document and extend it occasionaly. \startlines diff --git a/doc/context/sources/general/manuals/texit/texit-lookahead.tex b/doc/context/sources/general/manuals/texit/texit-lookahead.tex index d3652e744..03eaecabe 100644 --- a/doc/context/sources/general/manuals/texit/texit-lookahead.tex +++ b/doc/context/sources/general/manuals/texit/texit-lookahead.tex @@ -21,7 +21,7 @@ or maybe: \stopTEX Normally the percentage symbol is used to indicate a comment, but here -are no comments. In these cases it makes the definition effectively +are no comments. In these cases, it makes the definition effectively \startTEX \def\foo#1{do something with "#1"!} @@ -57,7 +57,7 @@ A different use of the percent is seen in cases like this: This time we want to preserve the space after \type {something} because an end|-|of|-|line would either or not collapse it with \type {with} depending on -how the endofline character is set up. Normally: +how the endofline character is set up. Normally \startTEX \def\foo#1% @@ -65,7 +65,7 @@ how the endofline character is set up. Normally: with "#1".} \stopTEX -Will also add a space after something but when \TEX\ is set up to ignore lines +will also add a space after something but when \TEX\ is set up to ignore lines you get a collapse. So the explicit space is a robust way out. Both cases of using or omitting the comment symbol are easy to spot as they trigger an error or result in weird typeset results. diff --git a/doc/context/sources/general/manuals/texit/texit-titlepage.tex b/doc/context/sources/general/manuals/texit/texit-titlepage.tex index ee5db1969..1b7cabe84 100644 --- a/doc/context/sources/general/manuals/texit/texit-titlepage.tex +++ b/doc/context/sources/general/manuals/texit/texit-titlepage.tex @@ -23,7 +23,7 @@ draw image ( clip currentpicture to Page ; -draw textext.ulft ("\TeX it") ysized 5cm +draw textext.ulft ("\TeX it") ysized 5cm % indeed, no space after \TeX ! shifted lrcorner Page shifted (-1cm,1cm) withcolor white ; -- cgit v1.2.3