diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-10-07 11:14:00 +0530 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-10-07 11:14:00 +0530 |
commit | ccdd2d9e98ac3bbf794eefd5a42ed063832a61b3 (patch) | |
tree | 6d4ce4ebf4876b443cdb40cfa74caf7970c61ebe /tex/context/base/strc-doc.lua | |
parent | 2b89b4ede02fd02fe66597e9c314dbfcfa4c0ecb (diff) | |
download | context-ccdd2d9e98ac3bbf794eefd5a42ed063832a61b3.tar.gz |
beta 2014.10.07 11:14
Diffstat (limited to 'tex/context/base/strc-doc.lua')
-rw-r--r-- | tex/context/base/strc-doc.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tex/context/base/strc-doc.lua b/tex/context/base/strc-doc.lua index 38830a4e7..7d3be1620 100644 --- a/tex/context/base/strc-doc.lua +++ b/tex/context/base/strc-doc.lua @@ -136,20 +136,27 @@ function sections.currentid() return #tobesaved end +local lastsaved = 0 + function sections.save(sectiondata) -- local sectionnumber = helpers.simplify(section.sectiondata) -- maybe done earlier local numberdata = sectiondata.numberdata local ntobesaved = #tobesaved if not numberdata or sectiondata.metadata.nolist then - return ntobesaved + -- stay else ntobesaved = ntobesaved + 1 tobesaved[ntobesaved] = numberdata if not collected[ntobesaved] then collected[ntobesaved] = numberdata end - return ntobesaved end + lastsaved = ntobesaved + return ntobesaved +end + +function sections.currentsectionindex() + return lastsaved -- only for special controlled situations end function sections.load() |