blob: 6b74a8a9f5ce6e29c10cfb2de445ec60f87d8956 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
\usemodule[rst]
\setuphead[chapter][page=no,style=bold]
\def\RSTCTX{{\em rst}\kern.5pt\CONTEXT}
\def\reST{{\rm re}{\ss Structured}{\rm Text}}
\starttext
\chapter{\RSTCTX\ Hybrid Documents}
This example demonstrates the macro \type{\RST} which can be used
to process \reST\ markup directly in a normal \CONTEXT\ document.
\RST{
-------------
This Chapter,
-------------
… for instance, was given entirely in *reST* markup. Naturally,
there are some :bold:`drawbacks` to expect when mixing markups:
directives and hyperlink targets that have already been specified
somewhere above the current section will *stay* accessible in
later passages until you redefine them. Also, certain letters
need to be thoroughly escaped in order for them to make it
through to the *reST*-parser, e.g. *\\\{* (<left brace>), and
you’ll have to be inventive to make a backslash
(*\\letterbackslash*) pass through the parser.
}
\startRST
-------------
Alternatively
-------------
you may always use the matching environment ``\\[start|stop]RST``
if you prefer.
\stopRST
\stoptext
|