summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/context/documents/general/manuals/musings.pdfbin2647 -> 5724100 bytes
-rw-r--r--doc/context/documents/general/manuals/texit.pdfbin0 -> 163963 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin853563 -> 853283 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin853525 -> 853946 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin856925 -> 857242 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin849445 -> 849852 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin856054 -> 856344 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-cs.pdfbin346696 -> 347078 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-de.pdfbin430993 -> 431351 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-en.pdfbin344652 -> 345045 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-fr.pdfbin347391 -> 347533 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-it.pdfbin346518 -> 346524 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-nl.pdfbin345264 -> 345459 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-ro.pdfbin508003 -> 508395 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin846610 -> 846592 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin851107 -> 851440 bytes
-rw-r--r--doc/context/examples/calculator/calculator.pdfbin0 -> 145209 bytes
-rw-r--r--doc/context/examples/calculator/calculator.tex1871
-rw-r--r--doc/context/presentations/bachotex/2005/bachotex-2005-fonts.tex1
-rw-r--r--doc/context/presentations/bachotex/2005/bachotex-2005-hyphenation.tex1
-rw-r--r--doc/context/presentations/bachotex/2009/bachotex-2009-luatex.tex1
-rw-r--r--doc/context/presentations/bachotex/2009/bachotex-2009-math.tex1
-rw-r--r--doc/context/presentations/bachotex/2009/bachotex-2009-opentype.tex1
-rw-r--r--doc/context/presentations/bachotex/2011/bachotex-2011-ebook.tex1
-rw-r--r--doc/context/presentations/bachotex/2011/bachotex-2011-math.tex1
-rw-r--r--doc/context/presentations/bachotex/2011/bachotex-2011-metapost.tex1
-rw-r--r--doc/context/presentations/bachotex/2012/bachotex-2012-context.tex1
-rw-r--r--doc/context/presentations/bachotex/2012/bachotex-2012-future.tex1
-rw-r--r--doc/context/presentations/bachotex/2014/bachotex-2014-luatex.tex1
-rw-r--r--doc/context/presentations/bachotex/2014/bachotex-2014-metapost.tex1
-rw-r--r--doc/context/presentations/context/2007/context-2007-luatex.tex1
-rw-r--r--doc/context/presentations/context/2007/context-2007-mkiv.tex1
-rw-r--r--doc/context/presentations/context/2010/context-2010-just-in-time-1.tex1
-rw-r--r--doc/context/presentations/context/2010/context-2010-just-in-time-2.tex1
-rw-r--r--doc/context/presentations/context/2010/context-2010-requirements.tex1
-rw-r--r--doc/context/presentations/context/2010/context-2010-structure-matters.tex1
-rw-r--r--doc/context/presentations/context/2010/context-2010-workflows.tex1
-rw-r--r--doc/context/presentations/tug/2001/tug-2001-ideas.pdfbin0 -> 659331 bytes
-rw-r--r--doc/context/presentations/tug/2001/tug-2001-ideas.tex445
-rw-r--r--doc/context/presentations/tug/2007/tug-2007-fonts.pdfbin0 -> 120377 bytes
-rw-r--r--doc/context/sources/general/manuals/interaction/interaction-javascript.tex11
-rw-r--r--metapost/context/base/mpiv/mp-tool.mpiv4
-rw-r--r--scripts/context/lua/mtx-fonts.lua2
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/back-exp.lua4
-rw-r--r--tex/context/base/mkiv/buff-imp-default.mkiv10
-rw-r--r--tex/context/base/mkiv/char-def.lua283
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-cff.lua1
-rw-r--r--tex/context/base/mkiv/font-dsp.lua2
-rw-r--r--tex/context/base/mkiv/font-map.lua5
-rw-r--r--tex/context/base/mkiv/font-mis.lua2
-rw-r--r--tex/context/base/mkiv/font-otl.lua2
-rw-r--r--tex/context/base/mkiv/font-ott.lua4
-rw-r--r--tex/context/base/mkiv/font-oup.lua1
-rw-r--r--tex/context/base/mkiv/java-imp-fld.mkiv19
-rw-r--r--tex/context/base/mkiv/java-ini.lua3
-rw-r--r--tex/context/base/mkiv/lpdf-fld.lua226
-rw-r--r--tex/context/base/mkiv/lpdf-grp.lua11
-rw-r--r--tex/context/base/mkiv/scrn-fld.mkvi91
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26196 -> 26173 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin269257 -> 269261 bytes
-rw-r--r--tex/context/base/mkiv/strc-tag.lua4
-rw-r--r--tex/context/base/mkiv/strc-tag.mkiv32
-rw-r--r--tex/context/base/mkiv/supp-box.mkiv13
-rw-r--r--tex/context/interface/mkiv/context-en.xml11
-rw-r--r--tex/context/interface/mkiv/i-boxes.xml15
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin856925 -> 857242 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60771 -> 60771 bytes
-rw-r--r--tex/context/modules/mkiv/s-cgj.mkiv714
-rw-r--r--tex/context/modules/mkiv/s-present-dark.mkiv357
-rw-r--r--tex/context/sample/third/aesop-de.tex (renamed from tex/context/sample/common/aesop-de.tex)0
-rw-r--r--tex/context/sample/third/cervantes-es.tex (renamed from tex/context/sample/common/cervantes-es.tex)0
-rw-r--r--tex/context/sample/third/khatt-ar.tex (renamed from tex/context/sample/common/khatt-ar.tex)0
-rw-r--r--tex/context/sample/third/khatt-en.tex (renamed from tex/context/sample/common/khatt-en.tex)0
-rw-r--r--tex/context/sample/third/quevedo-es.tex (renamed from tex/context/sample/common/quevedo-es.tex)0
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua14
79 files changed, 4059 insertions, 125 deletions
diff --git a/doc/context/documents/general/manuals/musings.pdf b/doc/context/documents/general/manuals/musings.pdf
index bb70fac4c..8c956b7c4 100644
--- a/doc/context/documents/general/manuals/musings.pdf
+++ b/doc/context/documents/general/manuals/musings.pdf
Binary files differ
diff --git a/doc/context/documents/general/manuals/texit.pdf b/doc/context/documents/general/manuals/texit.pdf
new file mode 100644
index 000000000..e5c67ebdb
--- /dev/null
+++ b/doc/context/documents/general/manuals/texit.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index efb4fb952..495058550 100644
--- a/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf
index fe5c22ca8..3b57402ac 100644
--- a/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf
index 9c45d463f..ddec39373 100644
--- a/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf
index e15cff82c..b44f5019a 100644
--- a/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf
index 5aae4072a..80e35c65a 100644
--- a/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
index 0b99cc06c..0ec1d9d99 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
index c451eb621..194eb640b 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
index 248a1c798..49149e8cd 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
index c4cceecdc..427af2e8a 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
index 56c41f819..572adc050 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
index 7a3c3c84a..71df849db 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
index ab17871a0..da4157af7 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf
index 26f6e3f8c..8e771658f 100644
--- a/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf
index c43d9ba17..a162fb882 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/doc/context/examples/calculator/calculator.pdf b/doc/context/examples/calculator/calculator.pdf
new file mode 100644
index 000000000..3c7a4b8e8
--- /dev/null
+++ b/doc/context/examples/calculator/calculator.pdf
Binary files differ
diff --git a/doc/context/examples/calculator/calculator.tex b/doc/context/examples/calculator/calculator.tex
new file mode 100644
index 000000000..7ff3235a6
--- /dev/null
+++ b/doc/context/examples/calculator/calculator.tex
@@ -0,0 +1,1871 @@
+%D The calculator
+%D
+%D This document was made in 1998 as demonstration of widgets in \CONTEXT in \MKII.
+%D It has been adapted to run in \MKIV. Not many changes were needed. The macro
+%D definitions are layout a bit more readable and we use official scratch variables.
+%D
+%D The \JAVASCRIPT\ interpeter has changes and also became more strict. So, I
+%D reformatted the code bit and added some more semicolons and vars.
+%D
+%D We changed to font from a Helvetica lookalike to Dejavu but kept the colors as
+%D in the original. We also kept the \JAVASCRIPT\ and \METAPOST\ code (although
+%D we had to add some initalizations for \METAPOST\ due to the runtime graphic
+%D generation. I didn't check the functionality.
+%D
+%D Should I do it different nowaways? For sure. I might use layers of make nicer
+%D \METAPOST\ code but it's also a demonstration of how thinsg were done in 1998.
+
+% acrobat 3->4 : different field initialization
+% acrobat 4->5 : typecasting fails [switch"2" vs 2]
+% acrobat 6-> : more strict interpreter
+
+\starttext
+
+\dontcomplain
+
+\setuppapersize
+ [S6][S6]
+
+\setupwhitespace
+ [medium]
+
+\setupbodyfont
+ [dejavu,9pt]
+
+\setuptyping
+ [margin=standard]
+
+\setuplayout
+ [backspace=1cm,
+ topspace=1cm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+\setupinteraction
+ [page=yes,
+ state=start,
+ author=Hans Hagen,
+ title=The Calculator,
+ color=keyboard]
+
+\setupinteractionscreen
+ [option=max]
+
+\definecolor [action] [r= 1, g=.9, b=.5]
+\definecolor [keyboard] [r= 0, g=.7, b=.7]
+\definecolor [stack] [r=.7, g=.6, b=.8]
+
+\useURL[pragma-mail][mailto:pragma@xs4all.nl][][pragma@xs4all.nl]
+
+%D We have to use \type {String(...)=""} otherwise zero is regarded
+%D as non|-|entry (empty). This is a bit fuzzy.
+
+\def\MinLevel{50}
+\def\MaxLevel {8}
+
+\startJSpreamble {variables} used now
+
+ var Growing = false ;
+ var MinLevel = -50 ;
+ var MaxLevel = 8 ;
+ var Level = 1 ;
+ var NoErrorFound = ">ok" ;
+ var NoValueError = ">invalid" ;
+ var WhateverError = ">error" ;
+ var OverflowError = ">overflow" ;
+ var ExhaustedError = ">exhausted" ;
+
+ var Stack = new Array() ;
+ var Stats = new Array() ;
+
+ // console.clear() ;
+
+ // console.println("preamble loaded: variables") ;
+
+\stopJSpreamble
+
+\startJSpreamble {housekeeping} used now
+
+ function do_reset_all () {
+ if (Growing) {
+ Level = 1 ;
+ } else {
+ Level = MaxLevel ;
+ }
+ for (var i=MinLevel ; i<=MaxLevel ; i++) {
+ Stack[i] = "" ;
+ }
+ do_mark (NoErrorFound) ;
+ }
+
+ function do_refresh (i) {
+ var vv = this.getField("Stack." + String(i)) ;
+ if (vv) {
+ vv.value = Stack[i] ;
+ vv.readonly = (i != Level) ;
+ this.dirty = false ;
+ }
+ }
+
+ function do_refresh_all () {
+ for (var i=1 ; i<=MaxLevel ; i++) {
+ do_refresh(i) ;
+ }
+ }
+
+ function do_update_A () {
+ if (Stack[1] == "") {
+ for (var i=1 ; i<=MaxLevel ; i++) {
+ vv = this.getField("Stack." + String(i)) ;
+ if (vv) {
+ Level = i ;
+ if (valid_number(vv.value)) {
+ Stack[Level] = String(vv.value)
+ } else {
+ vv.value = "" ;
+ this.dirty = false ;
+ return ;
+ }
+ }
+ }
+ }
+ }
+
+ function do_update_B () {
+ if (String(Stack[MaxLevel-1]) == "") {
+ for (var i=1 ; i<=MaxLevel ; i++) {
+ vv = this.getField("Stack." + String(i)) ;
+ if (vv) {
+ if (valid_number(vv.value)) {
+ Stack[Level] = String(vv.value) ;
+ } else {
+ vv.value = "" ;
+ this.dirty = false ;
+ return ;
+ }
+ }
+ }
+ }
+ }
+
+ function do_update () {
+ if (Growing) {
+ do_update_A() ;
+ } else {
+ do_update_B() ;
+ }
+ }
+
+ function do_mark (s) {
+ var vv = this.getField("Stack." + String(Level)) ;
+ if (vv) {
+ vv.value = s ;
+ this.dirty = false ;
+ }
+ }
+
+ // console.println("preamble loaded: housekeeping") ;
+\stopJSpreamble
+
+\startJSpreamble {handling} used now
+
+ function do_enter () {
+ do_update() ;
+ var vv = this.getField("Stack." + String(Level)) ;
+ if ((vv.value!=Stack[Level]) && (String(vv.value).search(/>/)==-1)) {
+ do_push (vv.value) ;
+ } else {
+ do_push (Stack[Level]) ;
+ }
+ }
+
+ function do_push_A (Value) {
+ do_update() ;
+ Stack[Level] = String(Value) ;
+ do_parse(Level) ;
+ if (String(Stack[Level])!="") {
+ if (Level<MaxLevel) {
+ ++Level ;
+ do_mark (ErrorString) ;
+ } else {
+ for (var i=MinLevel ; i<MaxLevel ; i++) {
+ Stack[i] = Stack[i+1] ;
+ }
+ Stack[MaxLevel] = "" ;
+ do_refresh_all() ;
+ if (String(Stack[MinLevel])!="") {
+ ErrorString = ExhaustedError ;
+ }
+ do_mark (ErrorString) ;
+ }
+ }
+ }
+
+ function do_push_B (Value) {
+ do_update() ;
+ Stack[MaxLevel] = String(Value) ;
+ do_parse(MaxLevel) ;
+ if (String(Stack[MaxLevel])!="") {
+ for (var i=MinLevel ; i<MaxLevel ; i++) {
+ Stack[i] = Stack[i+1] ;
+ }
+ Stack[MaxLevel] = "" ;
+ do_refresh_all() ;
+ if (Stack[MinLevel]!="") {
+ ErrorString = ExhaustedError ;
+ }
+ do_mark (ErrorString) ;
+ }
+ }
+
+ function do_push (Value) {
+ if (Growing) {
+ do_push_A (Value) ;
+ } else {
+ do_push_B (Value) ;
+ }
+ }
+
+ function do_pop_A () {
+ do_update() ;
+ if (String(Stack[0])!="") {
+ for (var i=MaxLevel ; i>MinLevel ; i--) {
+ Stack[i] = Stack[i-1] ;
+ }
+ Stack[MinLevel] = "" ;
+ do_refresh_all() ;
+ Level = MaxLevel ;
+ } else {
+ while ((Level>1) && (String(Stack[Level])=="")) {
+ do_refresh(Level) ;
+ --Level ;
+ }
+ }
+ if (String(Stack[Level])=="") {
+ return("") ;
+ } else {
+ Value = Number(Stack[Level]) ;
+ Stack[Level] = "" ;
+ do_refresh(Level) ;
+ return(Value) ;
+ }
+ }
+
+ function do_pop_B () {
+ do_update() ;
+ if (String(Stack[MaxLevel])=="") {
+ for (var i=MaxLevel ; i>MinLevel ; i--) {
+ Stack[i] = Stack[i-1] ;
+ }
+ Stack[MinLevel] = "" ;
+ do_refresh_all() ;
+ }
+ if (String(Stack[MaxLevel])=="") {
+ return("") ;
+ } else {
+ Value = Number(Stack[MaxLevel]) ;
+ Stack[MaxLevel] = "" ;
+ return(Value) ;
+ }
+ }
+
+ function do_pop () {
+ if (Growing) {
+ return(do_pop_A()) ;
+ } else {
+ return(do_pop_B()) ;
+ }
+ }
+
+ function do_dup () {
+ var X = do_pop() ;
+ if (valid_number(X)) {
+ do_push(X) ;
+ do_push(X) ;
+ } else {
+ do_mark (ErrorString) ;
+ }
+ }
+
+ function do_parse ( i ) {
+ if (valid_number(Stack[i])) {
+ Stack[i] = parseFloat(Stack[i]) ;
+ do_refresh(i) ;
+ } else {
+ Stack[i] = "" ;
+ do_refresh(i) ;
+ do_mark (ErrorString) ;
+ }
+ }
+
+ function do_digit ( d ) {
+ Stack[Level] += String(d) ;
+ do_refresh(Level) ;
+ }
+
+ function valid_number ( x ) {
+ if (String(x) == "") {
+ ErrorString = NoValueError ;
+ return(false) ;
+ } else if (isNaN(x)) {
+ ErrorString = NoValueError ;
+ return(false) ;
+ } else if (isFinite(x)) {
+ ErrorString = NoErrorFound ;
+ return(true) ;
+ } else {
+ ErrorString = OverflowError ;
+ return(false) ;
+ }
+ }
+
+ // console.println("preamble loaded: handling") ;
+
+\stopJSpreamble
+
+\startJSpreamble {operations} used now
+
+ function do_calculate (Operator) {
+ do_enter() ;
+ var Y = do_pop() ;
+ var X = 0 ;
+ if (valid_number(Y)) {
+ X = do_pop() ;
+ if (valid_number(X)) {
+ switch (Number(Operator)) {
+ case 1 :
+ if (Y) {
+ X /= Y ;
+ }
+ break ;
+ case 2 :
+ X *= Y ;
+ break ;
+ case 3 :
+ X -= Y ;
+ break ;
+ case 4 :
+ X += Y ;
+ break ;
+ case 5 :
+ X = Math.max(X,Y) ;
+ break ;
+ case 6 :
+ X = Math.min(X,Y) ;
+ break ;
+ case 7 :
+ X = Math.pow(X,Y) ;
+ break
+ }
+ do_push(X) ;
+ } else {
+ do_push(Y) ;
+ ErrorString = NoValueError ;
+ }
+ }
+ do_mark(ErrorString) ;
+ }
+
+ // console.println("preamble loaded: operations") ;
+\stopJSpreamble
+
+\startJSpreamble {functions} used now
+
+ function do_facultate (Value) {
+ var n = Math.min(Math.round(Value),500) ;
+ if (n <= 1) {
+ return(1) ;
+ } else {
+ var m = 1 ;
+ for (m=1, i=1 ; i<=n ; i++) {
+ m = m * i ;
+ }
+ return(m) ;
+ }
+ }
+
+ function do_constant (Operation) {
+ do_update() ;
+ switch (Number(Operation)) {
+ case 1 :
+ do_push(Math.PI) ;
+ break ;
+ case 2 :
+ do_push(Math.E) ;
+ break ;
+ case 3 :
+ do_push(Math.random(1)) ;
+ break ;
+ case 4 :
+ do_dup() ;
+ break ;
+ }
+ }
+
+ function do_do_memory (mv, Sign) {
+ var X = do_pop() ;
+ if (valid_number(X)) {
+ mv.value += Sign*X ;
+ if (!valid_number(mv.value)) {
+ mv.value = "" ;
+ }
+ this.dirty = false ;
+ }
+ do_mark(ErrorString) ;
+ }
+
+ function do_memory (Operation) {
+ var mv = this.getField("Stats.mem") ;
+ if (mv) {
+ switch (Number(Operation)) {
+ case 1 :
+ mv.value = "" ;
+ break ;
+ case 2 :
+ do_do_memory(mv, 1) ;
+ break ;
+ case 3 :
+ do_do_memory(mv, -1) ;
+ break ;
+ case 4 :
+ if (mv.value == "") {
+ ErrorString = NoValueError ;
+ do_mark(ErrorString) ;
+ } else {
+ do_push(mv.value) ;
+ }
+ break ;
+ }
+ this.dirty = false ;
+ }
+ }
+
+ function do_operation (Operator) {
+ do_enter() ;
+ var X = do_pop() ;
+ if (valid_number(X)) {
+ switch (Number(Operator)) {
+ case 1 :
+ do_push(Math.sin(X)) ;
+ break ;
+ case 2 :
+ do_push(Math.cos(X)) ;
+ break ;
+ case 3 :
+ do_push(Math.tan(X)) ;
+ break ;
+ case 4 :
+ do_push(Math.exp(X)) ;
+ break ;
+ case 5 :
+ do_push(Math.ceil(X)) ;
+ break ;
+ case 6 :
+ do_push(Math.pow(X,2)) ;
+ break ;
+ case 7 :
+ do_push(do_facultate(X)) ;
+ break ;
+ case 8 :
+ do_push(Math.asin(X)) ;
+ break ;
+ case 9 :
+ do_push(Math.acos(X)) ;
+ break ;
+ case 10 :
+ do_push(Math.atan(X)) ;
+ break ;
+ case 11 :
+ do_push(Math.log(X)) ;
+ break ;
+ case 12 :
+ do_push(Math.floor(X)) ;
+ break ;
+ case 13 :
+ do_push(Math.sqrt(X)) ;
+ break ;
+ case 14 :
+ do_push(Math.round(X)) ;
+ break ;
+ case 15 :
+ do_push(Math.pow(X,-1)) ;
+ break ;
+ case 16 :
+ do_push(X*(2*Math.PI/360)) ;
+ break ;
+ case 17 :
+ do_push(X/(2*Math.PI/360)) ;
+ break ;
+ case 18 :
+ do_push(-X) ;
+ break ;
+ }
+ }
+ do_mark(ErrorString) ;
+ }
+
+ // console.println("preamble loaded: functions") ;
+\stopJSpreamble
+
+\startJSpreamble {statistics} used now
+
+ var s_min_max = 1 ;
+ var s_sqrt = 0 ;
+
+ function do_statcalcs (Sign, X) {
+ s_n.value += Sign ;
+ s_sqrt += Sign*X*X ;
+ s_total.value += Sign*X ;
+ s_mean.value = s_total.value / s_n.value ;
+ s_temp = Math.max(s_sqrt - 2*s_total.value*s_mean.value +
+ s_n.value*s_mean.value*s_mean.value, 0) ;
+ s_sdev.value = Math.sqrt(s_temp/s_n.value) ;
+ if (!(valid_number(X) && valid_number(s_sqrt) &&
+ valid_number(s_sdev.value) && valid_number(s_total.value) &&
+ valid_number(s_mean.value))) {
+ do_statistics(1) ;
+ }
+ this.dirty = false ;
+ }
+
+ function do_statistics(Operator) {
+ var s_n = this.getField("Stats.n") ;
+ var s_min = this.getField("Stats.min") ;
+ var s_max = this.getField("Stats.max") ;
+ var s_total = this.getField("Stats.total") ;
+ var s_mean = this.getField("Stats.mean") ;
+ var s_sdev = this.getField("Stats.sdev") ;
+ if ((s_sqrt==0) && (s_n.value!="") && (s_n.value>0)) {
+ s_min_max = 1 ;
+ s_sqrt = s_n.value*s_sdev.value*s_sdev.value +
+ 2*s_total.value*s_mean.value -
+ s_n.value*s_mean.value*s_mean.value ;
+ }
+ switch (Number(Operator)) {
+ case 1 :
+ s_min_max = 1 ;
+ s_n.value = "" ;
+ s_min.value = "" ;
+ s_max.value = "" ;
+ s_total.value = "" ;
+ s_mean.value = "" ;
+ s_sdev.value = "" ;
+ s_sqrt = 0 ;
+ break ;
+ case 2 :
+ do_enter() ;
+ var X = do_pop() ;
+ if (valid_number(X)) {
+ if (s_n.value=="") {
+ s_n.value = 0 ;
+ s_total.value = 0 ;
+ s_mean.value = 0 ;
+ if (s_min_max) {
+ s_min.value = X ;
+ s_max.value = X ;
+ }
+ } else {
+ if ((s_min_max) && (X<s_min.value)) {
+ s_min.value = X ;
+ }
+ if ((s_min_max) && (X>s_max.value)) {
+ s_max.value = X ;
+ }
+ }
+ do_statcalcs(1,X) ;
+ }
+ break ;
+ case 3 :
+ do_enter() ;
+ var X = do_pop() ;
+ if (valid_number(X)) {
+ s_min.value = "" ;
+ s_max.value = "" ;
+ s_min_max = 0 ;
+ if (s_n.value>0) {
+ do_statcalcs(-1,X) ;
+ } else {
+ do_statistics(1) ;
+ }
+ }
+ break ;
+ }
+ do_mark(ErrorString) ;
+ this.dirty = false ;
+ }
+
+ function do_copystat (Field) {
+ var sv = this.getField("Stats.".concat(Field)) ;
+ do_push(sv.value) ;
+ }
+
+ // console.println("preamble loaded: statistics") ;
+\stopJSpreamble
+
+\startJSpreamble {initialization} used now
+ do_reset_all() ;
+ do_update() ;
+ do_refresh_all() ;
+ do_mark (NoErrorFound) ;
+
+ // console.println("preamble loaded: initialization") ;
+\stopJSpreamble
+
+%D We could use functions instead but this demonstrates inline
+%D code. We also could use predefined references.
+
+\startJScode{period}
+ if (Stack[Level].search(/[.|e]/)==-1) {
+ do_digit(".") ;
+ }
+\stopJScode
+
+\startJScode{sign}
+ L = Stack[Level].length ;
+ if ((L==0) || (Stack[Level].charAt(L-1)=="e")) {
+ do_digit("-") ;
+ }
+\stopJScode
+
+\startJScode{exponent}
+ L = Stack[Level].length ;
+ if ((L>0) && valid_number(Stack[Level]) && (Stack[Level].search(/[e]/)==-1)) {
+ do_digit("e") ;
+ }
+\stopJScode
+
+\startJScode{reset}
+ do_reset_all() ;
+ do_refresh_all() ;
+ do_mark (NoErrorFound) ;
+\stopJScode
+
+\startJScode{clear}
+ do_update() ;
+ Stack[Level] = String(Stack[Level]).substring(0,String(Stack[Level]).length-1) ;
+ do_refresh(Level) ;
+\stopJScode
+
+\startJScode{pop}
+ X = do_pop() ;
+ do_mark(NoErrorFound) ;
+\stopJScode
+
+\startJScode{push}
+ do_enter() ;
+\stopJScode
+
+\startJScode{grow}
+ Growing = !Growing ;
+ do_reset_all() ;
+ do_refresh_all() ;
+ do_mark (NoErrorFound) ;
+\stopJScode
+
+% graphics
+
+\startuniqueMPgraphic{page}
+ fill OverlayBox
+ withcolor .4white ;
+ draw OverlayBox enlarged -10pt
+ withpen pencircle scaled 5pt
+ withcolor .8white ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{shape}
+ path p ; color c ;
+ p := OverlayBox ;
+ c := \overlaycolor ;
+ fill p withcolor c ;
+ draw p withpen pencircle scaled 1.5pt withcolor .8c ;
+\stopuniqueMPgraphic
+
+\defineoverlay [page] [\uniqueMPgraphic{page}]
+\defineoverlay [shape] [\uniqueMPgraphic{shape}]
+
+\setupbackgrounds
+ [page]
+ [background=page]
+
+\definemeasure[ButtonWidth][\makeupwidth/15]
+
+\setupbuttons
+ [width=\measured{ButtonWidth},
+ height=\measured{ButtonWidth},
+ background=shape,
+ backgroundcolor=\MPcolor{keyboard},
+ frame=off,
+ style=,
+ color=]
+
+\setupfield
+ [Results]
+ [horizontal,frame]
+ [width=fit,
+ align={lohi},
+ height=.5\measured{ButtonWidth},
+ background=shape,
+ backgroundcolor=\MPcolor{stack},
+ frame=off]
+ [width=3.5\measured{ButtonWidth},
+ frame=off]
+ [width=3.5\measured{ButtonWidth},
+ height=.45\measured{ButtonWidth},
+ option=readonly,
+ frame=off]
+
+\starttexdefinition unexpanded Star
+ \lower.65ex\hbox {
+ *
+ }
+\stoptexdefinition
+
+\starttexdefinition unexpanded InfoButton #1
+ \setbox\scratchbox\hbox {
+ \lower .5cm \hbox {
+ \button [
+ width=\dimexpr\overlaywidth + .5cm\relax,
+ height=\dimexpr\overlayheight + .5cm\relax,
+ strut=no,
+ frame=off,
+ background=
+ ] {
+ } [
+ info:#1
+ ]
+ }
+ }
+ \wd\scratchbox\overlaywidth
+ \ht\scratchbox\overlayheight
+ \box\scratchbox
+\stoptexdefinition
+
+\starttexdefinition unexpanded SomeKey #1#2#3
+
+ \bgroup
+
+ \doifelsenothing {#2} {
+ \button[background=]{#2}[#3]
+ } {
+ \defineoverlay
+ [infobutton]
+ [\InfoButton{#1}]
+ % \button
+ % [background={infobutton,shape}]
+ % {#2}
+ % [#3]
+ \framed
+ [offset=overlay,
+ frame=off,
+ background=infobutton,
+ backgroundcolor=red]
+ {\button{#2}[#3]}
+ }
+
+ \egroup
+
+ \ignorespaces
+
+\stoptexdefinition
+
+\starttexdefinition unexpanded StatField #1
+ \hbox \bgroup
+ \doifelsenothing {#1} {
+ \framed [
+ height=.5\measured{ButtonWidth},
+ width=3.5\measured{ButtonWidth},
+ frame=off
+ ] {
+ }
+ } {
+ \definefield[Stats.#1][line][Results]
+ \field[Stats.#1][option=readonly]
+ }
+ \egroup
+ \ignorespaces
+\stoptexdefinition
+
+\setbox\scratchboxone=\hbox to .4\makeupwidth \bgroup
+ \ss
+ \SomeKey {7} {\ssb 7} {JS(do_digit{7})} \hss
+ \SomeKey {8} {\ssb 8} {JS(do_digit{8})} \hss
+ \SomeKey {9} {\ssb 9} {JS(do_digit{9})} \hss
+ \SomeKey {div} {\ssb /} {JS(do_calculate{1})} \hss
+ \SomeKey {del} {del} {JS(clear)}
+\egroup
+
+\setbox\scratchboxtwo=\hbox to \wd\scratchboxone \bgroup
+ \ss
+ \SomeKey {4} {\ssb 4} {JS(do_digit{4})} \hss
+ \SomeKey {5} {\ssb 5} {JS(do_digit{5})} \hss
+ \SomeKey {6} {\ssb 6} {JS(do_digit{6})} \hss
+ \SomeKey {mul} {\ssb \Star} {JS(do_calculate{2})} \hss
+ \SomeKey {E} {E} {JS(exponent)}
+\egroup
+
+\setbox\scratchboxthree=\hbox to \wd\scratchboxone \bgroup
+ \ss
+ \SomeKey {1} {\ssb 1} {JS(do_digit{1})} \hss
+ \SomeKey {2} {\ssb 2} {JS(do_digit{2})} \hss
+ \SomeKey {3} {\ssb 3} {JS(do_digit{3})} \hss
+ \SomeKey {sub} {\ssb --} {JS(do_calculate{3})} \hss
+ \SomeKey {pop} {pop} {JS(pop)}
+\egroup
+
+\setbox\scratchboxfour=\hbox to \wd\scratchboxone \bgroup
+ \ss
+ \SomeKey {0} {\ssb 0} {JS(do_digit{0})} \hss
+ \SomeKey {period} {\ssb .} {JS(period)} \hss
+ \SomeKey {sign} {\ssb -} {JS(sign)} \hss
+ \SomeKey {add} {\ssb +} {JS(do_calculate{4})} \hss
+ \SomeKey {push} {push} {JS(push)}
+\egroup
+
+\setbox\scratchboxone=\vbox to .8\wd\scratchboxone \bgroup
+ \box\scratchboxone \vss
+ \box\scratchboxtwo \vss
+ \box\scratchboxthree\vss
+ \box\scratchboxfour
+\egroup
+
+\setbox\scratchboxtwo=\vbox to \ht\scratchboxone \bgroup
+ \dostepwiserecurse {\MaxLevel} {1} {-1} {
+ \definefield[Stack.\recurselevel][line][Results]
+ \hbox \bgroup
+ \field[Stack.\recurselevel][option=readonly]%
+ \egroup
+ \vfill
+ }
+ \unskip
+\egroup
+
+\setbox\scratchboxthree=\vbox to \ht\scratchboxone \bgroup
+ \StatField {n} \vfill
+ \StatField {min} \vfill
+ \StatField {max} \vfill
+ \StatField {total} \vfill
+ \StatField {mean} \vfill
+ \StatField {sdev} \vfill
+ \StatField {} \vfill
+ \StatField {}
+\egroup
+
+\setbox\scratchboxfour=\vbox to \ht\scratchboxone \bgroup
+ \ss\setstrut
+ \setupbuttons
+ [width=\measured{ButtonWidth},
+ height=.5\measured{ButtonWidth},
+ backgroundcolor=\MPcolor{action}]%
+ \SomeKey {sn} {n} {JS(do_copystat{n})} \vfill
+ \SomeKey {smin} {min} {JS(do_copystat{min})} \vfill
+ \SomeKey {smax} {max} {JS(do_copystat{max})} \vfill
+ \SomeKey {stotal} {total} {JS(do_copystat{total})} \vfill
+ \SomeKey {smean} {mean} {JS(do_copystat{mean})} \vfill
+ \SomeKey {ssdev} {sdev} {JS(do_copystat{sdev})} \vfill
+ \SomeKey {} {} {} \vfill
+ \SomeKey {} {} {}
+\egroup
+
+\setbox\scratchboxone=\hbox to \hsize \bgroup
+ \box\scratchboxone \hss
+ \box\scratchboxtwo \hss
+ \box\scratchboxthree\hss
+ \box\scratchboxfour
+\egroup
+
+\setupbuttons
+ [width=1.5cm,
+ height=1cm,
+ backgroundcolor=\MPcolor{action}]
+
+\setbox\scratchboxtwo=\hbox to \wd\scratchboxone \bgroup
+ \ss\setstrut
+ \SomeKey {sin} {sin} {JS(do_operation{1})} \hss
+ \SomeKey {cos} {cos} {JS(do_operation{2})} \hss
+ \SomeKey {tan} {tan} {JS(do_operation{3})} \hss
+ \SomeKey {max} {max} {JS(do_calculate{5})} \hss
+ \SomeKey {exp} {exp} {JS(do_operation{4})} \hss
+ \SomeKey {ceil} {ceil} {JS(do_operation{5})} \hss
+ \SomeKey {sqr} {x\high{2}} {JS(do_operation{6})} \hss
+ \SomeKey {fac} {x!} {JS(do_operation{7})} \hss
+ \SomeKey {pow} {x\high{y}} {JS(do_calculate{7})} \hss
+ \SomeKey {rad} {rad} {JS(do_operation{16})}
+\egroup
+
+\setbox\scratchboxthree=\hbox to \wd\scratchboxone \bgroup
+ \ss\setstrut
+ \SomeKey {asin} {asin} {JS(do_operation{8})} \hss
+ \SomeKey {acos} {acos} {JS(do_operation{9})} \hss
+ \SomeKey {atan} {atan} {JS(do_operation{10})} \hss
+ \SomeKey {min} {min} {JS(do_calculate{6})} \hss
+ \SomeKey {ln} {ln} {JS(do_operation{11})} \hss
+ \SomeKey {floor}{floor} {JS(do_operation{12})} \hss
+ \SomeKey {sqrt} {sqrt} {JS(do_operation{13})} \hss
+ \SomeKey {round}{round} {JS(do_operation{14})} \hss
+ \SomeKey {inv} {1/x} {JS(do_operation{15})} \hss
+ \SomeKey {deg} {deg} {JS(do_operation{17})}
+\egroup
+
+\setbox\scratchboxfour=\hbox to \wd\scratchboxone \bgroup
+ \ss\setstrut
+ \SomeKey {} {} {} \hss
+ \SomeKey {} {} {} \hss
+ \setupbuttons
+ [backgroundcolor=\MPcolor{keyboard}]%
+ \SomeKey {new} {new} {JS(reset)} \hss
+ \SomeKey {} {} {} \hss
+ \SomeKey {} {} {} \hss
+ \SomeKey {} {} {} \hss
+ \SomeKey {} {} {} \hss
+ \SomeKey {newn} {new} {JS(do_statistics{1})} \hss
+ \SomeKey {addn} {+n} {JS(do_statistics{2})} \hss
+ \SomeKey {subn} {--n} {JS(do_statistics{3})}
+\egroup
+
+\setbox\scratchboxfive=\hbox to \wd\scratchboxone \bgroup
+ \ss\setstrut
+ \SomeKey {neg} {--x} {JS(do_operation{18})} \hss
+ \SomeKey {random}{random} {JS(do_constant{3})} \hss
+ \SomeKey {pi} {pi} {JS(do_constant{1})} \hss
+ \SomeKey {e} {e} {JS(do_constant{2})} \hss
+ \SomeKey {dup} {dup} {JS(do_constant{4})} \hss
+ \SomeKey {} {} {} \hss
+ \SomeKey {} {} {} \hss
+ \setupbuttons
+ [backgroundcolor=\MPcolor{keyboard}]%
+ \SomeKey {} {} {} \hss
+ \SomeKey {exit} {exit} {CloseDocument} \hss
+ \SomeKey {help} {info} {info:help}
+\egroup
+
+\setbox\scratchboxsix=\hbox to \wd\scratchboxone \bgroup
+ \ss\setstrut
+ \setupbuttons
+ [width=\measured{ButtonWidth},
+ height=.5\measured{ButtonWidth},
+ backgroundcolor=\MPcolor{keyboard}]%
+ \SomeKey {newmem} {new} {JS(do_memory{1})} \hss
+ \SomeKey {addmem} {+m} {JS(do_memory{2})} \hss
+ \SomeKey {submem} {--m} {JS(do_memory{3})} \hss
+ \StatField {mem} \hss
+ \setupbuttons
+ [backgroundcolor=\MPcolor{action}]%
+ \SomeKey {copmem} {mem} {JS(do_memory{4})} \hss
+ \SomeKey {} {} {} \hss
+ \setupbuttons
+ [backgroundcolor=\MPcolor{stack}]%
+ \SomeKey {grow} {grow} {JS(grow)} \hss
+ \StatField {}
+\egroup
+
+\startstandardmakeup
+
+ \pagereference[calculator]
+
+ \vfill
+
+ \hbox to \hsize \bgroup
+ \hss
+ \vbox to \vsize \bgroup
+ \box\scratchboxtwo \vss
+ \box\scratchboxthree\vss
+ \box\scratchboxone \vss
+ \box\scratchboxfour \vss
+ \box\scratchboxfive \vss
+ \box\scratchboxsix
+ \egroup
+ \hss
+ \egroup
+
+ \vfill
+
+\stopstandardmakeup
+
+\starttexdefinition unexpanded BackgroundButton
+ \button [
+ background=screen,
+ backgroundscreen=.8,
+ backgroundoffset=5pt,
+ height=\vsize,
+ width=\hsize
+ ] {
+ } [
+ calculator
+ ]
+\stoptexdefinition
+
+\setuptexttexts
+ [\BackgroundButton]
+ []
+
+\starttexdefinition unexpanded Key #1#2
+ \goto {
+ \ss#1
+ } [
+ info:#2
+ ]
+\stoptexdefinition
+
+\startstandardmakeup[top=,bottom=]
+
+ \switchtobodyfont[8pt]
+
+ \start
+
+ \setupwhitespace[big]
+
+ \midaligned{\ssd The Calculator}
+
+ \blank[2*big]
+
+ \pagereference[info:help]
+ This calculator is stack based, which means that one enters values and
+ invokes an action that acts on the value(s) last entered. Subtracting 10 from
+ 20 using (\Key {--} {sub}) for instance comes down to clicking:
+
+ \startnarrower\ss
+ 10\quad in\quad 20\quad --
+ \stopnarrower
+
+ while calculating a sinus (\Key {sin} {sin}) results from entering:
+
+ \startnarrower\ss
+ .89\quad sin
+ \stopnarrower
+
+ The left column of fields (numbers) shows the Stack. One uses \Key {push}
+ {push} to push a value on the stack and \Key {pop} {pop} to remove a value.
+ Clicking \Key {new} {new} removes them all and the \Key {del} {del} button
+ can be used to undo the last entered digit. When a dyadic operation is
+ applied, the top value is used as~y. The \Key {grow} {grow} key toggles
+ between two different visualizations of the stack.
+
+ The stack is considerably larger than the screen representation suggests. In
+ the rare occasion that one encounters the message {\ss exhausted}, the amount
+ of stack entries already has totaled far beyond \MinLevel\ and one probably
+ already has forgotten what the values first entered represent.
+
+ The right column of fields reports the statistic calculations. By clicking on
+ the tag, one pushes the value on the Stack. The lower buttons are used to
+ reset~(\Key {new} {newn}), enter~(\Key {+} {addn}) and remove~(\Key {--}
+ {subn}) values to be taken into account when calculating those statistics.
+
+ This document is produced by \ConTeXt, a macro package written in \TeX. The
+ graphics are METAPOST graphics. The graphics, the PDF objects and the form
+ fields as well as JavaScript code were generated and inserted at run time.
+ Originally we used PDF\TeX\ and \MKII\ to process this document but this one
+ is done by \LUATEX\ and \MKIV. We kept the design and code original so that
+ it reflects how things were done (for readability we updated some \TEX\
+ definitions).
+
+ \stop
+
+ \vfilll
+
+ \startMPrun
+ logo_type := 302 ; % force single logo type
+ mpgraph := 302 ; % and use this number
+ input mp-prag ; % calculate logo of type
+ \stopMPrun
+
+ \startlinecorrection
+ \midaligned{\externalfigure[mprun.302][height=1.5cm]}
+ \stoplinecorrection
+
+ \midaligned{\strut Hans Hagen, PRAGMA ADE, \ConTeXt\ 18/2/1998--25/9/2018}
+
+ \blank
+
+ \midaligned{\strut\url[pragma-mail]}
+
+\stopstandardmakeup
+
+\starttexdefinition unexpanded BackgroundButton
+ \button [
+ background=screen,
+ backgroundscreen=.8,
+ backgroundoffset=5pt,
+ height=\vsize,
+ width=\hsize
+ ] {
+ } [
+ firstpage
+ ]
+\stoptexdefinition
+
+\starttexdefinition unexpanded ShowInfo #1#2
+ \startstandardmakeup
+ \pagereference[info:#1]
+ \vfill
+ \hbox to \hsize \bgroup
+ \hss
+ \useMPgraphic{#1}
+ \hss
+ \egroup
+ \blank[2*big]
+ \midaligned{#2}
+ \vfill
+ \stopstandardmakeup
+\stoptexdefinition
+
+\startMPinclusions
+
+ path ax, ay, p[] ;
+ color c ; c := \MPcolor{action} ;
+ pmax := 0 ;
+
+ let normalpow = pow ;
+
+ def draw_function (text fun) (expr xmin, xmax, xstep) =
+ pmax := pmax+1 ;
+ p[pmax] := for x=xmin step xstep until xmax:
+ (x,fun(x)) ..
+ endfor (xmax,fun(xmax)) ;
+ enddef ;
+
+ def draw_axis = % should sort of snap, to-do
+ pickup pencircle scaled 0 ;
+ for i=1 upto pmax:
+ draw p[i] ;
+ endfor ;
+ xmin := xpart llcorner currentpicture ;
+ xmax := xpart urcorner currentpicture ;
+ ymin := ypart llcorner currentpicture ;
+ ymax := ypart urcorner currentpicture ;
+ ax := (xmin,0)--(0,0)--(xmax,0) ;
+ ay := (0,ymin)--(0,0)--(0,ymax) ;
+ currentpicture := nullpicture ;
+ sx := 400/(xmax-xmin) ;
+ sy := 250/(ymax-ymin) ;
+ pickup pencircle xscaled (10/sx) yscaled (10/sy) ;
+ draw ax withcolor .4white ;
+ draw ay withcolor .4white ;
+ for i=1 upto pmax:
+ draw p[i] withcolor c ;
+ endfor ;
+ currentpicture := currentpicture xscaled sx yscaled sy ;
+ pmax := 0 ;
+ enddef ;
+
+\stopMPinclusions
+
+\startuseMPgraphic{sin}
+ draw_function(sind)(-360,360,60) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{sin}{Calculate the sine of the topmost stack entry.}
+
+\startuseMPgraphic{cos}
+ draw_function(cosd)(-360,360,60) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{cos}{Calculate the cosine of the topmost stack entry.}
+
+\startuseMPgraphic{tan}
+ draw_function(tand)(-240,-120,30) ;
+ draw_function(tand)( -60, 60,30) ;
+ draw_function(tand)( 120, 240,30) ;
+ draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{tan}{Calculate the tangent of the topmost stack entry.}
+
+\startuseMPgraphic{asin}
+ draw_function(asin)(-1,1,.2) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{asin}{Calculate the arcsine of the topmost stack entry.}
+
+\startuseMPgraphic{acos}
+ draw_function(acos)(-1,1,.2) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{acos}{Calculate the arccosine of the topmost stack entry.}
+
+\startuseMPgraphic{atan}
+ draw_function(atan)(-1,1,.2) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{atan}{Calculate the arctangent of the topmost stack entry.}
+
+\startuseMPgraphic{sqr}
+ draw_function(sqr)(-3,3,1) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{sqr}{Calculate the square of the topmost stack entry.}
+
+\startuseMPgraphic{sqrt}
+ draw_function(sqrt)(0,5,1) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{sqrt}{Calculate the square root of the topmost stack entry.}
+
+\startuseMPgraphic{exp}
+ draw_function(exp)(0,5,1) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{exp}{Calculate the exponential function of the topmost stack entry.}
+
+\startuseMPgraphic{ln}
+ draw_function(ln)(0,50,5) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{ln}{Calculate the natural logaritm of the topmost stack entry.}
+
+\startuseMPgraphic{pow}
+ vardef mypow(expr n) = 3**n enddef ;
+ draw_function(mypow)(-3,3,.5) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{pow}{Calculate x\high{y} where y is the topmost stack entry.}
+
+\startuseMPgraphic{inv}
+ draw_function(inv)(-10,10,1) ; draw_axis ;
+\stopuseMPgraphic
+
+\ShowInfo{inv}{Calculate 1/x using the topmost stack entry.}
+
+\startMPinclusions
+
+ def draw_statistics (expr ShowNew, ShowAdd, ShowSubtract, ShowN, ShowSum, ShowMin, ShowMax, ShowMean, ShowSdev) =
+ color c ; c := \MPcolor{action} ;
+ Delta := 20 ;
+ Total := 100 ;
+ Range := 24 ;
+ Sum := 0 ;
+ Sqr := 0 ;
+ randomseed := .5 ;
+ pickup pencircle scaled .5Delta ;
+ for r := 0 upto Range:
+ Value[r] := 0 ;
+ endfor ;
+ for i=1 upto Total:
+ r := uniformdeviate 1 ;
+ Sum := Sum + r ;
+ Sqr := Sqr + r*r ;
+ r := round(r*Range) ;
+ Value[r] := Value[r]+1 ;
+ endfor ;
+ Mean := Sum/Total ;
+ Sdev := sqrt((Sqr-2*Sum*Mean+Total*Mean*Mean)/Total) ;
+ Mean := Mean*Range ;
+ Sdev := Sdev*Range ;
+ SdevMin := Mean-Sdev ;
+ SdevMax := Mean+Sdev ;
+ for r := 0 upto Range:
+ draw (r*Delta,0)--(r*Delta,Value[r]*Delta)
+ withcolor
+ if (ShowSdev and (r>SdevMin) and (r<SdevMax)) or ShowSum or
+ (ShowMin and (r=0)) or (ShowMax and (r=Range)) or
+ (ShowMean and (r=round(Mean)) or ShowSubtract) :
+ c
+ else :
+ .4white
+ fi ;
+ if ShowN:
+ draw (r*Delta,0) withcolor c
+ fi ;
+ endfor ;
+ if ShowAdd or ShowNew:
+ pushboundingbox currentpicture ;
+ currentpicture := nullpicture ;
+ for r := 0 upto Range:
+ draw (r*Delta,0) withcolor .4white ;
+ endfor ;
+ if ShowAdd:
+ draw (5*Delta,0) withcolor c ;
+ fi ;
+ popboundingbox currentpicture ;
+ elseif ShowSubtract:
+ draw (5*Delta,0) withcolor .4white ;
+ fi ;
+ enddef ;
+
+\stopMPinclusions
+
+\startuseMPgraphic{addn}
+ draw_statistics (false, true, false, false, false, false, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{addn}{Add an observation to the statistics.}
+
+\startuseMPgraphic{subn}
+ draw_statistics (false, false, true, false, false, false, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{subn}{Remove an observation from the statistics.}
+
+\startuseMPgraphic{newn}
+ draw_statistics (true, false, false, false, false, false, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{newn}{Reset the statistics.}
+
+\startuseMPgraphic{sn}
+ draw_statistics (false, false, false, true, false, false, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{sn}{Push the number of observations to the stack.}
+
+\startuseMPgraphic{stotal}
+ draw_statistics (false, false, false, false, true, false, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{stotal}{Push the sum of encountered values to the stack.}
+
+\startuseMPgraphic{smin}
+ draw_statistics (false, false, false, false, false, true, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{smin}{Push the lowest encountered value to the stack.}
+
+\startuseMPgraphic{smax}
+ draw_statistics (false, false, false, false, false, false, true, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{smax}{Push the highest encountered value to the stack.}
+
+\startuseMPgraphic{smean}
+ draw_statistics (false, false, false, false, false, false, false, true, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{smean}{Push the mean value to the stack.}
+
+\startuseMPgraphic{ssdev}
+ draw_statistics (false, false, false, false, false, false, false, false, true) ;
+\stopuseMPgraphic
+
+\ShowInfo{ssdev}{Push the standard deviation to the stack.}
+
+\startMPinclusions
+
+ def draw_ranges (expr ShowNegate, ShowCeiling, ShowFloor, ShowRound, ShowMin, ShowMax, ShowE) =
+
+ color c ; c := \MPcolor{action} ;
+
+ Tics := 5 ;
+ Gap := 5Tics ;
+ Height := .5Gap ;
+ Place := 3 ;
+
+ pickup pencircle scaled 10 ;
+
+ for i=-Tics upto Tics:
+ draw (i*Gap,-Height)--(i*Gap,Height) withcolor .4white ;
+ endfor ;
+
+ draw (-Tics*Gap,0)--(Tics*Gap,0) withcolor .4white ;
+ draw (0,-2Height)--(0,2Height) withcolor .4white ;
+
+ z1 = (Place*Gap,0) ;
+ z2 = ((Place+1)*Gap,0) ;
+
+ if ShowNegate:
+ draw (x1,-Height)--(x1,Height) withcolor c ;
+ draw (-x1,-0)--(-x1,0) withcolor c ;
+ elseif ShowCeiling:
+ draw (x2,-Height)--(x2,Height) withcolor c ;
+ linecap := butt ;
+ draw z1--z2 withcolor c ;
+ elseif ShowFloor:
+ draw (x1,-Height)--(x1,Height) withcolor c ;
+ linecap := butt ;
+ draw z1--z2 withcolor c ;
+ elseif ShowRound:
+ draw (x2,-Height)--(x2,Height) withcolor c ;
+ linecap := butt ;
+ draw .5[z1,z2]--z2 withcolor c ;
+ elseif ShowMin:
+ draw (x1,-Height)--(x1,Height) withcolor c ;
+ draw (x2,0)--(x2,0) withcolor c ;
+ elseif ShowMax:
+ draw (x2,-Height)--(x2,Height) withcolor c ;
+ draw (x1,0)--(x1,0) withcolor c ;
+ elseif ShowE:
+ e := Gap*mexp256 ;
+ draw (e,-3Height)--(e,3Height) withcolor c ;
+ fi ;
+
+enddef ;
+
+\stopMPinclusions
+
+\startuseMPgraphic{neg}
+ draw_ranges (true, false, false, false, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{neg}{Negate the topmost stack entry.}
+
+\startuseMPgraphic{ceil}
+ draw_ranges (false, true, false, false, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{ceil}{Set the topmost stack entry to the next integer.}
+
+\startuseMPgraphic{floor}
+ draw_ranges (false, false, true, false, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{floor}{Set the topmost stack entry to the previous integer.}
+
+\startuseMPgraphic{round}
+ draw_ranges (false, false, false, true, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{round}{Set the topmost stack entry to the nearest integer.}
+
+\startuseMPgraphic{min}
+ draw_ranges (false, false, false, false, true, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{min}{Take the minumum of the two topmost stack entries.}
+
+\startuseMPgraphic{max}
+ draw_ranges (false, false, false, false, false, true, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{max}{Take the maximum of the two topmost stack entries.}
+
+\startuseMPgraphic{e}
+ draw_ranges (false, false, false, false, false, false, true) ;
+\stopuseMPgraphic
+
+\ShowInfo{e}{Push 2.71828182845905 onto the stack.}
+
+\startuseMPgraphic{pi}
+ pickup pencircle scaled 10 ;
+ draw fullcircle scaled 150 withcolor .4white ;
+ linecap := butt ;
+ ahlength := 25 ;
+ drawarrow halfcircle scaled 150 withcolor \MPcolor{action} ;
+\stopuseMPgraphic
+
+\ShowInfo{pi}{Push 3.14159265358979 onto the stack.}
+
+\startMPinclusions
+
+ def draw_degrees(expr DrawInner, DrawOuter) =
+ pickup pencircle scaled .02 ;
+ path p ; p := fullcircle ;
+ path q ; q := subpath(0,1) of fullcircle ;
+ path r ; r := (0,0)--q--(0,0)--cycle ;
+ filldraw p withcolor .4white ;
+ filldraw r withcolor \MPcolor{action} ;
+ ahlength := .04 ;
+ if DrawInner:
+ drawarrow q scaled .30 withcolor .4white ;
+ elseif DrawOuter:
+ drawarrow q scaled .90 withcolor .4white ;
+ fi ;
+ currentpicture := currentpicture scaled 200 ;
+ enddef ;
+
+\stopMPinclusions
+
+\startuseMPgraphic{deg}
+ draw_degrees (true, false)
+\stopuseMPgraphic
+
+\ShowInfo{deg}{Convert radians into degrees.}
+
+\startuseMPgraphic{rad}
+ draw_degrees (false, true)
+\stopuseMPgraphic
+
+\ShowInfo{rad}{Convert degrees into radians.}
+
+\startuseMPgraphic{random}
+
+ pickup pencircle scaled 5 ;
+ color c ; c := \MPcolor{action} ;
+ draw unitsquare scaled 100 withcolor .4white ;
+ for i=1 upto 250:
+ draw (uniformdeviate 90, uniformdeviate 90)
+ shifted (5,5) withcolor (.4+uniformdeviate .6)*c ;
+ endfor ;
+ currentpicture := currentpicture scaled 2 ;
+
+\stopuseMPgraphic
+
+\ShowInfo{random}{Generate a random number in the range 0--1.}
+
+\startMPinclusions
+
+ def do_draw_number (expr n, drift, s, c) =
+ numeric Height, Delta, Drift, x_max, y_max, x_pos, y_pos ;
+ Height := 11 ;
+ Delta := 5 ;
+ Drift := if drift: 1.5 else: 0 fi ;
+ x_max := 8 ;
+ def d = (uniformdeviate Drift) enddef ;
+ if n=0:
+ draw ((-d-4.5Delta,d)--(+d-0.5Delta,Height-d))
+ withpen pencircle scaled 2
+ withcolor c ;
+ else:
+ for i := 1 upto n :
+ x_pos := ((i-1) mod (5*x_max))*Delta ;
+ y_pos := ((i-1) div (5*x_max))*(Height+Delta) ;
+ draw
+ if (i mod 5)=0 :
+ ((-d-4.5Delta,d)--(+d-0.5Delta,Height-d))
+ else :
+ ((-d,+d)--(+d,Height-d))
+ fi
+ shifted (x_pos,-y_pos)
+ withpen pencircle scaled 2
+ withcolor c ;
+ endfor ;
+ fi ;
+ currentpicture := currentpicture scaled s ;
+ enddef ;
+
+ def draw_number (expr n, s) =
+ do_draw_number(n,false,s,\MPcolor{keyboard}) ;
+ push_boundingbox currentpicture ;
+ currentpicture := nullpicture ;
+ do_draw_number(n,true,s,\MPcolor{keyboard}) ;
+ pop_boundingbox currentpicture ;
+ enddef ;
+
+\stopMPinclusions
+
+\dostepwiserecurse {0}{9}{1} {
+ \startuseMPgraphic{\recurselevel}
+ draw_number(\recurselevel,10)
+ \stopuseMPgraphic
+ \expanded {
+ \ShowInfo
+ {\recurselevel}
+ {Add a digit \recurselevel\ to the current stack entry.}%
+ }
+}
+
+\startuseMPgraphic{fac}
+
+ def facultate (expr n) =
+ if n=1: 1 else: n*facultate(n-1) fi
+ enddef ;
+ picture pic[] ;
+ for m := 1 upto 5:
+ do_draw_number(facultate(m),true,1,\MPcolor{action}) ;
+ pic[m] := currentpicture ;
+ currentpicture := nullpicture ;
+ endfor ;
+ xmax := xpart urcorner pic[5] - xpart llcorner pic[5] ;
+ for m = 1 upto 5:
+ xmin := xpart urcorner pic[m] - xpart llcorner pic[m] ;
+ addto currentpicture also pic[m] shifted (.5(xmax-xmin),-m*25) ;
+ endfor ;
+ currentpicture := currentpicture scaled 2 ;
+
+\stopuseMPgraphic
+
+\ShowInfo{fac}{Calculate the recursive multiplication of n, n--1, n--2, etc.}
+
+\startMPinclusions
+
+ def draw_template (expr ShowSign, ShowPeriod, ShowExponent, ShowDel) =
+ pickup pencircle scaled 10 ;
+ color ca ; ca := if (ShowDel): .4white else: \MPcolor{stack} fi ;
+ color cb ; cb := \MPcolor{keyboard} ;
+ Delta := 20 ;
+ Width := 10 ;
+ Position := 6 ;
+ Max := 15 ;
+ path p ; p := (0,0)--(Width,0) ;
+ draw (-2Width,0)--(0,0) withcolor if ShowSign: cb else: ca fi ;
+ for i=1 upto Position-1:
+ draw p shifted (i*Delta,0) withcolor ca ;
+ endfor ;
+ draw (Position*Delta+.5Width,0)
+ withcolor if ShowPeriod: cb else: ca fi ;
+ for i=Position+1 upto Max:
+ if i=Max-3:
+ draw ((Width,0)--(0,0)--(0,2Width)--(Width,2Width))
+ shifted (i*Delta,-2.5)
+ withpen pencircle scaled 5
+ withcolor if ShowExponent: cb else: ca fi ;
+ draw ((0,Width)--(Width,Width))
+ shifted (i*Delta,-2.5)
+ withpen pencircle scaled 5
+ withcolor if ShowExponent: cb else: ca fi ;
+ else:
+ draw p shifted (i*Delta,0) withcolor ca ;
+ fi ;
+ endfor ;
+ enddef ;
+
+\stopMPinclusions
+
+\startuseMPgraphic{sign}
+ draw_template(true, false, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{sign}{Add a sign to the current stack entry.}
+
+\startuseMPgraphic{period}
+ draw_template(false, true, false, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{period}{Add a period to the current stack entry.}
+
+\startuseMPgraphic{E}
+ draw_template(false, false, true, false) ;
+\stopuseMPgraphic
+
+\ShowInfo{E}{Start setting the exponent part of the current stack entry.}
+
+\startuseMPgraphic{del}
+ draw_template(false, false, false, true) ;
+\stopuseMPgraphic
+
+\ShowInfo{del}{Delete the last entered digit of the current stack entry.}
+
+\startMPinclusions
+
+ u := 50 ;
+ logo_type := 0 ;
+ input mp-prag ;
+ set_phead(u) ;
+
+ def draw_memory (expr DrawErase, DrawAdd, DrawSubtract, DrawCopy) =
+ pickup pencircle scaled .1u ;
+ color ca ; ca := \MPcolor{stack} ;
+ color cb ; cb := \MPcolor{keyboard} ;
+ draw phead withcolor .4white ;
+ if DrawErase:
+ stripe_path_n
+ (withcolor .4white)
+ (fill) pbrain scaled .8 shifted (.5u,.5u) withcolor .8cb ;
+ else:
+ fill pbrain scaled .8 shifted (.5u,.5u)
+ if DrawCopy: withcolor .8ca else: withcolor .8cb fi ;
+ fi ;
+ draw pbrain scaled .8 shifted (.5u,.5u) withcolor cb ;
+ push_boundingbox currentpicture ;
+ ahlength:=.2u ;
+ path drain ; drain := (4.5u,2u){dir 120}..(2.25u,2.75u) ;
+ if DrawAdd:
+ drawarrow drain withcolor ca ;
+ elseif DrawSubtract or DrawCopy:
+ drawarrow reverse drain withcolor ca ;
+ fi ;
+ pop_boundingbox currentpicture ;
+ enddef ;
+
+\stopMPinclusions
+
+\startuseMPgraphic{newmem}
+ draw_memory (true,false,false,false) ;
+\stopuseMPgraphic
+
+\ShowInfo{newmem}{Erase the memory buffer.}
+
+\startuseMPgraphic{addmem}
+ draw_memory (false,true,false,false) ;
+\stopuseMPgraphic
+
+\ShowInfo{addmem}{Add to the memory buffer.}
+
+\startuseMPgraphic{submem}
+ draw_memory (false,false,true,false) ;
+\stopuseMPgraphic
+
+\ShowInfo{submem}{Substract from the memory buffer.}
+
+\startuseMPgraphic{copmem}
+ draw_memory (false,false,false,true) ;
+\stopuseMPgraphic
+
+\ShowInfo{copmem}{Copy the memory buffer to the stack.}
+
+\startMPinclusions
+
+ def erase_stack =
+ stripe_path_n
+ (withcolor .4white)
+ (fill) p withcolor .8cb ;
+ enddef ;
+
+ def draw_stack (expr ShowNew, ShowPush, ShowPop, ShowDup) =
+ path p ;
+ color ca ; ca := \MPcolor{stack} ;
+ color cb ; cb := \MPcolor{keyboard} ;
+ for i=8 downto 1:
+ j := i-1 ;
+ pickup pencircle scaled 1.5 ;
+ p := unitsquare
+ shifted(-.5,-.5)
+ xscaled 100 yscaled 40
+ shifted(20*j,j*15)
+ scaled (1-j*.04) ;
+ if i<3:
+ fill p withcolor .4white ;
+ elseif ShowPush:
+ fill p withcolor if i=3: .8cb else : .8ca fi ;
+ elseif ShowPop:
+ if i=3: erase_stack else: fill p withcolor .8ca fi ;
+ elseif ShowNew:
+ erase_stack ;
+ elseif ShowDup:
+ fill p withcolor if i>4: .8ca else: .8cb fi ;
+ else:
+ fill p withcolor .4white ;
+ fi ;
+ draw p withcolor ca ;
+ endfor ;
+ currentpicture := currentpicture scaled 1.5 ;
+ enddef ;
+
+\stopMPinclusions
+
+\startuseMPgraphic{push}
+ draw_stack (false, true, false, false)
+\stopuseMPgraphic
+
+\ShowInfo{push}{Push a new entry to the stack.}
+
+\startuseMPgraphic{pop}
+ draw_stack (false, false, true, false)
+\stopuseMPgraphic
+
+\ShowInfo{pop}{Remove the topmost entry from the stack.}
+
+\startuseMPgraphic{new}
+ draw_stack (true, false, false, false)
+\stopuseMPgraphic
+
+\ShowInfo{new}{Erase the whole stack.}
+
+\startuseMPgraphic{dup}
+ draw_stack (false, false, false, true)
+\stopuseMPgraphic
+
+\ShowInfo{dup}{Duplicate the topmost stack entry.}
+
+\startMPinclusions
+
+ def draw_funcalc (expr p, q, r, action) =
+
+ color b ; b := \MPcolor{keyboard} ;
+ color c ; c := \MPcolor{stack} ;
+
+ draw ((-2.25max(p,q,r))-1,0)--(-1,0) withcolor .4white ;
+
+ pickup pencircle scaled 2 ;
+ for i=1 upto p: draw (-i*2.25, 3.75) withcolor c ; endfor ;
+ for i=1 upto q: draw (-i*2.25, 1.50) withcolor c ; endfor ;
+ for i=1 upto r: draw (-i*2.25,-1.50) withcolor c ; endfor ;
+ pickup pencircle scaled .5 ;
+
+ push_boundingbox currentpicture ;
+
+ pair w ; w := (1.125,0) ;
+ path ww ; ww := -w -- w ;
+
+ if action=1:
+ draw ww shifted w withcolor b ;
+ draw ww rotated 90 shifted w withcolor b ;
+ elseif action=2:
+ draw ww shifted w withcolor b ;
+ elseif action=3:
+ draw ww rotated 45 shifted w withcolor b ;
+ draw ww rotated 135 shifted w withcolor b ;
+ elseif action=4:
+ draw ww rotated 45 shifted w withcolor b ;
+ fi ;
+
+ pop_boundingbox currentpicture ;
+
+ currentpicture := currentpicture scaled 15 ;
+
+ enddef ;
+
+\stopMPinclusions
+
+\startuseMPgraphic{add}
+ draw_funcalc (6, 6, 7, 1)
+\stopuseMPgraphic
+
+\ShowInfo{add}{Add the two topmost stack entries.}
+
+\startuseMPgraphic{sub}
+ draw_funcalc (5, 4, 5, 2)
+\stopuseMPgraphic
+
+\ShowInfo{sub}{Subtract the topmost stack entry from the one below.}
+
+\startuseMPgraphic{mul}
+ draw_funcalc (3, 4, 7, 3)
+\stopuseMPgraphic
+
+\ShowInfo{mul}{Multiply the two topmost stack entries.}
+
+\startuseMPgraphic{div}
+ draw_funcalc (5, 2, 4, 4)
+\stopuseMPgraphic
+
+\ShowInfo{div}{Divide the pre-last stack entry by the topmost one.}
+
+\startuseMPgraphic{grow}
+
+ pickup pencircle scaled 5 ;
+ ahlength := 10 ;
+
+ path p ; p := (0,0)--(60,0) ;
+ path q ; q := (30,2*15)--(30,7*15) ;
+ path r ; r := (30,0)--(30,7*15) ;
+
+ for i=0 upto 7:
+ draw p shifted (0,i*15) withcolor
+ if i<3: \MPcolor{stack} else: .4white fi ;
+ endfor ;
+
+ addto currentpicture also currentpicture
+ rotatedaround (center currentpicture, 180)
+ shifted (90, 0) ;
+
+ drawarrow q withcolor \MPcolor{keyboard} ;
+ drawarrow reverse r shifted (90, 0) withcolor \MPcolor{keyboard} ;
+
+ currentpicture := currentpicture scaled 2 ;
+
+\stopuseMPgraphic
+
+\ShowInfo{grow}{Toggle grow mode, another way of stacking.}
+
+\startuseMPgraphic{exit}
+
+ path p ; p := (100,30)--(100,0)--(0,0)--(0,100)--(100,100)--(100,70) ;
+ pickup pencircle scaled 10 ;
+ linecap := butt ;
+ ahlength := 60 ;
+ ahangle := 75 ;
+ filldraw
+ p--cycle
+ withcolor \MPcolor{action} ;
+ draw
+ p
+ withcolor \MPcolor{stack} ;
+ push_boundingbox currentpicture ;
+ pickup pencircle scaled 30 ;
+ draw
+ center currentpicture --
+ (xpart lrcorner currentpicture+.75ahlength, ypart center currentpicture)
+ withcolor \MPcolor{keyboard} ;
+ pickup pencircle scaled 5 ;
+ drawarrow
+ center currentpicture --
+ (xpart lrcorner currentpicture, ypart center currentpicture)
+ withcolor \MPcolor{keyboard} ;
+ pop_boundingbox currentpicture ;
+ currentpicture := currentpicture scaled 1.75 ;
+
+\stopuseMPgraphic
+
+\ShowInfo{exit}{Close this document.}
+
+\stoptext
diff --git a/doc/context/presentations/bachotex/2005/bachotex-2005-fonts.tex b/doc/context/presentations/bachotex/2005/bachotex-2005-fonts.tex
new file mode 100644
index 000000000..930316939
--- /dev/null
+++ b/doc/context/presentations/bachotex/2005/bachotex-2005-fonts.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext % see cld-dante
diff --git a/doc/context/presentations/bachotex/2005/bachotex-2005-hyphenation.tex b/doc/context/presentations/bachotex/2005/bachotex-2005-hyphenation.tex
new file mode 100644
index 000000000..930316939
--- /dev/null
+++ b/doc/context/presentations/bachotex/2005/bachotex-2005-hyphenation.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext % see cld-dante
diff --git a/doc/context/presentations/bachotex/2009/bachotex-2009-luatex.tex b/doc/context/presentations/bachotex/2009/bachotex-2009-luatex.tex
new file mode 100644
index 000000000..930316939
--- /dev/null
+++ b/doc/context/presentations/bachotex/2009/bachotex-2009-luatex.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext % see cld-dante
diff --git a/doc/context/presentations/bachotex/2009/bachotex-2009-math.tex b/doc/context/presentations/bachotex/2009/bachotex-2009-math.tex
new file mode 100644
index 000000000..930316939
--- /dev/null
+++ b/doc/context/presentations/bachotex/2009/bachotex-2009-math.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext % see cld-dante
diff --git a/doc/context/presentations/bachotex/2009/bachotex-2009-opentype.tex b/doc/context/presentations/bachotex/2009/bachotex-2009-opentype.tex
new file mode 100644
index 000000000..930316939
--- /dev/null
+++ b/doc/context/presentations/bachotex/2009/bachotex-2009-opentype.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext % see cld-dante
diff --git a/doc/context/presentations/bachotex/2011/bachotex-2011-ebook.tex b/doc/context/presentations/bachotex/2011/bachotex-2011-ebook.tex
new file mode 100644
index 000000000..930316939
--- /dev/null
+++ b/doc/context/presentations/bachotex/2011/bachotex-2011-ebook.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext % see cld-dante
diff --git a/doc/context/presentations/bachotex/2011/bachotex-2011-math.tex b/doc/context/presentations/bachotex/2011/bachotex-2011-math.tex
new file mode 100644
index 000000000..930316939
--- /dev/null
+++ b/doc/context/presentations/bachotex/2011/bachotex-2011-math.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext % see cld-dante
diff --git a/doc/context/presentations/bachotex/2011/bachotex-2011-metapost.tex b/doc/context/presentations/bachotex/2011/bachotex-2011-metapost.tex
new file mode 100644
index 000000000..930316939
--- /dev/null
+++ b/doc/context/presentations/bachotex/2011/bachotex-2011-metapost.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext % see cld-dante
diff --git a/doc/context/presentations/bachotex/2012/bachotex-2012-context.tex b/doc/context/presentations/bachotex/2012/bachotex-2012-context.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/bachotex/2012/bachotex-2012-context.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/bachotex/2012/bachotex-2012-future.tex b/doc/context/presentations/bachotex/2012/bachotex-2012-future.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/bachotex/2012/bachotex-2012-future.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/bachotex/2014/bachotex-2014-luatex.tex b/doc/context/presentations/bachotex/2014/bachotex-2014-luatex.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/bachotex/2014/bachotex-2014-luatex.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/bachotex/2014/bachotex-2014-metapost.tex b/doc/context/presentations/bachotex/2014/bachotex-2014-metapost.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/bachotex/2014/bachotex-2014-metapost.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/context/2007/context-2007-luatex.tex b/doc/context/presentations/context/2007/context-2007-luatex.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/context/2007/context-2007-luatex.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/context/2007/context-2007-mkiv.tex b/doc/context/presentations/context/2007/context-2007-mkiv.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/context/2007/context-2007-mkiv.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/context/2010/context-2010-just-in-time-1.tex b/doc/context/presentations/context/2010/context-2010-just-in-time-1.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/context/2010/context-2010-just-in-time-1.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/context/2010/context-2010-just-in-time-2.tex b/doc/context/presentations/context/2010/context-2010-just-in-time-2.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/context/2010/context-2010-just-in-time-2.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/context/2010/context-2010-requirements.tex b/doc/context/presentations/context/2010/context-2010-requirements.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/context/2010/context-2010-requirements.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/context/2010/context-2010-structure-matters.tex b/doc/context/presentations/context/2010/context-2010-structure-matters.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/context/2010/context-2010-structure-matters.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/context/2010/context-2010-workflows.tex b/doc/context/presentations/context/2010/context-2010-workflows.tex
new file mode 100644
index 000000000..dc4b4890b
--- /dev/null
+++ b/doc/context/presentations/context/2010/context-2010-workflows.tex
@@ -0,0 +1 @@
+\starttext todo \stoptext
diff --git a/doc/context/presentations/tug/2001/tug-2001-ideas.pdf b/doc/context/presentations/tug/2001/tug-2001-ideas.pdf
new file mode 100644
index 000000000..ca841c206
--- /dev/null
+++ b/doc/context/presentations/tug/2001/tug-2001-ideas.pdf
Binary files differ
diff --git a/doc/context/presentations/tug/2001/tug-2001-ideas.tex b/doc/context/presentations/tug/2001/tug-2001-ideas.tex
new file mode 100644
index 000000000..48eb8fd3b
--- /dev/null
+++ b/doc/context/presentations/tug/2001/tug-2001-ideas.tex
@@ -0,0 +1,445 @@
+\usemodule[present-dark]
+
+\usemodule[abr-01]
+
+\startdocument
+
+\StartIdea
+ [ title={Hans Hagen},
+ remark={PRAGMA ADE, Hasselt NL},
+ url={www.pragma-ade.com}]
+
+{\bfd \setstrut \strut TUG 2001}
+
+{\bfa \setstrut \strut A \TEX\ Odyssey}
+
+\blank[2*big]
+
+\startitemize [packed]
+ \startitem what way are we heading \stopitem
+ \startitem will there be documents \stopitem
+ \startitem is typography still needed \stopitem
+ \startitem are we still talking \TEX \stopitem
+\stopitemize
+
+\StopIdea
+
+\StartIdea
+
+Until now, the main source of information is books. In the next couple of slides,
+I will present some quotes from books I read the last couple of years, written
+by: Arthur \remark {Clarke} {physics}, Greg \remark {Bear} {psychology}, Graham
+\remark {Hancock} {journalism}, Peter \remark {Wilbur} {ergonomics} and Michael
+Burke, Jared \remark {Diamond} {history}, Edward \remark {Tufte} {design}, Peter
+Ward and Donald \remark {Brownlee} {biology}, Steve \remark{Reich} {music} and
+Beryl Korot, Richard \remark {Kadrey} {fantasy}, Brian \remark {Butterworth}
+{math} and of course Donald \remark {Knuth} {informatics}.
+
+\StopIdea
+
+\StartIdea
+ [ title={ed. David G. Stork},
+ remark={Hal's Legacy, 1997}]
+
+[Arthur Clarke:] Although I've never considered 2001 as a strict
+predict\-ion|<|but as more of a vision, a way things could work|>|I have long
+kept track, informally, of how our vision compares with computer science reality.
+Some things we got right---even righter than we ever had reason to suspect.
+Others, well, who could have \remark {known} {so, to what extent can we predict
+the future of documents}.
+
+[Summary:] much of the science predicted in 1968 is okay, but with regards to
+\remark {computers} {in this respect, \TeX\ is surprisingly up|-|to|-|date} a
+couple of points are missed: they have become smaller, \remark {AI} {and
+automated text processing is still difficult} is far from operational, natural
+speech, reasoning and lipreading are not really available, fault tolerance is
+there, we have lcd's, graphical user interfaces and windows, don't communicate in
+terminal messages, have mice and other means of input.
+
+\StopIdea
+
+\StartIdea
+ [ title={Arthur Clarke},
+ remark={2001, A space Odyssey, p. 66, 1968}]
+
+After a short walk through a tunnel packed with pipes and \remark {cables} {we
+are already going wireless}, and echoing hollowly with rhythmic thumbing and
+throbbings, they arrived in executive territory, and Floyd found himself back in
+the familiar environment of \remark {typewriters} {the good old times of \quote
+{think before you key}}, \remark {office} {indeed, most of today's users run
+\quote {office}} computers, \remark {girl} {everyone is now a typist} assistants,
+\remark {wall} {when will we go virtual} charts and ringing telephones.
+
+\StopIdea
+
+\StartIdea
+ [ title={Arthur Clarke},
+ remark={2001, A space Odyssey, p. 67, 1968}]
+
+There was plenty to occupy his time, even if he did nothing but sit and read.
+When he tired of official reports and memoranda and minutes he would \remark
+{plug} {documents will be in the air} his foolscap|-|sized newspad into the
+ship's information circuit and scan the latest reports from Earth. One by one he
+would conjure up the world's major electronic papers; he knew the \remark {codes}
+{who is using codes today} of the more important ones by heart, and had no need
+to consult the list on the back of his pad. Switching to the display's unit's
+short|-|term memory, he would hold the front page while he quickly \remark
+{searched} {we are very good in quick browsing} the headlines and noted the items
+that interested him. Each had its own \remark {two|-|digit} {aren't we running
+out of 256.256.256.256 already} reference; when he punched that, the
+postage|-|stamp|-|sized rectangle would expand until it neatly filled the screen,
+and he could read it with comfort. When had finished he would flash back to the
+complete remark {page} {will we keep on using composed mixed content pages} and
+select a new subject for detailed examination.
+
+\StopIdea
+
+\StartIdea
+ [ title={Arthur Clarke},
+ remark={2001, A space Odyssey, p. 109, 1968}]
+
+Bowman had been a student for more than a half his life; he would continue to be
+one until he retired. Thanks to the Twentieth Century \remark {revolution} {that
+has been a pretty quiet revolution then} in training and information|-|handling
+techniques, he already possessed the \remark {equivalent} {we will stop talking
+in those qualifications} of two or three college educations|=|and, what was more,
+he could \remark {remember} {with or without implant} \remark {ninety} {is this
+still needed with information everywhere} per cent of what he had learned.
+
+\StopIdea
+
+\StartIdea
+ [ title={Arthur Clarke},
+ remark={2001, A space Odyssey, p. 132, 1968}]
+
+The information flashed on the display screen; simultaneously, a sheet of paper
+slit out of the slot immediately \remark {beneath} {but aren't screens becoming
+like paper} it. Despite all the electronic read|-|outs, there were times when
+good, old|-|fashioned printed material was the most \remark {convenient} {good,
+because paper is a great invention} form of record.
+
+\StopIdea
+
+\StartIdea
+ [ title={Greg Bear},
+ remark={Eon, p. 30, 1985}]
+
+The office was neatly organized but still looked cluttered. A small desk
+manufactured from OTV tank baffles was flanked by chromium bins filled with
+\remark {rolls} {not much paper will be used in space, I guess} of paper. A
+narrow shelf of \remark {real} {that sounds pretty sad for around 2000} books
+hung next to \remark {racks} {will there be such a physical need} of memory
+blocks sealed behind tough, alarm-equipped plastic panels. \remark {Maps} {we
+will probably always need an overview} and \remark {diagrams} {and for that we
+need large projections} were taped to the wall.
+
+\StopIdea
+
+\StartIdea
+ [ title={Greg Bear},
+ remark={Eon, p. 132, 1985}]
+
+Still, she agreed with a nod and settled into the seat, manipulating the controls
+with one hand. A simple \remark {circular} {will we move away from rectangular
+presentations} graphic display \remark {hovered} {that's indeed what we want}
+before her, as crisp and \remark {clear} {good} as something \remark {solid}
+{even better}. Takahashi had misinformed her on one point, and her fumbling
+triggered a tutorial. It corrected her errors and informed her|<|in only slightly
+\remark {accented} {-)} American \remark {English} {what a pitty for dislectic
+people}|>|how to operate the equipment properly. Then it provided her with call
+\remark {numbers} {we really love numbers, don't we} and codes for other types of
+information.
+
+\StopIdea
+
+\StartIdea
+ [ title={Greg Bear},
+ remark={Eon, pp. 132/135, 1985}]
+
+The \remark {illusion} {physical presence will become less important} was
+perfect|<|even providing her with a memory of what her apartment looked like. She
+could turn her head and look completely behind her if she wished|>|indeed, she
+could walk around, even through she knew she was sitting down. \unknown\ The
+information had come in \remark {printed} {don't throw away eons of experience}
+displays, selected \remark {visuals} {will we keep on changing interfaces} and
+even more selected \remark {sounds} {we should have started recording already}.
+Where documentation of the multimedia sort was lacking, print took over, but with
+subtle and clear vocal accompaniment. Compared to this, simple reading was
+\remark {torture} {hm, \unknown} and current video methods as \remark {archaic}
+{eh, \unknown} as cave \remark {paintings} {let's be humble then}.
+
+\StopIdea
+
+\StartIdea
+ [ title={Greg Bear},
+ remark={Eon, p. 258, 1985}]
+
+\quotation {The P.M.\ has no suspicion of this when you alone were sent?} Toller
+\remark {picted} {finally ideographic scripts will win the game}. The symbols
+that flashed between the two men came from pictor torques around their necks,
+\remark {devices} {we really need an physical update} that had developed over the
+centuries in the Thistledown and in the Axis City.
+
+\StopIdea
+
+\StartIdea
+ [ title={Graham Hancock},
+ remark={Fingerprints of the gods, Graham Hancock, p. 120, 1995}]
+
+More systematically, all over Central America, vast repositories of knowledge
+\remark {accumulated} {as today in libraries, on servers and in our houses} since
+ancient times were painstakingly gathered, heaped up and burned by zealous
+friars. In July 1562, for example, in the main square of Mani (just south of
+modern Merida in Yucatan Province) Fr Diego de Landa \remark {burned} {and all
+can get lost forever} thousands of Maya codices, story paintings and hieroglyphs
+inscribed on rolled|-|up deer \remark {skins} {how about bits curled up on
+CDROM's}.
+
+\StopIdea
+
+\StartIdea
+ [ title={Graham Hancock},
+ remark={Fingerprints of the gods, Graham Hancock, p. 520/526, 1995}]
+
+We know that out late twentieth|-|century, post|-|industrial civilization is
+about to be destroyed by an \remark {inescapable} {not that imaginary, it has
+happened before} cosmic or geological cataclysm.
+
+We know|<|because our science is pretty good|>|that the destruction is going to
+be \remark {{\em near|-|total}} {one 10-30 km meteor or even one lunatic
+president will do}.
+
+\blank \unknown \blank
+
+I'm sure that we'd want to say more than just \quote {Kilroy was here}.
+
+\blank \unknown \blank
+
+And, yes, \remark {they} {pyramid builders 12,000 years ago} found an ingenious
+way to tell \remark {us} {who more and more think short|-|term} that they were
+\remark {here} {what will we leave behind}.
+
+\StopIdea
+
+\StartIdea
+ [ title={Jared Diamond},
+ remark={Guns, Germs and Steel, A Short History of Everybody for the Last
+ 13,000 years, p. 260, 1997}]
+
+Human technology developed from the first stone tools, in use by two and a half
+million years ago, to the 1996 laser \remark {printer} {the ones that produced
+sticky fading print|-|outs} that replaced my already outdated 1992 \remark
+{laser} {and now we want color on the desktop} printer and that was used to print
+this book's manuscript. The rate of development was undetectably slow at the
+beginning, when hundreds of thousands of years passed with no discernible change
+in out stone tools and with no surviving evidence for artifacts and of other
+materials. Today, technology advances so \remark {rapidly} {so let's be careful
+in claiming advance} that it is reported in the daily \remark {newspaper} {less
+and less people read them}.
+
+\StopIdea
+
+\StartIdea
+ [ title={Jared Diamond},
+ remark={Guns, Germs and Steel, A Short History of Everybody for the Last
+ 13,000 years, p. 418, 1997}]
+
+The decision could have gone to another keyboard at any of numerous stages
+between the 1860s and the 1880's; nothing about the American environment favored
+the \hbox {QWERTY} keyboard over its rivals. \unknown\ For example, if the \hbox
+{QWERTY} keyboard of the United States had not been adopted elsewhere in the
+world as well|<|say, if Japan or Europe had adopted the more \remark {efficient}
+{so why don't we take that one} Dvorak keyboard|>|that trivial decision in the
+19\high{th} century might have had big consequences for the competative position
+of the 20\high{th}|-|century \remark {American} {isn't \TeX\ also best tuned for
+english} technology.
+
+\StopIdea
+
+\StartIdea
+ [ title={Peter Wilbur \& Michael Burke},
+ remark={Information Graphics, Innovative Solutions in Contemporary Design,
+ p. 87, 1998}]
+
+It was generally \remark {agreed} {so let's judge with care} at that time that
+products which tried to fulfil two or more \remark {functions} {how many
+functions are there in a book} were compromises and therefore inferior to a
+single|-|function product.
+
+\StopIdea
+
+\StartIdea
+ [ title={Peter Wilbur \& Michael Burke},
+ remark={Information Graphics, Innovative Solutions in Contemporary Design,
+ p. 17, 1998}]
+
+All of this implies that design students of the future will need to have a much
+wider range of skills than most graphic and multimedia students possess today.
+The coming \remark {together} {which is better: overloaded CNN news screens or
+the more traditional ones} of typography, graphics, the moving image, sound and
+music requires training in both \remark {aesthetic} {let's hope for the best}
+judgment and technical skills, as well as the ability to implement and commission
+\remark {multimedia} {the current hype will become a decent craft} productions.
+Such a program hardly exists today, and it may be that \remark {designers} {or
+will machines do the work} of the future will find themselves on courses equal in
+duration and related in structure to those followed by architects.
+
+\StopIdea
+
+\StartIdea
+ [ title={Greg Bear},
+ remark={Darwin's radio, p. 271, 1999}]
+
+\quotation {As far as it goes}, Kaye said. \quotation {I believe our genome is
+much more \remark {clever} {let's hope that we can cope with the future} than we
+are. It's taken us tens of thousands of years to get to to the point where we
+have a hope of understanding how life works. \unknown\ The Earth species have
+learned how to anticipate climate change and respond to it in advance, get a head
+start, and I believe, in our case, our genome is now responding to social \remark
+{change} {like writing, reading, processing, collecting information} and the
+\remark {stress} {ability to keep track of things} it causes.}
+
+\StopIdea
+
+\StartIdea
+ [ title={Greg Bear},
+ remark={Darwin's radio, p. 404, 1999}]
+
+She looked at the cover and laughed out loud. It was a copy of WIRED, and on the
+brilliant orange cover was printed the black silhouette of a curled fetus with a
+green question mark across the middle. The log line read \quotation {\em Human
+3.0: Not a Virus, but an \remark {Upgrade} {or: complex talking & communicating
+in color, smell and taste}?}
+
+\StopIdea
+
+\StartIdea
+ [title={Edward R. Tufte}]
+
+We thrive in information|-|thick worlds because of our marvelous and everyday
+\remark {capacity} {that is us, now, or maybe until recently} to select, edit,
+single out, structure, highlight, group, pair, merge, harmonize, synthesize,
+focus, organize, condense, reduce, boil down, choose, categorize, catalog,
+classify, list, abstract, scan, look into, idealize, isolate, discriminate,
+distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect,
+filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate,
+outline, summarize, itemize, review, dip into, flip through, browse, glance into,
+leaf through, skim, refine, enumerate, glean, synopsize, \remark {winnow} {do we
+really} the wheat from the chaff and separate the sheep from the goats.
+
+\StopIdea
+
+\StartIdea
+ [ title={Donald E. Knuth},
+ remark={Selected Papers in Computer Science, p. 95, 1996}]
+
+I believe that the real reason underlying the fact that Computer Science has
+become a thriving discipline at essential all of the world's universities,
+although it was totally \remark {unknown} {much more is yet unknown, but we don't
+know what} twenty years ago, is {\em not} that computers exist in quantity; the
+real reason is that the algorithmic thinkers among scientists of the world never
+before had a home. We are brought \remark {together} {there will be more new
+disciplines} in Computer Science departments {\em because we find people who
+think like we do}. At least, that seems a viable hypothesis, which hasn't been
+contradicted by my observations during the last half dozen or so years since the
+possibility occurred to me.
+
+\StopIdea
+
+\StartIdea
+ [ title={Brian Butterworth},
+ remark={The Mathematical Brain, p. 162, 1999}]
+
+Nevertheless, it is now abundantly clear that infants are born with a \remark
+{capacity} {what more is lurking there} to recognize distinct numerosities up to
+about~4, and to respond to changes in numerosity. They also possess arithmical
+expectations: ....
+
+\StopIdea
+
+\StartIdea
+ [ title={Brian Butterworth},
+ remark={The Mathematical Brain, p. 275, 1999}]
+
+Imagine, if you can, asking Archimed, the greatest mathematician of antiquity, to
+solve the equation:
+
+\startformula
+2a^2 + 3ab - 4b^2 = 0
+\stopformula
+
+\remark {He} {would your parents recognize \type {<tags>} as such} would have
+less chance than an average educated fourteen|-|year|-|old, simply because he
+would not know what the strange \remark {symbols} {or recognize hyperlinks} $0$,
+$2$, $3$, and $4$ mean because thet weren't invented till seven centuries after
+his murder; nor $+$ and $-$, German inventions of the fifteenth century; not to
+mention \remark {$=$} {or be able to interpret a regular expression}, which was
+invented by the Englishman Robert Recorde in the sixteenth century. He would also
+have had a problem with the \remark {idea} {or be able to picture the internet}
+that equations can have negative roots.
+
+\StopIdea
+
+\StartIdea
+ [ title={Richard Kadrey},
+ remark={From Myst to Riven, the Creations and Inspirations, p. 16, 1997}]
+
+Some of basics of the D'ni bookmaking are known, but the most important \remark
+{details} {can we still make Gutenberg bibles} have been \remark {lost} {how do
+we preserve what we have} over time. \unknown\ From the few existing \remark
+{records} {how much is really new} lost it appears that the D'ni have been using
+their Linking books for millenia, and that they \remark {linked} {then they
+manage their links better than we do} to the earth around 10,000 terrestial years
+ago.
+
+\StopIdea
+
+\StartIdea
+ [ title={Richard Kadrey},
+ remark={From Myst to Riven, the Creations and Inspirations, p. 81,1997}]
+
+Glancing at the surface of thing, {\em Myst} and {\em Riven} might seem more of a
+technical achievement in computer \remark {artistry} {for this a real new way of
+thinking is needed} and the fine points of modeling frames for objects and
+designing surface textures and shader programs to reflect hyper|-|reality. It is
+very easy to focus exclusively on the cool factor of what you see and to overlook
+what is the underlying key to the success of these games: they are \remark
+{story} {authorship will change} driven. What really sucks the player in is that
+there is a deeply felt {\em purpose} to playing the \remark {game} {and the less
+we need to work, the more we will game}.
+
+\StopIdea
+
+\StartIdea
+ [ title={Steve Reich \& Beryl Korot},
+ remark={The Cave, 1995}]
+
+The true underpinnings were our interest in making a \remark {new} {the time is
+ready for revolutionary new ways of presenting information} kind of musical
+theater based on videotaped documentary sources. The idea was that you would be
+able to see and hear people as they spoke on the videotape and simultaneously you
+would see and hear on|-|stage musicians \remark {doubling} {also accompanied by
+char|-|by|-|char typesetting} them|=|actually playing their speech melodies as
+they spoke.
+
+\StopIdea
+
+\StartIdea
+ [ title={Peter D. Ward \& Donald Brownlee},
+ remark={Rare Earth, Why Complex Life us Uncommon in the Universe, p. xxiv,
+ 2000}]
+
+If it is found to be correct, however, the Rare Earth Hypothesis will reverse
+that decentering trend. What if the Earth, with its cargo of advanced animals, is
+virtually unique in this quadrant of the galaxy|=|the most diverse planet, say,
+in the nearest 10,000 light|-|years? What if it is utterly unique: the only
+planet with animals in this galaxy or even in the visible Universe, a bastion of
+animals amid a sea of microbe|-|infested worlds? If that is the case, how much
+greater the loss the Universe sustains for each species of animals or planet
+driven to extinction trough the \remark {careless} {like more and more paper}
+stewardship of Homo Sapiens? \crlf Welcome \remark {aboard} {but let's move on
+with care}.
+
+\StopIdea
+
+\stopdocument
diff --git a/doc/context/presentations/tug/2007/tug-2007-fonts.pdf b/doc/context/presentations/tug/2007/tug-2007-fonts.pdf
new file mode 100644
index 000000000..53b97ddc7
--- /dev/null
+++ b/doc/context/presentations/tug/2007/tug-2007-fonts.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/interaction/interaction-javascript.tex b/doc/context/sources/general/manuals/interaction/interaction-javascript.tex
index d578fa416..57ce54fb1 100644
--- a/doc/context/sources/general/manuals/interaction/interaction-javascript.tex
+++ b/doc/context/sources/general/manuals/interaction/interaction-javascript.tex
@@ -77,6 +77,17 @@ The full repertoire of commands is:
\showsetup{setJSpreamble}
+As we're into \LUA\ and because \LUA\ is so lightweight I've wondered several
+times now if it would make sense to embed \LUA\ in \PDF\ viewers. After all,
+annotations are an extension mechanism. In the early days of \PDF\ this was
+actually quite doable because \ACROBAT\ reader (and exchange) had a plugin model.
+However, the more functionality ended up in the program, the least interesting
+(and popular) the plugins mechanism became. Some open source viewers have an
+\API\ so in principle adding the lightweight \LUA\ interpreter (of course with
+\LPEG, and quite probably without file \IO) is possible. It has been discussed at
+a recent \CONTEXT\ meeting, so who knows \unknown For now we're stuck with
+\JAVASCRIPT.
+
\stopchapter
\stopcomponent
diff --git a/metapost/context/base/mpiv/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv
index 4c7303f44..fc0e566df 100644
--- a/metapost/context/base/mpiv/mp-tool.mpiv
+++ b/metapost/context/base/mpiv/mp-tool.mpiv
@@ -304,7 +304,7 @@ def newpair text v = forsuffixes i=v : save i ; pair i ; endfor ; endd
%D set_inner_boundingbox p
%D \stoptyping
-path mfun_boundingbox_stack ;
+path mfun_boundingbox_stack[] ;
numeric mfun_boundingbox_stack_depth ;
mfun_boundingbox_stack_depth := 0 ;
@@ -316,7 +316,7 @@ enddef ;
def popboundingbox text p =
setbounds p to mfun_boundingbox_stack[mfun_boundingbox_stack_depth] ;
- mfun_boundingbox_stack[mfun_boundingbox_stack_depth] := origin ;
+ mfun_boundingbox_stack[mfun_boundingbox_stack_depth] := origin -- cycle ;
mfun_boundingbox_stack_depth := mfun_boundingbox_stack_depth - 1 ;
enddef ;
diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua
index cefe33422..4348e6b9c 100644
--- a/scripts/context/lua/mtx-fonts.lua
+++ b/scripts/context/lua/mtx-fonts.lua
@@ -16,7 +16,7 @@ local lower = string.lower
local concat = table.concat
local write_nl = texio.write_nl
-local otlversion = 3.104
+local otlversion = 3.105
local helpinfo = [[
<?xml version="1.0"?>
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 2d0987f26..e9ee9f19d 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.09.26 14:26}
+\newcontextversion{2018.09.30 19:32}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 42417ac1e..f297b9b39 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.09.26 14:26}
+\edef\contextversion{2018.09.30 19:32}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua
index 9e62314d4..10aca0a46 100644
--- a/tex/context/base/mkiv/back-exp.lua
+++ b/tex/context/base/mkiv/back-exp.lua
@@ -2701,9 +2701,9 @@ local function pop()
currentdepth = currentdepth - 1
if trace_export then
if top then
- report_export("%w</%s>",currentdepth,top)
+ report_export("%w</%s>",currentdepth,tree.tg)
else
- report_export("</%s>",top)
+ report_export("</%s>",tree.tg)
end
end
else
diff --git a/tex/context/base/mkiv/buff-imp-default.mkiv b/tex/context/base/mkiv/buff-imp-default.mkiv
index a4ad788bb..4da4ff0df 100644
--- a/tex/context/base/mkiv/buff-imp-default.mkiv
+++ b/tex/context/base/mkiv/buff-imp-default.mkiv
@@ -15,11 +15,11 @@
\unprotect
-\definestartstop
- [DefaultSnippet]
- [\c!before=\blank,
- \c!after=\blank,
- \c!style=\tt]
+\setupstartstop
+ [DefaultSnippet]
+ [\c!before={\typingparameter\c!before},
+ \c!after={\typingparameter\c!after},
+ \c!style={\typingparameter\c!style}]
% Name
% NamePrimitive
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua
index 669a6b571..c17400a79 100644
--- a/tex/context/base/mkiv/char-def.lua
+++ b/tex/context/base/mkiv/char-def.lua
@@ -31725,6 +31725,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1000,
variants={
@@ -31735,6 +31736,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1001,
},
@@ -31742,6 +31744,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER GA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1002,
variants={
@@ -31752,6 +31755,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER GHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1003,
},
@@ -31759,6 +31763,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER NGA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1004,
variants={
@@ -31769,6 +31774,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER CA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1005,
},
@@ -31776,6 +31782,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER CHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1006,
},
@@ -31783,6 +31790,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER JA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1007,
},
@@ -31790,6 +31798,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER JHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1008,
},
@@ -31797,6 +31806,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER NYA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1009,
},
@@ -31804,6 +31814,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER NNYA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x100A,
},
@@ -31811,6 +31822,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TTA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x100B,
},
@@ -31818,6 +31830,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TTHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x100C,
},
@@ -31825,6 +31838,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER DDA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x100D,
},
@@ -31832,6 +31846,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER DDHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x100E,
},
@@ -31839,6 +31854,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER NNA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x100F,
},
@@ -31846,6 +31862,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1010,
variants={
@@ -31856,6 +31873,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER THA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1011,
variants={
@@ -31866,6 +31884,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER DA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1012,
},
@@ -31873,6 +31892,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER DHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1013,
},
@@ -31880,6 +31900,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER NA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1014,
},
@@ -31887,6 +31908,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER PA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1015,
variants={
@@ -31897,6 +31919,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER PHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1016,
},
@@ -31904,6 +31927,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER BA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1017,
},
@@ -31911,6 +31935,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER BHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1018,
},
@@ -31918,6 +31943,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER MA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1019,
variants={
@@ -31928,6 +31954,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER YA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x101A,
variants={
@@ -31938,6 +31965,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER RA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x101B,
},
@@ -31945,6 +31973,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER LA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x101C,
variants={
@@ -31955,6 +31984,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER WA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x101D,
variants={
@@ -31965,6 +31995,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x101E,
},
@@ -31972,6 +32003,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER HA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x101F,
},
@@ -31979,6 +32011,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER LLA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1020,
},
@@ -31986,6 +32019,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER A",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1021,
},
@@ -31993,6 +32027,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN A",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1022,
variants={
@@ -32003,6 +32038,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER I",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1023,
},
@@ -32010,6 +32046,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER II",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1024,
},
@@ -32017,6 +32054,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER U",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1025,
},
@@ -32024,6 +32062,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER UU",
direction="l",
+ indic="i",
linebreak="sa",
specials={ "char", 0x1025, 0x102E },
unicodeslot=0x1026,
@@ -32032,6 +32071,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER E",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1027,
},
@@ -32039,6 +32079,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER MON E",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1028,
},
@@ -32046,6 +32087,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER O",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1029,
},
@@ -32053,6 +32095,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER AU",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x102A,
},
@@ -32060,6 +32103,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN TALL AA",
direction="l",
+ indic="d",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x102B,
},
@@ -32067,6 +32112,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN AA",
direction="l",
+ indic="d",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x102C,
},
@@ -32074,6 +32121,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN I",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x102D,
},
@@ -32081,6 +32130,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN II",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x102E,
},
@@ -32088,6 +32139,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN U",
direction="nsm",
+ indic="d",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x102F,
},
@@ -32095,6 +32148,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN UU",
direction="nsm",
+ indic="d",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x1030,
},
@@ -32102,6 +32157,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN E",
direction="l",
+ indic="d",
+ indicmark="l",
linebreak="sa",
unicodeslot=0x1031,
variants={
@@ -32112,6 +32169,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN AI",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1032,
},
@@ -32119,6 +32178,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN MON II",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1033,
},
@@ -32126,6 +32187,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN MON O",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1034,
},
@@ -32133,6 +32196,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN E ABOVE",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1035,
},
@@ -32140,6 +32205,8 @@ characters.data={
category="mn",
description="MYANMAR SIGN ANUSVARA",
direction="nsm",
+ indic="m",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1036,
},
@@ -32148,6 +32215,8 @@ characters.data={
combining=0x7,
description="MYANMAR SIGN DOT BELOW",
direction="nsm",
+ indic="s",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x1037,
},
@@ -32155,6 +32224,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN VISARGA",
direction="l",
+ indic="m",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1038,
},
@@ -32163,6 +32234,8 @@ characters.data={
combining=0x9,
description="MYANMAR SIGN VIRAMA",
direction="nsm",
+ indic="m",
+ indicmark="b",
linebreak="sa",
synonyms={ "myanmar killer" },
unicodeslot=0x1039,
@@ -32172,6 +32245,8 @@ characters.data={
combining=0x9,
description="MYANMAR SIGN ASAT",
direction="nsm",
+ indic="m",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x103A,
},
@@ -32179,6 +32254,8 @@ characters.data={
category="mc",
description="MYANMAR CONSONANT SIGN MEDIAL YA",
direction="l",
+ indic="c",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x103B,
},
@@ -32186,6 +32263,7 @@ characters.data={
category="mc",
description="MYANMAR CONSONANT SIGN MEDIAL RA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x103C,
},
@@ -32193,6 +32271,8 @@ characters.data={
category="mn",
description="MYANMAR CONSONANT SIGN MEDIAL WA",
direction="nsm",
+ indic="c",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x103D,
},
@@ -32200,6 +32280,8 @@ characters.data={
category="mn",
description="MYANMAR CONSONANT SIGN MEDIAL HA",
direction="nsm",
+ indic="c",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x103E,
},
@@ -32207,6 +32289,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER GREAT SA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x103F,
},
@@ -32214,6 +32297,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT ZERO",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1040,
},
@@ -32221,6 +32305,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT ONE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1041,
},
@@ -32228,6 +32313,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT TWO",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1042,
},
@@ -32235,6 +32321,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT THREE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1043,
},
@@ -32242,6 +32329,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT FOUR",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1044,
},
@@ -32249,6 +32337,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT FIVE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1045,
},
@@ -32256,6 +32345,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT SIX",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1046,
},
@@ -32263,6 +32353,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT SEVEN",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1047,
},
@@ -32270,6 +32361,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT EIGHT",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1048,
},
@@ -32277,6 +32369,7 @@ characters.data={
category="nd",
description="MYANMAR DIGIT NINE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1049,
},
@@ -32284,6 +32377,7 @@ characters.data={
category="po",
description="MYANMAR SIGN LITTLE SECTION",
direction="l",
+ indic="o",
linebreak="ba",
unicodeslot=0x104A,
},
@@ -32291,6 +32385,7 @@ characters.data={
category="po",
description="MYANMAR SIGN SECTION",
direction="l",
+ indic="o",
linebreak="ba",
unicodeslot=0x104B,
},
@@ -32298,6 +32393,7 @@ characters.data={
category="po",
description="MYANMAR SYMBOL LOCATIVE",
direction="l",
+ indic="o",
linebreak="al",
unicodeslot=0x104C,
},
@@ -32305,6 +32401,7 @@ characters.data={
category="po",
description="MYANMAR SYMBOL COMPLETED",
direction="l",
+ indic="o",
linebreak="al",
unicodeslot=0x104D,
},
@@ -32312,6 +32409,7 @@ characters.data={
category="po",
description="MYANMAR SYMBOL AFOREMENTIONED",
direction="l",
+ indic="o",
linebreak="al",
unicodeslot=0x104E,
},
@@ -32319,6 +32417,7 @@ characters.data={
category="po",
description="MYANMAR SYMBOL GENITIVE",
direction="l",
+ indic="o",
linebreak="al",
unicodeslot=0x104F,
},
@@ -32326,6 +32425,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1050,
},
@@ -32333,6 +32433,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SSA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1051,
},
@@ -32340,6 +32441,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER VOCALIC R",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1052,
},
@@ -32347,6 +32449,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER VOCALIC RR",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1053,
},
@@ -32354,6 +32457,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER VOCALIC L",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1054,
},
@@ -32361,6 +32465,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER VOCALIC LL",
direction="l",
+ indic="i",
linebreak="sa",
unicodeslot=0x1055,
},
@@ -32368,6 +32473,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN VOCALIC R",
direction="l",
+ indic="d",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1056,
},
@@ -32375,6 +32482,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN VOCALIC RR",
direction="l",
+ indic="d",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1057,
},
@@ -32382,6 +32491,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN VOCALIC L",
direction="nsm",
+ indic="d",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x1058,
},
@@ -32389,6 +32500,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN VOCALIC LL",
direction="nsm",
+ indic="d",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x1059,
},
@@ -32396,6 +32509,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER MON NGA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x105A,
},
@@ -32403,6 +32517,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER MON JHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x105B,
},
@@ -32410,6 +32525,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER MON BBA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x105C,
},
@@ -32417,6 +32533,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER MON BBE",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x105D,
},
@@ -32424,6 +32541,8 @@ characters.data={
category="mn",
description="MYANMAR CONSONANT SIGN MON MEDIAL NA",
direction="nsm",
+ indic="c",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x105E,
},
@@ -32431,6 +32550,8 @@ characters.data={
category="mn",
description="MYANMAR CONSONANT SIGN MON MEDIAL MA",
direction="nsm",
+ indic="c",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x105F,
},
@@ -32438,6 +32559,8 @@ characters.data={
category="mn",
description="MYANMAR CONSONANT SIGN MON MEDIAL LA",
direction="nsm",
+ indic="c",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x1060,
},
@@ -32445,6 +32568,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SGAW KAREN SHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1061,
},
@@ -32452,6 +32576,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN SGAW KAREN EU",
direction="l",
+ indic="d",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1062,
},
@@ -32459,6 +32585,8 @@ characters.data={
category="mc",
description="MYANMAR TONE MARK SGAW KAREN HATHI",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1063,
},
@@ -32466,6 +32594,8 @@ characters.data={
category="mc",
description="MYANMAR TONE MARK SGAW KAREN KE PHO",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1064,
},
@@ -32473,6 +32603,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER WESTERN PWO KAREN THA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1065,
},
@@ -32480,6 +32611,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER WESTERN PWO KAREN PWA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1066,
},
@@ -32487,6 +32619,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN WESTERN PWO KAREN EU",
direction="l",
+ indic="d",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1067,
},
@@ -32494,6 +32628,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN WESTERN PWO KAREN UE",
direction="l",
+ indic="d",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1068,
},
@@ -32501,6 +32637,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN WESTERN PWO KAREN TONE-1",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1069,
},
@@ -32508,6 +32646,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN WESTERN PWO KAREN TONE-2",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x106A,
},
@@ -32515,6 +32655,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN WESTERN PWO KAREN TONE-3",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x106B,
},
@@ -32522,6 +32664,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN WESTERN PWO KAREN TONE-4",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x106C,
},
@@ -32529,6 +32673,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN WESTERN PWO KAREN TONE-5",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x106D,
},
@@ -32536,6 +32682,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER EASTERN PWO KAREN NNA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x106E,
},
@@ -32543,6 +32690,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER EASTERN PWO KAREN YWA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x106F,
},
@@ -32550,6 +32698,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER EASTERN PWO KAREN GHWA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1070,
},
@@ -32557,6 +32706,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN GEBA KAREN I",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1071,
},
@@ -32564,6 +32715,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN KAYAH OE",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1072,
},
@@ -32571,6 +32724,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN KAYAH U",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1073,
},
@@ -32578,6 +32733,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN KAYAH EE",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1074,
},
@@ -32585,6 +32742,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN KA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1075,
variants={
@@ -32595,6 +32753,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN KHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1076,
},
@@ -32602,6 +32761,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN GA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1077,
},
@@ -32609,6 +32769,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN CA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1078,
variants={
@@ -32619,6 +32780,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN ZA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1079,
},
@@ -32626,6 +32788,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN NYA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x107A,
variants={
@@ -32636,6 +32799,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN DA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x107B,
},
@@ -32643,6 +32807,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN NA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x107C,
},
@@ -32650,6 +32815,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN PHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x107D,
},
@@ -32657,6 +32823,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN FA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x107E,
},
@@ -32664,6 +32831,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN BA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x107F,
},
@@ -32671,6 +32839,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN THA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1080,
variants={
@@ -32681,6 +32850,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN HA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x1081,
},
@@ -32688,6 +32858,8 @@ characters.data={
category="mn",
description="MYANMAR CONSONANT SIGN SHAN MEDIAL WA",
direction="nsm",
+ indic="c",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x1082,
},
@@ -32695,6 +32867,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN SHAN AA",
direction="l",
+ indic="d",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1083,
},
@@ -32702,6 +32876,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN SHAN E",
direction="l",
+ indic="d",
+ indicmark="l",
linebreak="sa",
unicodeslot=0x1084,
},
@@ -32709,6 +32885,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN SHAN E ABOVE",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1085,
},
@@ -32716,6 +32894,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN SHAN FINAL Y",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x1086,
},
@@ -32723,6 +32903,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN SHAN TONE-2",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1087,
},
@@ -32730,6 +32912,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN SHAN TONE-3",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1088,
},
@@ -32737,6 +32921,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN SHAN TONE-5",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x1089,
},
@@ -32744,6 +32930,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN SHAN TONE-6",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x108A,
},
@@ -32751,6 +32939,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN SHAN COUNCIL TONE-2",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x108B,
},
@@ -32758,6 +32948,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN SHAN COUNCIL TONE-3",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x108C,
},
@@ -32766,6 +32958,8 @@ characters.data={
combining=0xDC,
description="MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE",
direction="nsm",
+ indic="s",
+ indicmark="b",
linebreak="sa",
unicodeslot=0x108D,
},
@@ -32773,6 +32967,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER RUMAI PALAUNG FA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0x108E,
},
@@ -32780,6 +32975,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN RUMAI PALAUNG TONE-5",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x108F,
},
@@ -32787,6 +32984,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT ZERO",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1090,
},
@@ -32794,6 +32992,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT ONE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1091,
},
@@ -32801,6 +33000,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT TWO",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1092,
},
@@ -32808,6 +33008,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT THREE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1093,
},
@@ -32815,6 +33016,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT FOUR",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1094,
},
@@ -32822,6 +33024,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT FIVE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1095,
},
@@ -32829,6 +33032,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT SIX",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1096,
},
@@ -32836,6 +33040,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT SEVEN",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1097,
},
@@ -32843,6 +33048,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT EIGHT",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1098,
},
@@ -32850,6 +33056,7 @@ characters.data={
category="nd",
description="MYANMAR SHAN DIGIT NINE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0x1099,
},
@@ -32857,6 +33064,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN KHAMTI TONE-1",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x109A,
},
@@ -32864,6 +33073,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN KHAMTI TONE-3",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x109B,
},
@@ -32871,6 +33082,8 @@ characters.data={
category="mc",
description="MYANMAR VOWEL SIGN AITON A",
direction="l",
+ indic="d",
+ indicmark="r",
linebreak="sa",
unicodeslot=0x109C,
},
@@ -32878,6 +33091,8 @@ characters.data={
category="mn",
description="MYANMAR VOWEL SIGN AITON AI",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0x109D,
},
@@ -32885,6 +33100,7 @@ characters.data={
category="so",
description="MYANMAR SYMBOL SHAN ONE",
direction="l",
+ indic="o",
linebreak="sa",
unicodeslot=0x109E,
},
@@ -32892,6 +33108,7 @@ characters.data={
category="so",
description="MYANMAR SYMBOL SHAN EXCLAMATION",
direction="l",
+ indic="o",
linebreak="sa",
unicodeslot=0x109F,
},
@@ -121296,6 +121513,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN GHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9E0,
},
@@ -121303,6 +121521,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN CHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9E1,
},
@@ -121310,6 +121529,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN JHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9E2,
},
@@ -121317,6 +121537,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN NNA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9E3,
},
@@ -121324,6 +121545,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHAN BHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9E4,
},
@@ -121331,6 +121553,8 @@ characters.data={
category="mn",
description="MYANMAR SIGN SHAN SAW",
direction="nsm",
+ indic="d",
+ indicmark="t",
linebreak="sa",
unicodeslot=0xA9E5,
},
@@ -121338,6 +121562,7 @@ characters.data={
category="lm",
description="MYANMAR MODIFIER LETTER SHAN REDUPLICATION",
direction="l",
+ indic="o",
linebreak="sa",
unicodeslot=0xA9E6,
},
@@ -121345,6 +121570,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING NYA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9E7,
},
@@ -121352,6 +121578,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING FA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9E8,
},
@@ -121359,6 +121586,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING GA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9E9,
},
@@ -121366,6 +121594,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING GHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9EA,
},
@@ -121373,6 +121602,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING JA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9EB,
},
@@ -121380,6 +121610,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING JHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9EC,
},
@@ -121387,6 +121618,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING DDA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9ED,
},
@@ -121394,6 +121626,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING DDHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9EE,
},
@@ -121401,6 +121634,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING NNA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9EF,
},
@@ -121408,6 +121642,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT ZERO",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F0,
},
@@ -121415,6 +121650,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT ONE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F1,
},
@@ -121422,6 +121658,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT TWO",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F2,
},
@@ -121429,6 +121666,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT THREE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F3,
},
@@ -121436,6 +121674,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT FOUR",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F4,
},
@@ -121443,6 +121682,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT FIVE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F5,
},
@@ -121450,6 +121690,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT SIX",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F6,
},
@@ -121457,6 +121698,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT SEVEN",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F7,
},
@@ -121464,6 +121706,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT EIGHT",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F8,
},
@@ -121471,6 +121714,7 @@ characters.data={
category="nd",
description="MYANMAR TAI LAING DIGIT NINE",
direction="l",
+ indic="o",
linebreak="nu",
unicodeslot=0xA9F9,
},
@@ -121478,6 +121722,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING LLA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9FA,
},
@@ -121485,6 +121730,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING DA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9FB,
},
@@ -121492,6 +121738,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING DHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9FC,
},
@@ -121499,6 +121746,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING BA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9FD,
},
@@ -121506,6 +121754,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER TAI LAING BHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xA9FE,
},
@@ -122094,6 +122343,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI GA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA60,
variants={
@@ -122104,6 +122354,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI CA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA61,
variants={
@@ -122114,6 +122365,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI CHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA62,
variants={
@@ -122124,6 +122376,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI JA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA63,
variants={
@@ -122134,6 +122387,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI JHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA64,
variants={
@@ -122144,6 +122398,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI NYA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA65,
variants={
@@ -122154,6 +122409,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI TTA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA66,
variants={
@@ -122164,6 +122420,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI TTHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA67,
},
@@ -122171,6 +122428,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI DDA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA68,
},
@@ -122178,6 +122436,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI DDHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA69,
},
@@ -122185,6 +122444,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI DHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA6A,
},
@@ -122202,6 +122462,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI SA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA6C,
variants={
@@ -122212,6 +122473,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI HA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA6D,
},
@@ -122219,6 +122481,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI HHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA6E,
},
@@ -122226,6 +122489,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI FA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA6F,
variants={
@@ -122236,6 +122500,7 @@ characters.data={
category="lm",
description="MYANMAR MODIFIER LETTER KHAMTI REDUPLICATION",
direction="l",
+ indic="o",
linebreak="sa",
unicodeslot=0xAA70,
},
@@ -122243,6 +122508,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI XA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA71,
},
@@ -122250,6 +122516,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI ZA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA72,
},
@@ -122257,6 +122524,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER KHAMTI RA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA73,
},
@@ -122264,6 +122532,7 @@ characters.data={
category="lo",
description="MYANMAR LOGOGRAM KHAMTI OAY",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA74,
},
@@ -122271,6 +122540,7 @@ characters.data={
category="lo",
description="MYANMAR LOGOGRAM KHAMTI QN",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA75,
},
@@ -122278,6 +122548,7 @@ characters.data={
category="lo",
description="MYANMAR LOGOGRAM KHAMTI HM",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA76,
},
@@ -122285,6 +122556,7 @@ characters.data={
category="so",
description="MYANMAR SYMBOL AITON EXCLAMATION",
direction="l",
+ indic="o",
linebreak="sa",
unicodeslot=0xAA77,
},
@@ -122292,6 +122564,7 @@ characters.data={
category="so",
description="MYANMAR SYMBOL AITON ONE",
direction="l",
+ indic="o",
linebreak="sa",
unicodeslot=0xAA78,
},
@@ -122299,6 +122572,7 @@ characters.data={
category="so",
description="MYANMAR SYMBOL AITON TWO",
direction="l",
+ indic="o",
linebreak="sa",
unicodeslot=0xAA79,
},
@@ -122306,6 +122580,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER AITON RA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA7A,
variants={
@@ -122316,6 +122591,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN PAO KAREN TONE",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0xAA7B,
},
@@ -122323,6 +122600,8 @@ characters.data={
category="mn",
description="MYANMAR SIGN TAI LAING TONE-2",
direction="nsm",
+ indic="s",
+ indicmark="t",
linebreak="sa",
unicodeslot=0xAA7C,
},
@@ -122330,6 +122609,8 @@ characters.data={
category="mc",
description="MYANMAR SIGN TAI LAING TONE-5",
direction="l",
+ indic="s",
+ indicmark="r",
linebreak="sa",
unicodeslot=0xAA7D,
},
@@ -122337,6 +122618,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHWE PALAUNG CHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA7E,
},
@@ -122344,6 +122626,7 @@ characters.data={
category="lo",
description="MYANMAR LETTER SHWE PALAUNG SHA",
direction="l",
+ indic="c",
linebreak="sa",
unicodeslot=0xAA7F,
},
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 3d6861ab4..01f33231d 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.09.26 14:26}
+\newcontextversion{2018.09.30 19:32}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 21b83b486..d50c05923 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -42,7 +42,7 @@
%D has to match \type {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.09.26 14:26}
+\edef\contextversion{2018.09.30 19:32}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-cff.lua b/tex/context/base/mkiv/font-cff.lua
index 87234dd46..ecd49fa3a 100644
--- a/tex/context/base/mkiv/font-cff.lua
+++ b/tex/context/base/mkiv/font-cff.lua
@@ -1567,6 +1567,7 @@ do
end
local function blend()
+ -- leaves n values on stack
local n = stack[top]
top = top - 1
if not axis then
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 1fe4289b2..ba92c62be 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -1215,7 +1215,7 @@ function gsubhandlers.single(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofg
local delta = readshort(f) -- can be negative
local coverage = readcoverage(f,tableoffset+coverage) -- not simple as we need to set key/value anyway
for index in next, coverage do
- local newindex = index + delta
+ local newindex = (index + delta) % 65536 -- modulo is new in 1.8.3
if index > nofglyphs or newindex > nofglyphs then
report("invalid index in %s format %i: %i -> %i (max %i)","single",subtype,index,newindex,nofglyphs)
coverage[index] = nil
diff --git a/tex/context/base/mkiv/font-map.lua b/tex/context/base/mkiv/font-map.lua
index a7fbfe49e..712b1584c 100644
--- a/tex/context/base/mkiv/font-map.lua
+++ b/tex/context/base/mkiv/font-map.lua
@@ -550,12 +550,17 @@ function mappings.addtounicode(data,filename,checklookups,forceligatures)
missing[du] = true
nofmissing = nofmissing + 1
end
+ else
+ -- maybe a message or so
end
end
else
local overload = overloads[du]
if overload then
glyph.unicode = overload.unicode
+ elseif not glyph.unicode then
+ missing[du] = true
+ nofmissing = nofmissing + 1
end
end
end
diff --git a/tex/context/base/mkiv/font-mis.lua b/tex/context/base/mkiv/font-mis.lua
index ac697295d..62353f3c6 100644
--- a/tex/context/base/mkiv/font-mis.lua
+++ b/tex/context/base/mkiv/font-mis.lua
@@ -21,7 +21,7 @@ local readers = otf.readers
if readers then
- otf.version = otf.version or 3.104
+ otf.version = otf.version or 3.105
otf.cache = otf.cache or containers.define("fonts", "otl", otf.version, true)
function fonts.helpers.getfeatures(name,save)
diff --git a/tex/context/base/mkiv/font-otl.lua b/tex/context/base/mkiv/font-otl.lua
index abb0ebd14..e2013720b 100644
--- a/tex/context/base/mkiv/font-otl.lua
+++ b/tex/context/base/mkiv/font-otl.lua
@@ -52,7 +52,7 @@ local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.104 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.105 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otl", otf.version, true)
otf.svgcache = containers.define("fonts", "svg", otf.version, true)
otf.sbixcache = containers.define("fonts", "sbix", otf.version, true)
diff --git a/tex/context/base/mkiv/font-ott.lua b/tex/context/base/mkiv/font-ott.lua
index 88da136ac..6f8b85446 100644
--- a/tex/context/base/mkiv/font-ott.lua
+++ b/tex/context/base/mkiv/font-ott.lua
@@ -390,6 +390,7 @@ local languages = allocate {
["kiu" ] = "kirmanjki",
["kjd" ] = "southern kiwai",
["kjp" ] = "eastern pwo karen",
+ ["kjz" ] = "bumthangkha",
["kkn" ] = "kokni",
["klm" ] = "kalmyk",
["kmb" ] = "kamba",
@@ -478,6 +479,7 @@ local languages = allocate {
["mdr" ] = "mandar",
["men" ] = "me'en",
["mer" ] = "meru",
+ ["mfa" ] = "pattani malay",
["mfe" ] = "morisyen",
["min" ] = "minangkabau",
["miz" ] = "mizo",
@@ -675,6 +677,7 @@ local languages = allocate {
["tpi" ] = "tok pisin",
["trk" ] = "turkish",
["tsg" ] = "tsonga",
+ ["tsj" ] = "tshangla",
["tua" ] = "turoyo aramaic",
["tul" ] = "tulu",
["tuv" ] = "tuvin",
@@ -705,6 +708,7 @@ local languages = allocate {
["xbd" ] = "lü",
["xhs" ] = "xhosa",
["xjb" ] = "minjangbal",
+ ["xkf" ] = "khengkha",
["xog" ] = "soga",
["xpe" ] = "kpelle (liberia)",
["yak" ] = "sakha",
diff --git a/tex/context/base/mkiv/font-oup.lua b/tex/context/base/mkiv/font-oup.lua
index 562d7561d..70d1ef4ab 100644
--- a/tex/context/base/mkiv/font-oup.lua
+++ b/tex/context/base/mkiv/font-oup.lua
@@ -457,7 +457,6 @@ local function checklookups(fontdata,missing,nofmissing)
end
end
end
-
local function collectthem(sequences)
if not sequences then
return
diff --git a/tex/context/base/mkiv/java-imp-fld.mkiv b/tex/context/base/mkiv/java-imp-fld.mkiv
index cbd53fffb..6e51681b0 100644
--- a/tex/context/base/mkiv/java-imp-fld.mkiv
+++ b/tex/context/base/mkiv/java-imp-fld.mkiv
@@ -262,9 +262,28 @@ function Forget_Changes() {
function ForgetChanges() {
this.dirty = false ;
}
+
+function Step_Fields (Name, First, Last) {
+ for (var i = Number(First) ; i <= Number(Last) ; i++) {
+ var s = Name + ":" + i ;
+ var v = this.getField(s) ;
+ if (v) {
+ ++visible_fields ;
+ visible_field[visible_fields] = s ;
+ if (v.hidden) {
+ v.hidden = false ;
+ this.dirty = false ;
+ return ;
+ }
+ }
+ }
+}
\stopJSpreamble
+\definereference[VideFields] [JS(Vide_Fields)]
+\definereference[HideFields] [JS(Hide_Fields)]
\definereference[ForgetChanges][JS(Forget_Changes)]
+\definereference[StepFields] [JS(Step_Fields)]
% This can be done more efficient, by keeping track of the
% current top of the stack.
diff --git a/tex/context/base/mkiv/java-ini.lua b/tex/context/base/mkiv/java-ini.lua
index 61ab15e7a..a8868da60 100644
--- a/tex/context/base/mkiv/java-ini.lua
+++ b/tex/context/base/mkiv/java-ini.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['java-ini'] = {
-- todo: don't flush scripts if no JS key
-local format = string.format
+local format, gsub, find = string.format, string.gsub, string.find
local concat = table.concat
local lpegmatch, P, S, C, Carg, Cc = lpeg.match, lpeg.P, lpeg.S, lpeg.C, lpeg.Carg, lpeg.Cc
@@ -69,6 +69,7 @@ local parsefunctions = (fname + any)^0
function javascripts.storecode(str)
local name, uses, script = lpegmatch(parsecode,str)
if name and name ~= "" then
+ script = gsub(script,"%s*([^\n\r]+)%s*[\n\r]+$","%1")
codes[name] = { uses, script }
end
end
diff --git a/tex/context/base/mkiv/lpdf-fld.lua b/tex/context/base/mkiv/lpdf-fld.lua
index 1c39b8876..dea5c16d7 100644
--- a/tex/context/base/mkiv/lpdf-fld.lua
+++ b/tex/context/base/mkiv/lpdf-fld.lua
@@ -103,7 +103,7 @@ local pdf_tx = pdfconstant("Tx")
local pdf_sig = pdfconstant("Sig")
local pdf_ch = pdfconstant("Ch")
local pdf_btn = pdfconstant("Btn")
------ pdf_yes = pdfconstant("Yes")
+local pdf_yes = pdfconstant("Yes")
local pdf_off = pdfconstant("Off")
local pdf_p = pdfconstant("P") -- None Invert Outline Push
local pdf_n = pdfconstant("N") -- None Invert Outline Push
@@ -341,10 +341,10 @@ local function fieldsurrounding(specification)
alternative, a = "tf", s.tf
end
local tag = fontstyle .. fontalternative
- fontsize = todimen(fontsize)
- fontsize = fontsize and (bpfactor * fontsize) or 12
+ fontsize = todimen(fontsize)
+ fontsize = fontsize and (bpfactor * fontsize) or 12
fontraise = 0.1 * fontsize -- todo: figure out what the natural one is and compensate for strutdp
- local fontcode = formatters["%0.4f Tf %0.4f Ts"](fontsize,fontraise)
+ local fontcode = formatters["%0.4F Tf %0.4F Ts"](fontsize,fontraise)
-- we could test for colorvalue being 1 (black) and omit it then
local colorcode = pdfcolor(3,colorvalue) -- we force an rgb color space
if trace_fields then
@@ -367,9 +367,9 @@ codeinjections.fieldsurrounding = fieldsurrounding
local function registerfonts()
if next(usedfonts) then
checkpdfdocencoding() -- already done
- local d = pdfdictionary()
- local pdffonttype, pdffontsubtype = pdfconstant("Font"), pdfconstant("Type1")
- -- for tag, name in next, usedfonts do
+ local pdffontlist = pdfdictionary()
+ local pdffonttype = pdfconstant("Font")
+ local pdffontsubtype = pdfconstant("Type1")
for tag, name in sortedhash(usedfonts) do
local f = pdfdictionary {
Type = pdffonttype,
@@ -378,9 +378,9 @@ local function registerfonts()
BaseFont = pdfconstant(name),
Encoding = pdfdocencodingvector,
}
- d[tag] = pdfreference(pdfflushobject(f))
+ pdffontlist[tag] = pdfreference(pdfflushobject(f))
end
- return d
+ return pdffontlist
end
end
@@ -388,7 +388,7 @@ end
local function fieldappearances(specification)
-- todo: caching
- local values = specification.values
+ local values = specification.values
local default = specification.default -- todo
if not values then
-- error
@@ -404,22 +404,117 @@ local function fieldappearances(specification)
n, r, d = v[1], v[2], v[3]
end
local appearance = pdfdictionary {
- N = registeredsymbol(n), R = registeredsymbol(r), D = registeredsymbol(d),
+ N = registeredsymbol(n),
+ R = registeredsymbol(r),
+ D = registeredsymbol(d),
}
return pdfshareobjectreference(appearance)
-- return pdfreference(pdfflushobject(appearance))
end
-local YesorOn = "Yes" -- somehow On is not always working out well any longer (why o why this change)
+-- local YesorOn = "Yes" -- somehow On is not always working out well any longer (why o why this change)
-- beware ... maybe we should have unique /Yes1 ... we will probably
-- change this one too.
--
-- TODO: the same as radio .. play safe and use different names.
+-- local function fieldstates_check(specification,forceyes,values,default,yesdefault)
+-- -- we don't use Opt here (too messy for radio buttons)
+-- local values, default = values or specification.values, default or specification.default
+-- if not values or values == "" then
+-- -- error
+-- return
+-- end
+-- local v = settings_to_array(values)
+-- local yes, off, yesn, yesr, yesd, offn, offr, offd
+-- if #v == 1 then
+-- yes, off = v[1], v[1]
+-- else
+-- yes, off = v[1], v[2]
+-- end
+-- local yesshown, yesvalue = lpegmatch(splitter,yes)
+-- if not (yesshown and yesvalue) then
+-- yesshown = yes, yes
+-- end
+-- yes = settings_to_array(yesshown)
+-- local offshown, offvalue = lpegmatch(splitter,off)
+-- if not (offshown and offvalue) then
+-- offshown = off, off
+-- end
+-- off = settings_to_array(offshown)
+-- if #yes == 1 then
+-- yesn, yesr, yesd = yes[1], yes[1], yes[1]
+-- elseif #yes == 2 then
+-- yesn, yesr, yesd = yes[1], yes[1], yes[2]
+-- else
+-- yesn, yesr, yesd = yes[1], yes[2], yes[3]
+-- end
+-- if #off == 1 then
+-- offn, offr, offd = off[1], off[1], off[1]
+-- elseif #off == 2 then
+-- offn, offr, offd = off[1], off[1], off[2]
+-- else
+-- offn, offr, offd = off[1], off[2], off[3]
+-- end
+-- if forceyes == true then
+-- forceyes = YesorOn -- spec likes Yes more but we've used On for ages now
+-- else
+-- -- false or string
+-- end
+-- if not yesvalue then
+-- yesvalue = yesdefault or yesn
+-- end
+-- if not offvalue then
+-- offvalue = offn
+-- end
+-- if default == yesn then
+-- default = pdfconstant(forceyes or yesn)
+-- else
+-- default = pdf_off
+-- end
+-- local appearance
+-- if false then -- needs testing
+-- appearance = pdfdictionary { -- maybe also cache components
+-- N = pdfshareobjectreference(pdfdictionary { [forceyes or yesn] = registeredsymbol(yesn), Off = registeredsymbol(offn) }),
+-- R = pdfshareobjectreference(pdfdictionary { [forceyes or yesr] = registeredsymbol(yesr), Off = registeredsymbol(offr) }),
+-- D = pdfshareobjectreference(pdfdictionary { [forceyes or yesd] = registeredsymbol(yesd), Off = registeredsymbol(offd) }),
+-- }
+-- else
+-- appearance = pdfdictionary { -- maybe also cache components
+-- N = pdfdictionary { [forceyes or yesn] = registeredsymbol(yesn), Off = registeredsymbol(offn) },
+-- R = pdfdictionary { [forceyes or yesr] = registeredsymbol(yesr), Off = registeredsymbol(offr) },
+-- D = pdfdictionary { [forceyes or yesd] = registeredsymbol(yesd), Off = registeredsymbol(offd) }
+-- }
+-- end
+-- local appearanceref = pdfshareobjectreference(appearance)
+-- -- local appearanceref = pdfreference(pdfflushobject(appearance))
+-- return appearanceref, default, yesvalue
+-- end
+
+-- The rendering part of form support has always been crappy and didn't really
+-- improve over time. Did bugs become features? Who knows. Why provide for instance
+-- control over appearance and then ignore it when the mouse clicks someplace else.
+-- Strangely enough a lot of effort went into JavaScript support while basic
+-- appearance control of checkboxes stayed poor. I found this link when googling for
+-- conformation after the n^th time looking into this behaviour:
+--
+-- https://stackoverflow.com/questions/15479855/pdf-appearance-streams-checkbox-not-shown-correctly-after-focus-lost
+--
+-- ... "In particular check boxes, therefore, whenever not interacting with the user, shall
+-- be displayed using their normal captions, not their appearances."
+--
+-- So: don't use check boxes. In fact, even radio buttons can have these funny "flash some
+-- funny symbol" side effect when clocking on them. I tried all combinations if /H and /AP
+-- and /AS and ... Because (afaiks) the acrobat interface assumes that one uses dingbats no
+-- one really cared about getting custom appeances done well. This erratic behaviour might
+-- as well be the reason why no open source viewer ever bothered implementing forms. It's
+-- probably also why most forms out there look kind of bad.
+
local function fieldstates_check(specification,forceyes,values,default,yesdefault)
-- we don't use Opt here (too messy for radio buttons)
- local values, default = values or specification.values, default or specification.default
+ local values = values or specification.values
+ local default = default or specification.default
if not values or values == "" then
-- error
return
@@ -461,28 +556,28 @@ local function fieldstates_check(specification,forceyes,values,default,yesdefaul
if not offvalue then
offvalue = offn
end
- if forceyes == true then
- forceyes = YesorOn -- spec likes Yes more but we've used On for ages now
- else
- -- false or string
- end
if default == yesn then
- default = pdfconstant(forceyes or yesn)
+ default = pdf_yes
else
default = pdf_off
end
+ if yesvalue == yesn then
+ yesvalue = "Yes"
+ else
+ yesvalue = "Off"
+ end
local appearance
if false then -- needs testing
appearance = pdfdictionary { -- maybe also cache components
- N = pdfshareobjectreference(pdfdictionary { [forceyes or yesn] = registeredsymbol(yesn), Off = registeredsymbol(offn) }),
- R = pdfshareobjectreference(pdfdictionary { [forceyes or yesr] = registeredsymbol(yesr), Off = registeredsymbol(offr) }),
- D = pdfshareobjectreference(pdfdictionary { [forceyes or yesd] = registeredsymbol(yesd), Off = registeredsymbol(offd) }),
+ N = pdfshareobjectreference(pdfdictionary { Yes = registeredsymbol(yesn), Off = registeredsymbol(offn) }),
+ R = pdfshareobjectreference(pdfdictionary { Yes = registeredsymbol(yesr), Off = registeredsymbol(offr) }),
+ D = pdfshareobjectreference(pdfdictionary { Yes = registeredsymbol(yesd), Off = registeredsymbol(offd) }),
}
else
appearance = pdfdictionary { -- maybe also cache components
- N = pdfdictionary { [forceyes or yesn] = registeredsymbol(yesn), Off = registeredsymbol(offn) },
- R = pdfdictionary { [forceyes or yesr] = registeredsymbol(yesr), Off = registeredsymbol(offr) },
- D = pdfdictionary { [forceyes or yesd] = registeredsymbol(yesd), Off = registeredsymbol(offd) }
+ N = pdfdictionary { Yes = registeredsymbol(yesn), Off = registeredsymbol(offn) },
+ R = pdfdictionary { Yes = registeredsymbol(yesr), Off = registeredsymbol(offr) },
+ D = pdfdictionary { Yes = registeredsymbol(yesd), Off = registeredsymbol(offd) }
}
end
local appearanceref = pdfshareobjectreference(appearance)
@@ -490,12 +585,11 @@ local function fieldstates_check(specification,forceyes,values,default,yesdefaul
return appearanceref, default, yesvalue
end
--- It looks like there is always a (MK related) symbol used and that
--- the appearances are only used as ornaments behind a symbol. So,
--- contrary to what we did when widgets showed up, we now limit
--- ourself to more dumb definitions. Especially when highlighting is
--- enabled weird interferences happen. So, we play safe (some nice code
--- has been removed that worked well till recently).
+-- It looks like there is always a (MK related) symbol used and that the appearances
+-- are only used as ornaments behind a symbol. So, contrary to what we did when
+-- widgets showed up, we now limit ourself to more dumb definitions. Especially when
+-- highlighting is enabled weird interferences happen. So, we play safe (some nice
+-- code has been removed that worked well till recently).
local function fieldstates_radio(specification,name,parent)
local values = values or specification.values
@@ -574,7 +668,7 @@ local function fieldstates_radio(specification,name,parent)
return appearanceref, default, yesvalue
end
-local function fielddefault(field)
+local function fielddefault(field,pdf_yes)
local default = field.default
if not default or default == "" then
local values = settings_to_array(field.values)
@@ -583,12 +677,12 @@ local function fielddefault(field)
if not default or default == "" then
return pdf_off
else
- return pdfconstant(default)
+ return pdf_yes or pdfconstant(default)
end
end
local function fieldoptions(specification)
- local values = specification.values
+ local values = specification.values
local default = specification.default
if values then
local v = settings_to_array(values)
@@ -792,7 +886,9 @@ function codeinjections.definefield(specification)
end
function codeinjections.clonefield(specification) -- obsolete
- local p, c, v = specification.parent, specification.children, specification.alternative
+ local p = specification.parent
+ local c = specification.children
+ local v = specification.alternative
if not p or not c then
if trace_fields then
report_fields("invalid clone, children %a, parent %a, alternative %a",c,p,v)
@@ -876,7 +972,8 @@ local function enhance(specification,option)
return specification
end
--- finish
+-- finish (if we also collect parents we can inline the kids which is
+-- more efficient ... but hardly anyone used widgets so ...)
local collected = pdfarray()
local forceencoding = false
@@ -951,14 +1048,14 @@ end
local function save_parent(field,specification,d,hasopt)
local kidsnum = pdfreserveobject()
- d.Kids = pdfreference(kidsnum)
+ d.Kids = pdfreference(kidsnum)
field.kidsnum = kidsnum
- field.kids = pdfarray()
+ field.kids = pdfarray()
if hasopt then
local optnum = pdfreserveobject()
- d.Opt = pdfreference(optnum)
+ d.Opt = pdfreference(optnum)
field.optnum = optnum
- field.opt = pdfarray()
+ field.opt = pdfarray()
end
local pnum = pdfflushobject(d)
field.pobj = pnum
@@ -974,16 +1071,21 @@ local function save_kid(field,specification,d,optname)
opt[#opt+1] = optname
end
end
- local width, height, depth = specification.width or 0, specification.height or 0, specification.depth
+ local width = specification.width or 0
+ local height = specification.height or 0
+ local depth = specification.depth or 0
local box = hpack_node(nodeinjections.annotation(width,height,depth,d(),kn))
- box.width, box.height, box.depth = width, height, depth -- redundant
+ -- redundant
+ box.width = width
+ box.height = height
+ box.depth = depth
return box
end
local function makelineparent(field,specification)
- local text = pdfunicode(field.default)
+ local text = pdfunicode(field.default)
local length = tonumber(specification.length or 0) or 0
- local d = pdfdictionary {
+ local d = pdfdictionary {
Subtype = pdf_widget,
T = pdfunicode(specification.title),
F = fieldplus(specification),
@@ -1001,7 +1103,8 @@ local function makelineparent(field,specification)
end
local function makelinechild(name,specification)
- local field, parent = clones[name], nil
+ local field = clones[name]
+ local parent = nil
if field then
parent = fields[field.parent]
if not parent.pobj then
@@ -1012,7 +1115,7 @@ local function makelinechild(name,specification)
end
else
parent = fields[name]
- field = parent
+ field = parent
if not parent.pobj then
if trace_fields then
report_fields("using parent text %a",name)
@@ -1049,9 +1152,9 @@ end
-- copy of line ... probably also needs a /Lock
local function makesignatureparent(field,specification)
- local text = pdfunicode(field.default)
+ local text = pdfunicode(field.default)
local length = tonumber(specification.length or 0) or 0
- local d = pdfdictionary {
+ local d = pdfdictionary {
Subtype = pdf_widget,
T = pdfunicode(specification.title),
F = fieldplus(specification),
@@ -1069,7 +1172,8 @@ local function makesignatureparent(field,specification)
end
local function makesignaturechild(name,specification)
- local field, parent = clones[name], nil
+ local field = clones[name]
+ local parent = nil
if field then
parent = fields[field.parent]
if not parent.pobj then
@@ -1080,7 +1184,7 @@ local function makesignaturechild(name,specification)
end
else
parent = fields[name]
- field = parent
+ field = parent
if not parent.pobj then
if trace_fields then
report_fields("using parent text %a",name)
@@ -1126,7 +1230,8 @@ local function makechoiceparent(field,specification)
end
local function makechoicechild(name,specification)
- local field, parent = clones[name], nil
+ local field = clones[name]
+ local parent = nil
if field then
parent = fields[field.parent]
if not parent.pobj then
@@ -1137,7 +1242,7 @@ local function makechoicechild(name,specification)
end
else
parent = fields[name]
- field = parent
+ field = parent
if not parent.pobj then
if trace_fields then
report_fields("using parent choice %a",name)
@@ -1176,15 +1281,16 @@ local function makecheckparent(field,specification)
F = fieldplus(specification),
Ff = fieldflag(specification),
OC = fieldlayer(specification),
- AA = fieldactions(specification),
+ AA = fieldactions(specification), -- can be shared
FT = pdf_btn,
- V = fielddefault(field),
+ V = fielddefault(field,pdf_yes),
}
save_parent(field,specification,d,true)
end
local function makecheckchild(name,specification)
- local field, parent = clones[name], nil
+ local field = clones[name]
+ local parent = nil
if field then
parent = fields[field.parent]
if not parent.pobj then
@@ -1195,7 +1301,7 @@ local function makecheckchild(name,specification)
end
else
parent = fields[name]
- field = parent
+ field = parent
if not parent.pobj then
if trace_fields then
report_fields("using parent check %a",name)
@@ -1211,7 +1317,7 @@ local function makecheckchild(name,specification)
Parent = pdfreference(parent.pobj),
F = fieldplus(specification),
OC = fieldlayer(specification),
- AA = fieldactions(specification),
+ AA = fieldactions(specification), -- can be shared
H = pdf_n,
}
local fontsymbol = specification.fontsymbol
@@ -1241,7 +1347,7 @@ local function makepushparent(field,specification) -- check if we can share with
F = fieldplus(specification),
Ff = fieldflag(specification),
OC = fieldlayer(specification),
- AA = fieldactions(specification),
+ AA = fieldactions(specification), -- can be shared
FT = pdf_btn,
AP = fieldappearances(field),
H = pdf_p,
@@ -1278,7 +1384,7 @@ local function makepushchild(name,specification)
Parent = pdfreference(field.pobj),
F = fieldplus(specification),
OC = fieldlayer(specification),
- AA = fieldactions(specification),
+ AA = fieldactions(specification), -- can be shared
H = pdf_p,
}
if fontsymbol and fontsymbol ~= "" then
@@ -1313,7 +1419,7 @@ end
local function makeradiochild(name,specification)
local field, parent = clones[name], nil
if field then
- field = radios[field.parent]
+ field = radios[field.parent]
parent = fields[field.parent]
if not parent.pobj then
if trace_fields then
diff --git a/tex/context/base/mkiv/lpdf-grp.lua b/tex/context/base/mkiv/lpdf-grp.lua
index 34925fddd..ee6aa5d84 100644
--- a/tex/context/base/mkiv/lpdf-grp.lua
+++ b/tex/context/base/mkiv/lpdf-grp.lua
@@ -252,6 +252,14 @@ end
-- temp hack
+local f_image = formatters["%.6F 0 0 %.6F 0 0 cm /%s Do"]
+local f_pattern = formatters["q /Pattern cs /%s scn 0 0 %.6F %.6F re f Q"] -- q Q is not really needed
+
+directives.register("pdf.stripzeros",function()
+ f_image = formatters["%.6N 0 0 %.6N 0 0 cm /%s Do"]
+ f_pattern = formatters["q /Pattern cs /%s scn 0 0 %.6N %.6N re f Q"]
+end)
+
function img.package(image) -- see lpdf-u3d **
local boundingbox = image.bbox
local imagetag = "Im" .. image.index
@@ -270,7 +278,7 @@ function img.package(image) -- see lpdf-u3d **
local height = boundingbox[4]
local xform = img.scan {
attr = resources(),
- stream = formatters["%.6F 0 0 %.6F 0 0 cm /%s Do"](width,height,imagetag),
+ stream = f_image(width,height,imagetag),
bbox = { 0, 0, width/basepoints, height/basepoints },
}
img.immediatewrite(xform)
@@ -280,7 +288,6 @@ end
-- experimental
local nofpatterns = 0
-local f_pattern = formatters["q /Pattern cs /%s scn 0 0 %.6F %.6F re f Q"] -- q Q is not really needed
local texsavebox = tex.saveboxresource
diff --git a/tex/context/base/mkiv/scrn-fld.mkvi b/tex/context/base/mkiv/scrn-fld.mkvi
index dec334209..7327f7c14 100644
--- a/tex/context/base/mkiv/scrn-fld.mkvi
+++ b/tex/context/base/mkiv/scrn-fld.mkvi
@@ -627,11 +627,13 @@
%D Common stuff (obsolete)
+
\newcount\c_scrn_field_system_n
-\def\nextsystemfield
- {\global\advance\c_scrn_field_system_n\plusone
- \def\currentsystemfield{sys::\number\c_scrn_field_system_n}}
+\def\currentsystemfield{sys::\number\c_scrn_field_system_n}
+
+\unexpanded\def\nextsystemfield
+ {\global\advance\c_scrn_field_system_n\plusone}
%D \CONTEXT\ had tooltips right from the moment that it
%D supported fields. Due to the at that moment somewhat
@@ -822,21 +824,56 @@
\unexpanded\def\overlayrollbutton
{\dodoubleargument\scrn_rollbutton_overlay}
-\def\scrn_rollbutton_overlay[#regionin][#regionout]%
+\unexpanded\def\scrn_rollbutton_overlay[#regionin][#regionout]%
+ {\iffirstargument
+ \scrn_rollbutton_overlay_indeed[#regionin][#regionout]%
+ \else
+ \expandafter\scrn_rollbutton_overlay_indeed
+ \fi}
+
+% \def\scrn_rollbutton_overlay_indeed#regionin#regionout%
+% {\iflocation
+% \bgroup
+% \global\advance\c_scrn_rollbutton_n\plusone
+% \definesymbol
+% [rollbutton:\number\c_scrn_rollbutton_n]
+% [{\framed[\c!frame=\v!off,\c!width=\overlaywidth,\c!height=\overlayheight]{}}]%
+% \definefieldbody
+% [rollbutton:\number\c_scrn_rollbutton_n]
+% [\c!type=push,
+% \c!regionin={#regionin},
+% \c!regionout={#regionout},
+% \c!values=\currentsystemfield,
+% \c!default=\currentsystemfield]%
+% \fitfield[\currentsystemfield]%
+% \egroup
+% \fi}
+
+\def\scrn_rollbutton_overlay_indeed#regionin#regionout%
{\iflocation
\bgroup
- \global\advance\c_scrn_rollbutton_n\plusone
+ \global\advance\c_scrn_rollbutton_n_button\plusone
+ \global\advance\c_scrn_rollbutton_n_symbol\plusone
\definesymbol
- [rollbutton:\number\c_scrn_rollbutton_n]
+ [rollsymbol:\number\c_scrn_rollbutton_n_symbol]
[{\framed[\c!frame=\v!off,\c!width=\overlaywidth,\c!height=\overlayheight]{}}]%
- \definefieldbody
- [rollbutton:\number\c_scrn_rollbutton_n]
- [\c!type=push,
- \c!regionin={#regionin},
- \c!regionout={#regionout},
- \c!values=\currentsystemfield,
- \c!default=\currentsystemfield]%
- \fitfield[\currentsystemfield]%
+ % \definefieldbody
+ % [rollbutton:\number\c_scrn_rollbutton_n_button]
+ % [\c!type=push,
+ % \c!values=rollsymbol:\number\c_scrn_rollbutton_n_symbol,
+ % \c!default=rollsymbol:\number\c_scrn_rollbutton_n_symbol]%
+ % \fitfield
+ % [rollbutton:\number\c_scrn_rollbutton_n_button]%
+ % [\c!regionin={#regionin},
+ % \c!regionout={#regionout}]%
+ %
+ \definefield
+ [rollbutton:\number\c_scrn_rollbutton_n_button][push][rollbutton]
+ [rollsymbol:\number\c_scrn_rollbutton_n_symbol]%
+ \fitfield
+ [rollbutton:\number\c_scrn_rollbutton_n_button]%
+ [\c!regionin={#regionin},\c!regionout={#regionout}]%
+ %
\egroup
\fi}
@@ -914,7 +951,7 @@
%D We plug into the menu system
\unexpanded\def\scrn_menu_psh_start[#reference]#text\stoppsh
- {\starttxt\pushbutton[\currentmenu][#reference]\stoptxt}
+ {\starttxt\pushbutton[\currentinteractionmenu][#reference]\stoptxt}
\unexpanded\def\scrn_menu_psh_direct[#reference]#text\\
{\scrn_menu_psh_start[#reference]\stoprob}
@@ -956,6 +993,8 @@
\newcount\c_scrn_rollbutton_n_button
\newcount\c_scrn_rollbutton_n_symbol
+\def\lastrollbuttonindex{\the\c_scrn_rollbutton_n_button}
+
\unexpanded\def\rollbutton
{\dodoubleempty\scrn_rollbutton}
@@ -973,11 +1012,16 @@
\setbuttonparameter
\usebuttonstyleandcolor}
+\setupfield
+ [rollbutton]
+ [\c!frame=\v!off,
+ \c!offset=\v!overlay]
+
\def\scrn_rollbutton[#tag][#settings]#text[#reference]%
{\dontleavehmode
\bgroup
- \advance\c_scrn_rollbutton_n_button\plusone
- \advance\c_scrn_rollbutton_n_symbol\plusone
+ \global\advance\c_scrn_rollbutton_n_button\plusone
+ \global\advance\c_scrn_rollbutton_n_symbol\plusone
\iffirstargument
\ifsecondargument
\edef\currentinteractionmenu{#tag}%
@@ -994,21 +1038,18 @@
\else
\let\scrn_rollbutton_symbol\scrn_rollbutton_symbol_b
\fi
- % todo: share symbols, tricky since different dimensions
+ % todo: share symbols, tricky since different dimensions (maybe \unique...)
\definesymbol[rollsymbol:\number\c_scrn_rollbutton_n_symbol:n][\scrn_rollbutton_symbol{n}{#text}]%
\definesymbol[rollsymbol:\number\c_scrn_rollbutton_n_symbol:r][\scrn_rollbutton_symbol{r}{#text}]%
\definesymbol[rollsymbol:\number\c_scrn_rollbutton_n_symbol:d][\scrn_rollbutton_symbol{d}{#text}]%
- \setupfield
- [rollbutton]
- [\c!frame=\v!off,
- \c!offset=\v!overlay,
- \c!clickout={#reference}]%
\definefield
[rollbutton:\number\c_scrn_rollbutton_n_button][push][rollbutton]
[rollsymbol:\number\c_scrn_rollbutton_n_symbol:n,%
rollsymbol:\number\c_scrn_rollbutton_n_symbol:r,%
rollsymbol:\number\c_scrn_rollbutton_n_symbol:d]%
- \fitfield[rollbutton:\number\c_scrn_rollbutton_n_button]%
+ \fitfield
+ [rollbutton:\number\c_scrn_rollbutton_n_button]%
+ [\c!clickout={#reference}]%
\egroup}
\unexpanded\def\scrn_rollbutton_symbol_indeed#getparameter#inheritedframed#setparameter#usestyleandcolor#what#text%
@@ -1023,7 +1064,7 @@
%D We plug into the menu system
\unexpanded\def\scrn_menu_rob_start[#reference]#text\stoprob
- {\starttxt\rollbutton[\currentmenu]{\ignorespaces#text\unskip}[#reference]\stoptxt}
+ {\starttxt\rollbutton[\currentinteractionmenu]{\ignorespaces#text\unskip}[#reference]\stoptxt}
\unexpanded\def\scrn_menu_rob_direct[#reference]#text\\
{\scrn_menu_rob_start[#reference]#text\stoprob}
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 5d0bf9406..b95443a9a 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index c7ffdbd8b..0e8d79426 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-tag.lua b/tex/context/base/mkiv/strc-tag.lua
index f77f766a9..0453640ca 100644
--- a/tex/context/base/mkiv/strc-tag.lua
+++ b/tex/context/base/mkiv/strc-tag.lua
@@ -408,9 +408,9 @@ function tags.stop()
end
local t = stack[stacksize]
if not t then
- -- if trace_tags then
+ if trace_tags then
report_tags("ignoring end tag, previous chain: %s",stacksize > 0 and concat(chain," ",1,stacksize) or "none")
- -- end
+ end
t = unsetvalue
end
texsetattribute(a_tagged,t)
diff --git a/tex/context/base/mkiv/strc-tag.mkiv b/tex/context/base/mkiv/strc-tag.mkiv
index 8530431ed..84e11a632 100644
--- a/tex/context/base/mkiv/strc-tag.mkiv
+++ b/tex/context/base/mkiv/strc-tag.mkiv
@@ -197,38 +197,44 @@
\installsetuponlycommandhandler \??tagging {tagging}
+% it makes no sense to have labels ... maybe some day as a last 'replace' in the export
+% which might be more efficient then ... okay, we now cannot overload but who cares
+
\unexpanded\def\strc_tags_element_start_yes{\dodoubleempty\strc_tags_element_start_yes_indeed}
\unexpanded\def\strc_tags_element_start_nop{\dodoubleempty\strc_tags_element_start_nop_indeed}
\unexpanded\def\strc_tags_element_start_yes_indeed
{\iftrialtypesetting
- \expandafter\strc_tags_element_start_nop_indeed
+ \expandafter\strc_tags_element_start_yes_indeed_nop
\else
\expandafter\strc_tags_element_start_yes_indeed_yes
\fi}
-\unexpanded\def\strc_tags_element_stop
- {\iftrialtypesetting
- \expandafter\strc_tags_element_stop_nop
- \else
- \expandafter\strc_tags_element_stop_yes
- \fi}
-
-% it makes no sense to have labels ... maybe some day as a last 'replace' in the export
-% which might be more efficient then ... okay, we now cannot overload but who cares
+\unexpanded\def\strc_tags_element_start_yes_indeed_nop[#1][#2]%
+ {}
\unexpanded\def\strc_tags_element_start_yes_indeed_yes[#1][#2]%
{\clf_starttag_u{#1}{#2}}
\unexpanded\def\strc_tags_element_stop_yes
- {\clf_stoptag}
+ {\iftrialtypesetting
+ \expandafter\strc_tags_element_stop_yes_indeed_nop
+ \else
+ \expandafter\strc_tags_element_stop_yes_indeed_yes
+ \fi}
-\unexpanded\def\strc_tags_element_start_nop_indeed[#1][#2]%
+\unexpanded\def\strc_tags_element_stop_nop
{}
-\unexpanded\def\strc_tags_element_stop_nop
+\unexpanded\def\strc_tags_element_stop_yes_indeed_nop
{}
+\unexpanded\def\strc_tags_element_stop_yes_indeed_yes
+ {\clf_stoptag}
+
+\let\strc_tags_element_start_nop_indeed\strc_tags_element_start_yes_indeed_nop
+\let\strc_tags_element_stop_nop_indeed \strc_tags_element_stop_yes_indeed_nop
+
\def\strc_tags_report_hyphen#1%
{\writestatus\m!languages{setting #1 to U+00AD}}
diff --git a/tex/context/base/mkiv/supp-box.mkiv b/tex/context/base/mkiv/supp-box.mkiv
index 1ac51f7cc..311b8a520 100644
--- a/tex/context/base/mkiv/supp-box.mkiv
+++ b/tex/context/base/mkiv/supp-box.mkiv
@@ -3002,6 +3002,19 @@
\unexpanded\def\shiftbox{\clf_shiftbox}
+%D This one has been moved from a 2 decade old file. It makes something boxed
+%D sit on the baseline.
+
+\unexpanded\def\linebox
+ {\hpack\bgroup\dowithnextbox
+ {\scratchdimen\dimexpr\dimexpr\htdp\nextbox-\lineheight\relax/2+\dp\strutbox\relax
+ \setbox\nextbox\hpack{\lower\scratchdimen\box\nextbox}%
+ \ht\nextbox\ht\strutbox
+ \dp\nextbox\dp\strutbox
+ \box\nextbox
+ \egroup}
+ \hbox}
+
\protect \endinput
% a bit of test code:
diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml
index bf442c134..d53aebac3 100644
--- a/tex/context/interface/mkiv/context-en.xml
+++ b/tex/context/interface/mkiv/context-en.xml
@@ -1909,6 +1909,17 @@
<cd:content/>
</cd:arguments>
</cd:command>
+ <cd:command file="supp-box.mkiv" level="system" name="linebox">
+ <cd:arguments>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command file="supp-box.mkiv" level="system" name="shiftbox">
+ <cd:arguments>
+ <cd:dimension/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
<cd:command file="supp-box.mkiv" level="system" name="inlinedbox">
<cd:arguments>
<cd:content/>
diff --git a/tex/context/interface/mkiv/i-boxes.xml b/tex/context/interface/mkiv/i-boxes.xml
index dd5c30529..e89be4fd0 100644
--- a/tex/context/interface/mkiv/i-boxes.xml
+++ b/tex/context/interface/mkiv/i-boxes.xml
@@ -246,6 +246,19 @@
</cd:arguments>
</cd:command>
+ <cd:command name="linebox" level="system" file="supp-box.mkiv">
+ <cd:arguments>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="shiftbox" level="system" file="supp-box.mkiv">
+ <cd:arguments>
+ <cd:dimension/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
<cd:command name="inlinedbox" level="system" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
@@ -1128,4 +1141,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 9c45d463f..ddec39373 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index c7a9f2005..a45f8b996 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/modules/mkiv/s-cgj.mkiv b/tex/context/modules/mkiv/s-cgj.mkiv
new file mode 100644
index 000000000..2950a799d
--- /dev/null
+++ b/tex/context/modules/mkiv/s-cgj.mkiv
@@ -0,0 +1,714 @@
+%D \module
+%D [file=s-cgj.mkiv,
+%D version=2018.09.28,
+%D title=Context group style file,
+%D subtitle=CG-journal base style,
+%D author={Adrian Egger, W. Egger, Taco Hoekwater},
+%D date=\currentdate,
+%D copyright={Context Group}]
+
+%D \type {\enablemode[draft]} has to come before loading the style. Maybe some
+%D day I'll make something more official and then some \type {everydraft} or so.
+
+% Fixme and todo ...
+
+\startmodule[cgj]
+
+\definecolor[NoteColor][g=1,r=.25,b=.25]
+\definecolor[WarnColor][r=1,g=.25,b=.25]
+
+\unexpanded\def\todo#1%
+ {\startframedtext[background=color,backgroundcolor=NoteColor]
+ \dontleavehmode\start\bf TODO:\stop~~#1\par
+ \stopframedtext}
+
+\unexpanded\def\fixme#1%
+ {\startframedtext[background=color,backgroundcolor=WarnColor]
+ \dontleavehmode\start\bf FIXME:\stop~~#1\par
+ \stopframedtext }
+
+%D Base set of variables. The actual values are set in the file
+%D CG-journal.
+
+\setvariables
+ [CG-Journal]
+ [Title={Journal},
+ RunningTitle={Journal},
+ SubTitle={From the base set of variables},
+ Version=1.0,
+ NOFColumns=2]
+
+\startmode[onecolumn,fullwidth]
+ \setvariables
+ [CG-Journal]
+ [NOFColumns=1]
+\stopmode
+
+% Fonts setup.
+
+\usetypescriptfile[plex]
+
+\starttypescript [cgj]
+ \definetypeface [cgj] [rm] [serif][ibmplex-light] [default]
+ \definetypeface [cgj] [ss] [sans] [ibmplex-light] [default]
+ \definetypeface [cgj] [mm] [math] [palatino] [default]
+ \definetypeface [cgj] [tt] [mono] [ibmplex] [default][rscale=0.9]
+\stoptypescript
+
+\starttypescript [cgj-light]
+ \definetypeface [cgj-light] [rm] [serif][ibmplex-extralight] [default]
+ \definetypeface [cgj-light] [ss] [sans] [ibmplex-extralight] [default]
+ \definetypeface [cgj-light] [mm] [math] [palatino] [default]
+ \definetypeface [cgj-light] [tt] [mono] [ibmplex-extralight] [default][rscale=0.9]
+\stoptypescript
+
+\starttypescript [cgj-extralight]
+ \definetypeface [cgj-extralight] [rm] [serif][ibmplex-thin] [default]
+ \definetypeface [cgj-extralight] [ss] [sans] [ibmplex-thin] [default]
+ \definetypeface [cgj-extralight] [mm] [math] [palatino] [default]
+ \definetypeface [cgj-extralight] [tt] [mono] [ibmplex-thin] [default][rscale=0.9]
+\stoptypescript
+
+\usebodyfont
+ [cgj-light,cgj-extralight]
+
+\setupbodyfont
+ [cgj,ss,10pt]
+
+\definebodyfontenvironment[10pt][interlinespace=13pt]
+\definebodyfontenvironment[12pt][interlinespace=16pt]
+\definebodyfontenvironment[16pt][interlinespace=20pt]
+
+\setupinterlinespace
+ [line=13pt]
+
+\let\sl\it
+
+%D Path to the logos
+
+\setupexternalfigures
+ [directory=./Logos,
+ location={global,local,default}]
+
+%D Logos: black logo only.
+
+\useexternalfigure
+ [Logo]
+ [cg_corp_logo_loop_black_cmyk]
+ [width=30mm,
+ height=19mm]
+
+%D Black logo with text
+
+\useexternalfigure
+ [LogoText]
+ [cg_corp_logo_text_black_cmyk]
+ [width=50mm,
+ height=35.2mm]
+
+%D Colors
+
+\definecolor[CGlightblue][c=1,m=.15,y=0,k=0]
+\definecolor[CGdeepblue] [c=1,m=.8,y=0,k=.3]
+\definecolor[CGgray] [c=0,m=0,y=0,k=.1]
+
+%D Article styles
+
+\definealternativestyle
+ [Articleheading]
+ [{\switchtobodyfont[16pt,ss]\bf}]
+
+\definealternativestyle
+ [Articlesubheading]
+ [{\switchtobodyfont[16pt,ss]\tf}]
+
+\definealternativestyle
+ [Authorname]
+ [{\switchtobodyfont[12pt,ss]\it}]
+
+\definealternativestyle
+ [Sectionheading]
+ [{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=12pt]}]
+
+\definealternativestyle
+ [Subsectionheading]
+ [{\switchtobodyfont[cgj-light,10pt,ss]\bf\setupinterlinespace[line=10pt]}]
+
+\definealternativestyle
+ [IntroCopy]
+ [{\switchtobodyfont[12pt,ss]\tf}]
+
+\definealternativestyle
+ [PagenumberStyle]
+ [{\switchtobodyfont[cgj-light,10pt,ss]\bf}]
+
+%D Headerstyles:Breadcrumbs
+
+\definealternativestyle
+ [BreadcrumbMd]
+ [{\switchtobodyfont[cgj-light,10pt,ss]\bf}]
+
+\definealternativestyle
+ [BreadcrumbRg]
+ [{\switchtobodyfont[cgj,10pt,ss]}]
+
+\definealternativestyle
+ [BreadcrumbLt]
+ [{\switchtobodyfont[10pt,ss]\tf}]
+
+\definealternativestyle
+ [BreadcrumbTh]
+ [{\switchtobodyfont[cgj-light,10pt,ss]\tf}]
+
+%D Captionstyles
+
+\definealternativestyle
+ [Captionheading]
+ [{\switchtobodyfont[8pt,ss]\bf\setupinterlinespace[line=8pt]}]
+
+\definealternativestyle
+ [Captiontext]
+ [{\switchtobodyfont[8pt,ss]\tf\setupinterlinespace[line=8pt]}]
+
+%D Article signature
+
+\definealternativestyle
+ [Signaturestyle]
+ [{\switchtobodyfont[10pt,ss]\it}]
+
+%D Article footnotes
+
+\definealternativestyle
+ [Articlefootnotes]
+ [{\switchtobodyfont[8pt,ss]\tf}]
+
+%D Index and TOC styles
+
+\definealternativestyle
+ [IndexContents]
+ [{\switchtobodyfont[16pt,ss]\bf\setupinterlinespace[line=18pt]}]
+
+\definealternativestyle
+ [IndexArticleTitle]
+ [{\switchtobodyfont[12pt,ss]\tf\setupinterlinespace[line=20pt]}]
+
+\definealternativestyle
+ [IndexNumber]
+ [{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=20pt]}]
+
+\definealternativestyle
+ [IndexAuthor]
+ [{\switchtobodyfont[12pt,ss]\it\setupinterlinespace[line=20pt]}]
+
+%D Math: still missing.
+
+%D Verbatim
+
+\definealternativestyle
+ [DisplayMonospaced]
+ [\tt]
+
+\definealternativestyle
+ [DisplayMonospacedX]
+ [{\switchtobodyfont[8pt,tt]}]
+
+\definealternativestyle
+ [DisplayMonospacedS]
+ [{\switchtobodyfont[9pt,tt]\setupinterlinespace[line=10pt]}]
+
+%D Blank adjustment
+
+\defineblank[CGblank] [6pt]
+\defineblank[BigCGblank] [24pt]
+\defineblank[MediumCGblank][12pt]
+
+%D Paper definition
+
+\definepapersize
+ [Journal]
+ [width=210mm,
+ height=266mm]
+
+\setuppapersize
+ [Journal]
+ [Journal]
+
+%D General layout
+
+\definelayout
+ [General]
+ [topspace=18mm,
+ backspace=28mm,
+ header=5mm,
+ headerdistance=7mm,
+ footer=5mm,
+ footerdistance=5mm,
+ width=157mm,
+ height=224mm,
+ marking=on]
+
+\definelayout
+ [Content]
+ [topspace=18mm,
+ backspace=28mm,
+ header=5mm,
+ headerdistance=7mm,
+ footer=0mm,
+ footerdistance=0mm,
+ width=157mm,
+ height=224mm,
+ margindistance=4mm,
+ rightmargin=21mm,
+ leftmargin=21mm,
+ marking=on]
+
+\definelayout
+ [Imprint]
+ [topspace=18mm,
+ backspace=28mm,
+ header=5mm,
+ headerdistance=7mm,
+ footer=5mm,
+ footerdistance=5mm,
+ width=107mm,
+ height=224mm,
+ margindistance=4mm,
+ rightmargin=45.3mm,
+ leftmargin=21mm,
+ marking=on]
+
+\definelayout
+ [SingleColumn]
+ [topspace=18mm,
+ backspace=55mm,
+ header=5mm,
+ headerdistance=7mm,
+ footer=5mm,
+ footerdistance=5mm,
+ width=130mm,
+ height=224mm,
+ margindistance=4mm,
+ leftmargin=48mm,
+ rightmargin=21mm,
+ marking=on]
+
+%D Pagenumbering: Pagenumber is set in the footer
+
+\setuppagenumbering
+ [location=,
+ alternative=doublesided]
+
+%D Head-definitions
+
+\setuphead
+ [title]
+ [style=Articleheading,
+ after={\blank[BigCGblank]},
+ page=yes]
+
+\setuphead
+ [part]
+ [placehead=no,
+ after=,
+ before=,
+ page=no,
+ numbercommand=,
+ expansion=yes]
+
+\setuphead
+ [section]
+ [style=Sectionheading,
+ before={\blank[BigCGblank]},
+ after={\blank[CGblank]},
+ sectionstopper={.},
+ distance=4pt,
+ align={flushleft,nothyphenated},
+ resetnumber=yes,
+ continue=yes]
+
+\setuphead
+ [subsection]
+ [style=Subsectionheading,
+ before={\blank[CGblank]},
+ after={\blank[CGblank]},
+ sectionstopper=,
+ distance=4pt,
+ align={flushleft,nothyphenated},
+ resetnumber=yes,
+ continue=yes]
+
+\setuphead
+ [subject]
+ [style=Sectionheading,
+ before={\blank[BigCGblank]},
+ after=]
+
+\setuphead
+ [subsubject]
+ [style=Subsectionheading,
+ before={\blank[CGblank]},
+ after={\blank[CGblank]},
+ sectionstopper=]
+
+%D A special head for the footnote section in multicolumn mode excuse the low-level
+%D rule, I wanted it to look like the start of footnotes in single column mode. (TH)
+
+\definehead
+ [footnotesubject]
+ [subject]
+
+\setuphead
+ [footnotesubject]
+ [style=Sectionheading,
+ before={\kern -13pt},
+ after={\smash{\lower 13pt\hbox{\vrule width 2.5cm height 1pt depth 0pt}}}]
+
+
+%D The setup of the columns is done at the moment columns are started (see end
+%D of file)
+
+%D Index/TOC page setups
+
+\definelistalternative
+ [CGJ:Index]
+ [renderingsetup=CGJ:Indexheading]
+
+\definelistalternative
+ [CGJ:Index:Chapter]
+ [renderingsetup=CGJ:Indexheading:Chapter]
+
+\startsetups[CGJ:Indexheading:Chapter]
+ \listparameter{before}
+ \vbox \listboxproperties{all} {
+ \forgetall
+ \dontleavehmode
+ \listrenderingsynchronize
+ \hbox to 15mm{
+ \bgroup
+ \useliststyleandcolor{numberstyle}{numbercolor}
+ \currentlistentrypagenumber
+ \egroup}
+ \bgroup
+ \useliststyleandcolor{textstyle}{textcolor}
+ \smash{\currentlistentrytitle}%
+ \egroup
+ }
+ \par
+ \listparameter{after}
+\stopsetups
+
+\startsetups[CGJ:Indexheading]
+ \listparameter{before}
+ \vbox \listboxproperties{all} {
+ \forgetall
+ \dontleavehmode
+ \listrenderingsynchronize
+ \hbox to 15mm{
+ \bgroup
+ \useliststyleandcolor{numberstyle}{numbercolor}
+ \currentlistentrypagenumber
+ \egroup}
+ \bgroup
+ \useliststyleandcolor{textstyle}{textcolor}
+ \currentlistentrytitle
+ \egroup
+ \par
+ }
+ \par
+ \listparameter{after}
+\stopsetups
+
+\setuplist
+ [part]
+ [before={\blank[CGblank]},
+ after=,
+ style=IndexContents,
+ numberstyle=\IndexNumber,
+ textstyle=\IndexArticleTitle,
+ prefix=no,
+ alternative=CGJ:Index:Chapter]
+
+%D Captions
+
+\setupcaptions
+ [suffix={.},
+ headstyle=\Captionheading,
+ style=\Captiontext,
+ distance=6pt]
+
+\setupcaption[figure][way=bypart]
+\setupcaption[table] [way=bypart]
+
+%D Datacollection: article parameters (other fields and defaults)
+
+\unexpanded\def\CGJBibData[#1]%
+ {\getparameters
+ [CGJ]
+ [SubTitle=,
+ RunningAuthor=,
+ RunningTitle=Example,
+ Email=,
+ Address=,
+ Page=1,
+ Title={My Article},
+ Author={Example Author},
+ Period=,
+ Number=,
+ Year=,
+ TocAuthor=,
+ TocTitle=,
+ #1]%
+ \doifnothing
+ {\CGJRunningTitle}
+ {\let\CGJRunningTitle\CGJTitle}%
+ \doifnothing
+ {\CGJRunningAuthor}
+ {\let\CGJRunningAuthor\CGJAuthor}%
+ \doifnothing
+ {\CGJTocAuthor}
+ {\let\CGJTocAuthor\CGJAuthor}%
+ \doifnothing
+ {\CGJTocTitle}
+ {\let\CGJTocTitle\CGJTitle}%
+ \setvariables
+ [CGJToc]
+ [Author=\CGJTocAuthor,
+ Title=\CGJTocTitle]% for TOC
+ }
+
+\unexpanded\def\dostartArticle[#1]
+ {\CGJBibData[#1]
+ \doifelse
+ {\getvariable{CG-Journal}{NOFColumns}}
+ {1}
+ {\doifmodeelse{fullwidth}
+ {\setuplayout[General]}
+ {\setuplayout[SingleColumn]}}
+ {\setupnotes[location=none]
+ \setuplayout[General]}%
+ \bgroup
+ {\switchtobodyfont[16pt]\Articleheading\CGJTitle\par}
+ {\doifsomething{\CGJSubTitle}
+ {\switchtobodyfont[16pt]\Articlesubheading\CGJSubTitle\par}}
+ {\doifsomething{\CGJAuthor}
+ {\switchtobodyfont[12pt]\Authorname \CGJAuthor}\par}
+ \part
+ {\getvariable{CGJToc}{Title}%
+ \doifsomething{\getvariable{CGJToc}{Author}}{ \emdash\ }%
+ \IndexAuthor\getvariable{CGJToc}{Author}}
+ \godown[13pt]%
+ \egroup
+ \par
+ \hyphenpenalty1000\relax}
+
+\unexpanded\def\startArticle
+ {\dosingleempty\dostartArticle}
+
+\def\signArticle
+ {}
+
+%D In multicolumn mode, footnotes come are at the end of the article:
+
+\startsetups article:after
+ \startfootnotesubject[title=]
+ \placefootnotes
+ \stopfootnotesubject
+\stopsetups
+
+\unexpanded\def\stopArticle
+ {\doifelse{\getvariable{CG-Journal}{NOFColumns}}{1}
+ {\par
+ \signArticle}
+ {\setups{article:after}
+ \par
+ \signArticle
+ \stoppagecolumns}
+ \page}
+
+\unexpanded\def\startAbstract
+ {\bgroup
+ \switchtobodyfont[12pt]
+ \IntroCopy}
+
+\unexpanded\def\stopAbstract
+ {\par
+ \egroup
+ \finishAbstract}
+
+\unexpanded\def\finishAbstract
+ {\doifelse {\getvariable{CG-Journal}{NOFColumns}} {1}
+ {\blank[BigCGblank]}
+ {\vbox{\blank[BigCGblank]}%
+ \par
+ \startpagecolumns[balance=yes,distance=12pt,page=no,n=\getvariable{CG-Journal}{NOFColumns}]
+ \setupitemgroup[itemize][packed]
+ \setuplayout[grid=yes]} % grid mode only in columns
+ }
+
+
+\unexpanded\def\noAbstract
+ {\kern -24pt
+ \finishAbstract}
+
+%D Headertexts
+
+\startsetups[Header:texts]
+ \setupheadertexts
+ [] [{{\BreadcrumbLt\CGJRunningTitle}{\BreadcrumbTh\doifsomething{\CGJRunningAuthor}{\ > }\CGJRunningAuthor}}] %odd
+ [{\BreadcrumbMd contextgroup}{\BreadcrumbRg\ > \getvariable{CG-Journal}{RunningTitle}}] [] %even
+\stopsetups
+
+%D Footertexts
+
+\startsetups[Footer:texts]
+ \setupfootertexts
+ [] [\PagenumberStyle\pagenumber]
+ [\PagenumberStyle\pagenumber] []
+\stopsetups
+
+%D Setup tolerance, stretch.
+
+\setuptolerance
+ [tolerant,stretch]
+
+%D Setting up footnotes.
+
+\setupnotation
+ [footnote]
+ [way=bypart,
+ rule=on]
+
+%D Adjustments to the container containing the footnotes.
+
+\setupnote
+ [footnote]
+ [frame=off,
+ topframe=off ,
+ framecolor=black,
+ background=,
+ rulecolor=black, %% the line above the inserts
+ rulethickness=1pt,
+ next={ },
+ split=verystrict,
+ scope=page,
+ style=Articlefootnotes]
+
+\doifmodeelse {draft} {\setupnote[footnote][frame=on]}
+
+% Setup typing.
+
+\setupnarrower
+ [middle=3mm,
+ left=5mm]
+
+\definetextbackground
+ [verbatim]
+ [frame=off,
+ background=color,
+ backgroundcolor=CGgray,
+ leftoffset=2mm,rightoffset=2mm,
+ topoffset=2mm,bottomoffset=2mm,
+ location=paragraph,
+ align=flushleft]
+
+\doifmodeelse {draft} {\definetextbackground[verbatim][frame=on]}
+
+\definetextbackground
+ [verbatimitem]
+ [verbatim]
+
+\setuptextbackground
+ [verbatimitem]
+ [before=,
+ after=,
+ width=\the\dimexpr\hsize-10.5mm\relax]
+
+\startsetups typing:before
+ \blank[MediumCGblank]
+ \starttextbackground[verbatim]
+\stopsetups
+
+\startsetups typing:before:small
+ \blank[MediumCGblank]
+ \starttextbackground[verbatim]
+\stopsetups
+
+\startsetups typing:after
+ \stoptextbackground
+ \blank[MediumCGblank]
+\stopsetups
+
+\startsetups typing:before:item
+ \starttextbackground[verbatimitem]
+\stopsetups
+
+\startsetups typing:after:item
+ \stoptextbackground
+\stopsetups
+
+\setuptyping
+ [typing]
+ [style=DisplayMonospaced,
+ before=\setups{typing:before},
+ after=\setups{typing:after}]
+
+\setuptype
+ [style=DisplayMonospaced]
+
+%D When verbatim becomes too large:
+
+\definetyping
+ [smalltyping]
+
+\setuptyping
+ [smalltyping]
+ [style=DisplayMonospacedX,
+ before=\setups{typing:before:small},
+ after=\setups{typing:after}]
+
+\unexpanded\def\smalltypefile{\typefile[smalltyping][]}
+
+%D Bullet lists.
+
+\setupitemgroup
+ [itemize]
+ [each]
+ []
+ [symbol=1,
+ indentnext=no,
+ align=right,
+ before={\blank[MediumCGblank]\startnarrower[left]},
+ after={\stopnarrower\blank[MediumCGblank]},
+ inbetween={\blank[CGblank]}]
+
+\definedescription
+ [description]
+ [location=hanging,
+ width=broad,
+ before={\blank},
+ after={\blank}]
+
+\setupformula
+ [align=flushleft,
+ margin=5mm]
+
+\setupquotation
+ [before={\blank[CGblank]\switchtobodyfont[10pt]},
+ after={\blank[CGblank]}]
+
+\setupwhitespace
+ [medium]
+
+\usemodule[abr-02,abr-03,abr-04]
+
+\unexpanded\def\Href#1{\underbar{\hyphenatedurl{#1}}}
+\unexpanded\def\CG {\ConTeXt\ group}
+
+\setnewconstant\kindofpagetextareas\plusone % partial page. HH: low level, no high level switch (yet)
+
+%D There is a draft mode, which enables all frames:
+
+\doifmode {draft} {\showframe}
+
+\stopmodule
+
diff --git a/tex/context/modules/mkiv/s-present-dark.mkiv b/tex/context/modules/mkiv/s-present-dark.mkiv
new file mode 100644
index 000000000..a3b6f6e14
--- /dev/null
+++ b/tex/context/modules/mkiv/s-present-dark.mkiv
@@ -0,0 +1,357 @@
+%D \module
+%D [ file=s-present-dark, % tug-2001
+%D version=2018.09.25, % 2000.*.*
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment Dark,
+%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.
+
+\startmodule[present-dark]
+
+%D The original document dates from 2000 and was meant for a presentation at \TUG\
+%D 2001. It used widgets and in particular check fields and push buttons.
+%D \JAVASCRIPT\ was used to show or hide them when rolling over, and appearances
+%D changed in a subtle way. It actually worked quite well at that time.
+%D
+%D However, over time these widgets proved to be sort of unstable. For instance we
+%D used the parent|-|child model of which (inheritance and appearance) behaviour
+%D changed over time. We're talking of a few decades ago when \TEX\ was one of the
+%D few (maybe only) tools that could actually support everything that the manual
+%D introduced: the \quote {standard} seemed to be ahead of the viewer. Anyway, we
+%D adapted but it meant that old document in principle were not always future proof.
+%D
+%D We used in this document a push button in the background of the menu so that it
+%D could become visible when rolled over. There were no layers in \PDF\ at that
+%D time! Nowadays such a trick doesn't work well because of the way a viewer
+%D intercepts regions. One gets kind of erratic behaviour when applying \JAVASCRIPT.
+%D
+%D I spent quite some time to test if we could still do the same without side
+%D effects and in the process also noticed that some functionality in \JAVASCRIPT\
+%D seems broken (or changed due to maybe security issues). So, in the end I decided
+%D to simplify the approach and use layers to pop up the menu when the mouse goes
+%D over it but no longer hide it when the mouse leaves that area. It just doesn't
+%D work too well otherwise.
+
+%D We start with the layout. We basically have three areas: edge, margin and text.
+%D Each are more or less the same width.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [backspace=380pt,
+ topspace=20pt,
+ leftedge=100pt,
+ leftedgedistance=10pt,
+ leftmargin=230pt,
+ leftmargindistance=20pt,
+ header=0pt,
+ footer=0pt,
+ width=200pt,
+ backspace=360pt,
+ width=220pt,
+ leftmargin=210pt,
+ height=middle]
+
+%D The bodyfont is the Latin Modern Variable (of course at that time we used
+%D the Computer Modern predecessors). We still apply protrusion and expansion.
+%D The new \quotation {Modern Latin} look also works ok on screen.
+
+\definefontfeature
+ [default]
+ [default]
+ [expansion=pure,
+ protrusion=pure]
+
+\setupalign
+ [verytolerant,stretch,hanging] % space
+
+\setupbodyfont
+ [modernvariable,11pt]
+
+% \setupbodyfont
+% [modernlatin,11pt]
+
+\setupinmargin
+ [style=,
+ color=]
+
+%D We use some predefined \JAVASCRIPT\ functions. These are rather old helpers.
+%D Normally only the libraries (sets of functions) that are used will be
+%D embedded.
+
+\useJSscripts[fld]
+\useJSscripts[nav]
+
+%D The remarks that will pop up. By default they are not visible. Clicking
+%D on the page (or menu item) will show them step by step.
+
+\newcounter\bofremarks
+\newcounter\nofremarks
+
+\setupfield
+ [remark]
+ [offset=overlay,
+ option={readonly,hidden},
+ color=,
+ style=,
+ frame=off]
+
+\defineframed
+ [remarkable]
+ [frame=off,
+ backgroundcolor=white,
+ background=RollBackground]
+
+\starttexdefinition unexpanded remark #1#2
+
+ \doglobal\increment\nofremarks
+
+ \definesymbol
+ [remark:x:\nofremarks]
+ [\remarkable{#1}]
+
+ \definesymbol
+ [remark:y:\nofremarks]
+ [\remarkable{#2}]
+
+ \definefield
+ [remark:x:\nofremarks][check][remark]
+ [remark:x:\nofremarks]
+ [remark:x:\nofremarks]
+
+ \definefield
+ [remark:y:\nofremarks][check][remark]
+ [remark:y:\nofremarks]
+ [remark:y:\nofremarks]
+
+ \inleft
+ [scope=local]
+ {
+ \hpack to \hsize {
+ \hss
+ \linebox {
+ \fitfield[remark:y:\nofremarks]
+ }
+ }
+ }
+
+ \bgroup
+
+ \setbox\scratchbox\hbox {
+ #1
+ }
+
+ \hpack to \wd\scratchbox {
+ \wd\scratchbox\zeropoint
+ \box\scratchbox
+ \hss
+ \linebox {
+ \fitfield[remark:x:\nofremarks]
+ }
+ \hss
+ }
+
+ \egroup
+
+\stoptexdefinition
+
+%D We use lots of backgrounds. The \METAPOST\ graphics are a bit overkill
+%D but we keep them.
+
+\setupbackgrounds
+ [text]
+ [background=StepFields]
+
+\defineoverlay
+ [StepFields]
+ [\directsetup{syncrefs}\overlaybutton{ShowRemark}]
+
+\setupbackgrounds
+ [page]
+ [background=PageBackground]
+
+%D Just look in \type {java-imp-fld.mkiv} how \type {HideFields} and
+%D alike are defined. They are defined references to \JAVASCRIPT\ calls.
+
+\setupinteraction
+ [state=start,
+ click=no,
+ menu=on,
+ style=,
+ color=,
+ frame=off,
+ contrastcolor=]
+
+\setupinteractionscreen
+ [option=max]
+
+\setupbackgrounds
+ [paper]
+ [background=color,
+ backgroundcolor=black]
+
+\defineoverlay
+ [PageBackground]
+ [\useMPgraphic{PageBackground}]
+
+\startuseMPgraphic{PageBackground}
+ StartPage ;
+ numeric w ; w := 1.25 * PaperWidth ;
+ numeric n ; n := 2.50 * PageNumber ;
+ numeric d ; d := (1 + (PageNumber-1)/5) * 5pt ;
+ fill Page
+ withcolor black ;
+ for i=1 upto 500 :
+ draw
+ center Page
+ randomized w
+ rotatedaround(center Page,n)
+ withpen pencircle
+ scaled (uniformdeviate d)
+ withcolor
+ (yellow randomized (.3,.8))
+ ;
+ endfor ;
+ StopPage ;
+\stopuseMPgraphic
+
+\defineoverlay
+ [TextBackground]
+ [\uniqueMPgraphic{TextBackground}]
+
+\startuniqueMPgraphic{TextBackground}
+ fill
+ OverlayBox
+ withcolor black ;
+ draw
+ OverlayBox
+ withpen pencircle scaled 1pt
+ withcolor OverlayColor ;
+\stopuniqueMPgraphic
+
+\defineoverlay
+ [RollBackground]
+ [\uniqueMPgraphic{RollBackground}]
+
+\startuniqueMPgraphic{RollBackground}
+ fill
+ OverlayBox
+ withcolor black ;
+ draw
+ OverlayBox
+ withpen pencircle scaled 1pt
+ withcolor OverlayColor ;
+\stopuniqueMPgraphic
+
+\setupinteractionmenu
+ [left]
+ [state=start,
+ width=\leftedgewidth,
+ frame=on,
+ framecolor=white,
+ rulethickness=1pt,
+ foregroundcolor=white,
+ background=RollBackground]
+
+\startsetups syncrefs
+ \normalexpanded {
+ \definereference
+ [ShowRemark]
+ [StepFields{remark:x,\bofremarks,\nofremarks},
+ StepFields{remark:y,\bofremarks,\nofremarks}]
+ }
+\stopsetups
+
+%D The menu buttons used to be rollover buttons but are now normal simple
+%D ones (more predictable).
+
+\defineviewerlayer
+ [buttons]
+
+\startinteractionmenu[left]
+ \vfill
+ \directsetup{syncrefs}
+ \startviewerlayer[buttons]
+ \startbut [previouspage,HideFields] Previous \stopbut
+ \startbut [nextpage,HideFields] Next \stopbut
+ \startbut [ShowRemark] Remark \stopbut
+ \startbut [HideFields] Reset \stopbut
+ \startbut [CloseDocument,HideFields] Quit \stopbut
+ \stopviewerlayer
+\stopinteractionmenu
+
+\setupinteraction
+ [closeaction=ForgetChanges,
+ openpageaction={HideFields,HideLayer{buttons}},
+ closepageaction={HideFields,HideLayer{buttons}}]
+
+\defineoverlay
+ [ShowMenu]
+ [\overlayrollbutton{VideLayer{buttons}}{}]
+
+\setupbackgrounds
+ [text][leftedge]
+ [backgroundoffset=10pt,
+ background=ShowMenu]
+
+%D The environment has been adapted a bit. Instead of taking two
+%D arguments we now use a key|-|value approach. The remark is shown
+%D when one rolls over the title (author).
+
+\defineframedtext
+ [MainText]
+ [frame=off,
+ offset=10pt,
+ width=\textwidth,
+ before=,
+ after=,
+ color=,
+ foregroundcolor=white,
+ background=TextBackground,
+ backgroundcolor=white]
+
+\starttexdefinition unexpanded StartIdea
+ \dosingleempty{\texdefinition{StartIdeaIndeed}}
+\stoptexdefinition
+
+\starttexdefinition StartIdeaIndeed [#1]
+ \let\bofremarks\nofremarks
+ \increment\bofremarks
+ \startstandardmakeup
+ \setvariables[Idea][#1]
+ \startMainText
+ \setupalign[verytolerant,stretch,hanging]
+\stoptexdefinition
+
+\starttexdefinition unexpanded StopIdea
+ \doifvariable {Idea} {text} {
+ \blank
+ \rightaligned {
+ \doifelsevariable {Idea} {remark} {
+ \tooltip
+ [left]
+ {\getvariable{Idea}{title}}
+ {\getvariable{Idea}{remark}}
+ } {
+ \getvariable{Idea}{title}
+ }
+ }
+ }
+ \stopMainText
+ \vfill
+ \stopstandardmakeup
+\stoptexdefinition
+
+\stopmodule
+
+\continueifinputfile{s-present-dark.mkiv}
+
+\usemodule[present-common]
+
+\inputpresentationfile{tug/2001/tug-2001-ideas.tex}
diff --git a/tex/context/sample/common/aesop-de.tex b/tex/context/sample/third/aesop-de.tex
index 80a41f295..80a41f295 100644
--- a/tex/context/sample/common/aesop-de.tex
+++ b/tex/context/sample/third/aesop-de.tex
diff --git a/tex/context/sample/common/cervantes-es.tex b/tex/context/sample/third/cervantes-es.tex
index 153797023..153797023 100644
--- a/tex/context/sample/common/cervantes-es.tex
+++ b/tex/context/sample/third/cervantes-es.tex
diff --git a/tex/context/sample/common/khatt-ar.tex b/tex/context/sample/third/khatt-ar.tex
index c91426411..c91426411 100644
--- a/tex/context/sample/common/khatt-ar.tex
+++ b/tex/context/sample/third/khatt-ar.tex
diff --git a/tex/context/sample/common/khatt-en.tex b/tex/context/sample/third/khatt-en.tex
index 52891af25..52891af25 100644
--- a/tex/context/sample/common/khatt-en.tex
+++ b/tex/context/sample/third/khatt-en.tex
diff --git a/tex/context/sample/common/quevedo-es.tex b/tex/context/sample/third/quevedo-es.tex
index 166b0328f..166b0328f 100644
--- a/tex/context/sample/common/quevedo-es.tex
+++ b/tex/context/sample/third/quevedo-es.tex
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 45caa3ee4..ba46a517f 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 09/26/18 14:26:41
+-- merge date : 09/30/18 19:32:19
do -- begin closure to overcome local limits and interference
@@ -10968,12 +10968,16 @@ function mappings.addtounicode(data,filename,checklookups,forceligatures)
missing[du]=true
nofmissing=nofmissing+1
end
+ else
end
end
else
local overload=overloads[du]
if overload then
glyph.unicode=overload.unicode
+ elseif not glyph.unicode then
+ missing[du]=true
+ nofmissing=nofmissing+1
end
end
end
@@ -13522,6 +13526,7 @@ local languages=allocate {
["kiu" ]="kirmanjki",
["kjd" ]="southern kiwai",
["kjp" ]="eastern pwo karen",
+ ["kjz" ]="bumthangkha",
["kkn" ]="kokni",
["klm" ]="kalmyk",
["kmb" ]="kamba",
@@ -13610,6 +13615,7 @@ local languages=allocate {
["mdr" ]="mandar",
["men" ]="me'en",
["mer" ]="meru",
+ ["mfa" ]="pattani malay",
["mfe" ]="morisyen",
["min" ]="minangkabau",
["miz" ]="mizo",
@@ -13807,6 +13813,7 @@ local languages=allocate {
["tpi" ]="tok pisin",
["trk" ]="turkish",
["tsg" ]="tsonga",
+ ["tsj" ]="tshangla",
["tua" ]="turoyo aramaic",
["tul" ]="tulu",
["tuv" ]="tuvin",
@@ -13837,6 +13844,7 @@ local languages=allocate {
["xbd" ]="lü",
["xhs" ]="xhosa",
["xjb" ]="minjangbal",
+ ["xkf" ]="khengkha",
["xog" ]="soga",
["xpe" ]="kpelle (liberia)",
["yak" ]="sakha",
@@ -18131,7 +18139,7 @@ function gsubhandlers.single(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofg
local delta=readshort(f)
local coverage=readcoverage(f,tableoffset+coverage)
for index in next,coverage do
- local newindex=index+delta
+ local newindex=(index+delta)%65536
if index>nofglyphs or newindex>nofglyphs then
report("invalid index in %s format %i: %i -> %i (max %i)","single",subtype,index,newindex,nofglyphs)
coverage[index]=nil
@@ -22592,7 +22600,7 @@ local trace_defining=false registertracker("fonts.defining",function(v) trace_de
local report_otf=logs.reporter("fonts","otf loading")
local fonts=fonts
local otf=fonts.handlers.otf
-otf.version=3.104
+otf.version=3.105
otf.cache=containers.define("fonts","otl",otf.version,true)
otf.svgcache=containers.define("fonts","svg",otf.version,true)
otf.sbixcache=containers.define("fonts","sbix",otf.version,true)