diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/luacolor/luacolor.lua | 20 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/luacolor/luacolor.sty | 20 |
2 files changed, 30 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/luacolor/luacolor.lua b/Master/texmf-dist/tex/latex/luacolor/luacolor.lua index e95192a2fef..851b72c5190 100644 --- a/Master/texmf-dist/tex/latex/luacolor/luacolor.lua +++ b/Master/texmf-dist/tex/latex/luacolor/luacolor.lua @@ -9,11 +9,11 @@ -- This is a generated file. -- -- Project: luacolor --- Version: 2020-02-24 v1.15 +-- Version: 2021-02-17 v1.17 -- -- Copyright (C) -- 2007, 2009-2011 Heiko Oberdiek --- 2016-2020 Oberdiek Package Support Group +-- 2016-2021 Oberdiek Package Support Group -- -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either @@ -41,7 +41,7 @@ oberdiek = oberdiek or {} local luacolor = oberdiek.luacolor or {} oberdiek.luacolor = luacolor function luacolor.getversion() - tex.write("2020-02-24 v1.15") + tex.write("2021-02-17 v1.17") end local ifpdf = tonumber(tex.outputmode or tex.pdfoutput) > 0 local prefix @@ -116,6 +116,7 @@ local LIST = 1 local LIST_LEADERS = 2 local LIST_DISC = 3 local COLOR = 4 +local NOCOLOR = 5 local RULE = node.id("rule") local node_types = { [node.id("hlist")] = LIST, @@ -124,6 +125,10 @@ local node_types = { [node.id("glyph")] = COLOR, [node.id("disc")] = LIST_DISC, [node.id("whatsit")] = { + [node.subtype("pdf_colorstack")] = + function(n) + return n.stack == 0 and NOCOLOR or nil + end, [node.subtype("special")] = COLOR, [node.subtype("pdf_literal")] = COLOR, [node.subtype("pdf_save")] = COLOR, @@ -202,6 +207,8 @@ local function traverse(list, color, dry) end end end + elseif t == NOCOLOR then + color = '' end end if get_type(list) == LIST then @@ -216,6 +223,13 @@ function luacolor.process(box) local list = tex.getbox(box) traverse(list, color, DRY_FALSE) end + +if luatexbase.callbacktypes.pre_shipout_filter then + luatexbase.add_to_callback("pre_shipout_filter", function(list) + traverse(list, "", DRY_FALSE) + return true + end, "luacolor.process") +end if luaotfload.set_colorhandler then local set_attribute = node.direct.set_attribute luaotfload.set_colorhandler(function(head, n, color) diff --git a/Master/texmf-dist/tex/latex/luacolor/luacolor.sty b/Master/texmf-dist/tex/latex/luacolor/luacolor.sty index af5de64684d..b82069ea648 100644 --- a/Master/texmf-dist/tex/latex/luacolor/luacolor.sty +++ b/Master/texmf-dist/tex/latex/luacolor/luacolor.sty @@ -9,11 +9,11 @@ %% This is a generated file. %% %% Project: luacolor -%% Version: 2020-02-24 v1.15 +%% Version: 2021-02-17 v1.17 %% %% Copyright (C) %% 2007, 2009-2011 Heiko Oberdiek -%% 2016-2020 Oberdiek Package Support Group +%% 2016-2021 Oberdiek Package Support Group %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -89,7 +89,7 @@ \edef\LuaCol@AtEnd{\LuaCol@AtEnd\noexpand\endinput} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luacolor}% - [2020-02-24 v1.15 Color support via LuaTeX's attributes (HO)] + [2021-02-17 v1.17 Color support via LuaTeX's attributes (HO)] \RequirePackage{color} \ifx\directlua\@undefined \PackageError{luacolor}{% @@ -112,7 +112,7 @@ require("luacolor")% } \begingroup - \edef\x{\directlua{tex.write("2020-02-24 v1.15")}}% + \edef\x{\directlua{tex.write("2021-02-17 v1.17")}}% \edef\y{% \directlua{% if oberdiek.luacolor.getversion then % @@ -176,9 +176,15 @@ oberdiek.luacolor.process(\number#1)% }% } -\RequirePackage{atbegshi}[2011/01/30] -\AtBeginShipout{% - \luacolorProcessBox\AtBeginShipoutBox +\directlua{% + if luatexbase.callbacktypes.pre_shipout_filter then + token.get_next() + end +}\@secondoftwo\@gobble{ + \RequirePackage{atbegshi}[2011/01/30] + \AtBeginShipout{% + \luacolorProcessBox\AtBeginShipoutBox + } } \set@color \ifnum\outputmode=\@ne |