summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rst_context.lua16
-rw-r--r--rst_parser.lua16
2 files changed, 27 insertions, 5 deletions
diff --git a/rst_context.lua b/rst_context.lua
index 05ed14f..71e9e09 100644
--- a/rst_context.lua
+++ b/rst_context.lua
@@ -537,7 +537,9 @@ end
-- Prime time for the fancybreak module.
function rst_context.transition (str)
- return "\n\\hrule\n"
+ rst_context.addsetups("breaks")
+ --return "\\fancybreak\n"
+ return "\\fancybreak{$* * *$}\n"
end
function rst_context.bullet_marker(str)
@@ -1253,4 +1255,16 @@ function optional_setups.lines ()
]]
end
+function optional_setups.breaks ()
+ return [[
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Fancy transitions %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\usemodule[fancybreak]
+\setupfancybreak[symbol=star]
+]]
+end
+
return rst_context
diff --git a/rst_parser.lua b/rst_parser.lua
index a83209a..b17e2fd 100644
--- a/rst_parser.lua
+++ b/rst_parser.lua
@@ -129,8 +129,8 @@ local parser = P{
+ Cs(V"list") / rst.escape
+ Cs(V"line_block") / rst.escape
+ Cs(V"table_block") / rst.escape
+ + V"transition" --/ rst.escape
+ Cs(V"section") / rst.escape
- + Cs(V"transition") --/ rst.escape
+ V"literal_block"
+ Cs(V"block_quote") / rst.escape
+ V"comment_block"
@@ -928,10 +928,10 @@ local parser = P{
transition_line = C(V"adornment_char"^4),
- transition = V"eol"^0
- * V"transition_line"
+ transition = V"transition_line" * V"eol"
* V"end_block"
- /rst.transition,
+ / rst.transition
+ ,
--------------------------------------------------------------------------------
-- Sectioning
@@ -1299,6 +1299,8 @@ local function get_setups ()
%{ Setups }%
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% General %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setupcolors[state=start]
\setupinteraction[state=start,focus=standard,color=darkgreen,contrastcolor=darkgreen]
@@ -1306,6 +1308,12 @@ local function get_setups ()
\sethyphenatedurlnormal{:=?&}
\sethyphenatedurlbefore{?&}
\sethyphenatedurlafter {:=/-}
+
+\doifundefined{startparagraph}{% -->mkii
+ \let\startparagraph\relax
+ \let\stopparagraph\endgraf
+}
+
]]
for item, _ in next, state.addme do