summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-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/colo-grp.mkiv4
-rw-r--r--tex/context/base/mkiv/colo-ini.mkiv8
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv5
-rw-r--r--tex/context/base/mkiv/file-mod.mkvi2
-rw-r--r--tex/context/base/mkiv/font-tra.mkiv26
-rw-r--r--tex/context/base/mkiv/grph-inc.mkiv3
-rw-r--r--tex/context/base/mkiv/lang-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/mult-sys.mkiv48
-rw-r--r--tex/context/base/mkiv/page-grd.mkiv106
-rw-r--r--tex/context/base/mkiv/page-lay.mkiv18
-rw-r--r--tex/context/base/mkiv/page-run.lua188
-rw-r--r--tex/context/base/mkiv/page-run.mkiv285
-rw-r--r--tex/context/base/mkiv/publ-ini.mkiv9
-rw-r--r--tex/context/base/mkiv/publ-tra.mkiv28
-rw-r--r--tex/context/base/mkiv/spac-ali.mkiv5
-rw-r--r--tex/context/base/mkiv/spac-ver.mkiv2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25745 -> 25732 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin426112 -> 426110 bytes
-rw-r--r--tex/context/base/mkiv/strc-ref.mkvi16
-rw-r--r--tex/context/base/mkiv/supp-box.lua6
-rw-r--r--tex/context/base/mkiv/supp-box.mkiv4
-rw-r--r--tex/context/base/mkiv/supp-vis.mkiv2
-rw-r--r--tex/context/base/mkiv/symb-ini.mkiv2
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin818633 -> 818489 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60765 -> 60765 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
29 files changed, 364 insertions, 415 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 3342dd419..379974c0d 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{2017.10.05 22:40}
+\newcontextversion{2017.10.06 23:21}
%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 643685639..6edac4011 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{2017.10.05 22:40}
+\edef\contextversion{2017.10.06 23:21}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/colo-grp.mkiv b/tex/context/base/mkiv/colo-grp.mkiv
index e296bbc33..fddf65c79 100644
--- a/tex/context/base/mkiv/colo-grp.mkiv
+++ b/tex/context/base/mkiv/colo-grp.mkiv
@@ -104,7 +104,7 @@
%D
%D \showsetup{showcolorgroup}
-\fetchruntimecommand \showcolorgroup {\f!colorprefix\s!run}
+\fetchruntimecommand \showcolorgroup \f!colo_run
%D There are ten predefined color groups, like
%D \color[green]{\em groen}, \color[red]{\em rood},
@@ -163,6 +163,6 @@
%D
%D \showsetup{comparecolorgroup}
-\fetchruntimecommand \comparecolorgroup {\f!colorprefix\s!run}
+\fetchruntimecommand \comparecolorgroup \f!colo_run
\protect \endinput
diff --git a/tex/context/base/mkiv/colo-ini.mkiv b/tex/context/base/mkiv/colo-ini.mkiv
index 34b43a947..5d6046904 100644
--- a/tex/context/base/mkiv/colo-ini.mkiv
+++ b/tex/context/base/mkiv/colo-ini.mkiv
@@ -623,7 +623,7 @@
%D
%D \showsetup{showpalet}
-\fetchruntimecommand \showpalet {\f!colorprefix\s!run}
+\fetchruntimecommand \showpalet \f!colo_run
%D \macros
%D {showcolorcomponents}
@@ -632,7 +632,7 @@
%D \showcolorcomponents[color-1,color-2]
%D \stoptyping
-\fetchruntimecommand \showcolorcomponents {\f!colorprefix\s!run}
+\fetchruntimecommand \showcolorcomponents \f!colo_run
%D \macros
%D {comparepalet}
@@ -655,7 +655,7 @@
%D
%D \showsetup{comparepalet}
-\fetchruntimecommand \comparepalet {\f!colorprefix\s!run}
+\fetchruntimecommand \comparepalet \f!colo_run
%D \macros
%D {showcolor}
@@ -671,7 +671,7 @@
%D
%D \showsetup{showcolor}
-\fetchruntimecommand \showcolor {\f!colorprefix\s!run}
+\fetchruntimecommand \showcolor \f!colo_run
%D It would make sense to put the following code in \type
%D {colo-mps}, but it it rather low level.
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 34dc68343..b6e4ff5fe 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{2017.10.05 22:40}
+\newcontextversion{2017.10.06 23:21}
%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 6e1911cca..0b49db31a 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -41,7 +41,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2017.10.05 22:40}
+\edef\contextversion{2017.10.06 23:21}
\edef\contextkind {beta}
%D For those who want to use this:
@@ -305,7 +305,6 @@
\loadmarkfile{page-brk}
\loadmarkfile{page-col}
\loadmarkfile{page-inf}
-\loadmarkfile{page-grd}
\loadmarkfile{page-flt}
\loadmarkfile{page-bck}
\loadmarkfile{page-not}
@@ -498,7 +497,7 @@
\loadmarkfile{typo-scr}
\loadmarkfile{phys-dim}
-\loadmarkfile{node-rul} % beware, defined \underbar so after math
+\loadmarkfile{node-rul} % beware, defined \underbar so after math
\loadmkvifile{font-sol} % font solutions
\loadmkvifile{strc-not}
diff --git a/tex/context/base/mkiv/file-mod.mkvi b/tex/context/base/mkiv/file-mod.mkvi
index ebd741d42..06c02f0e1 100644
--- a/tex/context/base/mkiv/file-mod.mkvi
+++ b/tex/context/base/mkiv/file-mod.mkvi
@@ -183,7 +183,7 @@
%D bene: such runtime definitions are to be defined global.
%D
%D \starttyping
-%D \fetchruntimecommand\showaccents{\f!colorprefix ...}
+%D \fetchruntimecommand \showaccents \f!file_run % last is a file name
%D \stoptyping
\installcorenamespace{runtimeloaded}
diff --git a/tex/context/base/mkiv/font-tra.mkiv b/tex/context/base/mkiv/font-tra.mkiv
index 930798320..6ff2b1bfb 100644
--- a/tex/context/base/mkiv/font-tra.mkiv
+++ b/tex/context/base/mkiv/font-tra.mkiv
@@ -32,7 +32,7 @@
%D The implementation is rather straightforward in using
%D \type{\halign}.
-\fetchruntimecommand \showbodyfont {\f!fontprefix\s!run}
+\fetchruntimecommand \showbodyfont \f!font_run
%D \macros
%D {showfontstrip, testminimalbaseline, showminimalbaseline}
@@ -43,9 +43,9 @@
%D
%D \showfontstrip \blank \showminimalbaseline
-\fetchruntimecommand \showfontstrip {\f!fontprefix\s!run}
-\fetchruntimecommand \testminimalbaseline {\f!fontprefix\s!run}
-\fetchruntimecommand \showminimalbaseline {\f!fontprefix\s!run}
+\fetchruntimecommand \showfontstrip \f!font_run
+\fetchruntimecommand \testminimalbaseline \f!font_run
+\fetchruntimecommand \showminimalbaseline \f!font_run
%D \macros
%D {showkerning}
@@ -54,7 +54,7 @@
%D
%D \showkerning{Can you guess what kerning is?}
-\fetchruntimecommand \showkerning {\f!fontprefix\s!run}
+\fetchruntimecommand \showkerning \f!font_run
%D \macros
%D {showbodyfontenvironment,showfont,showfontstyle,showligatures}
@@ -67,7 +67,7 @@
%D
%D \showsetup{showbodyfontenvironment}
-\fetchruntimecommand \showbodyfontenvironment {\f!fontprefix\s!run}
+\fetchruntimecommand \showbodyfontenvironment \f!font_run
%D
%D The following command generates a fontmap:
@@ -79,12 +79,12 @@
%D \typebuffer
%D \getbuffer
-\fetchruntimecommand \showfont {\f!fontprefix\s!run}
-\fetchruntimecommand \showfontstyle {\f!fontprefix\s!run}
-\fetchruntimecommand \showligature {\f!fontprefix\s!run}
-\fetchruntimecommand \showligatures {\f!fontprefix\s!run}
-\fetchruntimecommand \showcharratio {\f!fontprefix\s!run}
-\fetchruntimecommand \showfontparameters {\f!fontprefix\s!run}
+\fetchruntimecommand \showfont \f!font_run
+\fetchruntimecommand \showfontstyle \f!font_run
+\fetchruntimecommand \showligature \f!font_run
+\fetchruntimecommand \showligatures \f!font_run
+\fetchruntimecommand \showcharratio \f!font_run
+\fetchruntimecommand \showfontparameters \f!font_run
\unexpanded\def\showchardata #1{\ctxcommand{showchardata("#1")}}
\unexpanded\def\showfontdata {\ctxcommand{showfontparameters()}}
@@ -347,7 +347,7 @@
{\begingroup
\unexpanded\def\showotfcompositionsample##1%
{\NC\type{##1}\NC\showotfcompositionlist{#1}{#2}{##1}\NC\definedfont[#1]##1\NC\NR}%
- \starttabulate[|||| ]
+ \starttabulate[||||]
#3%
\stoptabulate
\endgroup}
diff --git a/tex/context/base/mkiv/grph-inc.mkiv b/tex/context/base/mkiv/grph-inc.mkiv
index 5865c7702..fb57d4634 100644
--- a/tex/context/base/mkiv/grph-inc.mkiv
+++ b/tex/context/base/mkiv/grph-inc.mkiv
@@ -854,9 +854,6 @@
% \eTABLE
% \stoptext
-\unexpanded\def\showexternalfigures
- {\writestatus\m!system{the \string\showexternalfigures\space command is not (yet) implemented in mkiv}}
-
\unexpanded\def\overlayfigure#1%
{\externalfigure[#1][\c!width=\d_overlay_width,\c!height=\d_overlay_height]}
diff --git a/tex/context/base/mkiv/lang-ini.mkiv b/tex/context/base/mkiv/lang-ini.mkiv
index 947422710..34e4dfa49 100644
--- a/tex/context/base/mkiv/lang-ini.mkiv
+++ b/tex/context/base/mkiv/lang-ini.mkiv
@@ -220,8 +220,8 @@
%D named:
%D
%D \starttyping
-%D \f!languageprefix-identifier.\f!patternsextension
-%D \f!languageprefix-identifier.\f!hyhensextension
+%D lang-identifier.\f!patternsextension
+%D lang-identifier.\f!hyhensextension
%D \stoptyping
%D
%D The \type{spacing} variable specifies how the spaces after
diff --git a/tex/context/base/mkiv/mult-sys.mkiv b/tex/context/base/mkiv/mult-sys.mkiv
index 2fffe3084..418ae743f 100644
--- a/tex/context/base/mkiv/mult-sys.mkiv
+++ b/tex/context/base/mkiv/mult-sys.mkiv
@@ -305,8 +305,6 @@
\definesystemconstant {ligatures}
\definesystemconstant {collapsing}
-\definesystemconstant {run}
-
\definesystemconstant {default}
\definesystemconstant {mode}
@@ -631,47 +629,11 @@
%D The setup files for the language, font, color and special subsystems have a common
%D prefix. This means that we have at most three characters for unique filenames.
-\definefileconstant {colorprefix} {colo-}
-%definefileconstant {encodingprefix} {enco-}
-%definefileconstant {filterprefix} {filt-}
-\definefileconstant {fontprefix} {font-}
-%definefileconstant {handlingprefix} {hand-}
-%definefileconstant {javascriptprefix} {java-}
-%definefileconstant {languageprefix} {lang-}
-%definefileconstant {mathprefix} {math-}
-%definefileconstant {metapostprefix} {meta-}
-%definefileconstant {regimeprefix} {regi-}
-%definefileconstant {specialprefix} {spec-}
-\definefileconstant {symbolprefix} {symb-}
-\definefileconstant {typeprefix} {type-}
-%definefileconstant {xtagprefix} {xtag-}
-%definefileconstant {propprefix} {prop-}
-%definefileconstant {unicprefix} {unic-}
-%definefileconstant {sortprefix} {sort-}
-%definefileconstant {prettyprefix} {pret-}
-
-%definefileconstant {moduleprefix} {m-}
-%definefileconstant {styleprefix} {s-}
-%definefileconstant {xstyleprefix} {x-}
-%definefileconstant {privateprefix} {p-}
-%definefileconstant {thirdprefix} {t-}
-
-%definefileconstant {beforeprefix} {b-}
-%definefileconstant {afterprefix} {a-}
-
-% for old times sake:
-
-% \defineinterfaceconstant {x} {x}
-% \defineinterfaceconstant {xx} {xx}
-% \defineinterfaceconstant {em} {em} % will go
-
-% \defineinterfaceconstant {tf} {tf}
-% \defineinterfaceconstant {bf} {bf}
-% \defineinterfaceconstant {bs} {bs}
-% \defineinterfaceconstant {bi} {bi}
-% \defineinterfaceconstant {sl} {sl}
-% \defineinterfaceconstant {it} {it}
-% \defineinterfaceconstant {sc} {sc} % keep, used elsewhere (or define in mult-def)
+\definefileconstant {colo_run} {colo-run}
+\definefileconstant {font_run} {font-run}
+\definefileconstant {page_run} {page-run}
+\definefileconstant {symb_run} {symb-run}
+\definefileconstant {publ_tra} {publ-tra}
%D For figure inclusion we need(ed):
diff --git a/tex/context/base/mkiv/page-grd.mkiv b/tex/context/base/mkiv/page-grd.mkiv
deleted file mode 100644
index 4125eb46a..000000000
--- a/tex/context/base/mkiv/page-grd.mkiv
+++ /dev/null
@@ -1,106 +0,0 @@
-%D \module
-%D [ file=page-grd, % moved from page-ini
-%D version=2011.12.07, % 2000.10.20,
-%D title=\CONTEXT\ Page Macros,
-%D subtitle=Grids,
-%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.
-
-\writestatus{loading}{ConTeXt Page Macros / Grids}
-
-\unprotect
-
-\newconstant\c_page_grids_location
-\newconstant\c_page_grids_line_mode
-\newconstant\c_page_grids_lineno_mode
-\newconstant\c_page_grids_columns_mode
-
-\unexpanded\def\showgrid
- {\dosingleempty\page_grids_show}
-
-\def\page_grids_show[#1]%
- {\c_page_grids_location \plusone % downward compatible default
- \c_page_grids_line_mode \plusone
- \c_page_grids_lineno_mode \plusone
- \c_page_grids_columns_mode\plusone
- \processallactionsinset
- [#1]%
- [ \v!reset=>\c_page_grids_location \zerocount
- \c_page_grids_columns_mode\zerocount,
- \v!bottom=>\c_page_grids_location \plusone,
- \v!top=>\c_page_grids_location \plustwo,
- \v!none=>\c_page_grids_line_mode \zerocount,
- \v!all=>\c_page_grids_line_mode \plusone,
- \v!lines=>\c_page_grids_line_mode \plustwo,
- \v!frame=>\c_page_grids_line_mode \plusthree,
- \v!nonumber=>\c_page_grids_lineno_mode \zerocount,
- \v!right=>\c_page_grids_lineno_mode \plusone,
- \v!left=>\c_page_grids_lineno_mode \plustwo,
- \v!outer=>\c_page_grids_lineno_mode \plusthree,
- \v!columns=>\c_page_grids_columns_mode\plusone]% new option
- \ifcase\c_page_grids_location
- \let\page_grids_add_to_box\gobbleoneargument
- \else % 1=bottom 2=top
- \let\page_grids_add_to_box\page_grids_add_to_box_indeed
- \fi
- \ifcase\c_page_grids_columns_mode
- \let\page_grids_add_to_one\gobbleoneargument
- \let\page_grids_add_to_mix\gobbleoneargument
- \else
- \let\page_grids_add_to_one\page_grids_add_to_one_indeed
- \let\page_grids_add_to_mix\page_grids_add_to_mix_indeed
- \fi}
-
-% if really needed for speed we can cache the grid
-
-\let\page_grids_add_to_box\gobbleoneargument
-\let\page_grids_add_to_one\gobbleoneargument
-\let\page_grids_add_to_mix\gobbleoneargument
-
-\def\page_grids_add_to_box_indeed#1% to be checked for color and layer ..... use mp
- {\startcolor[layout:grid]%
- \resetvisualizers
- \gridboxlinemode \c_page_grids_line_mode
- \gridboxlinenomode\c_page_grids_lineno_mode
- \setgridbox\scratchbox\makeupwidth\textheight % todo: check color
- \global\setbox#1\hbox % global ?
- {\ifcase\c_page_grids_location\or\or\box#1\hskip-\makeupwidth\fi
- \begingroup % color
- \ifcase\layoutcolumns\else
- \gray
- \setlayoutcomponentattribute{\v!grid:\v!columns}%
- \hbox \layoutcomponentboxattribute to \makeupwidth
- {\dorecurse\layoutcolumns
- {\hskip\layoutcolumnwidth
- \ifnum\recurselevel<\layoutcolumns
- \vrule
- \s!height\ht\scratchbox
- \s!depth \dp\scratchbox
- \s!width \layoutcolumndistance
- \fi}}%
- \hskip-\makeupwidth
- \fi
- \setlayoutcomponentattribute{\v!grid:\v!lines}%
- \hbox \layoutcomponentboxattribute{\box\scratchbox}%
- \endgroup
- \ifcase\c_page_grids_location\or\hskip-\makeupwidth\box#1\fi}%
- \stopcolor}
-
-\def\page_grids_add_to_one_indeed#1%
- {\begingroup
- \resetvisualizers
- \global\setbox#1\vpack{\backgroundline[layout:one]{\box#1}}%
- \endgroup}
-
-\def\page_grids_add_to_mix_indeed#1%
- {\begingroup
- \resetvisualizers
- \global\setbox#1\vpack{\backgroundline[layout:mix]{\box#1}}%
- \endgroup}
-
-\protect \endinput
diff --git a/tex/context/base/mkiv/page-lay.mkiv b/tex/context/base/mkiv/page-lay.mkiv
index ae04a34e0..b078e1042 100644
--- a/tex/context/base/mkiv/page-lay.mkiv
+++ b/tex/context/base/mkiv/page-lay.mkiv
@@ -1343,12 +1343,18 @@
%D \showsetup{showlayout}
%D \showsetup{showsetups}
%D %showsetup{showmargins}
-
-\fetchruntimecommand \showprint {page-run}
-\fetchruntimecommand \showframe {page-run}
-\fetchruntimecommand \showlayout {page-run}
-\fetchruntimecommand \showsetups {page-run}
-\fetchruntimecommand \showmargins {page-run}
+%D %showsetup{showgrid}
+
+\fetchruntimecommand \showprint \f!page_run
+\fetchruntimecommand \showframe \f!page_run
+\fetchruntimecommand \showlayout \f!page_run
+\fetchruntimecommand \showsetups \f!page_run
+\fetchruntimecommand \showmargins \f!page_run
+\fetchruntimecommand \showgrid \f!page_run
+
+\glet\page_grids_add_to_box\gobbleoneargument
+\glet\page_grids_add_to_one\gobbleoneargument
+\glet\page_grids_add_to_mix\gobbleoneargument
%D The default dimensions are quite old and will not change.
%D The funny fractions were introduced when we went from fixed
diff --git a/tex/context/base/mkiv/page-run.lua b/tex/context/base/mkiv/page-run.lua
new file mode 100644
index 000000000..c0a2022b2
--- /dev/null
+++ b/tex/context/base/mkiv/page-run.lua
@@ -0,0 +1,188 @@
+if not modules then modules = { } end modules ['page-run'] = {
+ version = 1.001,
+ comment = "companion to page-run.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local format, concat = string.format, table.concat
+local todimen = number.todimen
+local texdimen = tex.dimen
+
+local function asdimen(name,unit)
+ return todimen(texdimen[name],unit,"%0.4f") -- 4 is more than enough, even 3 would be okay
+end
+
+local function checkedoptions(options)
+ if type(options) == "table" then
+ return options
+ elseif not options or options == "" then
+ options = "pt,cm"
+ end
+ options = utilities.parsers.settings_to_hash(options)
+ local n = 4
+ for k, v in table.sortedhash(options) do
+ local m = tonumber(k)
+ if m then
+ n = m
+ end
+ end
+ options.n = n
+ return options
+end
+
+function commands.showlayoutvariables(options)
+
+ options = checkedoptions(options)
+
+ local dimensions = { "pt", "bp", "cm", "mm", "dd", "cc", "pc", "nd", "nc", "sp", "in" }
+
+ local n = 0
+ for i=1,#dimensions do
+ if options[dimensions[i]] then
+ n = n + 1
+ end
+ end
+
+ if n == 0 then
+ options.pt = true
+ n = 1
+ end
+
+ local function showdimension(name)
+ context.NC()
+ context.tex(interfaces.interfacedcommand(name))
+ context.NC()
+ for i=1,#dimensions do
+ local d = dimensions[i]
+ if options[d] then
+ context("%s%s",asdimen(name,d),d)
+ context.NC()
+ end
+ end
+ context.NR()
+ end
+
+ local function showmacro(name)
+ context.NC()
+ context.tex(interfaces.interfacedcommand(name))
+ context.NC()
+ context.getvalue(name)
+ context.NC()
+ context.NR()
+ end
+
+ local function reportdimension(name)
+ local result = { }
+ for i=1,#dimensions do
+ local d = dimensions[i]
+ if options[d] then
+ result[#result+1] = format("%12s%s",asdimen(name,d),d)
+ end
+ end
+ commands.writestatus("layout",format("%-24s %s",interfaces.interfacedcommand(name),concat(result," ")))
+ end
+
+ if tex.count.textlevel == 0 then
+
+ -- especially for Luigi:
+
+ reportdimension("paperheight")
+ reportdimension("paperwidth")
+ reportdimension("printpaperheight")
+ reportdimension("printpaperwidth")
+ reportdimension("topspace")
+ reportdimension("backspace")
+ reportdimension("makeupheight")
+ reportdimension("makeupwidth")
+ reportdimension("topheight")
+ reportdimension("topdistance")
+ reportdimension("headerheight")
+ reportdimension("headerdistance")
+ reportdimension("textheight")
+ reportdimension("footerdistance")
+ reportdimension("footerheight")
+ reportdimension("bottomdistance")
+ reportdimension("bottomheight")
+ reportdimension("leftedgewidth")
+ reportdimension("leftedgedistance")
+ reportdimension("leftmarginwidth")
+ reportdimension("leftmargindistance")
+ reportdimension("textwidth")
+ reportdimension("rightmargindistance")
+ reportdimension("rightmarginwidth")
+ reportdimension("rightedgedistance")
+ reportdimension("rightedgewidth")
+ reportdimension("bodyfontsize")
+ reportdimension("lineheight")
+
+ else
+
+ context.starttabulate { "|l|" .. string.rep("Tr|",n) }
+
+ showdimension("paperheight")
+ showdimension("paperwidth")
+ showdimension("printpaperheight")
+ showdimension("printpaperwidth")
+ showdimension("topspace")
+ showdimension("backspace")
+ showdimension("makeupheight")
+ showdimension("makeupwidth")
+ showdimension("topheight")
+ showdimension("topdistance")
+ showdimension("headerheight")
+ showdimension("headerdistance")
+ showdimension("textheight")
+ showdimension("footerdistance")
+ showdimension("footerheight")
+ showdimension("bottomdistance")
+ showdimension("bottomheight")
+ showdimension("leftedgewidth")
+ showdimension("leftedgedistance")
+ showdimension("leftmarginwidth")
+ showdimension("leftmargindistance")
+ showdimension("textwidth")
+ showdimension("rightmargindistance")
+ showdimension("rightmarginwidth")
+ showdimension("rightedgedistance")
+ showdimension("rightedgewidth")
+ context.NR()
+ showdimension("bodyfontsize")
+ showdimension("lineheight")
+ context.NR()
+ showmacro("strutheightfactor")
+ showmacro("strutdepthfactor")
+ showmacro("topskipfactor")
+ showmacro("maxdepthfactor")
+
+ context.stoptabulate()
+
+ end
+
+end
+
+function commands.showlayout(options)
+
+ options = checkedoptions(options)
+
+ if tex.count.textlevel == 0 then
+
+ commands.showlayoutvariables(options)
+
+ else
+
+ context.page()
+ context.bgroup()
+ context.showframe()
+ context.setuplayout { marking = interfaces.variables.on }
+ for i=1,(options.n or 4) do
+ commands.showlayoutvariables(options)
+ context.page()
+ end
+ context.egroup()
+
+ end
+
+end
+
diff --git a/tex/context/base/mkiv/page-run.mkiv b/tex/context/base/mkiv/page-run.mkiv
index 9adcb23c7..ce5923f02 100644
--- a/tex/context/base/mkiv/page-run.mkiv
+++ b/tex/context/base/mkiv/page-run.mkiv
@@ -13,10 +13,11 @@
\writestatus{loading}{ConTeXt Page Macros / Runtime Macros}
+\registerctxluafile{page-run}{1.001}
+
\unprotect
-\gdef\showprint
- {\dotripleempty\page_layouts_show_print}
+\unexpanded\gdef\showprint{\dotripleempty\page_layouts_show_print}
\gdef\page_layouts_show_print[#1][#2][#3]% only english
{\setbuffer[crap]%
@@ -70,189 +71,9 @@
% {\showprint[mirrored] [mirrored] [location=middle]} {\type{mirrored}\break\type{mirrored}}
% \stopcombination
-% maybe we will have page-run.lua
-
-\startluacode
-local format, concat = string.format, table.concat
-local todimen = number.todimen
-local texdimen = tex.dimen
-
-local function asdimen(name,unit)
- return todimen(texdimen[name],unit,"%0.4f") -- 4 is more than enough, even 3 would be okay
-end
-
-local function checkedoptions(options)
- if type(options) == "table" then
- return options
- elseif not options or options == "" then
- options = "pt,cm"
- end
- options = utilities.parsers.settings_to_hash(options)
- local n = 4
- for k, v in table.sortedhash(options) do
- local m = tonumber(k)
- if m then
- n = m
- end
- end
- options.n = n
- return options
-end
-
-function commands.showlayoutvariables(options)
-
- options = checkedoptions(options)
-
- local dimensions = { "pt", "bp", "cm", "mm", "dd", "cc", "pc", "nd", "nc", "sp", "in" }
-
- local n = 0
- for i=1,#dimensions do
- if options[dimensions[i]] then
- n = n + 1
- end
- end
-
- if n == 0 then
- options.pt = true
- n = 1
- end
-
- local function showdimension(name)
- context.NC()
- context.tex(interfaces.interfacedcommand(name))
- context.NC()
- for i=1,#dimensions do
- local d = dimensions[i]
- if options[d] then
- context("%s%s",asdimen(name,d),d)
- context.NC()
- end
- end
- context.NR()
- end
-
- local function showmacro(name)
- context.NC()
- context.tex(interfaces.interfacedcommand(name))
- context.NC()
- context.getvalue(name)
- context.NC()
- context.NR()
- end
-
- local function reportdimension(name)
- local result = { }
- for i=1,#dimensions do
- local d = dimensions[i]
- if options[d] then
- result[#result+1] = format("%12s%s",asdimen(name,d),d)
- end
- end
- commands.writestatus("layout",format("%-24s %s",interfaces.interfacedcommand(name),concat(result," ")))
- end
-
- if tex.count.textlevel == 0 then
-
- -- especially for Luigi:
-
- reportdimension("paperheight")
- reportdimension("paperwidth")
- reportdimension("printpaperheight")
- reportdimension("printpaperwidth")
- reportdimension("topspace")
- reportdimension("backspace")
- reportdimension("makeupheight")
- reportdimension("makeupwidth")
- reportdimension("topheight")
- reportdimension("topdistance")
- reportdimension("headerheight")
- reportdimension("headerdistance")
- reportdimension("textheight")
- reportdimension("footerdistance")
- reportdimension("footerheight")
- reportdimension("bottomdistance")
- reportdimension("bottomheight")
- reportdimension("leftedgewidth")
- reportdimension("leftedgedistance")
- reportdimension("leftmarginwidth")
- reportdimension("leftmargindistance")
- reportdimension("textwidth")
- reportdimension("rightmargindistance")
- reportdimension("rightmarginwidth")
- reportdimension("rightedgedistance")
- reportdimension("rightedgewidth")
- reportdimension("bodyfontsize")
- reportdimension("lineheight")
-
- else
-
- context.starttabulate { "|l|" .. string.rep("Tr|",n) }
-
- showdimension("paperheight")
- showdimension("paperwidth")
- showdimension("printpaperheight")
- showdimension("printpaperwidth")
- showdimension("topspace")
- showdimension("backspace")
- showdimension("makeupheight")
- showdimension("makeupwidth")
- showdimension("topheight")
- showdimension("topdistance")
- showdimension("headerheight")
- showdimension("headerdistance")
- showdimension("textheight")
- showdimension("footerdistance")
- showdimension("footerheight")
- showdimension("bottomdistance")
- showdimension("bottomheight")
- showdimension("leftedgewidth")
- showdimension("leftedgedistance")
- showdimension("leftmarginwidth")
- showdimension("leftmargindistance")
- showdimension("textwidth")
- showdimension("rightmargindistance")
- showdimension("rightmarginwidth")
- showdimension("rightedgedistance")
- showdimension("rightedgewidth")
- context.NR()
- showdimension("bodyfontsize")
- showdimension("lineheight")
- context.NR()
- showmacro("strutheightfactor")
- showmacro("strutdepthfactor")
- showmacro("topskipfactor")
- showmacro("maxdepthfactor")
-
- context.stoptabulate()
-
- end
-
-end
-
-function commands.showlayout(options)
-
- options = checkedoptions(options)
-
- if tex.count.textlevel == 0 then
-
- commands.showlayoutvariables(options)
-
- else
-
- context.page()
- context.bgroup()
- context.showframe()
- context.setuplayout { marking = interfaces.variables.on }
- for i=1,(options.n or 4) do
- commands.showlayoutvariables(options)
- context.page()
- end
- context.egroup()
-
- end
-
-end
-\stopluacode
+\unexpanded\gdef\showframe {\dodoubleempty\page_layouts_show_frame}
+\unexpanded\gdef\showsetups{\dosingleempty\page_layouts_show_setups}
+\unexpanded\gdef\showlayout{\dosingleempty\page_layouts_show_layout}
\gdef\page_layouts_show_frame[#1][#2]%
{\ifsecondargument
@@ -293,10 +114,6 @@ end
\gdef\page_layouts_show_layout[#1]%
{\ctxcommand{showlayout("#1")}}
-\unexpanded\gdef\showframe {\dodoubleempty\page_layouts_show_frame }
-\unexpanded\gdef\showsetups{\dosingleempty\page_layouts_show_setups}
-\unexpanded\gdef\showlayout{\dosingleempty\page_layouts_show_layout}
-
\unexpanded\gdef\showmargins
{\starttabulate
\NC asynchrone \NC \doifelseoddpage {odd} {even} \NC \NR
@@ -307,4 +124,94 @@ end
\NC inner margin \NC \the\innermarginwidth \NC \NR
\stoptabulate}
+%D Page grids:
+
+\newconstant\c_page_grids_location
+\newconstant\c_page_grids_line_mode
+\newconstant\c_page_grids_lineno_mode
+\newconstant\c_page_grids_columns_mode
+
+\unexpanded\gdef\showgrid
+ {\dosingleempty\page_grids_show}
+
+\gdef\page_grids_show[#1]%
+ {\c_page_grids_location \plusone % downward compatible default
+ \c_page_grids_line_mode \plusone
+ \c_page_grids_lineno_mode \plusone
+ \c_page_grids_columns_mode\plusone
+ \processallactionsinset
+ [#1]%
+ [ \v!reset=>\c_page_grids_location \zerocount
+ \c_page_grids_columns_mode\zerocount,
+ \v!bottom=>\c_page_grids_location \plusone,
+ \v!top=>\c_page_grids_location \plustwo,
+ \v!none=>\c_page_grids_line_mode \zerocount,
+ \v!all=>\c_page_grids_line_mode \plusone,
+ \v!lines=>\c_page_grids_line_mode \plustwo,
+ \v!frame=>\c_page_grids_line_mode \plusthree,
+ \v!nonumber=>\c_page_grids_lineno_mode \zerocount,
+ \v!right=>\c_page_grids_lineno_mode \plusone,
+ \v!left=>\c_page_grids_lineno_mode \plustwo,
+ \v!outer=>\c_page_grids_lineno_mode \plusthree,
+ \v!columns=>\c_page_grids_columns_mode\plusone]% new option
+ \ifcase\c_page_grids_location
+ \let\page_grids_add_to_box\gobbleoneargument
+ \else % 1=bottom 2=top
+ \let\page_grids_add_to_box\page_grids_add_to_box_indeed
+ \fi
+ \ifcase\c_page_grids_columns_mode
+ \let\page_grids_add_to_one\gobbleoneargument
+ \let\page_grids_add_to_mix\gobbleoneargument
+ \else
+ \let\page_grids_add_to_one\page_grids_add_to_one_indeed
+ \let\page_grids_add_to_mix\page_grids_add_to_mix_indeed
+ \fi}
+
+% if really needed for speed we can cache the grid
+
+\glet\page_grids_add_to_box\gobbleoneargument
+\glet\page_grids_add_to_one\gobbleoneargument
+\glet\page_grids_add_to_mix\gobbleoneargument
+
+\gdef\page_grids_add_to_box_indeed#1% to be checked for color and layer ..... use mp
+ {\startcolor[layout:grid]%
+ \resetvisualizers
+ \gridboxlinemode \c_page_grids_line_mode
+ \gridboxlinenomode\c_page_grids_lineno_mode
+ \setgridbox\scratchbox\makeupwidth\textheight % todo: check color
+ \global\setbox#1\hbox % global ?
+ {\ifcase\c_page_grids_location\or\or\box#1\hskip-\makeupwidth\fi
+ \begingroup % color
+ \ifcase\layoutcolumns\else
+ \gray
+ \setlayoutcomponentattribute{\v!grid:\v!columns}%
+ \hbox \layoutcomponentboxattribute to \makeupwidth
+ {\dorecurse\layoutcolumns
+ {\hskip\layoutcolumnwidth
+ \ifnum\recurselevel<\layoutcolumns
+ \vrule
+ \s!height\ht\scratchbox
+ \s!depth \dp\scratchbox
+ \s!width \layoutcolumndistance
+ \fi}}%
+ \hskip-\makeupwidth
+ \fi
+ \setlayoutcomponentattribute{\v!grid:\v!lines}%
+ \hbox \layoutcomponentboxattribute{\box\scratchbox}%
+ \endgroup
+ \ifcase\c_page_grids_location\or\hskip-\makeupwidth\box#1\fi}%
+ \stopcolor}
+
+\gdef\page_grids_add_to_one_indeed#1%
+ {\begingroup
+ \resetvisualizers
+ \global\setbox#1\vpack{\backgroundline[layout:one]{\box#1}}%
+ \endgroup}
+
+\gdef\page_grids_add_to_mix_indeed#1%
+ {\begingroup
+ \resetvisualizers
+ \global\setbox#1\vpack{\backgroundline[layout:mix]{\box#1}}%
+ \endgroup}
+
\protect \endinput
diff --git a/tex/context/base/mkiv/publ-ini.mkiv b/tex/context/base/mkiv/publ-ini.mkiv
index 9dd03e40d..b3ddf722a 100644
--- a/tex/context/base/mkiv/publ-ini.mkiv
+++ b/tex/context/base/mkiv/publ-ini.mkiv
@@ -1877,4 +1877,13 @@
\loadbtxdefinitionfile
[\s!default]
+%D Delayed loading:
+
+\fetchruntimecommand \showbtxdatasetfields \f!publ_tra
+\fetchruntimecommand \showbtxdatasetcompleteness \f!publ_tra
+\fetchruntimecommand \showbtxdatasetauthors \f!publ_tra
+\fetchruntimecommand \showbtxhashedauthors \f!publ_tra
+\fetchruntimecommand \showbtxfields \f!publ_tra
+\fetchruntimecommand \showbtxtables \f!publ_tra
+
\protect
diff --git a/tex/context/base/mkiv/publ-tra.mkiv b/tex/context/base/mkiv/publ-tra.mkiv
index 6ef86ca59..5f9da651f 100644
--- a/tex/context/base/mkiv/publ-tra.mkiv
+++ b/tex/context/base/mkiv/publ-tra.mkiv
@@ -20,14 +20,14 @@
\unprotect
-\unexpanded\def\showbtxdatasetfields {\dosingleempty\publ_show_dataset_fields}
-\unexpanded\def\showbtxdatasetcompleteness{\dosingleempty\publ_show_dataset_completeness}
-\unexpanded\def\showbtxdatasetauthors {\dosingleempty\publ_show_dataset_authors}
-\unexpanded\def\showbtxhashedauthors {\dosingleempty\publ_show_hashed_authors}
-\unexpanded\def\showbtxfields {\dosingleempty\publ_show_fields}
-\unexpanded\def\showbtxtables {\dosingleempty\publ_show_tables}
-
-\def\publ_show_dataset_whatever#1[#2]%
+\unexpanded\gdef\showbtxdatasetfields {\dosingleempty\publ_show_dataset_fields}
+\unexpanded\gdef\showbtxdatasetcompleteness{\dosingleempty\publ_show_dataset_completeness}
+\unexpanded\gdef\showbtxdatasetauthors {\dosingleempty\publ_show_dataset_authors}
+\unexpanded\gdef\showbtxhashedauthors {\dosingleempty\publ_show_hashed_authors}
+\unexpanded\gdef\showbtxfields {\dosingleempty\publ_show_fields}
+\unexpanded\gdef\showbtxtables {\dosingleempty\publ_show_tables}
+
+\gdef\publ_show_dataset_whatever#1[#2]%
{\begingroup
\letdummyparameter\c!specification\currentbtxspecification
\setdummyparameter\c!dataset {\currentbtxdataset}%
@@ -46,11 +46,11 @@
}}%
\endgroup}
-\def\publ_show_dataset_fields {\publ_show_dataset_whatever{showbtxdatasetfields}}
-\def\publ_show_dataset_completeness{\publ_show_dataset_whatever{showbtxdatasetcompleteness}}
-\def\publ_show_dataset_authors {\publ_show_dataset_whatever{showbtxdatasetauthors}}
+\gdef\publ_show_dataset_fields {\publ_show_dataset_whatever{showbtxdatasetfields}}
+\gdef\publ_show_dataset_completeness{\publ_show_dataset_whatever{showbtxdatasetcompleteness}}
+\gdef\publ_show_dataset_authors {\publ_show_dataset_whatever{showbtxdatasetauthors}}
-\def\publ_show_fields[#1]%
+\gdef\publ_show_fields[#1]%
{\begingroup
\setdummyparameter\c!rotation{90}%
\doifelseassignment{#1}%
@@ -65,12 +65,12 @@
}}%
\endgroup}
-\def\publ_show_tables[#1]%
+\gdef\publ_show_tables[#1]%
{\begingroup
\ctxcommand{showbtxtables{}}%
\endgroup}
-\def\publ_show_hashed_authors[#1]%
+\gdef\publ_show_hashed_authors[#1]%
{\ctxcommand{showbtxhashedauthors{}}}
\protect
diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv
index af02f76ae..07c89bcae 100644
--- a/tex/context/base/mkiv/spac-ali.mkiv
+++ b/tex/context/base/mkiv/spac-ali.mkiv
@@ -963,13 +963,14 @@
\dontleavehmode
\begingroup
\inleftmargin{\vsmash{\infofont\framed[\c!align=\v!right]{\thepardata}}}%
- \endgroup}
+ \endgroup
+ \let\showpardata\relax}
\unexpanded\def\startshowpardata
{\begingroup
\showstruts
\tracingparagraphs\maxdimen
- \appendtoksonce\showpardata\let\showpardata\relax\to\everypar}
+ \appendtoksonce\showpardata\to\everypar}
\unexpanded\def\stopshowpardata
{\endgraf
diff --git a/tex/context/base/mkiv/spac-ver.mkiv b/tex/context/base/mkiv/spac-ver.mkiv
index 8d55fc133..6647ede19 100644
--- a/tex/context/base/mkiv/spac-ver.mkiv
+++ b/tex/context/base/mkiv/spac-ver.mkiv
@@ -1615,8 +1615,6 @@
\newif\ifgridsnapping
-\let\showgridsnapping\relax
-
%unexpanded\def\moveongrid {\dosingleempty\spac_grids_move_on}
\unexpanded\def\snaptogrid {\dosingleempty\spac_grids_snap_to}
\unexpanded\def\placeongrid{\dosingleempty\spac_grids_place_on}
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 66c7dc56d..670af30fc 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 d1e17ab58..0c918349d 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-ref.mkvi b/tex/context/base/mkiv/strc-ref.mkvi
index da6416d92..43d4d1f5b 100644
--- a/tex/context/base/mkiv/strc-ref.mkvi
+++ b/tex/context/base/mkiv/strc-ref.mkvi
@@ -33,22 +33,6 @@
\unprotect
-%D This module is a (partial) rewrite of core-ref.tex for \MKIV. As
-%D such it will be a moving target for a while.
-
-%D Later we will do a further cleanup and move much of the code to
-%D \LUA\ (i.e.\ better backend integration).
-
-\let\mainreference\gobblefivearguments
-
-% this will go when we got rid of the tuo file
-
-\let\currentfolioreference \!!zerocount % only used in xml-fo
-\let\resetreferences \relax
-\let\setreferences \relax
-\let\showcurrentreference \relax
-\let\setexecutecommandcheck\gobbletwoarguments
-
% todo : unknown/illegal reference no arg
% todo : +n pages check on 'samepage' (contrastcolor)
% todo : multiple text in reference
diff --git a/tex/context/base/mkiv/supp-box.lua b/tex/context/base/mkiv/supp-box.lua
index 4fe062a1c..fc8ad1ae4 100644
--- a/tex/context/base/mkiv/supp-box.lua
+++ b/tex/context/base/mkiv/supp-box.lua
@@ -166,8 +166,10 @@ end
implement {
name = "showhyphenatedinlist",
arguments = "integer",
- actions = function(box)
- report_hyphenation("show: %s",listtoutf(checkedlist(n),false,true))
+ actions = function(n)
+ -- we just hyphenate (as we pass a hpack) .. a bit too much casting but ...
+ local l = languages.hyphenators.handler(tonode(checkedlist(n)))
+ report_hyphenation("show: %s",listtoutf(l,false,true))
end
}
diff --git a/tex/context/base/mkiv/supp-box.mkiv b/tex/context/base/mkiv/supp-box.mkiv
index 9d2817cee..348120e22 100644
--- a/tex/context/base/mkiv/supp-box.mkiv
+++ b/tex/context/base/mkiv/supp-box.mkiv
@@ -1071,8 +1071,8 @@
\unexpanded\def\doshowhyphenatednextbox
{\clf_showhyphenatedinlist\nextbox}
-\unexpanded\def\showhyphens
- {\dowithnextboxcs\doshowhyphenatednextbox\hbox}
+\unexpanded\def\showhyphens % hpack: so no processing (we hyphenate in lua)
+ {\dowithnextboxcs\doshowhyphenatednextbox\hpack}
%D The following macros are seldom used but handy for tracing.
%D
diff --git a/tex/context/base/mkiv/supp-vis.mkiv b/tex/context/base/mkiv/supp-vis.mkiv
index e12c4c534..4fa50ebe5 100644
--- a/tex/context/base/mkiv/supp-vis.mkiv
+++ b/tex/context/base/mkiv/supp-vis.mkiv
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+\endinput
+
%D This module is no longer generic \unknown\ but who cares. Maybe
%D the code will be moved out of the core (apart from ruled boxes).
diff --git a/tex/context/base/mkiv/symb-ini.mkiv b/tex/context/base/mkiv/symb-ini.mkiv
index 23879b43a..e16cb48b3 100644
--- a/tex/context/base/mkiv/symb-ini.mkiv
+++ b/tex/context/base/mkiv/symb-ini.mkiv
@@ -301,7 +301,7 @@
%D
%D \showsetup{showsymbolset}
-\fetchruntimecommand \showsymbolset {\f!symbolprefix\s!run}
+\fetchruntimecommand \showsymbolset \f!symb_run
%D \macros
%D {usesymbols}
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index f48fd5d5b..0a02a2fc2 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 0a1a477db..ebd2ae3c8 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 671d3c83f..b22e62968 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 : 10/05/17 22:40:23
+-- merge date : 10/06/17 23:21:48
do -- begin closure to overcome local limits and interference