summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r--Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.lua15
-rw-r--r--Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.sty7
2 files changed, 19 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.lua b/Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.lua
index 07b68e3ed44..4eabc5868d1 100644
--- a/Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.lua
+++ b/Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.lua
@@ -1,5 +1,5 @@
--% Kale Ewasiuk (kalekje@gmail.com)
---% 2022-01-30
+--% 2022-04-16
--% Copyright (C) 2021-2022 Kale Ewasiuk
--%
--% Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -110,4 +110,17 @@ function ap.go(s)
return s
end
+function ap.gotab(s)
+ -- very simple, does not work if \\ in tabular, doesn't factor in header or footer
+ local s, c = s:gsub('%s*\\\\', '\0')
+ if c > 2 then
+ s = s:gsub('\0', ap.punc[0]..'\\\\', c-2)
+ end
+ if c > 1 then
+ s = s:gsub('\0', ap.punc[2]..'\\\\', 1)
+ end
+ s = s:gsub('\0', ap.punc[1]..'\\\\', 1)
+ return s
+end
+
return ap \ No newline at end of file
diff --git a/Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.sty b/Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.sty
index 11a4c66f69e..e444adf0d51 100644
--- a/Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.sty
+++ b/Master/texmf-dist/tex/lualatex/autopuncitems/autopuncitems.sty
@@ -1,5 +1,5 @@
% Kale Ewasiuk (kalekje@gmail.com)
-% 2022-01-30
+% 2022-04-16
% Copyright (C) 2021-2022 Kale Ewasiuk
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -23,7 +23,7 @@
% OR OTHER DEALINGS IN THE SOFTWARE.
-\ProvidesPackage{autopuncitems}[2022-01-30]
+\ProvidesPackage{autopuncitems}[2022-04-16]
\RequirePackage{luacode}
\RequirePackage{etoolbox}
@@ -68,3 +68,6 @@
after=\endAutoPuncItemsE,
}
}
+
+\NewDocumentEnvironment{AutoPuncTabular}{ +b }{\luadirect{tex.print(autopuncitems.gotab(\luastringN{#1}))}}{} % does not expand
+