From 327c881beb87e751e38c17c06b5e0490d2299d80 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 3 Sep 2010 23:42:09 +0200 Subject: definition lists --- rst_context.lua | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'rst_context.lua') diff --git a/rst_context.lua b/rst_context.lua index 40dd719..e6c20ee 100644 --- a/rst_context.lua +++ b/rst_context.lua @@ -277,4 +277,39 @@ function rst_context.bullet_item (str) ]] end +-------------------------------------------------------------------------------- +-- Definition lists +-------------------------------------------------------------------------------- +-- TODO define proper setups (probably bnf-like and some narrower for def-paragraphs) + +function rst_context.deflist (str) + return [[ + +\\startdefinitionlist +]] .. str .. [[ + +\\stopdefinitionlist +]] +end + +function rst_context.deflist_item (str) + return [[\\definitionitem{%]] .. str .. [[}]] +end + +function rst_context.deflist_classifier (str) + return [[\\definitionclassifier{]] .. str .. [[}]] +end + +function rst_context.deflist_term (str) + return [[ + + \\definitionterm{]] .. str .. [[}]] +end + +function rst_context.deflist_def (str) + return [[ + + \\definitiondef{%]] .. str .. [[}]] +end + return rst_context -- cgit v1.2.3