summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-08-26 16:29:15 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-08-26 16:29:15 +0200
commit2146c5714b53b92df35551a989cbe1db7b290829 (patch)
treec5082e64775784c5aee84039b6bf316e75c155a7 /tex/context/base/mkiv
parentacf69d3d7873025941544add3ba168b367c84edd (diff)
downloadcontext-2146c5714b53b92df35551a989cbe1db7b290829.tar.gz
2016-08-26 15:40:00
Diffstat (limited to 'tex/context/base/mkiv')
-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-dsp.lua3
-rw-r--r--tex/context/base/mkiv/mult-def.lua4
-rw-r--r--tex/context/base/mkiv/pack-com.mkiv4
-rw-r--r--tex/context/base/mkiv/publ-imp-apa.mkvi22
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9238 -> 9133 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin369102 -> 369101 bytes
-rw-r--r--tex/context/base/mkiv/strc-flt.mkvi86
9 files changed, 91 insertions, 32 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 0886f6e81..2f11fa776 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{2016.08.25 14:14}
+\newcontextversion{2016.08.26 15:35}
%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 1ca5dbb5e..0806b4977 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.08.25 14:14}
+\edef\contextversion{2016.08.26 15:35}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 49d5929f6..1c81e5e22 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -53,6 +53,7 @@ local bittest = bit32.btest
local rshift = bit32.rshift
local concat = table.concat
local lower = string.lower
+local copy = table.copy
local sub = string.sub
local strip = string.strip
local tohash = table.tohash
@@ -1698,7 +1699,7 @@ do
flags = d.flags,
-- chain = d.chain,
}
- sublookuplist[nofsublookups] = h
+ sublookuplist[nofsublookups] = copy(h) -- we repack later
sublookuphash[lookupid] = nofsublookups
sublookupcheck[lookupid] = 1
else
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index 6b55c7626..b6a9c64ee 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -13175,6 +13175,10 @@ return {
["pe"]="لبه",
["ro"]="bordura",
},
+ ["effective"]={
+ ["en"]="effective",
+ ["nl"]="effectief",
+ },
["embed"]={
["en"]="embed",
["nl"]="sluitin",
diff --git a/tex/context/base/mkiv/pack-com.mkiv b/tex/context/base/mkiv/pack-com.mkiv
index c9c3bab4b..74230a099 100644
--- a/tex/context/base/mkiv/pack-com.mkiv
+++ b/tex/context/base/mkiv/pack-com.mkiv
@@ -487,7 +487,7 @@
\let\stopfloatcombination\relax
\def\pack_combinations_start_float[#1][#2]%
- {\vbox\bgroup
+ {\dontleavehmode\vbox\bgroup
%\insidecolumnstrue % trick, forces no centering, todo: proper switch/feature
\postcenterfloatmethod\zerocount
\forcelocalfloats
@@ -496,7 +496,7 @@
\def\pack_combinations_stop_float#1%
{\scratchtoks\emptytoks
\dorecurse\noflocalfloats
- {\appendetoks{\noexpand\getlocalfloat{\recurselevel}}{}\to\scratchtoks}% brrr
+ {\appendetoks{\getlocalfloat{\recurselevel}}{}\to\scratchtoks}% brrr
\expanded{\startcombination[#1]\the\scratchtoks}\stopcombination
\resetlocalfloats
\egroup}
diff --git a/tex/context/base/mkiv/publ-imp-apa.mkvi b/tex/context/base/mkiv/publ-imp-apa.mkvi
index 9492b44e8..6aa589478 100644
--- a/tex/context/base/mkiv/publ-imp-apa.mkvi
+++ b/tex/context/base/mkiv/publ-imp-apa.mkvi
@@ -35,7 +35,11 @@
\c!specification=apa,
\c!otherstext={\btxspace\btxlabeltext{others}},
%c!journalconversion=\v!normal,
- \c!monthconversion=\v!month]
+ \c!monthconversion=\v!month,
+ \c!stopper:initials={. }, % with a (breakable) space
+ \c!separator:names:2={\btxcomma}, % aka namesep - in this namespace
+ \c!separator:names:3={\btxcomma\btxnobreakspace\textampersand\space}, % comma separated list
+ \c!separator:names:4={\btxnobreakspace\textampersand\space}] % last of two, no comma!
% First, define list and rendering parameters
@@ -61,10 +65,7 @@
\c!etallimit=7,
\c!etaldisplay=6,
\c!etaloption=last,
- \c!authorconversion=invertedshort,
- \c!separator:names:2={\btxcomma}, % aka namesep - in this namespace
- \c!separator:names:3={\btxcomma\btxnobreakspace\textampersand\space}, % comma separated list
- \c!separator:names:4={\btxnobreakspace\textampersand\space}] % last of two, no comma!
+ \c!authorconversion=invertedshort]
% First, we define a namespace for a few special fields
@@ -280,7 +281,6 @@
\c!authorconversion=\v!name,
\c!sorttype=normal,
\c!compress=\v!yes, % note that cite sorts only work with compress=yes.
- \c!separator:names:2={\btxcomma},
\c!separator:names:3={\btxcomma\btxlabeltext{and}\space}, % not \textampersand
\c!separator:names:4={\btxspace\btxlabeltext{and}\space}] % not \textampersand
@@ -319,8 +319,8 @@
[\c!left={(},
\c!right={)},
\c!inbetween={\btxcomma},
- \c!separator:names:3={\btxcomma\texampersand\space},
- \c!separator:names:4={\btxspace\texampersand\space}]
+ \c!separator:names:3={\btxcomma\textampersand\space},
+ \c!separator:names:4={\btxspace\textampersand\space}]
\definebtx
[apa:\s!cite:default]
@@ -329,7 +329,7 @@
\definebtx
[apa:\s!cite:authoryears]
[apa:\s!cite:author]
- [\c!left=,
+ [\c!left=, % these two settings are perhaps redundant?
\c!right=,
\c!inbetween={\btxspace}]
@@ -337,7 +337,9 @@
[apa:\s!cite:authornum]
[apa:\s!cite:author]
[\c!left={(},
- \c!right={)}]
+ \c!right={)},
+ \c!separator:names:3={\btxcomma\textampersand\space},
+ \c!separator:names:4={\btxspace\textampersand\space}]
\definebtx
[apa:\s!cite:author:num] % todo
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 50eaedba1..1161e801c 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 61861f2bd..b44dd4cd6 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 90294cf38..e28039716 100644
--- a/tex/context/base/mkiv/strc-flt.mkvi
+++ b/tex/context/base/mkiv/strc-flt.mkvi
@@ -744,7 +744,7 @@
\global\setfalse\c_strc_floats_par_float
\else
\doifelsecommon\floatlocation\flushfloatslist
- {\global\settrue \c_strc_floats_par_float}
+ {\global\settrue \c_strc_floats_par_float}%
{\global\setfalse\c_strc_floats_par_float}%
\fi
\global\d_page_sides_shift \zeropoint
@@ -779,21 +779,26 @@
\global\advance\d_page_sides_bottomskip\floatparameter\c!bottomoffset
\else
\processallactionsinset
- [\floatlocation]
+ [\floatlocation]%
[ 90=>\global\c_strc_floats_rotation\commalistelement\relax,%
180=>\global\c_strc_floats_rotation\commalistelement\relax,%
270=>\global\c_strc_floats_rotation\commalistelement\relax]%
\fi
\doifelseinset\v!nonumber\floatlocation
- {\global\nofloatnumbertrue}
+ {\global\nofloatnumbertrue}%
{\doifelse{\floatcaptionparameter\c!number}\v!yes
- {\global\nofloatnumberfalse}
+ {\global\nofloatnumberfalse}%
{\global\nofloatnumbertrue}}%
\doifelseinset\v!none\floatlocation
- {\global\nofloatcaptiontrue}
+ {\global\nofloatcaptiontrue}%
{\global\nofloatcaptionfalse}%
\doif{\floatcaptionparameter\c!number}\v!none % new
{\global\nofloatcaptiontrue}%
+ \doifinset\v!effective\floatlocation
+ {\letfloatparameter \c!leftmargin \effectiveleftskip
+ \letfloatparameter \c!rightmargin\effectiverightskip
+ \letfloatcaptionparameter\c!leftmargin \effectiveleftskip
+ \letfloatcaptionparameter\c!rightmargin\effectiverightskip}%
\ifemptyfloatcaption \ifnofloatnumber
\global\nofloatcaptiontrue
\fi \fi}
@@ -1309,20 +1314,66 @@
% minwidth=fit,width=max : no overshoot, as wide as graphic
+% keep these as reference:
+%
+% \def\strc_floats_align_content_indeed
+% {\alignstrutmode\zerocount
+% \doifnotcommon{\floatcaptionparameter\c!location}{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
+% {\shiftalignedline
+% {\floatparameter\c!leftmargin }{\floatparameter\c!rightmargin}%
+% {\floatparameter\c!innermargin}{\floatparameter\c!outermargin}}%
+% \alignedline{\floatparameter\c!location}\v!middle}
+%
+% \def\strc_floats_align_caption_indeed
+% {\alignstrutmode\zerocount
+% \shiftalignedline
+% {\floatcaptionparameter\c!leftmargin }{\floatcaptionparameter\c!rightmargin}%
+% {\floatcaptionparameter\c!innermargin}{\floatcaptionparameter\c!outermargin}%
+% \alignedline{\floatparameter\c!location}\v!middle}
+%
+% Test case:
+%
+% \setupfloats[location=left]
+% \setupfloatcaption[width=max]
+%
+% \startfloatcombination
+% \placefigure{}{}
+% \placefigure{}{}
+% \stopfloatcombination
+
+%D In a floatcombination we ignore the margins .. if that is ever needed we need another
+%D state (instead of local).
+
+\def\strc_floats_align_indeed
+ {\alignedline{\floatparameter\c!location}\v!middle}
+
+\def\strc_floats_shift_indeed#1%
+ {\shiftalignedline{#1\c!leftmargin}{#1\c!rightmargin}{#1\c!innermargin}{#1\c!outermargin}}
+
\def\strc_floats_align_content_indeed
{\alignstrutmode\zerocount
- \doifnotcommon{\floatcaptionparameter\c!location}{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
- {\shiftalignedline
- {\floatparameter\c!leftmargin }{\floatparameter\c!rightmargin}%
- {\floatparameter\c!innermargin}{\floatparameter\c!outermargin}}%
- \alignedline{\floatparameter\c!location}\v!middle}
+ \ifx\forcedfloatmethod\v!local \else
+ \doifnotcommon{\floatcaptionparameter\c!location}{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
+ {\strc_floats_shift_indeed\floatparameter}%
+ \expandafter\strc_floats_align_indeed
+ \fi}
\def\strc_floats_align_caption_indeed
{\alignstrutmode\zerocount
- \shiftalignedline
- {\floatcaptionparameter\c!leftmargin }{\floatcaptionparameter\c!rightmargin}%
- {\floatcaptionparameter\c!innermargin}{\floatcaptionparameter\c!outermargin}%
- \alignedline{\floatparameter\c!location}\v!middle}
+ \ifx\forcedfloatmethod\v!local
+ \expandafter\strc_floats_align_indeed_local
+ \else
+ \strc_floats_shift_indeed\floatcaptionparameter
+ \expandafter\strc_floats_align_indeed
+ \fi}
+
+% \def\strc_floats_align_indeed_local#1%
+% {\begingroup
+% \hsize\wd\floatbox
+% \strc_floats_align_indeed{#1}%
+% \endgroup}
+
+\let\strc_floats_align_indeed_local\firstofoneargument
\newdimen\d_strc_floats_content
\newdimen\d_strc_float_temp_height
@@ -1896,7 +1947,7 @@
% test \placefigure{} {\externalfigure[cow.pdf][frame=on,grid=depth]} test \page
% test \placefigure{\input zapf\relax}{\externalfigure[cow.pdf][frame=on,grid=depth]} test \page
% \stoptext
-
+
% This might move to page-flt:
\newif\ifpostponecolumnfloats \postponecolumnfloatsfalse % don't change
@@ -1979,11 +2030,12 @@
\def\strc_floats_prepare_side_caption_fit % or center when smaller
{\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax
- \setbox\b_strc_floats_caption\vbox
+ \setbox\b_strc_floats_caption\vbox
{\forgetall % needed?
\hsize\wd\b_strc_floats_content
\strc_floats_make_complete_caption}%
\else
+ % maybe we should listen to the align option here (now side floats need the max option
\setbox\b_strc_floats_caption\hpack to \wd\b_strc_floats_content
{\hss\hbox{\strc_floats_make_complete_caption}\hss}%
\fi}
@@ -2097,7 +2149,7 @@
\let\floatlabel \empty % set by lua
\let\floatcolumn \empty % set by lua
\let\floatrow \empty % set by lua
-\let\forcedfloatmethod\empty % set by lua
+\let\forcedfloatmethod\empty % set by lua and floatcombinations
\def\setfloatmethodvariables#1% \floatmethod \floatlabel \floatrow \floatcolumn
{\clf_analysefloatmethod{#1}}