E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 1 | .if false |
| 2 | ================================================================================== |
E. Scott Daniels | a3a121c | 2020-05-06 09:07:08 -0400 | [diff] [blame] | 3 | Copyright (c) 2019-2020 Nokia |
| 4 | Copyright (c) 2018-2020 AT&T Intellectual Property. |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 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 Daniels | b7a4b52 | 2019-11-07 15:35:17 -0500 | [diff] [blame] | 40 | .dv esc : .** rst needs an escape for some things |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 41 | |
| 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 Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 57 | .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 Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 61 | .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 Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 66 | .** superscript number for start_note macro |
| 67 | .dv ss_num 1 |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 68 | .dv super .sm ^[ .sm ^&{ss_num}] |
| 69 | .dv note .dv ss_num ^[ ^&ss_num 1 + ] ^: .sm ^[ .sm ^&{ss_num}] |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 70 | .dv atbot atclose |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 71 | |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 72 | .dv start_note .cn start atclose Times-roman 8p .5i |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 73 | .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 Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 84 | .dv mult_space .sp $1 |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 85 | |
| 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 |
E. Scott Daniels | a3a121c | 2020-05-06 09:07:08 -0400 | [diff] [blame] | 106 | .dv ditem ^&break **$1:** |
| 107 | .dv ditem_nosp ^&break **$1:** |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 108 | |
| 109 | .dv beg_list .bl * |
| 110 | .dv item .li |
| 111 | .dv li .li |
| 112 | .dv end_list .el |
| 113 | |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 114 | .dv center_start |
| 115 | .dv center_end |
| 116 | |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 117 | .dv line .sp 1 ------ |
| 118 | |
| 119 | .** leading indention is significant to markdown, so turn it off |
| 120 | .in 0 |
| 121 | .dv indent |
| 122 | .dv uindent .sp 2 |
| 123 | .dv smindent |
| 124 | .dv smuindent .sp 2 |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 125 | .dv bold **${1}** |
| 126 | .dv ital _${1}_ |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 127 | .dv h1 .sp 2 # $1 .br |
| 128 | .dv h2 .sp 1 ## $1 .br |
| 129 | .dv h3 .sp 1 ### $1 .br |
| 130 | |
| 131 | .dv ex_start .sp .5 .ll -4 .in .5i .sp 2 .fo off |
| 132 | .dv ex_end .fo on .in 0i .ll +4 .sp 2 |