diff options
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 |