Ashwin Sridharan | fd9cc7a | 2019-04-03 16:47:02 -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. |
Ashwin Sridharan | fd9cc7a | 2019-04-03 16:47:02 -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: troff.im |
| 22 | Abstract: This file provides macros allowing {X}fm source to generate |
| 23 | troff input from {X}fm source when the doc is passed through |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 24 | tfm. This allows the more easily read {X}fm source to be used |
| 25 | to generate man pages, and to be able to generate the man pages |
| 26 | in various output formats (txt, rst, etc.). |
Ashwin Sridharan | fd9cc7a | 2019-04-03 16:47:02 -0400 | [diff] [blame] | 27 | |
| 28 | Author: E. Scott Daniels |
| 29 | Date: 27 January 2019 |
| 30 | |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 31 | Some roff information was gleanded from these pages: |
| 32 | http://cmd.inp.nsk.su/old/cmd2/manuals/unix/UNIX_Unleashed/ch08.htm |
| 33 | https://www.gnu.org/software/groff/manual/html_node/Basics.html |
Ashwin Sridharan | fd9cc7a | 2019-04-03 16:47:02 -0400 | [diff] [blame] | 34 | .fi |
| 35 | |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 36 | .** assume that we're generating roff output when tfm is used. These macros |
| 37 | .** convert {X}fm input into troff. |
| 38 | |
| 39 | .dv h1 .sp 1 ^&bold($1) .br ^&space |
| 40 | .dv h2 .sp 1 ^&bold($1) .br ^&space |
| 41 | .dv h3 .sp 1 ^&bold($1) .br ^&space |
| 42 | |
E. Scott Daniels | a3a121c | 2020-05-06 09:07:08 -0400 | [diff] [blame] | 43 | .dv fig |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 44 | .dv set_font_cw .br ^^.ft CW |
| 45 | |
| 46 | .dv nf ^^.nf .br .nf |
| 47 | .dv fo .fo ^^.fi .br |
| 48 | |
| 49 | .dv center .br ^^.ce 1 .br $1 .br |
| 50 | .dv center_start .br ^^.ce 999 |
| 51 | .dv center_end .br ^.ce 0 |
| 52 | |
E. Scott Daniels | b7a4b52 | 2019-11-07 15:35:17 -0500 | [diff] [blame] | 53 | .dv esc : .** rst needs an escape for some things |
| 54 | |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 55 | .dv line_len ^^.ll $1 |
| 56 | .dv space .br ^^.sp 1 .br |
| 57 | .dv half_space .br ^^.sp 1 .br |
| 58 | .dv mult_space .br ^^.sp $1 .br |
| 59 | .dv beg_list |
| 60 | .dv end_list |
E. Scott Daniels | a3a121c | 2020-05-06 09:07:08 -0400 | [diff] [blame] | 61 | .dv item ^&space \(bu |
| 62 | .dv li ^&space \(bu |
| 63 | .dv li_sp ^&space \(bu |
| 64 | |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 65 | .dv beg_dlist .dv udi -$1 ^: ^^.in +$1 .br ^^.sp 1 .br |
| 66 | .dv end_dlist .br ^^.in &udi .br |
| 67 | .dv ditem ^^.ti ^&udi .br ^&space .br \fB$1\fR .br |
E. Scott Daniels | a3a121c | 2020-05-06 09:07:08 -0400 | [diff] [blame] | 68 | .dv ditem_nosp ^^.ti ^&udi .br \fB$1\fR .br |
| 69 | |
| 70 | .** deprecated, but needed til doc cleaned up |
| 71 | .dv diitem ^^.ti ^&udi .br ^&space .br \fB$1\fR .br |
| 72 | .dv di ^^.ti ^&udi .br ^&space .br \fB$1\fR .br |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 73 | |
| 74 | .dv ex_start ^^.IP .br ^^.nf .br ^^.ft CW .br .nf |
| 75 | .dv ex_end .fo on .br ^^.ft P .br ^^.fi .br ^&space |
| 76 | |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 77 | .dv proto_start .sp 1 .cc .5i .st 9 .sf Courier-bold .nf |
| 78 | .dv proto_end .fo on .sf ^&text_font .st ^&text_size .sp .3 |
| 79 | |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 80 | .** fonts and font macros |
| 81 | .dv ital \fI$1\fR |
| 82 | .dv bold \fB$1\fR |
| 83 | .dv cw \f(CW$1\fP |
| 84 | .dv set_font_prop .br ^^.ft P |
| 85 | |
| 86 | .ju off |
| 87 | .in 0 |
| 88 | |
| 89 | .dv indent ^^.ll -0.5i &space ^^.in +0.25i |
| 90 | .dv uindent ^^.in -0.25i &space ^^.ll +0.5i |
| 91 | |