diff options
author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-08 22:47:41 +0200 |
---|---|---|
committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-08 22:47:41 +0200 |
commit | 988814b6f26f4fbf54b70c66624cddece04d27bb (patch) | |
tree | 9a763aca0440e57943249d9e79e960bcec51b767 /rst_context.lua | |
parent | 875ca73b3e6d3f61097ae4c6ccae356743d6abef (diff) | |
download | context-rst-988814b6f26f4fbf54b70c66624cddece04d27bb.tar.gz |
small fix for sectioning
Diffstat (limited to 'rst_context.lua')
-rw-r--r-- | rst_context.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/rst_context.lua b/rst_context.lua index 7a556ab..13e4522 100644 --- a/rst_context.lua +++ b/rst_context.lua @@ -468,7 +468,9 @@ function rst_context.table (str) end function rst_context.grid_table (tab) - local head = [[ + local head + if tab.has_head then + head = [[ \\setupTABLE[c][first] [background=color, backgroundcolor=grey, style=\tt] \\setupTABLE[c][each] [frame=on] \\setupTABLE[r][each] [frame=on] @@ -483,6 +485,14 @@ function rst_context.grid_table (tab) \\eTABLEhead \\bTABLEbody ]] + else + head = [[ +\\setupTABLE[c][each] [frame=on] +\\setupTABLE[r][each] [frame=on] +\\bTABLE[split=repeat,option=stretch] +\\bTABLEbody +]] + end local tail = [[ \\eTABLEbody @@ -498,8 +508,6 @@ function rst_context.grid_table (tab) end end - --if not ( r.sepline or - --r.sephead )then if not isempty then local row = [[\\bTR]] for n,c in ipairs(r) do @@ -519,13 +527,11 @@ function rst_context.grid_table (tab) end row = row .. "\n " .. [[\\bTC ]] .. celltext .. [[\\eTC]] - --print(c.parent) end end test = test .. row .. "\n" .. [[\\eTR]] .. "\n" end end - --return head .. test .. tail return head .. test .. tail end |