diff options
Diffstat (limited to 'tex/context/base')
25 files changed, 187 insertions, 74 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 4651ed0e7..e19a3dfbb 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{2019.06.14 17:49} +\newcontextversion{2019.06.20 18:47} %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 ea6f7becb..4a72dae8b 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{2019.06.14 17:49} +\edef\contextversion{2019.06.20 18:47} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii index ba43a7cb2..b450e464e 100644 --- a/tex/context/base/mkii/mult-ro.mkii +++ b/tex/context/base/mkii/mult-ro.mkii @@ -731,6 +731,7 @@ \setinterfaceconstant{component}{component} \setinterfaceconstant{compoundhyphen}{compoundhyphen} \setinterfaceconstant{compress}{compress} +\setinterfaceconstant{compressdistance}{compressdistance} \setinterfaceconstant{compressseparator}{compressseparator} \setinterfaceconstant{concerns}{concerns} \setinterfaceconstant{connector}{connector} diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua index f5035d3cf..9f16a9e09 100644 --- a/tex/context/base/mkiv/back-exp.lua +++ b/tex/context/base/mkiv/back-exp.lua @@ -2086,6 +2086,29 @@ do end +do + + local usedparagraphs = { } + + function structurestags.setparagraph(align) + if align ~= "" then + usedparagraphs[locatedtag("paragraph")] = { + dataset = dataset, + tag = tag, + align = align, + } + end + end + + function extras.paragraph(di,element,n,fulltag) + local hash = usedparagraphs[fulltag] + if hash then + setattribute(di,"align",hash.align) + end + end + +end + -- flusher do @@ -4250,3 +4273,9 @@ implement { actions = structurestags.setpublication, arguments = "2 strings" } + +implement { + name = "settagparagraph", + actions = structurestags.setparagraph, + arguments = "string" +} diff --git a/tex/context/base/mkiv/back-exp.mkiv b/tex/context/base/mkiv/back-exp.mkiv index 03dbe709a..3e8469b14 100644 --- a/tex/context/base/mkiv/back-exp.mkiv +++ b/tex/context/base/mkiv/back-exp.mkiv @@ -262,6 +262,13 @@ \fi}% \to \everyenableelements +\appendtoks + \unexpanded\def\dotagparagraph#1% + {\iftrialtypesetting\else + \clf_settagparagraph{#1}\relax + \fi}% +\to \everyenableelements + % The action: \setupbackend[export=yes] % or filename % maybe xhtml css settings will move to setupexport diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 4fa009727..dbf340dc5 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2019.06.14 17:49} +\newcontextversion{2019.06.20 18:47} %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 8c501d4d5..2d0bf8881 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2019.06.14 17:49} +\edef\contextversion{2019.06.20 18:47} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/driv-shp.lua b/tex/context/base/mkiv/driv-shp.lua index b9298176a..19bc75f2a 100644 --- a/tex/context/base/mkiv/driv-shp.lua +++ b/tex/context/base/mkiv/driv-shp.lua @@ -506,7 +506,7 @@ local hlist_out, vlist_out do return ot, x + xoffset, y - yoffset end - -- rangedir can stick to widths only + -- to be checked: begin- or enddir kan nil zijn, weird rangedimensions = node.direct.naturalwidth or rangedimensions diff --git a/tex/context/base/mkiv/luat-cnf.lua b/tex/context/base/mkiv/luat-cnf.lua index 979ca36a0..c398b75bb 100644 --- a/tex/context/base/mkiv/luat-cnf.lua +++ b/tex/context/base/mkiv/luat-cnf.lua @@ -31,7 +31,7 @@ texconfig.param_size = 25000 texconfig.save_size = 100000 texconfig.stack_size = 10000 texconfig.function_size = 32768 -texconfig.properties_size = 65536 +texconfig.properties_size = 262144 -- after that, we're a hash texconfig.fix_mem_init = 750000 local stub = [[ diff --git a/tex/context/base/mkiv/luat-cod.lua b/tex/context/base/mkiv/luat-cod.lua index 522de886c..f38966443 100644 --- a/tex/context/base/mkiv/luat-cod.lua +++ b/tex/context/base/mkiv/luat-cod.lua @@ -31,7 +31,7 @@ texconfig.param_size = 25000 texconfig.save_size = 100000 texconfig.stack_size = 10000 texconfig.function_size = 32768 -texconfig.properties_size = 65536 +texconfig.properties_size = 262144 -- nuts are actually kind of pointers (so we jump by size) texconfig.fix_mem_init = 750000 -- registering bytecode chunks diff --git a/tex/context/base/mkiv/math-noa.lua b/tex/context/base/mkiv/math-noa.lua index 376767227..112972d8f 100644 --- a/tex/context/base/mkiv/math-noa.lua +++ b/tex/context/base/mkiv/math-noa.lua @@ -28,7 +28,7 @@ local utfchar, utfbyte = utf.char, utf.byte local formatters, gmatch = string.formatters, string.gmatch local sortedhash = table.sortedhash local insert, remove = table.insert, table.remove -local div = math.div +local div, round = math.div, math.round local bor, band = bit32.bor, bit32.band local fonts = fonts @@ -1557,6 +1557,7 @@ do else correction = correction - 100 end + correction = round(correction) setattr(pointer,a_mathitalics,correction) setattr(parent,a_mathitalics,correction) return -- so no reset later on diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua index 73257968b..62a6de16b 100644 --- a/tex/context/base/mkiv/mlib-pps.lua +++ b/tex/context/base/mkiv/mlib-pps.lua @@ -834,7 +834,7 @@ local tx_reset, tx_process do end elseif #mp_c == 3 then if mp_a and mp_t then - ctx_MPLIBsetCtext(mp_target,f_rgb_nop(mp_c[1],mp_c[2],mp_c[3],mp_a,mp_t),mp_text) + ctx_MPLIBsetCtext(mp_target,f_rgb_yes(mp_c[1],mp_c[2],mp_c[3],mp_a,mp_t),mp_text) else ctx_MPLIBsetCtext(mp_target,f_rgb_nop(mp_c[1],mp_c[2],mp_c[3]),mp_text) end diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index 8dfee915a..4ec3bd7c2 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -7337,6 +7337,9 @@ return { ["compressseparator"]={ ["en"]="compressseparator", }, + ["compressdistance"]={ + ["en"]="compressdistance", + }, ["concerns"]={ ["en"]="concerns", ["nl"]="betreft", diff --git a/tex/context/base/mkiv/node-mig.lua b/tex/context/base/mkiv/node-mig.lua index 32b09a186..6c10625eb 100644 --- a/tex/context/base/mkiv/node-mig.lua +++ b/tex/context/base/mkiv/node-mig.lua @@ -24,13 +24,16 @@ local tonut = nuts.tonut local getnext = nuts.getnext local getid = nuts.getid local getlist = nuts.getlist -local getattr = nuts.getattr +----- getattr = nuts.getattr +local getprop = nuts.getprop -local setattr = nuts.setattr +----- setattr = nuts.setattr +local setprop = nuts.setprop local setlink = nuts.setlink local setlist = nuts.setlist local setprev = nuts.setprev local setnext = nuts.setnext +local setboth = nuts.setboth local remove_node = nuts.remove @@ -60,11 +63,11 @@ local function locate(head,first,last,ni,nm) elseif migrate_inserts and id == insert_code then local insert head, current, insert = remove_node(head,current) - setnext(insert) if first then + setnext(insert) setlink(last,insert) else - setprev(insert) + setboth(insert) first = insert end last = insert @@ -72,11 +75,11 @@ local function locate(head,first,last,ni,nm) elseif migrate_marks and id == mark_code then local mark head, current, mark = remove_node(head,current) - setnext(mark) if first then + setnext(mark) setlink(last,mark) else - setprev(mark) + setboth(mark) first = mark end last = mark @@ -98,8 +101,13 @@ function nodes.handlers.migrate(head,where) local id = getid(current) -- inserts_too is a temp hack, we should only do them when it concerns -- newly placed (flushed) inserts - if id == vlist_code or id == hlist_code or (inserts_too and id == insert_code) and not getattr(current,a_migrated) then - setattr(current,a_migrated,1) + + -- todo: getprop / setprop + + -- if id == vlist_code or id == hlist_code or (inserts_too and id == insert_code) and not getattr(current,a_migrated) then + if id == vlist_code or id == hlist_code or (inserts_too and id == insert_code) and not getprop(current,"migrated") then + -- setattr(current,a_migrated,1) + setprop(current,"migrated",true) t_sweeps = t_sweeps + 1 local h = getlist(current) local first, last, ni, nm @@ -112,7 +120,7 @@ function nodes.handlers.migrate(head,where) end if first then t_inserts = t_inserts + ni - t_marks = t_marks + nm + t_marks = t_marks + nm if trace_migrations and (ni > 0 or nm > 0) then report_nodes("sweep %a, container %a, %s inserts and %s marks migrated outwards during %a", t_sweeps,nodecodes[id],ni,nm,where) @@ -126,7 +134,7 @@ function nodes.handlers.migrate(head,where) current = last end end - current = getnext(next) + current = getnext(current) end return head end diff --git a/tex/context/base/mkiv/page-cst.mkiv b/tex/context/base/mkiv/page-cst.mkiv index 8fd02c870..8444e4e16 100644 --- a/tex/context/base/mkiv/page-cst.mkiv +++ b/tex/context/base/mkiv/page-cst.mkiv @@ -401,11 +401,13 @@ \global\setfalse\c_page_floats_flushing} \def\page_grd_command_flush_floats_indeed % much in common with OTRSET - {\wait\ifconditional\c_page_floats_some_waiting - \ifconditional\c_page_floats_pack_flushed - \page_floats_collect\s!text\hsize\emwidth + {\ifconditional\c_page_floats_some_waiting + \ifconditional\c_page_floats_compress_flushed + \page_floats_collect\s!text\hsize\d_page_floats_compress_distance \ifcase\nofcollectedfloats \page_floats_get + % \or + % \page_floats_get \else \setfalse\c_page_floats_center_box % not needed as we do call directly \global\setbox\floatbox\hbox to \hsize diff --git a/tex/context/base/mkiv/page-flt.lua b/tex/context/base/mkiv/page-flt.lua index 41a35d47b..b1f729f7a 100644 --- a/tex/context/base/mkiv/page-flt.lua +++ b/tex/context/base/mkiv/page-flt.lua @@ -87,22 +87,32 @@ end local function setdimensions(t,b) local bw, bh, bd = 0, 0, 0 local nw, nh, nd = 0, 0, 0 + local cw, ch, cd = 0, 0, 0 if b then bw = b.width bh = b.height bd = b.depth + cw = b.cwidth + ch = b.cheight + cd = b.cdepth end if t then - nw = t.width or bw - nh = t.height or bh - nd = t.depth or bd + nw = t.width or bw + nh = t.height or bh + nd = t.depth or bd + cw = t.cwidth or cw + ch = t.cheight or ch + cd = t.cdepth or cd end setdimen("global","floatwidth", bw) setdimen("global","floatheight", bh+bd) setdimen("global","naturalfloatwd", nw) setdimen("global","naturalfloatht", nh) setdimen("global","naturalfloatdp", nd) - return bw, bh, bd, nw, nh, dp + setdimen("global","floatcaptionwd", cw) + setdimen("global","floatcaptionht", ch) + setdimen("global","floatcaptiondp", cd) + return bw, bh, bd, nw, nh, dp, cw, xh, xp end local function get(stack,n,bylabel) @@ -125,19 +135,22 @@ local function get(stack,n,bylabel) end end -function floats.save(which,data) +function floats.save(which,data) -- todo: just pass which = which or default local b = textakebox("floatbox") if b then local stack = stacks[which] noffloats = noffloats + 1 local t = { - n = noffloats, - data = data or { }, - width = getdimen("naturalfloatwd"), - height = getdimen("naturalfloatht"), - depth = getdimen("naturalfloatdp"), - box = b, + n = noffloats, + data = data or { }, + width = getdimen("naturalfloatwd"), + height = getdimen("naturalfloatht"), + depth = getdimen("naturalfloatdp"), + cwidth = getdimen("floatcaptionwd"), + cheight = getdimen("floatcaptionht"), + cdepth = getdimen("floatcaptiondp"), + box = b, } insert(stack,t) -- inspect(stacks) @@ -240,11 +253,15 @@ function floats.collect(which,maxwidth,distance) for i=1,stacksize do local t, b, n = get(stack,i) if t then - local w, h, d, nw = setdimensions(t,b) + local w, h, d, nw, nh, nd, cw, ch, cd = setdimensions(t,b) -- we use the real width - w = nw + if cw > nw then + w = cw + else + w = nw + end -- which could be an option - local rest = maxwidth - w - (1 == 1 and 0 or distance) + local rest = maxwidth - w - distance local fits = rest > -10 if trace_collecting then report_collecting("%s, category %a, number %a, slot %a width %p, rest %p, fit %a","collecting", diff --git a/tex/context/base/mkiv/page-flt.mkiv b/tex/context/base/mkiv/page-flt.mkiv index 83e2b4954..e72ae314a 100644 --- a/tex/context/base/mkiv/page-flt.mkiv +++ b/tex/context/base/mkiv/page-flt.mkiv @@ -63,7 +63,9 @@ \newconditional\c_page_floats_center_box \settrue\c_page_floats_center_box \newconditional\c_page_floats_center_box_local \newconditional\c_page_floats_center_box_global -\newconditional\c_page_floats_pack_flushed \settrue\c_page_floats_pack_flushed +\newconditional\c_page_floats_compress_flushed \settrue\c_page_floats_compress_flushed + +\newdimen \d_page_floats_compress_distance %D For the moment we keep this but they will become private too. diff --git a/tex/context/base/mkiv/page-one.mkiv b/tex/context/base/mkiv/page-one.mkiv index 64c4a7134..356fb4987 100644 --- a/tex/context/base/mkiv/page-one.mkiv +++ b/tex/context/base/mkiv/page-one.mkiv @@ -146,14 +146,18 @@ \page_one_registered_text_area_a#1#2% \unvbox <box> % \ifgridsnapping + \unskip % new per 2019-06-18, otherwise weird bottom floats \vkern\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax \prevdepth\openstrutdepth \page_otr_command_flush_bottom_insertions \vfil \else\ifcase\bottomraggednessmode % ragged (default) + \unskip % new per 2019-06-18, otherwise weird bottom floats \vkern\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax \prevdepth\openstrutdepth + % these have whitespace before but we can have some more options + % like a \vfill or so \page_otr_command_flush_bottom_insertions \vfil \or @@ -161,6 +165,7 @@ \page_otr_command_flush_bottom_insertions \or % baseline + \unskip % new per 2019-06-18, otherwise weird bottom floats \vkern\dimexpr\maxdepth-\d_page_one_natural_depth\relax \page_otr_command_flush_bottom_insertions \fi\fi @@ -373,35 +378,37 @@ \fi \fi \snaptogrid\hpack{\box\floatbox}} % was copy -\def\page_one_command_flush_floats_indeed % much in common with OTRSET +\def\page_one_command_floats_get_compressed + {\setfalse\c_page_floats_center_box % not needed as we do call directly + %% no longer (interferes with footnotes): + %% + %% \page_one_command_set_vsize % test 2011.06.24.001 + %% + \global\setbox\floatbox\hbox to \hsize + {\hfil + \dorecurse\nofcollectedfloats + {\ifcase\columndirection % nog document wide + \page_floats_flush\s!text\plusone + \else + \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}% + \fi + \hpack to \ifdim\naturalfloatwd>\makeupwidth\makeupwidth\else\naturalfloatwd\fi + {\hss\box\floatbox\hss}% + \ifnum\recurselevel<\nofcollectedfloats + \hfil + \fi}% + \hfil}} + +\def\page_one_command_flush_floats_indeed {\ifconditional\c_page_floats_some_waiting \ifconditional\c_page_floats_pack_flushed - \page_floats_collect\s!text\hsize\emwidth + \page_floats_collect\s!text\hsize\d_page_floats_compress_distance \ifcase\nofcollectedfloats \page_floats_get + \or + \page_floats_get \else - \setfalse\c_page_floats_center_box % not needed as we do call directly - %% no longer (interferes with footnotes): - %% - %% \page_one_command_set_vsize % test 2011.06.24.001 - %% - \global\setbox\floatbox\hbox to \hsize - {\hfil - \dorecurse\nofcollectedfloats - {\ifcase\columndirection % nog document wide - \page_floats_flush\s!text\plusone - \else - \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}% - \fi - \ifdim\wd\floatbox>\makeupwidth % \hsize - \hpack to \makeupwidth{\hss\box\floatbox\hss}% - \else - \box\floatbox - \fi - \ifnum\recurselevel<\nofcollectedfloats - \hfil - \fi}% - \hfil}% + \page_one_command_floats_get_compressed \fi \else \page_floats_get diff --git a/tex/context/base/mkiv/page-pcl.mkiv b/tex/context/base/mkiv/page-pcl.mkiv index 9772320e7..3cb5bf1c8 100644 --- a/tex/context/base/mkiv/page-pcl.mkiv +++ b/tex/context/base/mkiv/page-pcl.mkiv @@ -398,10 +398,9 @@ \def\page_col_command_flush_floats_indeed % much in common with OTRSET {\ifconditional\c_page_floats_some_waiting - \ifconditional\c_page_floats_pack_flushed + \ifconditional\c_page_floats_compress_flushed \setfalse\c_page_floats_center_box % not needed as we do call directly - % - \page_floats_collect\s!text\hsize\emwidth + \page_floats_collect\s!text\hsize\d_page_floats_compress_distance % \ifnum\nofcollectedfloats=\plusone \ifdim\naturalfloatwd>\hsize @@ -421,7 +420,7 @@ % this could happen at the lua end instead \scratchdimen\dimexpr\wd\floatbox-\naturalfloatwd\relax \ifdim\scratchdimen<\zeropoint - \global\setbox\floatbox\hpack spread -\scratchdimen{\hss\box\floatbox\hss}% + \global\setbox\floatbox\hpack spread -\scratchdimen{\hss\box\floatbox\hss}% \fi % \ifdim\wd\floatbox>\textwidth % \hsize diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex b3bdbce43..c171029ad 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 26ce87818..0f13f1cb4 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-blk.lua b/tex/context/base/mkiv/strc-blk.lua index 89df440c9..6717c3777 100644 --- a/tex/context/base/mkiv/strc-blk.lua +++ b/tex/context/base/mkiv/strc-blk.lua @@ -118,10 +118,12 @@ function blocks.select(state,name,tag,criterium) printblock(ri.index,name,ri.data,hide) else local mtags = metadata.tags - for tag, sta in next, tags do - if mtags[tag] then - printblock(ri.index,name,ri.data,hide) - break + if mtags then + for tag, sta in next, tags do + if mtags[tag] then + printblock(ri.index,name,ri.data,hide) + break + end end end end diff --git a/tex/context/base/mkiv/strc-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi index 8e8975a05..a1289bf1d 100644 --- a/tex/context/base/mkiv/strc-flt.mkvi +++ b/tex/context/base/mkiv/strc-flt.mkvi @@ -173,13 +173,26 @@ %\c!bottomafter=, %\c!default=, % default location \c!sidethreshold=.5\strutdp, % set to "old" to check with old method - \c!numbering=\v!yes] + \c!numbering=\v!yes, + \c!compress=\v!yes, % when possible pack floats when flushing + \c!compressdistance=\emwidth] \setupfloatframed [\c!frame=\v!off, \c!offset=\v!overlay, \c!strut=\v!no] +\appendtoks + \doifelse{\floatparameter\c!compress}\v!yes\settrue\setfalse\c_page_floats_pack_flushed + \d_page_floats_compress_distance\floatparameter\c!compressdistance\relax +\to \everysetupfloat + +%D We need to do it again here: + +\setupfloat + [\c!compress=\v!yes, % when possible pack floats when flushing + \c!compressdistance=\emwidth] + %D Individial settings: \installcounterassociation{floatcaption} @@ -1014,15 +1027,28 @@ \def\naturalfloatwidth {\the\naturalfloatht} \def\naturalfloatdepth {\the\naturalfloatdp} +\def\floatcaptionheight{\the\floatcaptionwd} +\def\floatcaptionwidth {\the\floatcaptionht} +\def\floatcaptiondepth {\the\floatcaptiondp} + \newdimen\naturalfloatwd \newdimen\naturalfloatht \newdimen\naturalfloatdp +\newdimen\floatcaptionwd +\newdimen\floatcaptionht +\newdimen\floatcaptiondp + \def\strc_floats_set_natural_dimensions#box% {\global\naturalfloatwd\wd#box\relax \global\naturalfloatht\ht#box\relax \global\naturalfloatdp\dp#box\relax} +\def\strc_floats_set_caption_dimensions#box% + {\global\floatcaptionwd\wd#box\relax + \global\floatcaptionht\ht#box\relax + \global\floatcaptiondp\dp#box\relax} + \def\doifelsemainfloatbody {\ifinsidesplitfloat \ifconditional\splitfloatfirstdone @@ -1573,8 +1599,9 @@ % nothing \or % automatic - \ifnofloatcaption + \ifnofloatcaption \strc_floats_prepare_no_caption + \strc_floats_set_caption_dimensions\voidbox %\page_backgrounds_add_local_to_box\floatbox % was \doglobal but not needed \else % todo: installable maken, variant/method=auto vs macro @@ -1582,6 +1609,7 @@ %\page_backgrounds_add_local_to_box\b_strc_floats_content \setbox\b_strc_floats_caption\hbox % text {\floatcaptionparameter\c!command{\box\b_strc_floats_caption}}% + \strc_floats_set_caption_dimensions\b_strc_floats_caption \moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height %\page_backgrounds_add_local_to_box\b_strc_floats_caption \strc_floats_build_box diff --git a/tex/context/base/mkiv/strc-tag.mkiv b/tex/context/base/mkiv/strc-tag.mkiv index 84e11a632..621a54040 100644 --- a/tex/context/base/mkiv/strc-tag.mkiv +++ b/tex/context/base/mkiv/strc-tag.mkiv @@ -463,11 +463,14 @@ {\let\currentparagraph\empty \paragraph_start_indeed} +\ifdefined\dotagparagraph \else \let\dotagparagraph \gobbleoneargument \fi + \def\paragraph_start_indeed {\useparagraphstyleandcolor\c!style\c!color \usealignparameter\paragraphparameter \usesetupsparameter\paragraphparameter - \dostarttagged\t!paragraph\currentparagraph} + \dostarttagged\t!paragraph\currentparagraph + \dotagparagraph{\paragraphparameter\c!align}} \unexpanded\def\stopparagraph {\dostoptagged diff --git a/tex/context/base/mkiv/typo-ovl.lua b/tex/context/base/mkiv/typo-ovl.lua index 09cf5e129..6f836551d 100644 --- a/tex/context/base/mkiv/typo-ovl.lua +++ b/tex/context/base/mkiv/typo-ovl.lua @@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['typo-ovl'] = { -- we have hardly any private code. For convenience I hooked it into the existing -- replacement module (as it used the same code anyway). I did some cleanup. -local next = next +local next, type = next, type local context = context @@ -114,7 +114,11 @@ function attributes.applyoverloads(specification,start,stop) else oldlist = getattrlist(current) for k, v in next, overloads do - setattr(current,k,v) + if type(v) == "number" then + setattr(current,k,v) + else + -- can be: ["font"] = number + end end newlist = current -- getattrlist(current) end |