summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-11-14 14:35:42 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-11-14 14:35:42 +0100
commit6f55552ca1456f0a2d50d1d0fdc8dc813d9ace77 (patch)
tree4be2ae8eabfd71f42977c74055b2f15d4f253d7b /tex
parent3c5bdb02c68293a907c765f109641c3939c13f6c (diff)
downloadcontext-6f55552ca1456f0a2d50d1d0fdc8dc813d9ace77.tar.gz
2017-11-14 13:58:00
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/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/page-flt.mkiv10
-rw-r--r--tex/context/base/mkiv/page-one.mkiv11
-rw-r--r--tex/context/base/mkiv/page-pcl.mkiv606
-rw-r--r--tex/context/base/mkiv/spac-ali.mkiv3
-rw-r--r--tex/context/base/mkiv/spac-ver.mkiv55
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25822 -> 25841 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin249990 -> 249993 bytes
-rw-r--r--tex/context/base/mkiv/strc-flt.mkvi46
-rw-r--r--tex/context/base/mkiv/typo-duc.lua6
-rw-r--r--tex/context/interface/mkiv/context-en.xml2
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin839406 -> 839516 bytes
-rw-r--r--tex/context/interface/mkiv/i-fittingpage.xml4
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60774 -> 60775 bytes
-rw-r--r--tex/context/modules/mkiv/s-evohome.mkiv290
-rw-r--r--tex/context/modules/mkiv/s-fonts-variable.mkiv13
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
20 files changed, 978 insertions, 78 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index bca89a4a3..0aef69e34 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.11.08 22:45}
+\newcontextversion{2017.11.14 13:52}
%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 3e2bab562..ef19769a8 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.11.08 22:45}
+\edef\contextversion{2017.11.14 13:52}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 6c42048c9..1f84e31ad 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.11.08 22:45}
+\newcontextversion{2017.11.14 13:52}
%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 a78b7d31f..93e4df9b7 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.11.08 22:45}
+\edef\contextversion{2017.11.14 13:52}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/page-flt.mkiv b/tex/context/base/mkiv/page-flt.mkiv
index c43fb3c69..555077ace 100644
--- a/tex/context/base/mkiv/page-flt.mkiv
+++ b/tex/context/base/mkiv/page-flt.mkiv
@@ -22,14 +22,18 @@
\ifdefined\s!topfloat \else \def\s!topfloat {topfloat} \fi
\ifdefined\s!bottomfloat \else \def\s!bottomfloat{bottomfloat} \fi
+\ifdefined\s!pagefloat \else \def\s!pagefloat {pagefloat} \fi
\defineinsertion[\s!topfloat]
\defineinsertion[\s!bottomfloat]
+\defineinsertion[\s!pagefloat]
\newdimen \d_page_floats_inserted_bottom
\newdimen \d_page_floats_inserted_top
+\newdimen \d_page_floats_inserted_page
\newcount \c_page_floats_n_of_top \c_page_floats_n_of_top \plustwo
\newcount \c_page_floats_n_of_bottom \c_page_floats_n_of_bottom\zerocount
+\newcount \c_page_floats_n_of_page \c_page_floats_n_of_page \plustwo
\newconstant\c_page_floats_insertions_topskip_mode % 1 = no topskip
@@ -189,12 +193,14 @@
%D
%D First we reimplement some helpers.
+\def\page_floats_get_used_hsize{\hsize}
+
\unexpanded\def\page_floats_get
{\ifconditional\c_page_floats_some_waiting
\page_floats_flush\s!text\plusone
\ifconditional\c_page_floats_center_box
- \ifdim\wd\globalscratchbox<\hsize
- \global\setbox\floatbox\hpack to \hsize{\hss\box\floatbox\hss}%
+ \ifdim\wd\globalscratchbox<\page_floats_get_used_hsize
+ \global\setbox\floatbox\hpack to \page_floats_get_used_hsize{\hss\box\floatbox\hss}%
\else
% retain special alignments
\ifinsidecolumns
diff --git a/tex/context/base/mkiv/page-one.mkiv b/tex/context/base/mkiv/page-one.mkiv
index f3d7aa3e4..0b67f6ef6 100644
--- a/tex/context/base/mkiv/page-one.mkiv
+++ b/tex/context/base/mkiv/page-one.mkiv
@@ -423,20 +423,21 @@
\fi
% should be an option
\endgroup
- \dimen0\dimexpr\pagetotal+\floatheight+\d_strc_floats_top-\pageshrink\relax
- \dimen2\pagegoal
+ \scratchdimenone\dimexpr\pagetotal+\floatheight+\d_strc_floats_top-\pageshrink\relax
+ \scratchdimentwo\pagegoal
\relax % needed
\ifcase\c_page_one_float_method
% method 0 : raw
\or
% method 1 : safe
- \dimen2 .99\pagegoal
+ % too fuzzy as it can change and for a high page it's a lot : \scratchdimentwo .99\pagegoal
+ \advance\scratchdimentwo -\strutdp
\or
% method 2 : tight
- \advance\dimen0 -\onepoint
+ \advance\scratchdimenone -\onepoint
\fi
\relax % really needed ! ! ! !
- \ifdim\dimen0>\dimen2
+ \ifdim\scratchdimenone>\scratchdimentwo
\global\setfalse\c_page_floats_room
\else
\global\settrue\c_page_floats_room
diff --git a/tex/context/base/mkiv/page-pcl.mkiv b/tex/context/base/mkiv/page-pcl.mkiv
new file mode 100644
index 000000000..c8818e32b
--- /dev/null
+++ b/tex/context/base/mkiv/page-pcl.mkiv
@@ -0,0 +1,606 @@
+%D \module
+%D [ file=page-pcl,
+%D version=2017.11.08,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Page Columns,
+%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 / Page Columns}
+
+%D This is very experimental code! We took a bit from the mixed columns and single
+%D column page code. This one works acceptable with floats and is for whole double
+%D column documents. We don't balance (yet). Footnotes are per column. One can have
+%D side floats too. No balancing and other fancy features.
+%D
+%D Don't use this in production! Although the main approach will stay there might be
+%D changes in th ewya floats are dealt with. Not much testing has been done but as
+%D we stay close to the single column mode we expect most to just work. Only floats
+%D are the (usual) pain. Backgrounds, line numbering, etc.\ not tested either.
+
+\unprotect
+
+\def\s!pagecolumn{pagecolumn}
+
+\newcount\c_page_column_n_of_columns \c_page_column_n_of_columns\plusone
+\newcount\c_page_column_current \c_page_column_current \plusone
+\newdimen\d_page_column_distance
+\newdimen\d_page_column_max_height
+\newdimen\d_page_column_max_width
+%newdimen\d_page_column_balance_step
+\newdimen\d_page_column_column_width
+
+\newdimen\d_page_column_top_height
+\newdimen\d_page_column_top_width
+
+\newdimen\d_page_column_available
+\newdimen\d_page_column_sofar
+
+%D We need to step over empty columns.
+
+\unexpanded\def\page_column_command_next_page
+ {\ifnum\c_page_column_n_of_columns=\plusone
+ \page_otr_eject_page
+ \else
+ \page_otr_eject_page_column
+ \fi}
+
+\unexpanded\def\page_column_column
+ {\page_otr_eject_page}
+
+\unexpanded\def\page_otr_eject_page_column
+ {\begingroup
+ \scratchcountertwo\realpageno
+ \page_otr_eject_page
+% \page_otr_flush_all_floats
+ \scratchcounterone\zerocount
+ \scratchcounterthree\zerocount
+ \doloop{%
+ \ifnum\scratchcounterthree>\plushundred
+ \exitloop
+ \else
+ \advance\scratchcounterthree\plusone
+ \ifnum\scratchcountertwo=\realpageno
+ \ifnum\c_page_column_current=\plusone
+ \exitloop
+ \else
+ \ifnum\scratchcounterone=\c_page_column_current
+ \dontleavehmode\null
+ \fi
+ \page_otr_eject_page
+% \page_otr_flush_all_floats
+ \scratchcounterone\c_page_column_current
+ \fi
+ \else
+ \exitloop
+ \fi
+ \fi
+ }%
+ \endgroup}
+
+%D \unknown
+
+\unexpanded\def\page_column_command_next_page_and_inserts
+ {\ifnum\c_page_column_n_of_columns=\plusone
+ \page_otr_eject_page_and_flush_inserts
+ \else
+ \page_otr_eject_page_and_flush_inserts
+ \fi}
+
+%D \unknown
+
+\unexpanded\def\page_column_command_set_hsize
+ {\ifnum\c_page_column_n_of_columns=\plusone
+ \page_one_command_set_hsize
+ \else
+ \page_column_command_set_hsize_indeed
+ \fi}
+
+\unexpanded\def\page_column_command_set_hsize_indeed
+ {\global\hsize\d_page_column_column_width\relax
+ \global\d_page_column_available\dimexpr
+ \numexpr\c_page_column_n_of_columns-\c_page_column_current+\plusone\relax\d_page_column_column_width
+ + \numexpr\c_page_column_n_of_columns-\c_page_column_current \relax\d_page_column_distance
+ \relax
+ \global\d_page_column_sofar
+ \ifnum\c_page_column_n_of_columns=\plusone
+ \zerocount
+ \else
+ \numexpr\c_page_column_n_of_columns-\plusone\relax
+ \dimexpr\d_page_column_column_width+\d_page_column_distance\relax
+ \fi}
+
+%D \unknown
+
+\unexpanded\def\page_column_command_set_vsize
+ {\ifnum\c_page_column_n_of_columns=\plusone
+ \page_one_command_set_vsize
+ \else
+ \page_column_command_set_vsize_indeed
+ \fi}
+
+\unexpanded\def\page_column_command_set_vsize_indeed % \page_one_command_set_vsize minus the pagegoal setting
+ {\ifgridsnapping
+ \ifcase\layoutlines
+ \getrawnoflines\textheight
+ \else
+ \noflines\layoutlines
+ \fi
+ \global\vsize\noflines\openlineheight
+ \else
+ \global\vsize\textheight
+ \fi}
+
+%D \unknown
+
+\unexpanded\def\page_column_command_package_contents % \box<n> \unvbox<n> % this one will be redone (checked)
+ {\ifnum\c_page_column_n_of_columns=\plusone
+ \expandafter\page_one_command_package_contents
+ \else
+ \expandafter\page_column_command_package_contents_all
+ \fi}
+
+\unexpanded\def\page_column_command_package_contents_one#1#2% \box<n> \unvbox<n> % this one will be redone (checked)
+ {\bgroup
+ \forgetall
+ % see one for comments as it is similar
+ \strc_notes_check_if_bottom_present
+ \d_page_one_natural_depth\dp#2\relax
+ \setbox\b_page_one_contents\vbox to \textheight
+ {\page_otr_command_flush_top_insertions
+ \page_one_registered_text_area_a#1#2%
+ \hsize\d_page_column_column_width
+ \ifgridsnapping
+ \vskip\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax
+ \prevdepth\openstrutdepth
+ \page_otr_command_flush_bottom_insertions
+ \vfil
+ \else\ifcase\bottomraggednessmode
+ % ragged (default)
+ \vskip\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax
+ \prevdepth\openstrutdepth
+ \page_otr_command_flush_bottom_insertions
+ \vfil
+ \or
+ % align (normal)
+ \page_otr_command_flush_bottom_insertions
+ \or
+ % baseline
+ \kern\dimexpr\maxdepth-\d_page_one_natural_depth\relax
+ \page_otr_command_flush_bottom_insertions
+ \fi\fi
+ \fakepagenotes}%
+ \page_one_command_package_show_state
+ \ifconditional\c_notes_bottom_present
+ \ifgridsnapping
+ \ifcase\layoutlines
+ \getrawnoflines\textheight
+ \else
+ \noflines\layoutlines
+ \fi
+ \scratchoffset\dimexpr\numexpr\noflines-\plusone\relax\lineheight+\topskip\relax
+ \else
+ \scratchoffset\ht\b_page_one_contents
+ \fi
+ \setbox\b_page_one_bottom_notes\hpack
+ {\checksinglecolumnfootnotes % ?
+ \hsize\d_page_column_column_width
+ \setupnotes[\c!width=\textwidth]%
+ \lower\scratchoffset\vbox{\placebottomnotes\par\kern\zeropoint}}%
+ \ht\b_page_one_contents \zeropoint
+ \wd\b_page_one_contents \zeropoint
+ \ht\b_page_one_bottom_notes\zeropoint
+ \wd\b_page_one_bottom_notes\zeropoint
+ \wd\b_page_one_bottom_notes\d_page_column_column_width
+ \page_one_registered_text_area_b
+ {\vpack to \textheight
+ {\hbox{\box\b_page_one_contents\box\b_page_one_bottom_notes}}}%
+ \else
+ \ht\b_page_one_contents\textheight
+ \wd\b_page_one_contents\d_page_column_column_width
+ \page_one_registered_text_area_b
+ {\box\b_page_one_contents}%
+ \fi
+ \egroup}
+
+\unexpanded\def\page_column_command_package_contents_all#1#2% \box<n> \unvbox<n> % this one will be redone (checked)
+ {\bgroup
+ \setbox\b_page_one_contents\vbox to \textheight
+ {\page_one_registered_text_area_a#1#2}%
+ \page_one_command_package_show_state
+ \ht\b_page_one_contents\textheight
+ \page_one_registered_text_area_b
+ {\box\b_page_one_contents}%
+ \egroup}
+
+%D \unknown
+
+\unexpanded\def\page_column_command_side_float_output
+ {\ifnum\c_page_column_n_of_columns=\plusone
+ \page_one_command_side_float_output
+ \else
+ \page_column_command_side_float_output_indeed
+ \fi}
+
+\unexpanded\def\page_column_command_side_float_output_indeed
+ {% % %
+ \ifvoid\namedinsertionnumber\s!topfloat\else
+ \scratchwidth\wd\namedinsertionnumber\s!topfloat
+ \ifdim\scratchwidth>\d_page_column_top_width
+ \global\d_page_column_top_width \scratchwidth
+ \fi
+ \global\d_page_column_top_height\ht\namedinsertionnumber\s!topfloat
+ \fi
+ % % %
+ \setbox\scratchbox\vbox\bgroup
+ \page_column_command_package_contents_one\unvbox\normalpagebox
+ \egroup
+ \putboxincache\s!pagecolumn{\number\c_page_column_current}\scratchbox
+ \ifnum\c_page_column_current=\c_page_column_n_of_columns
+ \page_column_routine_package
+ \page_otr_construct_and_shipout\box\normalpagebox\plusone
+ \global\c_page_column_current\plusone
+ \global\d_page_column_top_height\zeropoint
+ \global\d_page_column_top_width\zeropoint
+ \else
+ \ifdim\d_page_column_top_width>\zeropoint
+ % % %
+% \writestatus{!!!!!}{
+% width : \the\d_page_column_top_width,
+% sofar : \the\d_page_column_sofar}
+ \ifdim\dimexpr\d_page_column_top_width>\d_page_column_sofar\relax
+ \begingroup
+ \floatingpenalty\zerocount
+ \insert\namedinsertionnumber\s!topfloat\bgroup
+ \vbox to \d_page_column_top_height{\vss\the\c_page_column_current\vss}
+% \page_one_command_flush_top_insertions
+% \page_one_command_flush_floats
+ \egroup
+ \endgroup
+ \fi
+ \fi
+ % % %
+ \global\advance\c_page_column_current\plusone
+ \fi
+ %
+ \page_column_command_set_vsize
+ \page_column_command_set_hsize}
+
+% use \currentmixedcolumns instead of \recurselevel
+
+\def\page_column_routine_package_step
+ {% needs packaging anyway
+ \getboxfromcache{\s!pagecolumn}{\number\recurselevel}\scratchbox
+ \page_lines_add_numbers_to_box\scratchbox\recurselevel\c_page_column_n_of_columns\plusone % new
+ \page_marks_synchronize_column\plusone\c_page_column_n_of_columns\recurselevel\scratchbox
+ % backgrounds
+ \anch_mark_column_box\scratchbox
+ \mixedcolumnseparatorheight\ht\scratchbox
+ \mixedcolumnseparatordepth \dp\scratchbox
+ \inheritedpagecolumnsframedbox\recurselevel\scratchbox}
+
+\def\page_column_routine_package
+ {\global\setbox\normalpagebox\hbox to \makeupwidth\bgroup
+ \edef\p_separator{\pagecolumnsparameter\c!separator}%
+ \pagecolumnseparatorwidth\d_page_column_distance
+ \edef\p_direction{\pagecolumnsparameter\c!direction}%
+ \ifx\p_direction\v!reverse
+ \dostepwiserecurse\c_page_column_n_of_columns\plusone\minusone
+ {\page_column_routine_package_step
+ \ifnum\recurselevel>\plusone
+ \page_column_routine_package_separate
+ \fi}%
+ \else
+ \dorecurse\c_page_column_n_of_columns
+ {\page_column_routine_package_step
+ \ifnum\recurselevel<\c_page_column_n_of_columns
+ \page_column_routine_package_separate
+ \fi}%
+ \fi
+ \egroup
+ \resetboxesincache{\s!pagecolumn}}
+
+%D \unknown
+
+\unexpanded\def\page_column_command_check_if_float_fits
+ {\ifnum\c_page_column_n_of_columns=\plusone
+ \page_one_command_check_if_float_fits
+ \else
+ \page_column_command_check_if_float_fits_indeed
+ \fi}
+
+\unexpanded\def\page_column_command_check_if_float_fits_indeed
+ {\ifconditional\c_page_floats_not_permitted
+ %\writestatus{CHECK}{\the\wd\floatbox,\the\d_page_column_available,NOT PERMITTED}
+ \global\setfalse\c_page_floats_room
+ \else\ifdim\naturalfloatwidth>\d_page_column_column_width
+ %\writestatus{CHECK}{\the\wd\floatbox,\the\d_page_column_available,TOO WIDE}
+ \global\setfalse\c_page_floats_room
+ \else
+ %\writestatus{CHECK}{\the\wd\floatbox,\the\d_page_column_available,SEEMS TO FIT}
+ % same as one
+ \begingroup
+ \scratchdimen\dimexpr\pagetotal+\lineheight\relax
+ \ifdim\scratchdimen>\pagegoal
+ \goodbreak
+ \fi
+ \endgroup
+ \scratchdimenone\dimexpr\pagetotal+\floatheight+\d_strc_floats_top-\pageshrink\relax
+ \scratchdimentwo\pagegoal
+ \relax % needed
+ \ifcase\c_page_one_float_method
+ % method 0 : raw
+ \or
+ % method 1 : safe
+ \advance\scratchdimentwo -\strutdp
+ \or
+ % method 2 : tight
+ \advance\scratchdimenone -\onepoint
+ \fi
+ \relax % really needed ! ! ! !
+ \ifdim\scratchdimenone>\scratchdimentwo
+ \global\setfalse\c_page_floats_room
+ \else
+ \global\settrue\c_page_floats_room
+ \fi
+ \fi\fi}
+
+%D The separator code is more or less the same as mixed columns but we need
+%D to compensate for the top floats so we comment a bit for now.
+
+\newdimen\pagecolumnseparatorheight
+\newdimen\pagecolumnseparatordepth
+\newdimen\pagecolumnseparatorwidth
+
+% \installcorenamespace{pagecolumnsseparator}
+%
+% \unexpanded\def\installpagecolumnseparator#1#2%
+% {\setvalue{\??pagecolumnsseparator#1}{#2}}
+%
+% \installpagecolumnseparator\v!rule
+% {\vrule
+% \s!width \pagecolumnsparameter\c!rulethickness
+% \s!height\pagecolumnseparatorheight
+% \s!depth \pagecolumnseparatordepth
+% \relax}
+%
+% \def\page_column_routine_package_separate
+% {\ifcsname\??pagecolumnsseparator\p_separator\endcsname
+% \page_column_command_inject_separator
+% \else
+% \hss
+% \fi}
+%
+% \unexpanded\def\page_column_command_inject_separator
+% {\begingroup
+% \setbox\scratchbox\hbox to \zeropoint \bgroup
+% \hss
+% \starttextproperties
+% \usepagecolumnscolorparameter\c!rulecolor
+% \begincsname\??pagecolumnsseparator\p_separator\endcsname % was \c!rule
+% \stoptextproperties
+% \hss
+% \egroup
+% \ht\scratchbox\zeropoint
+% \dp\scratchbox\zeropoint
+% \hss
+% \box\scratchbox
+% \hss
+% \endgroup}
+
+\def\page_column_routine_package_separate
+ {\hss}
+
+%D \unknown
+
+\unexpanded\def\page_column_command_routine % yet the same
+ {\ifnum\c_page_column_n_of_columns=\plusone
+ \page_sides_output_routine
+ \else
+ \page_sides_output_routine_column
+ \fi}
+
+\def\page_sides_output_routine_column
+ {\ifconditional\c_page_sides_short
+ \page_sides_output_routine_yes_column
+ \else
+ \page_sides_output_routine_nop_column
+ \fi}
+
+\let\page_sides_output_routine_nop_column\page_sides_output_routine_nop
+
+\def\page_sides_output_routine_yes_column % this might become the main one too
+ {\unvbox\normalpagebox % bah, and the discards?
+ %\page_column_column
+ \column % \page
+ %
+ % % do we really need the next code
+ %
+ % \setbox\b_page_sides_bottom\lastbox
+ % \ifdim\wd\b_page_sides_bottom>\d_page_sides_hsize
+ % \penalty-201 % hm, i really need to write this from scatch
+ % \box\b_page_sides_bottom
+ % \else\ifvoid\b_page_sides_bottom
+ % \else
+ % \page_sides_restore_left_indent
+ % \ifdim\wd\b_page_sides_bottom<\d_page_sides_hsize
+ % \parskip\zeropoint
+ % %\noindent
+ % \ifinner\else
+ % \vadjust{\penalty\minusone}%
+ % \fi
+ % \global\advance\d_page_sides_hsize -\wd\b_page_sides_bottom
+ % \global\divide\d_page_sides_hsize \plustwo
+ % \hskip\d_page_sides_hsize % \kern
+ % \fi
+ % \box\b_page_sides_bottom
+ % \page_sides_restore_output_penalty
+ % \fi\fi
+ % why was this \global\holdinginserts\zerocount
+ \global\setfalse\c_page_sides_short}
+
+%D \unknown
+
+\defineoutputroutine
+ [\s!pagecolumn]
+ [\s!page_otr_command_routine =\page_column_command_routine,
+ \s!page_otr_command_package_contents =\page_column_command_package_contents,
+ \s!page_otr_command_set_vsize =\page_column_command_set_vsize,
+ \s!page_otr_command_set_hsize =\page_column_command_set_hsize,
+ \s!page_otr_command_next_page =\page_column_command_next_page,
+ \s!page_otr_command_next_page_and_inserts =\page_column_command_next_page_and_inserts,
+ % \s!page_otr_command_synchronize_hsize =\page_one_command_synchronize_hsize, % one
+ \s!page_otr_command_set_top_insertions =\page_one_command_set_top_insertions, % one
+ \s!page_otr_command_set_bottom_insertions =\page_one_command_set_bottom_insertions, % one
+ \s!page_otr_command_flush_top_insertions =\page_one_command_flush_top_insertions, % one
+ \s!page_otr_command_flush_bottom_insertions=\page_one_command_flush_bottom_insertions, % one
+ % \s!page_otr_command_set_float_hsize =\page_one_command_set_float_hsize, % one
+ \s!page_otr_command_check_if_float_fits =\page_column_command_check_if_float_fits,
+ \s!page_otr_command_flush_float_box =\page_one_command_flush_float_box, % one
+ \s!page_otr_command_synchronize_side_floats=\page_one_command_synchronize_side_floats, % one
+ \s!page_otr_command_side_float_output =\page_column_command_side_float_output,
+ \s!page_otr_command_flush_floats =\page_one_command_flush_floats, % one
+ \s!page_otr_command_flush_side_floats =\page_one_command_flush_side_floats, % one
+ \s!page_otr_command_flush_saved_floats =\page_one_command_flush_saved_floats, % one
+ \s!page_otr_command_flush_margin_blocks =\page_one_command_flush_margin_blocks, % one
+ \s!page_otr_command_test_column =\page_one_command_test_page % one
+ ]
+
+%D \unknown
+
+\installfloatmethod \s!pagecolumn \v!here \page_one_place_float_here
+\installfloatmethod \s!pagecolumn \v!force \page_one_place_float_force
+\installfloatmethod \s!pagecolumn \v!left \page_one_place_float_left
+\installfloatmethod \s!pagecolumn \v!right \page_one_place_float_right
+\installfloatmethod \s!pagecolumn \v!text \page_one_place_float_text
+\installfloatmethod \s!pagecolumn \v!top \page_one_place_float_top
+\installfloatmethod \s!pagecolumn \v!bottom \page_one_place_float_bottom
+\installfloatmethod \s!pagecolumn \v!auto \page_one_place_float_auto
+\installfloatmethod \s!pagecolumn \v!margin \page_one_place_float_margin
+\installfloatmethod \s!pagecolumn \v!opposite \page_one_place_float_face
+\installfloatmethod \s!pagecolumn \v!page \page_one_place_float_page
+\installfloatmethod \s!pagecolumn \v!leftpage \page_one_place_float_leftpage
+\installfloatmethod \s!pagecolumn \v!rightpage \page_one_place_float_rightpage
+\installfloatmethod \s!pagecolumn \v!inmargin \page_one_place_float_inmargin
+\installfloatmethod \s!pagecolumn \v!inleft \page_one_place_float_leftmargin
+\installfloatmethod \s!pagecolumn \v!inright \page_one_place_float_rightmargin
+\installfloatmethod \s!pagecolumn \v!leftmargin \page_one_place_float_leftmargin
+\installfloatmethod \s!pagecolumn \v!rightmargin \page_one_place_float_rightmargin
+\installfloatmethod \s!pagecolumn \v!leftedge \page_one_place_float_leftedge
+\installfloatmethod \s!pagecolumn \v!rightedge \page_one_place_float_rightedge
+\installfloatmethod \s!pagecolumn \v!somewhere \page_one_place_float_somewhere
+\installfloatmethod \s!pagecolumn \v!backspace \page_one_place_float_backspace
+\installfloatmethod \s!pagecolumn \v!cutspace \page_one_place_float_cutspace
+%installfloatmethod \s!pagecolumn \s!tblr \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!lrtb \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!tbrl \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!fxtb \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!rltb \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!btlr \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!lrbt \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!btrl \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!rlbt \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!fxbt \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!fixd \page_one_place_float_force
+
+\installfloatmethod \s!pagecolumn \v!local \somelocalfloat
+
+%D The main interface:
+
+\setupoutputroutine
+ [\s!pagecolumn]
+
+\installcorenamespace{pagecolumns}
+
+\installframedcommandhandler \??pagecolumns {pagecolumns} \??pagecolumns
+
+\setuppagecolumns
+ [\c!distance=1.5\bodyfontsize,
+ \c!n=\plustwo,
+ %\c!align=, % inherit (also replaces tolerance)
+ %\c!before=,
+ %\c!after=,
+ %\c!separator=\v!none,
+ %\c!setups=,
+ %\c!balance=\v!no,
+ %\c!blank={\v!line,\v!fixed}, yes or no
+ \c!frame=\v!off,
+ \c!strut=\v!no,
+ \c!offset=\v!overlay,
+ %\c!maxheight=\textheight,
+ \c!maxwidth=\makeupwidth,
+ %\c!grid=\v!tolerant,
+ %\c!internalgrid=\v!line,
+ \c!direction=\v!normal]
+
+\let\startpagecolumns\relax % defined later
+\let\stop % automatic as suggested by WScolumns \relax % defined later
+
+\appendtoks % could become an option
+ \setuevalue{\e!start\currentpagecolumns}{\startpagecolumns[\currentpagecolumns]}%
+ \setuevalue{\e!stop \currentpagecolumns}{\stoppagecolumns}%
+\to \everydefinepagecolumns
+
+\ifdefined \columnwidth \else \newdimen\columnwidth \fi
+\ifdefined \columndistance \else \newdimen\columndistance \fi
+
+\unexpanded\def\startpagecolumns
+ {\page
+ \begingroup
+ \dosingleempty\page_column_start}
+
+\unexpanded\def\page_column_start[#1]%
+ {\doifelseassignment{#1}%
+ {\let\currentpagecolumns\empty
+ \setuppagecolumns[#1]}%
+ {\edef\currentpagecolumns{#1}}%
+ %
+ % \page_column_enable_grid_snapping
+ %
+ \d_page_column_distance \pagecolumnsparameter\c!distance\relax
+ \c_page_column_n_of_columns \pagecolumnsparameter\c!n\relax
+ % \d_page_column_max_height \pagecolumnsparameter\c!maxheight
+ \d_page_column_max_width \pagecolumnsparameter\c!maxwidth
+ % \d_page_column_balance_step \pagecolumnsparameter\c!step
+ \c_page_column_current \plusone
+ %
+ \d_page_column_column_width\dimexpr(\d_page_column_max_width-\d_page_column_distance*\numexpr(\c_page_column_n_of_columns-\plusone)\relax)/\c_page_column_n_of_columns\relax
+ %
+ \columnwidth \d_page_column_column_width
+ \columndistance \d_page_column_distance
+ %
+ \nopenalties
+ %
+ % \insidecolumnstrue % NO!
+ %
+ \let\column\page_column_column
+ %
+ \def\page_floats_get_used_hsize{\makeupwidth} % a bit of a hack
+ %
+ \usealignparameter \pagecolumnsparameter
+ \useblankparameter \pagecolumnsparameter
+ % \useprofileparameter\pagecolumnsparameter
+ %
+ \usemixedcolumnscolorparameter\c!color
+ %
+ \setupnotes[\c!width=\textwidth]%
+ %
+ \usesetupsparameter\pagecolumnsparameter
+ %
+ \setupoutputroutine[\s!pagecolumn]%
+ %
+ \page_column_command_set_vsize
+ \page_column_command_set_hsize
+ %
+ \nofcolumns\c_page_mix_n_of_columns} % public
+
+\unexpanded\def\stoppagecolumns
+ {\page
+ \endgroup}
+
+\protect \endinput
diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv
index 3eb13769e..eff4cbcbf 100644
--- a/tex/context/base/mkiv/spac-ali.mkiv
+++ b/tex/context/base/mkiv/spac-ali.mkiv
@@ -795,6 +795,9 @@
\setvalue{\??aligncommand3*\v!final}{\c_spac_align_state_par_fill\plusthree}
\setvalue{\??aligncommand4*\v!final}{\c_spac_align_state_par_fill\plusfour}
+% \setvalue{\??aligncommand ... }{\toksapp\t_spac_align_collected{\nopenalties}}
+% \setvalue{\??aligncommand ... }{\toksapp\t_spac_align_collected{\setdefaultpenalties}}
+
\definehspace [\v!final] [\emspaceamount]
\def\spac_align_flush_parfill
diff --git a/tex/context/base/mkiv/spac-ver.mkiv b/tex/context/base/mkiv/spac-ver.mkiv
index f0e60e32e..f3c12bed4 100644
--- a/tex/context/base/mkiv/spac-ver.mkiv
+++ b/tex/context/base/mkiv/spac-ver.mkiv
@@ -1375,15 +1375,21 @@
\newif\ifgridsnapping % to be sure
-\def\defaultwidowpenalty {2000} % was: 1000
-\def\defaultclubpenalty {2000} % was: 800
-\def\defaultdisplaywidowpenalty {50}
-\def\defaultbrokenpenalty {100}
-
-\def\defaultgridwidowpenalty {0}
-\def\defaultgridclubpenalty {0}
-\def\defaultgriddisplaywidowpenalty {0}
-\def\defaultgridbrokenpenalty {0}
+\def\defaultdisplaywidowpenalty {50}
+\def\defaultwidowpenalty {2000} % was: 1000
+\def\defaultclubpenalty {2000} % was: 800
+\def\defaultbrokenpenalty {100}
+\def\defaultdoublehyphendemerits {10000}
+\def\defaultfinalhyphendemerits {5000}
+\def\defaultadjdemerits {10000}
+
+\def\defaultgriddisplaywidowpenalty {0}
+\def\defaultgridwidowpenalty {0}
+\def\defaultgridclubpenalty {0}
+\def\defaultgridbrokenpenalty {0}
+\def\defaultgriddoublehyphendemerits{10000} % always was so
+\def\defaultgridfinalhyphendemerits {5000} % always was so
+\def\defaultgridadjdemerits {10000} % always was so
\unexpanded\def\nopenalties
{\widowpenalty \zerocount
@@ -1408,10 +1414,13 @@
\directsetup{\systemsetupsprefix\s!reset}
- \widowpenalty \defaultwidowpenalty
- \clubpenalty \defaultclubpenalty
- \displaywidowpenalty\defaultdisplaywidowpenalty
- \brokenpenalty \defaultbrokenpenalty
+ \widowpenalty \defaultwidowpenalty
+ \clubpenalty \defaultclubpenalty
+ \displaywidowpenalty \defaultdisplaywidowpenalty
+ \brokenpenalty \defaultbrokenpenalty
+ \doublehyphendemerits\defaultdoublehyphendemerits
+ \finalhyphendemerits \defaultfinalhyphendemerits
+ \adjdemerits \defaultadjdemerits
\stopsetups
@@ -1419,10 +1428,13 @@
\directsetup{\systemsetupsprefix\s!reset}
- \widowpenalty \defaultgridwidowpenalty
- \clubpenalty \defaultgridclubpenalty
- \displaywidowpenalty\defaultgriddisplaywidowpenalty
- \brokenpenalty \defaultgridbrokenpenalty
+ \widowpenalty \defaultgridwidowpenalty
+ \clubpenalty \defaultgridclubpenalty
+ \displaywidowpenalty \defaultgriddisplaywidowpenalty
+ \brokenpenalty \defaultgridbrokenpenalty
+ \doublehyphendemerits\defaultgriddoublehyphendemerits
+ \finalhyphendemerits \defaultgridfinalhyphendemerits
+ \adjdemerits \defaultgridadjdemerits
\stopsetups
@@ -1432,9 +1444,12 @@
\directsetup{\systemsetupsprefix\s!reset}
- \setpenalties\widowpenalties\plustwo\maxdimen
- \setpenalties\clubpenalties \plustwo\maxdimen
- \brokenpenalty \maxdimen
+ \setpenalties \widowpenalties \plustwo \maxdimen
+ \setpenalties \clubpenalties \plustwo \maxdimen
+ \brokenpenalty \maxdimen
+ \doublehyphendemerits \defaultdoublehyphendemerits
+ \finalhyphendemerits \defaultfinalhyphendemerits
+ \adjdemerits \defaultadjdemerits
\stopsetups
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 2279d5eba..b5d4901ed 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 42e37801c..f8685b73f 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-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi
index 1b75c7011..408a48611 100644
--- a/tex/context/base/mkiv/strc-flt.mkvi
+++ b/tex/context/base/mkiv/strc-flt.mkvi
@@ -97,17 +97,17 @@
\c!textcolor=,
\c!align=,
\c!number=\v!yes,
- % \c!expansion=\v!no
- % \c!prefix=\v!no,
- % \c!prefixconnector=.,
- % \c!way=\v!by\v!chapter,
- % \c!prefixsegments=2:2,
- % \c!way=\@@nrway,
- % \c!blockway=\@@nrblockway,
- % \c!sectionnumber=\@@nrsectionnumber,
- % \c!separator=\@@koseparator,
- % \c!starter=\@@kostarter,
- % \c!stopper=\@@kostopper,
+ % \c!expansion=,
+ % \c!prefix=,
+ % \c!prefixconnector=,
+ % \c!way=,
+ % \c!prefixsegments=,
+ % \c!way=,
+ % \c!blockway=,
+ % \c!sectionnumber=,
+ % \c!separator=,
+ % \c!starter=,
+ % \c!stopper=,
\c!suffixseparator=, % currently rather hard coded
\c!suffix=\floatcaptionsuffix,
\c!distance=\emwidth,
@@ -410,30 +410,6 @@
\fi
\fi}
-% The tricky part of getting float related two pass data is
-% that we should fetch is early but can only save it with
-% the composed float box; this determines the order: get it
-% before saving it.
-
-% We had this:
-%
-% \definetwopasslist{\s!float\s!data} \newcounter\noffloatdata
-%
-% \let\strc_float_realpage\realpageno % used for odd/even determination, can be combined with nodelocation
-%
-% \def\strc_float_save_data % \expanded ... will change in mkiv
-% {\doglobal\increment\noffloatdata
-% \lazysavetaggedtwopassdata{\s!float\s!data}{\noffloatdata}{\noffloatpages}{\noexpand\realfolio}}% later {}{}{}{} and \getfirst...
-%
-% \def\strc_float_load_data % precedes save !
-% {\doglobal\increment\noffloatpages
-% \findtwopassdata{\s!float\s!data}{\noffloatpages}%
-% \ifconditional\twopassdatafound
-% \globallet\strc_float_realpage\twopassdata
-% \else
-% \globallet\strc_float_realpage\realpageno % \realfolio
-% \fi}
-
%D We can do this ...
%D
%D \starttyping
diff --git a/tex/context/base/mkiv/typo-duc.lua b/tex/context/base/mkiv/typo-duc.lua
index 9033e6d47..7d3834b20 100644
--- a/tex/context/base/mkiv/typo-duc.lua
+++ b/tex/context/base/mkiv/typo-duc.lua
@@ -4,16 +4,16 @@ if not modules then modules = { } end modules ['typo-duc'] = {
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files",
- comment = "Unicode bidi (sort of) variant b",
+ comment = "Unicode bidi (sort of) variant c",
}
--- This is a follow up on typo-uba which itself is a follow up on t-bidi by Khaled Hosny which
+-- This is a follow up on typo-uda which itself is a follow up on t-bidi by Khaled Hosny which
-- in turn is based on minibidi.c from Arabeyes. This is a further optimizations, as well as
-- an update on some recent unicode bidi developments. There is (and will) also be more control
-- added. As a consequence this module is somewhat slower than its precursor which itself is
-- slower than the one-pass bidi handler. This is also a playground and I might add some plugin
-- support. However, in the meantime performance got a bit better and this third variant is again
--- some 10% faster than the two variant.
+-- some 10% faster than the second variant.
-- todo (cf html):
--
diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml
index e3b626c2a..97b954e5a 100644
--- a/tex/context/interface/mkiv/context-en.xml
+++ b/tex/context/interface/mkiv/context-en.xml
@@ -9836,7 +9836,7 @@
</cd:parameter>
<cd:parameter name="paper">
<cd:constant type="auto"/>
- <cd:constant default="yes" type="defaut"/>
+ <cd:constant default="yes" type="default"/>
<cd:constant type="cd:name"/>
</cd:parameter>
<cd:inherit name="setupframed"/>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index bc74703e1..601963f61 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-fittingpage.xml b/tex/context/interface/mkiv/i-fittingpage.xml
index 4398625c3..8c2003568 100644
--- a/tex/context/interface/mkiv/i-fittingpage.xml
+++ b/tex/context/interface/mkiv/i-fittingpage.xml
@@ -33,7 +33,7 @@
</cd:parameter>
<cd:parameter name="paper">
<cd:constant type="auto"/>
- <cd:constant type="defaut" default="yes"/>
+ <cd:constant type="default" default="yes"/>
<cd:constant type="cd:name"/>
</cd:parameter>
<cd:inherit name="setupframed"/>
@@ -100,4 +100,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 121dc7bba..40b54dccd 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-evohome.mkiv b/tex/context/modules/mkiv/s-evohome.mkiv
new file mode 100644
index 000000000..06641d2c4
--- /dev/null
+++ b/tex/context/modules/mkiv/s-evohome.mkiv
@@ -0,0 +1,290 @@
+%D \module
+%D [ file=s-evohome,
+%D version=2017.11.12,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Evohome Graphics,
+%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.
+
+% in cronjob on one of the servers:
+%
+% mtxrun --script youless --collect --host=192.168.2.50 --watt youless-watt.lua
+% mtxrun --script youless --collect --host=192.168.2.50 --kwk youless-kwh.lua
+
+\setupbodyfont[dejavu]
+
+\starttext
+
+\startluacode
+
+require("util-evo")
+
+moduledata.evohome = { }
+
+function moduledata.evohome.status(specification)
+
+ local presets = utilities.evohome.loadpresets(specification.presets)
+ local zones = utilities.evohome.loadtemperatures(presets)
+
+ -- todo : time
+
+ if not zones then
+ context("no zones")
+ context.blank()
+ return
+ end
+
+ local t = zones.time
+
+ t = t and os.date("%Y-%m-%d %H:%M:%S",t) or "unknown time"
+
+ context.starttitle { title = t }
+
+ context.starttabulate { "|l|c|c|c|c|" }
+ context.BC() context("name")
+ context.BC() context("current")
+ context.BC() context("min")
+ context.BC() context("max")
+ context.BC() context("target")
+ context.NC() context.NR()
+ for i=1,#zones do
+ local zone = zones[i]
+ context.NC() context.word(zone.name)
+ context.NC() context("%0.1f",zone.current)
+ context.NC() context("%0.1f",zone.min)
+ context.NC() context("%0.1f",zone.max)
+ context.NC() context("%0.1f",zone.target)
+ context.NC() context.NR()
+ end
+ context.stoptabulate()
+
+ for i=1,#zones do
+ local zone = zones[i]
+ local data = utilities.evohome.getroomstate(presets,zone.name)
+ local schedule = data.schedule or { }
+ context.startsubject { title = zone.name }
+ context.starttabulate { "|l|c|c|" }
+ context.BC() context("day")
+ context.BC() context("time")
+ context.BC() context("temperature")
+ context.NR()
+ local daily = schedule.dailySchedules
+ if daily then
+ for i=1,#daily do
+ local d = daily[i]
+ local s = d.switchpoints
+ if s then
+ for i=1,#s do
+ context.NC()
+ if i == 1 then
+ context.word(d.dayOfWeek)
+ end
+ context.NC() context(s[i].timeOfDay)
+ context.NC() context(s[i].temperature)
+ context.NC() context.NR()
+ end
+ end
+ end
+ end
+ context.stoptabulate()
+ context.stopsubject()
+ end
+
+ context.stoptitle()
+
+end
+
+function moduledata.evohome.history(specification)
+
+ local presets = utilities.evohome.loadpresets(specification.presets)
+ local zones = utilities.evohome.loadtemperatures(presets)
+
+ if not zones then
+ context("no zones")
+ context.blank()
+ return
+ end
+
+ local data = utilities.evohome.loadhistory(presets)
+
+ if not zones then
+ context("no history")
+ return
+ end
+
+ local years = data.years
+
+ if not years then
+ context("no years")
+ return
+ end
+
+ local minyear = specification.year or 2017
+ local maxyear = minyear
+ local minmonth = specification.month or 1
+ local maxmonth = specification.month or 12
+
+ local scale = 1/8 -- 20
+ local mark = 3
+ local abstemp = 25
+
+ for y=minyear,maxyear do
+
+ local year = years[y]
+
+ for m=minmonth,maxmonth do
+
+ local month = year.months[m]
+
+ if month then
+
+ context.starttitle { title = "\\month{" .. m .. "}\\enspace" .. y } -- todo: function context.Month(m) end
+
+ for i=1,#zones do
+
+ local zone = zones[i]
+ local where = zone.name
+ local mintemp = zone.min
+ local maxtemp = zone.max
+
+ -- context.startMPpage { offset = "10pt" }
+ context.startlinecorrection()
+ context.startMPcode()
+ context("linecap := butt; pickup pencircle scaled .5")
+
+ context("fill (%s,%s) -- (%s,%s) -- (%s,%s) -- (%s,%s) -- cycle withcolor .8white ;",
+ 0, mintemp/scale,
+ 31 * 24, mintemp/scale,
+ 31 * 24, maxtemp/scale,
+ 0, maxtemp/scale
+ )
+
+ for i=0,abstemp do
+ context("draw (%s,%s) -- (%s,%s) withcolor .6white ;",
+ 0, i/scale,
+ 31 * 24, i/scale
+ )
+ end
+
+ local days = month.days
+ if days then
+ local nd = os.nofdays(y,m)
+ for d=1,nd do
+ local day = days[d]
+ local xoffset = (d-1) * 24
+ local wd = os.weekday(d,m,y)
+ local weekend = wd == 1 or wd == 7
+ if not weekend then
+ -- okay
+ elseif mark == 1 then
+ context("draw (%s,%s) -- (%s,%s) ; ",xoffset, -17.5,xoffset, -32.5)
+ context("draw (%s,%s) -- (%s,%s) ; ",xoffset+24,-17.5,xoffset+24,-32.5)
+ elseif mark == 2 then
+ context("draw (%s,%s) -- (%s,%s) ; ",xoffset, -17.5,xoffset+24,-17.5)
+ context("draw (%s,%s) -- (%s,%s) ; ",xoffset, -32.5,xoffset+24,-32.5)
+ elseif mark == 3 then
+ context("draw unitsquare xysized (%s,%s) shifted (%s,%s) ; ",24,15,xoffset,-32.5)
+ end
+ context([[draw textext("%s") shifted (%s,%s) ; ]],d,xoffset + 12,-25)
+ if day then
+ for h=0,23 do
+ local hours = day.hours
+ if hours then
+ local hour = hours[h]
+ if hour then
+ local a = 0
+ local n = 0
+ local m = 0
+ for minute, d in next, hour do
+ local v = d[where]
+ a = a + v
+ n = n + 1
+ if v > m then
+ m = v
+ end
+ end
+ a = a / n
+ local dx = xoffset + h
+ local dy = a/scale
+ local dm = m/scale
+ context("draw (%s,%s) -- (%s,%s) withcolor %s ; ",
+ dx, 0,dx,dy,weekend and "darkmagenta" or "darkblue")
+ context("draw (%s,%s) -- (%s,%s) withcolor %s ; ",
+ dx,dy,dx,dm,"darkred")
+ end
+ end
+ end
+ end
+ end
+ for d=0,30 do
+ local xoffset = d * 24
+ context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset+ 0,0,xoffset+ 0,-10)
+ context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset+ 6,0,xoffset+ 6,-2.5)
+ context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset+12,0,xoffset+12,-5)
+ context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset+18,0,xoffset+18,-2.5)
+ end
+ local xoffset = 31 * 24
+ context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset,0,xoffset,-10)
+ end
+
+ for i=0,abstemp,5 do
+ context([[draw textext.lft("%s") shifted (%s,%s) ; ]],i,-10,i/scale)
+ context("draw (%s,%s) -- (%s,%s) withcolor .2white ;",0,i/scale,31 * 24,i/scale)
+ end
+
+ context([[draw textext("\strut\month{%s}\enspace%s\enspace:\enspace%s") shifted (%s,%s) ; ]], m, y, where, 31 * 24 / 2, -50)
+ context([[draw textext.lft("\textdegree{}C") shifted (%s,%s) ; ]],-10,-25)
+
+ context("currentpicture := currentpicture xsized TextWidth") ;
+
+ context.stopMPcode()
+ context.stoplinecorrection()
+ -- context.stopMPpage()
+ end
+
+ context.stoptitle()
+
+ end
+
+ end
+
+ end
+
+end
+
+\stopluacode
+
+\continueifinputfile{s-evohome.mkiv}
+
+\usemodule[art-01]
+
+\setuplayout
+ [article]
+ [footer=0cm,
+ header=1cm,
+ topspace=5mm,
+ bottomspace=5mm]
+
+\starttext
+
+ \startluacode
+
+ -- os.execute([[mtxrun --script evohome --collect --presets=c:/data/develop/domotica/code/evohome-presets.lua]])
+
+ local specification = {
+ year = 2017,
+ -- month = 11,
+ presets = "c:/data/develop/domotica/code/evohome-presets.lua",
+ }
+
+ moduledata.evohome.status (specification)
+ moduledata.evohome.history(specification)
+
+ \stopluacode
+
+\stoptext
diff --git a/tex/context/modules/mkiv/s-fonts-variable.mkiv b/tex/context/modules/mkiv/s-fonts-variable.mkiv
index d024ddc05..1a826314d 100644
--- a/tex/context/modules/mkiv/s-fonts-variable.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-variable.mkiv
@@ -30,11 +30,11 @@
{\begingroup
\scratchskip \interwordspace plus \interwordstretch minus \interwordshrink
\normalexpanded{\hpack\bgroup
- \tttf
- sp: \the\scratchskip \hskip\emwidth
- es: \the\extraspace\hskip\emwidth
- ex: \the\exheight \hskip\emwidth
- em: \the\emwidth \hskip\emwidth
+ \tt\txx
+ sp: \the\scratchskip\hskip\emwidth
+ es: \the\extraspace \hskip\emwidth
+ ex: \the\exheight \hskip\emwidth
+ em: \the\emwidth \hskip\emwidth
\egroup}%
\endgroup}
@@ -108,4 +108,7 @@
% \showfontvariations
% [font=file:AmstelvarAlpha-VF.ttf]
+ \showfontvariations
+ [font=file:bahnshrift.ttf]
+
\stoptext
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 741f4e7ac..f8ad44f8f 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 : 11/08/17 22:45:06
+-- merge date : 11/14/17 13:52:52
do -- begin closure to overcome local limits and interference