E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 1 | .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 Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 40 | |
| 41 | .** these macros are common for prfm/tfm, markdown will override some |
| 42 | .dv indent .ll -.5i .in +.25i |
| 43 | .dv uindent .in -.25i .ll +.5i |
| 44 | .dv smindent .ll -.2i .in +.1i |
| 45 | .dv smuindent .in -.1i .ll +.2i |
| 46 | |
| 47 | .dv def_list .bd $1 |
| 48 | .dv end_dlist .ed |
| 49 | .dv bd .bd $1 |
| 50 | .dv ed .ed |
| 51 | |
| 52 | .dv ex_start .sp .5 .ll -.25i .in +.25i .sf Courier .st ^&extextsize .fo off |
| 53 | .** ex_end macro calls _must_ be placed in col 0 to cause an exit from no-format mode. |
| 54 | .dv ex_end .fo on .sf ^&textfont .st ^&textsize .in -.25i .ll +.25i .sp .1 |
| 55 | |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 56 | .dv proto_start .sp 1 .cc .5i .st 9 .sf Courier-bold .nf |
| 57 | .dv proto_end .fo on .sf ^&text_font .st ^&text_size .sp .3 |
| 58 | |
| 59 | |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 60 | .dv h1 .sp .1 .h1 $1 |
| 61 | .dv h2 .sp .1 .h2 $1 |
| 62 | .dv h3 .sp .1 .h3 $1 |
| 63 | .dv di .di $1 ^: |
| 64 | |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 65 | .** superscript number for start_note macro |
| 66 | .dv ss_num 1 |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 67 | .dv super .sm ^[ .sm ^&{ss_num}] |
| 68 | .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] | 69 | .dv atbot atclose |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 70 | |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 71 | .dv start_note .cn start atclose Times-roman 8p .5i |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 72 | .dv end_note .cn end |
| 73 | .dv bold $1 |
| 74 | .dv cw $1 |
| 75 | .dv set_font_prop |
| 76 | .dv ital $1 |
| 77 | .dv lic1 * |
| 78 | .dv lic2 + |
| 79 | |
| 80 | .dv line_len .ll $1 |
| 81 | .dv space .sp 1 |
| 82 | .dv half_space .sp 1 |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 83 | .dv mult_space .sp $1 |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 84 | |
| 85 | .** ----------------------------------------------- |
| 86 | .** not used, but might be needed if doc expanded |
| 87 | .** .dv ta .br ^.ta .br | |
| 88 | .** .dv et .br ^.et .br |
| 89 | .** .dv cl | |
| 90 | .** .dv tr | .br ^.tr .br | |
| 91 | .** .dv table_head $1 |
| 92 | .** .dv empty_cell |
| 93 | .** ----------------------------------------------- |
| 94 | |
| 95 | .dv break .sm ^` ^` .br |
| 96 | .dv br .sm ^` ^` .br |
| 97 | .ju off |
| 98 | .dv image .ep ^[ .sm $2] ($3) |
| 99 | |
| 100 | .** no concept of a definition list in markdown; no start/end and just make the text bold to emulate |
| 101 | .dv beg_dlist .sp 1 |
| 102 | .dv bd .sp 1 |
| 103 | .dv end_dlist .sp 1 |
| 104 | .dv ed .sp 1 |
| 105 | .dv di ^&break **$1:** |
| 106 | |
| 107 | .dv beg_list .bl * |
| 108 | .dv item .li |
| 109 | .dv li .li |
| 110 | .dv end_list .el |
| 111 | |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 112 | .dv center_start |
| 113 | .dv center_end |
| 114 | |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 115 | .dv line .sp 1 ------ |
| 116 | |
| 117 | .** leading indention is significant to markdown, so turn it off |
| 118 | .in 0 |
| 119 | .dv indent |
| 120 | .dv uindent .sp 2 |
| 121 | .dv smindent |
| 122 | .dv smuindent .sp 2 |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 123 | .dv bold **${1}** |
| 124 | .dv ital _${1}_ |
E. Scott Daniels | ffba61c | 2019-07-29 14:28:00 -0400 | [diff] [blame] | 125 | .dv h1 .sp 2 # $1 .br |
| 126 | .dv h2 .sp 1 ## $1 .br |
| 127 | .dv h3 .sp 1 ### $1 .br |
| 128 | |
| 129 | .dv ex_start .sp .5 .ll -4 .in .5i .sp 2 .fo off |
| 130 | .dv ex_end .fo on .in 0i .ll +4 .sp 2 |