summaryrefslogtreecommitdiff
path: root/tex/context/base/buff-ver.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2014-05-26 22:08:00 +0200
committerHans Hagen <pragma@wxs.nl>2014-05-26 22:08:00 +0200
commitedf3b6a69ff7b618b51a056d31b71f842c24c198 (patch)
treef368a7c04185f74b9f1a30020a9d0d9a6c839e07 /tex/context/base/buff-ver.lua
parent044365a4f17208925ebff5f8749c91571ed947ed (diff)
downloadcontext-edf3b6a69ff7b618b51a056d31b71f842c24c198.tar.gz
beta 2014.05.26 22:08
Diffstat (limited to 'tex/context/base/buff-ver.lua')
-rw-r--r--tex/context/base/buff-ver.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/tex/context/base/buff-ver.lua b/tex/context/base/buff-ver.lua
index 14914d42d..63f5bdfab 100644
--- a/tex/context/base/buff-ver.lua
+++ b/tex/context/base/buff-ver.lua
@@ -43,6 +43,7 @@ local v_auto = variables.auto
local v_yes = variables.yes
local v_last = variables.last
local v_all = variables.all
+local v_absolute = variables.absolute
-- beware, all macros have an argument:
@@ -742,8 +743,9 @@ end
--
-- needed in e.g. tabulate (manuals)
-local compact_all = Cs((P("\\") * ((1-S("\\ "))^1) * (P(" ")/"") * (P(-1) + S("[{")) + 1)^0)
-local compact_last = Cs((P(" ")^1 * P(-1)/"" + 1)^0)
+local compact_all = Cs((P("\\") * ((1-S("\\ "))^1) * (P(" ")/"") * (P(-1) + S("[{")) + 1)^0)
+local compact_absolute = Cs((P("\\") * ((1-S("\\ [{"))^1) * (P(" ")/"" * (S("[{\\"))) + 1) ^0)
+local compact_last = Cs((P(" ")^1 * P(-1)/"" + 1)^0)
function commands.typestring(settings)
local content = settings.data
@@ -751,6 +753,8 @@ function commands.typestring(settings)
local compact = settings.compact
if compact == v_all then
content = lpegmatch(compact_all,content)
+ elseif compact == v_absolute then
+ content = lpegmatch(compact_absolute,content)
elseif compact == v_last then
content = lpegmatch(compact_last,content)
end