[latex3-commits] [git/LaTeX3-latex3-latex3] luacolor: Remove duplicate code (842dd5ac3)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Feb 15 22:19:38 CET 2023
Repository : https://github.com/latex3/latex3
On branch : luacolor
Link : https://github.com/latex3/latex3/commit/842dd5ac333ecc3168ddc3b3b52aeab942e36419
>---------------------------------------------------------------
commit 842dd5ac333ecc3168ddc3b3b52aeab942e36419
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Jun 4 20:32:46 2021 +0100
Remove duplicate code
>---------------------------------------------------------------
842dd5ac333ecc3168ddc3b3b52aeab942e36419
l3backend/l3backend-color.dtx | 41 -----------------------------------------
1 file changed, 41 deletions(-)
diff --git a/l3backend/l3backend-color.dtx b/l3backend/l3backend-color.dtx
index 99f97dd08..3faaba1ac 100644
--- a/l3backend/l3backend-color.dtx
+++ b/l3backend/l3backend-color.dtx
@@ -1478,47 +1478,6 @@ local node_types = {
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{node_map, node_types,literals}
-% We abstract the idea of different types of node where it makes sense:
-% notice for example that in contrast to \pkg{luacolor} we extract some
-% one-off information in the function that needs it. We also use a single
-% local \enquote{map} for the node values.
-% \begin{macrocode}
-local node_map = {
- list = 1 ,
- list_leaders = 2 ,
- list_disc = 3 ,
- color = 4 ,
- no_color = 5
- }
-local node_types = {
- [id("hlist")] = node_map.list ,
- [id("vlist")] = node_map.list ,
- [id("rule")] = node_map.color ,
- [id("glyph")] = node_map.color ,
- [id("disc")] = node_map.list_disc ,
- [id("whatsit")] = {
- [subtype("pdf_colorstack")] =
- function(n) return n.stack == 0 and node_map.no_color or nil end ,
- [subtype("special")] = node_map.color ,
- [subtype("pdf_literal")] = node_map.color ,
- [subtype("pdf_save")] = node_map.color ,
- [subtype("pdf_restore")] = node_map.color
- } ,
- [id("glue")] =
- function(n)
- if n.subtype >= 100 then
- if n.leader.id == id("rule") then
- return node_map.color
- else
- return node_map.list_leaders
- end
- end
- end
- }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{get_type}
% Convert a node into the type, allowing for tables and functions.
% \begin{macrocode}
More information about the latex3-commits
mailing list.