diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-03-15 19:22:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-03-15 19:22:00 +0100 |
commit | f134097269c02c4c42583281168c5ac71a4c2473 (patch) | |
tree | 6148e432ca8dba4135aad07e7da74099e51469bd /tex/context/base/strc-lev.lua | |
parent | d85ec4e39d1529a187aa1435f45625d5ac00f9d3 (diff) | |
download | context-f134097269c02c4c42583281168c5ac71a4c2473.tar.gz |
beta 2013.03.15 19:22
Diffstat (limited to 'tex/context/base/strc-lev.lua')
-rw-r--r-- | tex/context/base/strc-lev.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tex/context/base/strc-lev.lua b/tex/context/base/strc-lev.lua index 4ca049d7a..50a63c938 100644 --- a/tex/context/base/strc-lev.lua +++ b/tex/context/base/strc-lev.lua @@ -6,7 +6,6 @@ if not modules then modules = { } end modules ['strc-lev'] = { license = "see context related readme files" } -local format = string.format local insert, remove = table.insert, table.remove local sections = structures.sections @@ -18,6 +17,8 @@ local level, levels, categories = 0, sections.levels, { } storage.register("structures/sections/levels", levels, "structures.sections.levels") +local f_two_colon = string.formatters["%s:%s"] + function commands.definesectionlevels(category,list) levels[category] = utilities.parsers.settings_to_array(list) end @@ -27,7 +28,7 @@ function commands.startsectionlevel(category) level = level + 1 local lc = levels[category] if not lc or level > #lc then - context.nostarthead { format("%s:%s",category,level) } + context.nostarthead { f_two_colon(category,level) } else context.dostarthead { lc[level] } end @@ -39,7 +40,7 @@ function commands.stopsectionlevel() if category then local lc = levels[category] if not lc or level > #lc then - context.nostophead { format("%s:%s",category,level) } + context.nostophead { f_two_colon(category,level) } else context.dostophead { lc[level] } end |