diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/anch-pos.lua | 15 | ||||
-rw-r--r-- | tex/context/base/anch-pos.mkiv | 10 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4074 -> 4069 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 104794 -> 104903 bytes | |||
-rw-r--r-- | tex/context/base/page-box.mkvi | 37 | ||||
-rw-r--r-- | tex/context/base/page-one.mkiv | 38 | ||||
-rw-r--r-- | tex/context/base/page-sid.mkiv | 6 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24305 -> 24338 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 172421 -> 172422 bytes | |||
-rw-r--r-- | tex/context/base/strc-lst.mkvi | 18 | ||||
-rw-r--r-- | tex/context/base/strc-num.mkiv | 4 |
11 files changed, 78 insertions, 50 deletions
diff --git a/tex/context/base/anch-pos.lua b/tex/context/base/anch-pos.lua index 19c35a5a6..5d01a6e46 100644 --- a/tex/context/base/anch-pos.lua +++ b/tex/context/base/anch-pos.lua @@ -292,18 +292,23 @@ end function jobpositions.b_region(tag) local last = tobesaved[tag] last.x = pdf.h +last.y = pdf.v last.p = texcount.realpageno insert(regions,tag) region = tag end -function jobpositions.e_region() - tobesaved[region].y = pdf.v +function jobpositions.e_region(correct) + local last = tobesaved[region] +if correct then + last.h = last.y - pdf.v +end + last.y = pdf.v remove(regions) region = regions[#regions] end -function jobpositions.markregionbox(n,tag) +function jobpositions.markregionbox(n,tag,correct) if not tag or tag == "" then nofregions = nofregions + 1 tag = format("region:%s",nofregions) @@ -315,13 +320,13 @@ function jobpositions.markregionbox(n,tag) tobesaved[tag] = { p = true, x = true, - y = true, + y = pdf.v, -- true, w = w ~= 0 and w or nil, h = h ~= 0 and h or nil, d = d ~= 0 and d or nil, } local push = new_latelua(format("_plib_.b_region(%q)",tag)) - local pop = new_latelua("_plib_.e_region()") + local pop = new_latelua(format("_plib_.e_region(%s)",tostring(correct))) -- maybe we should construct a hbox first (needs experimenting) so that we can avoid some at the tex end local head = box.list if head then diff --git a/tex/context/base/anch-pos.mkiv b/tex/context/base/anch-pos.mkiv index e297369b6..2e13eeba2 100644 --- a/tex/context/base/anch-pos.mkiv +++ b/tex/context/base/anch-pos.mkiv @@ -256,12 +256,12 @@ {\iftrialtypesetting \singleexpandafter\gobbleoneargument \else\ifpositioning - \doubleexpandafter\gobbleoneargument - \else \doubleexpandafter\anch_mark_region_box_indeed + \else + \doubleexpandafter\gobbleoneargument \fi\fi} -\unexpanded\def\anch_mark_region_box#1% +\unexpanded\def\anch_mark_region_box_indeed#1% {\ctxcommand{markregionbox(\number#1)}} \unexpanded\def\anch_mark_flow_box#1% will be extended / renamed @@ -271,6 +271,10 @@ \box#1% \egroup} +\unexpanded\def\anch_mark_flow_only#1% will be extended / renamed + {\global\advance\c_anch_text\plusone + \ctxcommand{markregionbox(\number#1,"textarea:\the\c_anch_text",true)}} + \unexpanded\def\anch_make_page_box#1% maybe like text {\ctxcommand{markregionbox(\number#1,"\pageanchor")}} % needs an hbox diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex a89825054..f9ae11862 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex 90b846d3c..092ca2d98 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/page-box.mkvi b/tex/context/base/page-box.mkvi index 7d034105c..d9b2af881 100644 --- a/tex/context/base/page-box.mkvi +++ b/tex/context/base/page-box.mkvi @@ -278,25 +278,32 @@ \def\page_areas_registered_box_indeed#1#2#3% #1=lower-dp #2=correct-ht #3=box {\anch_mark_flow_box{#3}} -\def\page_areas_register_direct#1% - {\xypos{pbd:\realfolio:b}% we could save bytes by only saving the y - \endgraf - \begingroup - \scratchdimen\dimexpr\MPy{pbd:\realfolio:b}-\MPy{pbd:\realfolio:e}\relax - \setbox\scratchbox\emptyhbox - \wd\scratchbox\makeupwidth - \ht\scratchbox\scratchdimen - \vsmash{\page_areas_registered_box00\scratchbox}% - \endgroup - #1% - \endgraf - \xypos{pbd:\realfolio:e}} - \def\page_areas_register_boxed#1% {\begingroup \setbox\scratchbox\vbox{#1}% \wd\scratchbox\makeupwidth % somehow a space creeps in - \vbox{\page_areas_registered_box00\scratchbox}% + \vbox{\page_areas_registered_box00\scratchbox}% 0 0 will go \endgroup} +% \def\page_areas_register_direct#1% +% {\xypos{pbd:\realfolio:b}% we could save bytes by only saving the y +% \endgraf +% \begingroup +% \scratchdimen\dimexpr\MPy{pbd:\realfolio:b}-\MPy{pbd:\realfolio:e}\relax +% \setbox\scratchbox\emptyhbox +% \wd\scratchbox\makeupwidth +% \ht\scratchbox\scratchdimen +% \vsmash{\page_areas_registered_box00\scratchbox}% +% \endgroup +% #1% +% \endgraf +% \xypos{pbd:\realfolio:e}} + +\def\page_areas_register_direct#1#2% + {\scratchdepth\dp#2% + \dp#2\strutdepth + \anch_mark_flow_only{#2}% + \dp#2\scratchdepth + #1#2} + \protect \endinput diff --git a/tex/context/base/page-one.mkiv b/tex/context/base/page-one.mkiv index 47780d176..c2346b621 100644 --- a/tex/context/base/page-one.mkiv +++ b/tex/context/base/page-one.mkiv @@ -62,42 +62,42 @@ % 1 = partial page, 2 = whole page, 3 = partial page -\setnewconstant\kindofpagetextareas\plustwo +\setnewconstant\kindofpagetextareas\plustwo % \plusone can become default some day -\def\page_one_registered_text_area_a +\def\page_one_registered_text_area_a % two arguments: (un)vbox n {\ifconditional\c_page_areas_enabled \expandafter\page_one_registered_text_area_a_indeed \else \expandafter\firstofoneargument \fi} -\def\page_one_registered_text_area_b +\def\page_one_registered_text_area_b % one arguments: content {\ifconditional\c_page_areas_enabled \expandafter\page_one_registered_text_area_b_indeed \else \expandafter\firstofoneargument \fi} -\def\page_one_registered_text_area_a_indeed +\def\page_one_registered_text_area_a_indeed % two arguments: (un)vbox n {\ifcase\kindofpagetextareas \expandafter\firstofoneargument \or % partial page (experimental) \expandafter\page_areas_register_direct \or % whole page (default) \expandafter\firstofoneargument - \or % partial page (only works well with no stretch!) - \expandafter\page_areas_register_boxed + \else + \expandafter\firstofoneargument \fi} -\def\page_one_registered_text_area_b_indeed +\def\page_one_registered_text_area_b_indeed % one arguments: content {\ifcase\kindofpagetextareas - \expandafter\firstofoneargument + % \expandafter\firstofoneargument \or % partial page (experimental) - \expandafter\firstofoneargument + % \expandafter\firstofoneargument \or % whole page (default) \expandafter\page_areas_register_boxed - \or % partial page (only works well with no stretch!) - \expandafter\firstofoneargument + \else + % \expandafter\firstofoneargument \fi} \newdimen\d_page_one_natural_depth @@ -123,7 +123,7 @@ {\page_otr_command_flush_top_insertions % this is messy ... we will provide a more tight area (no big deal as we can % do that at the lua end) - \page_one_registered_text_area_a{#1#2}% \unvbox <box> + \page_one_registered_text_area_a#1#2% \unvbox <box> % \ifgridsnapping \vskip\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax @@ -159,7 +159,7 @@ \fi \setbox\b_page_one_bottom_notes\hbox {\checksinglecolumnfootnotes % why this check? *** - \lower\scratchoffset\vbox{\placebottomnotes}}% + \lower\scratchoffset\vbox{\placebottomnotes\par\kern\zeropoint}}% kerns makes notes sit on bottom \smashbox\b_page_one_bottom_notes \ht\b_page_one_contents\zeropoint \page_one_registered_text_area_b @@ -502,16 +502,16 @@ \def\page_one_place_float_auto_top_bottom {\ifx\floatmethod\v!auto - \ifdim\pagetotal<\floatautofactor\pagegoal % when empty page, maxdimen - \page_one_place_float_top_indeed - \else - \page_one_place_float_bottom_indeed - \fi + \ifdim\pagetotal<\floatautofactor\pagegoal % when empty page, maxdimen + \page_one_place_float_top_indeed + \else + \page_one_place_float_bottom_indeed + \fi \else \ifx\floatmethod\v!top \page_one_place_float_top_indeed \else\ifx\floatmethod\v!bottom - \page_one_place_float_top_indeed + \page_one_place_float_bottom_indeed \else \page_one_place_float_here_indeed \fi\fi diff --git a/tex/context/base/page-sid.mkiv b/tex/context/base/page-sid.mkiv index dbf567f5f..4a24794eb 100644 --- a/tex/context/base/page-sid.mkiv +++ b/tex/context/base/page-sid.mkiv @@ -521,12 +521,12 @@ \def\page_sides_place_float_grid {\getrawnoflines\d_page_sides_height % raw ? - \d_page_sides_height\plustwo\lineheight - \d_page_sides_grid_shift\the\dimexpr \noflines\lineheight + \d_page_sides_height\noflines\lineheight + \d_page_sides_grid_shift\the\dimexpr \plustwo\lineheight \ifcase\c_page_sides_place_grid_shift -3\lineheight % high \or - -2.5\lineheight % half + -2.5\lineheight % half (does not work currently) \else -2\lineheight % low \fi diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 017e00711..368ad4a97 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex f2ace1f36..7687b37a7 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-lst.mkvi b/tex/context/base/strc-lst.mkvi index 2fdbc7cc9..fd98ee2d1 100644 --- a/tex/context/base/strc-lst.mkvi +++ b/tex/context/base/strc-lst.mkvi @@ -23,6 +23,8 @@ % auto refs to lists (chain) % % TODO: strut=yes|no +% +% \lists -> strc_lists \unprotect @@ -723,6 +725,7 @@ \newtoks \t_lists_every_renderingsetup \newtoks \t_lists_every_renderingtext +\newtoks \t_lists_every_renderingsynchronize \newtoks \t_lists_every_renderingcleanup \newconditional\c_lists_has_number @@ -784,8 +787,8 @@ \to \t_lists_every_renderingsetup \appendtoks - \strc_lists_interaction_check -\to \t_lists_every_renderingsetup + \strc_lists_interaction_check % this can insert a node (latelua) +\to \t_lists_every_renderingsynchronize \appendtoks % as we don't want any interference we clear some variables @@ -825,7 +828,10 @@ \ifx\p_command\empty [\currentlist: \currentlistentrynumber\space -- \currentlistentrytitle\space -- \currentlistentrypagenumber]% \else - \p_command\currentlistentrynumber\currentlistentrytitle\currentlistentrypagenumber + \p_command + \currentlistentrynumber + {\the\t_lists_every_renderingsynchronize\currentlistentrytitle}% + \currentlistentrypagenumber \fi \stopsetups @@ -856,6 +862,7 @@ \hbox \strc_lists_get_reference_attribute\v!text { \strc_lists_set_style_color\c!textstyle\c!textcolor\v!text \the\t_lists_every_renderingtext + \the\t_lists_every_renderingsynchronize \listparameter\c!textcommand\currentlistentrytitle } \ifconditional\c_lists_show_page @@ -968,6 +975,7 @@ \strc_lists_set_reference_attribute\v!text \strc_lists_set_style_color\c!textstyle\c!textcolor\v!text \the\t_lists_every_renderingtext + \the\t_lists_every_renderingsynchronize \setstrut % needs checking, new here \begstrut \strc_lists_limitated_text\currentlistentrytitle @@ -1052,6 +1060,7 @@ \strc_lists_set_reference_attribute\v!text \strc_lists_set_style_color\c!textstyle\c!textcolor\v!text \the\t_lists_every_renderingtext + \the\t_lists_every_renderingsynchronize \setstrut % needs checking, new here \begstrut \strc_lists_limitated_text\currentlistentrytitle @@ -1089,6 +1098,7 @@ \letinteractionparameter\c!strut\v!no % still needed? \strc_lists_set_style_color\c!style\c!color\v!all \the\t_lists_every_renderingtext + \the\t_lists_every_renderingsynchronize \setstrut \begstrut \strc_lists_limitated_text\currentlistentrytitle @@ -1106,6 +1116,7 @@ \raggedbox { \strc_lists_set_style_color\c!style\c!color\v!all \the\t_lists_every_renderingtext + \the\t_lists_every_renderingsynchronize \setstrut \begstrut \strc_lists_limitated_text\currentlistentrytitle @@ -1122,6 +1133,7 @@ \midaligned { \strc_lists_set_style_color\c!style\c!color\v!all \the\t_lists_every_renderingtext + \the\t_lists_every_renderingsynchronize \setstrut \begstrut \strc_lists_limitated_text\currentlistentrytitle diff --git a/tex/context/base/strc-num.mkiv b/tex/context/base/strc-num.mkiv index 34426d589..9c08693be 100644 --- a/tex/context/base/strc-num.mkiv +++ b/tex/context/base/strc-num.mkiv @@ -482,8 +482,8 @@ \let \incrementnumber \incrementcounter % [name] \let \decrementnumber \decrementcounter % [name] \let \rawnumber \rawcounter % [name] -\let \getnumber \getcounter % [name] -\let \convertednumber \getcounter % [name] +\let \getnumber \convertedcounter % [name] +\let \convertednumber \convertedcounter % [name] \let \doifdefinednumber \doifdefinedcounter % {number}{true} \let \doifundefinednumber \doifnotdefinedcounter % {number}{true} |