diff options
author | Karl Berry <karl@freefriends.org> | 2015-05-14 22:53:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-05-14 22:53:14 +0000 |
commit | 6802edd7b9deb224cdc3aff2e65d0e71962bc0d2 (patch) | |
tree | 52a67c8f13afc517c2ac2bccaae73a3a21db93e1 /Master/texmf-dist/tex/context | |
parent | 1ee321247aa1b6b740e44a83ac872e0caa34abcf (diff) |
context/14may15
git-svn-id: svn://tug.org/texlive/trunk@37401 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context')
17 files changed, 300 insertions, 51 deletions
diff --git a/Master/texmf-dist/tex/context/base/attr-ini.mkiv b/Master/texmf-dist/tex/context/base/attr-ini.mkiv index f351a6800ee..c6b798d18e3 100644 --- a/Master/texmf-dist/tex/context/base/attr-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/attr-ini.mkiv @@ -42,13 +42,14 @@ \ifdefined \s!global \else \def\s!global {global} \fi % for metatex % or hard check later \ifdefined \s!public \else \def\s!public {public} \fi % for metatex % or hard check later +\ifdefined \s!private \else \def\s!private {private} \fi % for metatex % or hard check later \ifdefined \s!attribute \else \def\s!attribute{attribute} \fi % for metatex % or hard check later \unexpanded\def\defineattribute {\dodoubleempty\attr_basics_define} \unexpanded\def\definesystemattribute{\dodoubleempty\attr_basics_define_system} -\def\attr_basics_define {\attr_basics_define_indeed{public}} -\def\attr_basics_define_system{\attr_basics_define_indeed{private}} +\def\attr_basics_define {\attr_basics_define_indeed\s!public} +\def\attr_basics_define_system{\attr_basics_define_indeed\s!private} \def\attr_basics_define_indeed#1[#2][#3]% {\scratchcounter\clf_defineattribute{#2}{#1}\relax @@ -61,7 +62,9 @@ % here public means 'visible' so it's not to be confused with 'public' at the lua end \doifinset \s!public{#3}{\expandafter\let\csname#2\s!attribute\expandafter\endcsname\csname\??attributeid#2\endcsname}} -\unexpanded\def\newattribute#1{\attr_basics_define_indeed{public}[\strippedcsname#1][]} +\unexpanded\def\newattribute#1% + {\attr_basics_define_indeed\s!public[\strippedcsname#1][]% + \expandafter\let\expandafter#1\csname\??attributeid\strippedcsname#1\endcsname} % expandable so we can \edef them for speed diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkiv b/Master/texmf-dist/tex/context/base/cont-new.mkiv index ec97951b750..cf38042b642 100644 --- a/Master/texmf-dist/tex/context/base/cont-new.mkiv +++ b/Master/texmf-dist/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2015.05.12 17:57} +\newcontextversion{2015.05.13 23:52} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/Master/texmf-dist/tex/context/base/context-version.pdf b/Master/texmf-dist/tex/context/base/context-version.pdf Binary files differindex 73287d37573..cd9ca783da5 100644 --- a/Master/texmf-dist/tex/context/base/context-version.pdf +++ b/Master/texmf-dist/tex/context/base/context-version.pdf diff --git a/Master/texmf-dist/tex/context/base/context.mkiv b/Master/texmf-dist/tex/context/base/context.mkiv index de3e6c701d0..a775cfa0207 100644 --- a/Master/texmf-dist/tex/context/base/context.mkiv +++ b/Master/texmf-dist/tex/context/base/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.05.12 17:57} +\edef\contextversion{2015.05.13 23:52} \edef\contextkind {beta} %D For those who want to use this: diff --git a/Master/texmf-dist/tex/context/base/math-ini.mkiv b/Master/texmf-dist/tex/context/base/math-ini.mkiv index 16efd35a3de..79c9a62043d 100644 --- a/Master/texmf-dist/tex/context/base/math-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/math-ini.mkiv @@ -189,18 +189,52 @@ \unexpanded\def\mathematics {\doifelsenextoptionalcs\math_m_yes\math_m_nop} -\def\math_m_yes[#1]#2% +\def\math_m_yes {\relax \ifmmode - #2% + \expandafter\math_m_yes_math \else - \normalstartimath - \edef\currentmathematics{#1}% check for valid - \the\everyswitchmathematics\relax - #2% - \normalstopimath + \expandafter\math_m_yes_text + \fi} + +\def\math_m_yes_math[#1]#2% + {#2} + +\def\math_m_yes_text[#1]% + {\begingroup + \edef\currentmathematics{#1}% check for valid + \edef\p_openup{\mathematicsparameter\c!openup}% + \ifx\p_openup\v!yes + \expandafter\math_m_yes_text_openedup + \else + \expandafter\math_m_yes_text_normal \fi} +\def\math_m_yes_text_openedup#1% + {\setbox\scratchbox\hbox\bgroup + \normalstartimath + \the\everyswitchmathematics\relax + #1% + \normalstopimath + \egroup + \ifdim\ht\scratchbox>\strutht + \math_inline_openup_start_yes + \else\ifdim\dp\scratchbox>\strutdp + \math_inline_openup_start_yes + \else + \math_inline_openup_start_nop + \fi\fi + \unhbox\scratchbox % \normalstartimath#1\normalstopimath + \math_inline_openup_stop + \endgroup} + +\def\math_m_yes_text_normal#1% + {\normalstartimath + \the\everyswitchmathematics\relax + #1% + \normalstopimath + \endgroup} + \def\math_m_nop#1% {\relax \ifmmode @@ -213,6 +247,8 @@ \let\m\mathematics +% e.g.: \definemathematics[i:mp][setups=i:tight,openup=yes] + \newmuskip\defaultthickmuskip \defaultthickmuskip 5mu plus 5mu \newmuskip\defaultmedmuskip \defaultmedmuskip 4mu plus 2mu minus 4mu \newmuskip\defaultthinmuskip \defaultthinmuskip 3mu diff --git a/Master/texmf-dist/tex/context/base/mult-def.mkiv b/Master/texmf-dist/tex/context/base/mult-def.mkiv index b2fc1cfcffa..d547a7b8170 100644 --- a/Master/texmf-dist/tex/context/base/mult-def.mkiv +++ b/Master/texmf-dist/tex/context/base/mult-def.mkiv @@ -34,6 +34,8 @@ % start todo in mult-def.lua: +\def\c!openup {openup} + \def\v!serifnormal {serifnormal} \def\v!serifbold {serifbold} \def\v!sansnormal {sansnormal} diff --git a/Master/texmf-dist/tex/context/base/publ-aut.lua b/Master/texmf-dist/tex/context/base/publ-aut.lua index 185d99efcec..5a9d485516c 100644 --- a/Master/texmf-dist/tex/context/base/publ-aut.lua +++ b/Master/texmf-dist/tex/context/base/publ-aut.lua @@ -852,7 +852,7 @@ publications.components.author = components publications.sortmethods.authoryear = { sequence = { - { field = "key", default = "ZZZZ", unknown = "ZZZZ" }, + -- { field = "key", default = "ZZZZ", unknown = "ZZZZ" }, { field = "author", default = "", unknown = "" }, { field = "year", default = "9998", unknown = "9999" }, -- { field = "suffix", default = " ", unknown = " " }, diff --git a/Master/texmf-dist/tex/context/base/publ-dat.lua b/Master/texmf-dist/tex/context/base/publ-dat.lua index 5d19003ce64..36ba150009b 100644 --- a/Master/texmf-dist/tex/context/base/publ-dat.lua +++ b/Master/texmf-dist/tex/context/base/publ-dat.lua @@ -817,7 +817,7 @@ do if not fullname then return end - local data = io.loaddata(filename) or "" + local data = io.loaddata(fullname) or "" if data == "" then report("empty file %a, nothing loaded",fullname) return @@ -845,7 +845,7 @@ do return end current = datasets[dataset] - data = table.load(filename) + data = table.load(fullname) end if data then local luadata = current.luadata @@ -881,7 +881,7 @@ do end local current = datasets[dataset] local luadata = current.luadata - local root = xml.load(filename) + local root = xml.load(fullname) for bibentry in xmlcollected(root,"/bibtex/entry") do local attributes = bibentry.at local tag = attributes.tag diff --git a/Master/texmf-dist/tex/context/base/publ-imp-replacements.lua b/Master/texmf-dist/tex/context/base/publ-imp-replacements.lua index b15b17e30f8..e0ac249fc0d 100644 --- a/Master/texmf-dist/tex/context/base/publ-imp-replacements.lua +++ b/Master/texmf-dist/tex/context/base/publ-imp-replacements.lua @@ -1,3 +1,10 @@ +-- Many bibtex databases are poluted. This is a side effect of 7 bit encoding on the +-- one hand and tweaking the outcome at the other. The worst examples are the use +-- of \rlap on whole names. We found that trying to cope with all can one drive insane +-- so we stopped at some point. Clean up your mess or pay the price. But, you can load +-- this file (and similar ones) to help you out. There is simply no reward in trying +-- to deal with it ourselves. + return { name = "replacements", version = "1.00", @@ -5,7 +12,10 @@ return { author = "Alan Braslau and Hans Hagen", copyright = "ConTeXt development team", replacements = { - [ [[Th\^e\llap{\raise0.5ex\hbox{\'{\relax}}}]] ] = "Thánh", + [ [[\emdash]] ] = "—", + [ [[\endash]] ] = "–", + [ [[{\emdash}]] ] = "—", + [ [[{\endash}]] ] = "–", [ [[Th\^e\llap{\raise 0.5ex\hbox{\'{\relax}}}]] ] = "Thánh", [ [[Th{\^e}\llap{\raise0.5ex\hbox{\'{\relax}}}]] ] = "Thánh", [ [[Th{\^e}\llap{\raise 0.5ex\hbox{\'{\relax}}}]] ] = "Thánh", diff --git a/Master/texmf-dist/tex/context/base/publ-sor.lua b/Master/texmf-dist/tex/context/base/publ-sor.lua index ba353a9bcc4..b617af760e3 100644 --- a/Master/texmf-dist/tex/context/base/publ-sor.lua +++ b/Master/texmf-dist/tex/context/base/publ-sor.lua @@ -74,6 +74,8 @@ return function(dataset,list,method) -- indexer local index = tostring(i) local entry = luadata[tag] if entry then + -- maybe optional: if entry.key then push the keygetter + -- in slot 1 and ignore (e.g. author) local detail = details[tag] result[i] = { index = i, @@ -366,3 +368,10 @@ end table.setmetatableindex(sorters,function(t,k) return anything end) publications.lists.sorters = sorters + +-- publications.sortmethods.key = { +-- sequence = { +-- { field = "key", default = "", unknown = "" }, +-- { field = "index", default = "", unknown = "" }, +-- }, +-- } diff --git a/Master/texmf-dist/tex/context/base/status-files.pdf b/Master/texmf-dist/tex/context/base/status-files.pdf Binary files differindex bc804670a3d..78e8b3da7bf 100644 --- a/Master/texmf-dist/tex/context/base/status-files.pdf +++ b/Master/texmf-dist/tex/context/base/status-files.pdf diff --git a/Master/texmf-dist/tex/context/base/status-lua.pdf b/Master/texmf-dist/tex/context/base/status-lua.pdf Binary files differindex 99c615fd951..2db0c34065a 100644 --- a/Master/texmf-dist/tex/context/base/status-lua.pdf +++ b/Master/texmf-dist/tex/context/base/status-lua.pdf diff --git a/Master/texmf-dist/tex/context/base/strc-flt.mkvi b/Master/texmf-dist/tex/context/base/strc-flt.mkvi index cf75d3338c2..be2958fbfc3 100644 --- a/Master/texmf-dist/tex/context/base/strc-flt.mkvi +++ b/Master/texmf-dist/tex/context/base/strc-flt.mkvi @@ -1133,11 +1133,11 @@ \strc_floats_calculate_skip\d_strc_floats_bottom {\rootfloatparameter\c!spaceafter }% \strc_floats_calculate_skip\d_page_sides_topskip {\rootfloatparameter\c!sidespacebefore}% \strc_floats_calculate_skip\d_page_sides_bottomskip{\rootfloatparameter\c!sidespaceafter }% - \global\d_strc_floats_margin \rootfloatparameter\c!margin - \global\d_page_sided_leftshift \floatparameter \c!leftmargindistance - \global\d_page_sided_rightshift\floatparameter \c!rightmargindistance - \global\c_page_floats_n_of_top \rootfloatparameter\c!ntop - \global\c_page_floats_n_of_bottom \rootfloatparameter\c!nbottom + \global\d_strc_floats_margin \rootfloatparameter\c!margin + \global\d_page_sided_leftshift \floatparameter \c!leftmargindistance + \global\d_page_sided_rightshift \floatparameter \c!rightmargindistance + \global\c_page_floats_n_of_top \rootfloatparameter\c!ntop + \global\c_page_floats_n_of_bottom\rootfloatparameter\c!nbottom \endgroup} \unexpanded\def\betweenfloatblanko % assumes that spaceafter is present diff --git a/Master/texmf-dist/tex/context/base/tabl-xtb.mkvi b/Master/texmf-dist/tex/context/base/tabl-xtb.mkvi index a8f205f4a2e..73ba9104551 100644 --- a/Master/texmf-dist/tex/context/base/tabl-xtb.mkvi +++ b/Master/texmf-dist/tex/context/base/tabl-xtb.mkvi @@ -351,8 +351,11 @@ % in text flow: headers and footers only once \setvalue{\??xtableflushsplit\v!no}% - {\noindentation % better than \noindent (no \dontleavehmode here) % else no leftskip etc - %\ignorespaces + {% \noindent % gives extra line after table + % \noindentation % messes up the next indentation + % \dontleavehmode % no leftskip + \kern\zeropoint % yet another guess + \ignorespaces \clf_x_table_flush method {\v!normal}% \relax diff --git a/Master/texmf-dist/tex/context/base/typo-chr.lua b/Master/texmf-dist/tex/context/base/typo-chr.lua index 94095828ddc..db8579c8448 100644 --- a/Master/texmf-dist/tex/context/base/typo-chr.lua +++ b/Master/texmf-dist/tex/context/base/typo-chr.lua @@ -88,15 +88,32 @@ if not modules then modules = { } end modules ['typo-chr'] = { local insert, remove = table.insert, table.remove -local nodecodes = nodes.nodecodes -local glyph_code = nodecodes.glyph +local nodecodes = nodes.nodecodes +local whatsitcodes = nodes.whatsitcodes +local glyph_code = nodecodes.glyph +local whatsit_code = nodecodes.whatsit +local localpar_code = whatsitcodes.localpar -local texnest = tex.nest -local free_node = node.free +local texnest = tex.nest +local free_node = node.free +local flush_list = node.flush_list -local punctuation = characters.is_punctuation +local settexattribute = tex.setattribute +local punctuation = characters.is_punctuation -local stack = { } +local variables = interfaces.variables +local v_all = variables.all +local v_reset = variables.reset + +local a_marked = attributes.numbers['marked'] +local lastmarked = 0 +local marked = { + [v_all] = 1, + [""] = 1, + [v_reset] = attributes.unsetvalue, +} + +local stack = { } local function pickup() local list = texnest[texnest.ptr] @@ -143,6 +160,69 @@ local function pickuppunctuation(specification) end end +-- I played with nested marked content but it makes no sense and gives +-- complex code. Also, it's never needed so why bother. + +local function pickup(head,tail,str) + local attr = marked[str] + local last = tail + if last[a_marked] == attr then + local first = last + while true do + local prev = first.prev + if prev and prev[a_marked] == attr then + if prev.id == whatsit_code and prev.subtype == localpar_code then + break + else + first = prev + end + else + break + end + end + return first, last + end +end + +local actions = { + remove = function(specification) + local list = texnest[texnest.ptr] + if list then + local head = list.head + local tail = list.tail + local first, last = pickup(head,tail,specification.mark) + if first then + if first == head then + list.head = nil + list.tail = nil + else + local prev = first.prev + list.tail = prev + prev.next = nil + end + flush_list(first) + end + end + end, +} + +local function pickupmarkedcontent(specification) + local action = actions[specification.action or "remove"] + if action then + action(specification) + end +end + +local function markcontent(str) + local currentmarked = marked[str or v_all] + if not currentmarked then + lastmarked = lastmarked + 1 + currentmarked = lastmarked + marked[str] = currentmarked + end + settexattribute(a_marked,currentmarked) +end + interfaces.implement { name = "pickuppunctuation", actions = pickuppunctuation, @@ -153,3 +233,19 @@ interfaces.implement { } } +interfaces.implement { + name = "pickupmarkedcontent", + actions = pickupmarkedcontent, + arguments = { + { + { "action" }, + { "mark" } + } + } +} + +interfaces.implement { + name = "markcontent", + actions = markcontent, + arguments = "string", +} diff --git a/Master/texmf-dist/tex/context/base/typo-chr.mkiv b/Master/texmf-dist/tex/context/base/typo-chr.mkiv index 9d8dd7c20c8..dc0c6866408 100644 --- a/Master/texmf-dist/tex/context/base/typo-chr.mkiv +++ b/Master/texmf-dist/tex/context/base/typo-chr.mkiv @@ -1,9 +1,9 @@ %D \module -%D [ file=typo-cap, -%D version=2009.03.27, % code moved from core-spa.mkiv +%D [ file=typo-chr, +%D version=2015.01.01, % or about that time %D title=\CONTEXT\ Typesetting Macros, -%D subtitle=Capping, +%D subtitle=Cleaning Up Mess, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] @@ -16,13 +16,67 @@ \unprotect -%D Maybe we need a more clever system: either command or style mode etc. so -%D that we can avoid the grouped mess in a simple style switch. +%D This is a very experimental feature, mostly for Alan and me to play with in +%D publication hell. +%D +%D \startbuffer +%D before, after\par +%D before,\removepunctuation after\par +%D before\markcontent[gone]{\darkred gone}\removemarkedcontent[gone]after\par +%D before\markcontent[kept]{\darkgreen kept}\removemarkedcontent[gone]after\par +%D \markcontent[gone]{\darkred gone}\removemarkedcontent[gone]after\par +%D \markcontent[kept]{\darkgreen kept}\removemarkedcontent[gone]after\par +%D \stopbuffer +%D +%D \typebuffer \blank \getbuffer\blank +%D +%D This feature is paragraph based and is only to be used for small snippets of text, +%D for instance when combining bit and pieces where keeping a state is complex compared +%D to cleaning up unwanted stuff. \registerctxluafile{typo-chr}{1.001} -\unexpanded\def\removepunctuation{\clf_pickuppunctuation action {remove}\relax} -\unexpanded\def\pushpunctuation {\clf_pickuppunctuation action {push}\relax} -\unexpanded\def\poppunctuation {\clf_pickuppunctuation action {pop}\relax} +\definesystemattribute[marked][public] -\protect +\unexpanded\def\removepunctuation + {\clf_pickuppunctuation action{remove}\relax} % the first experiment + +\unexpanded\def\pushpunctuation + {\clf_pickuppunctuation action{push}\relax} % the first experiment + +\unexpanded\def\poppunctuation + {\clf_pickuppunctuation action{pop}\relax} % the first experiment + +\unexpanded\def\markcontent + {\dosingleempty\typo_marked_mark} + +\def\typo_marked_mark[#1]#2% + {\dontleavehmode + \bgroup + \clf_markcontent{#1}% + \bgroup + #2% double grouping makes aftergroups work ok + \egroup + \egroup} + +\unexpanded\def\startmarkedcontent + {\dontleavehmode + \bgroup + \dosingleempty\typo_marked_start} + +\def\typo_marked_start[#1]% + {\clf_markcontent{#1}% + % double grouping makes aftergroups work ok + \bgroup} + +\unexpanded\def\stopmarkedcontent + {\egroup + \egroup} + +\unexpanded\def\removemarkedcontent + {\dosingleempty\typo_marked_remove} + +\def\typo_marked_remove[#1]% + {\clf_pickupmarkedcontent action{remove}mark{#1}\relax} + +\protect \endinput diff --git a/Master/texmf-dist/tex/context/base/typo-itc.lua b/Master/texmf-dist/tex/context/base/typo-itc.lua index f37549dc830..c6528eee8b8 100644 --- a/Master/texmf-dist/tex/context/base/typo-itc.lua +++ b/Master/texmf-dist/tex/context/base/typo-itc.lua @@ -126,6 +126,42 @@ local function okay(data,current,font,prevchar,previtalic,char,what) return true end +-- maybe: with_attributes(current,n) : +-- +-- local function correction_kern(kern,n) +-- return with_attributes(new_correction_kern(kern),n) +-- end + +local function correction_glue(glue,n) + local g = new_correction_glue(glue) + if n then + setfield(g,"attr",getfield(n,"attr")) + end + return g +end + +local function correction_kern(kern,n) + local k = new_correction_kern(kern) + if n then + local a = getfield(n,"attr") + if a then -- maybe not + setfield(k,"attr",a) -- can be a marked content (border case) + end + end + return k +end + +local function correction_glue(n,glue) + local g = new_correction_glue(glue) + if n then + local a = getfield(n,"attr") + if a then -- maybe not + setfield(g,"attr",a) -- can be a marked content (border case) + end + end + return g +end + function italics.handler(head) local prev = nil @@ -160,7 +196,7 @@ function italics.handler(head) if font ~= lastfont then if previtalic ~= 0 then if okay(data,current,font,prevchar,previtalic,char,"glyph") then - insert_node_after(prevhead,prev,new_correction_kern(previtalic)) + insert_node_after(prevhead,prev,correction_kern(previtalic,current)) done = true end elseif previnserted and data then @@ -172,7 +208,7 @@ function italics.handler(head) -- if replaceitalic ~= 0 then if okay(data,replace,font,replacechar,replaceitalic,char,"replace") then - insert_node_after(replacehead,replace,new_correction_kern(replaceitalic)) + insert_node_after(replacehead,replace,correction_kern(replaceitalic,current)) done = true end replaceitalic = 0 @@ -185,7 +221,7 @@ function italics.handler(head) -- if postitalic ~= 0 then if okay(data,post,font,postchar,postitalic,char,"post") then - insert_node_after(posthead,post,new_correction_kern(postitalic)) + insert_node_after(posthead,post,correction_kern(postitalic,current)) done = true end postitalic = 0 @@ -338,7 +374,7 @@ function italics.handler(head) if trace_italics then report_italics("inserting %p between %s italic %C and glue",previtalic,"glyph",prevchar) end - previnserted = new_correction_glue(previtalic) -- maybe just add ? else problem with penalties + previnserted = correction_glue(previtalic,current) -- maybe just add ? else problem with penalties previtalic = 0 done = true insert_node_after(prevhead,prev,previnserted) @@ -347,7 +383,7 @@ function italics.handler(head) if trace_italics then report_italics("inserting %p between %s italic %C and glue",replaceitalic,"replace",replacechar) end - replaceinserted = new_correction_kern(replaceitalic) -- needs to be a kern + replaceinserted = correction_kern(replaceitalic,current) -- needs to be a kern replaceitalic = 0 done = true insert_node_after(replacehead,replace,replaceinserted) @@ -356,7 +392,7 @@ function italics.handler(head) if trace_italics then report_italics("inserting %p between %s italic %C and glue",postitalic,"post",postchar) end - postinserted = new_correction_kern(postitalic) -- needs to be a kern + postinserted = correction_kern(postitalic,current) -- needs to be a kern postitalic = 0 done = true insert_node_after(posthead,post,postinserted) @@ -375,7 +411,7 @@ function italics.handler(head) if trace_italics then report_italics("inserting %p between %s italic %C and whatever",previtalic,"glyph",prevchar) end - insert_node_after(prevhead,prev,new_correction_kern(previtalic)) + insert_node_after(prevhead,prev,correction_kern(previtalic,current)) previnserted = nil previtalic = 0 replaceinserted = nil @@ -388,7 +424,7 @@ function italics.handler(head) if trace_italics then report_italics("inserting %p between %s italic %C and whatever",replaceritalic,"replace",replacechar) end - insert_node_after(replacehead,replace,new_correction_kern(replaceitalic)) + insert_node_after(replacehead,replace,correction_kern(replaceitalic,current)) previnserted = nil previtalic = 0 replaceinserted = nil @@ -401,7 +437,7 @@ function italics.handler(head) if trace_italics then report_italics("inserting %p between %s italic %C and whatever",postitalic,"post",postchar) end - insert_node_after(posthead,post,new_correction_kern(postitalic)) + insert_node_after(posthead,post,correction_kern(postitalic,current)) previnserted = nil previtalic = 0 replaceinserted = nil @@ -419,21 +455,21 @@ function italics.handler(head) if trace_italics then report_italics("inserting %p between %s italic %C and end of list",previtalic,"glyph",prevchar) end - insert_node_after(prevhead,prev,new_correction_kern(previtalic)) + insert_node_after(prevhead,prev,correction_kern(previtalic,current)) done = true else if replaceitalic ~= 0 then if trace_italics then report_italics("inserting %p between %s italic %C and end of list",replaceitalic,"replace",replacechar) end - insert_node_after(replacehead,replace,new_correction_kern(replaceitalic)) + insert_node_after(replacehead,replace,correction_kern(replaceitalic,current)) done = true end if postitalic ~= 0 then if trace_italics then report_italics("inserting %p between %s italic %C and end of list",postitalic,"post",postchar) end - insert_node_after(posthead,post,new_correction_kern(postitalic)) + insert_node_after(posthead,post,correction_kern(postitalic,current)) done = true end end |