blob: 17ae572271fadd2b5a37012aab68783099e298ea [file] [log] [blame]
E. Scott Danielsffba61c2019-07-29 14:28:00 -04001.if false
2==================================================================================
3 Copyright (c) 2019 Nokia
4 Copyright (c) 2018-2019 AT&T Intellectual Property.
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17==================================================================================
18.fi
19
20.if false
21 Mnemonic: markdown.im
22 Abstract: This is a setup for a very basic generation of markdown from the few
23 macros which are designed for the RMR doc. It is very scaled down from
24 the markdown imbed file supplied with {X}fm.
25
26 Author: E. Scott Danils
27 Date: 26 October 2016
28-------------------------------------------------------------------------------
29.fi
30
31
32.dh 1 m=.5i e=no s=21 i=0 p=16 f=Helvetica-bold
33.dh 2 m=.5i s=21 i=0 p=14 f=Helvetica-bold
34.dh 3 m=.5i s=10 i=0 p=12 f=Helvetica-bold
35
36.ju on
37.hn off
38
39
E. Scott Danielsb7a4b522019-11-07 15:35:17 -050040.dv esc : .** rst needs an escape for some things
E. Scott Danielsffba61c2019-07-29 14:28:00 -040041
42.** these macros are common for prfm/tfm, markdown will override some
43.dv indent .ll -.5i .in +.25i
44.dv uindent .in -.25i .ll +.5i
45.dv smindent .ll -.2i .in +.1i
46.dv smuindent .in -.1i .ll +.2i
47
48.dv def_list .bd $1
49.dv end_dlist .ed
50.dv bd .bd $1
51.dv ed .ed
52
53.dv ex_start .sp .5 .ll -.25i .in +.25i .sf Courier .st ^&extextsize .fo off
54.** ex_end macro calls _must_ be placed in col 0 to cause an exit from no-format mode.
55.dv ex_end .fo on .sf ^&textfont .st ^&textsize .in -.25i .ll +.25i .sp .1
56
E. Scott Daniels06e85b72019-08-06 16:29:00 -040057.dv proto_start .sp 1 .cc .5i .st 9 .sf Courier-bold .nf
58.dv proto_end .fo on .sf ^&text_font .st ^&text_size .sp .3
59
60
E. Scott Danielsffba61c2019-07-29 14:28:00 -040061.dv h1 .sp .1 .h1 $1
62.dv h2 .sp .1 .h2 $1
63.dv h3 .sp .1 .h3 $1
64.dv di .di $1 ^:
65
E. Scott Daniels06e85b72019-08-06 16:29:00 -040066.** superscript number for start_note macro
67.dv ss_num 1
E. Scott Danielsffba61c2019-07-29 14:28:00 -040068.dv super .sm ^[ .sm ^&{ss_num}]
69.dv note .dv ss_num ^[ ^&ss_num 1 + ] ^: .sm ^[ .sm ^&{ss_num}]
E. Scott Daniels06e85b72019-08-06 16:29:00 -040070.dv atbot atclose
E. Scott Danielsffba61c2019-07-29 14:28:00 -040071
E. Scott Daniels06e85b72019-08-06 16:29:00 -040072.dv start_note .cn start atclose Times-roman 8p .5i
E. Scott Danielsffba61c2019-07-29 14:28:00 -040073.dv end_note .cn end
74.dv bold $1
75.dv cw $1
76.dv set_font_prop
77.dv ital $1
78.dv lic1 *
79.dv lic2 +
80
81.dv line_len .ll $1
82.dv space .sp 1
83.dv half_space .sp 1
E. Scott Daniels06e85b72019-08-06 16:29:00 -040084.dv mult_space .sp $1
E. Scott Danielsffba61c2019-07-29 14:28:00 -040085
86.** -----------------------------------------------
87.** not used, but might be needed if doc expanded
88.** .dv ta .br ^.ta .br |
89.** .dv et .br ^.et .br
90.** .dv cl |
91.** .dv tr | .br ^.tr .br |
92.** .dv table_head $1
93.** .dv empty_cell  
94.** -----------------------------------------------
95
96.dv break .sm ^` ^` .br
97.dv br .sm ^` ^` .br
98.ju off
99.dv image .ep ^[ .sm $2] ($3)
100
101.** no concept of a definition list in markdown; no start/end and just make the text bold to emulate
102.dv beg_dlist .sp 1
103.dv bd .sp 1
104.dv end_dlist .sp 1
105.dv ed .sp 1
106.dv di ^&break **$1:**
107
108.dv beg_list .bl *
109.dv item .li
110.dv li .li
111.dv end_list .el
112
E. Scott Daniels4240b8b2019-08-01 10:36:14 -0400113.dv center_start
114.dv center_end
115
E. Scott Danielsffba61c2019-07-29 14:28:00 -0400116.dv line .sp 1 ------
117
118.** leading indention is significant to markdown, so turn it off
119.in 0
120.dv indent
121.dv uindent .sp 2
122.dv smindent
123.dv smuindent .sp 2
E. Scott Daniels06e85b72019-08-06 16:29:00 -0400124.dv bold **${1}**
125.dv ital _${1}_
E. Scott Danielsffba61c2019-07-29 14:28:00 -0400126.dv h1 .sp 2 # $1 .br
127.dv h2 .sp 1 ## $1 .br
128.dv h3 .sp 1 ### $1 .br
129
130.dv ex_start .sp .5 .ll -4 .in .5i .sp 2 .fo off
131.dv ex_end .fo on .in 0i .ll +4 .sp 2