Ashwin Sridharan | fd9cc7a | 2019-04-03 16:47:02 -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: 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 | |
| 43 | .dv fig |
| 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 |
| 61 | .dv beg_dlist .dv udi -$1 ^: ^^.in +$1 .br ^^.sp 1 .br |
| 62 | .dv end_dlist .br ^^.in &udi .br |
| 63 | .dv ditem ^^.ti ^&udi .br ^&space .br \fB$1\fR .br |
| 64 | .dv item ^&space \(bu |
| 65 | .dv li ^&space \(bu |
| 66 | .** .dv di ^&ditem |
| 67 | .dv di ^^.ti ^&udi .br ^&space .br \fB$1\fR .br |
| 68 | |
| 69 | .dv ex_start ^^.IP .br ^^.nf .br ^^.ft CW .br .nf |
| 70 | .dv ex_end .fo on .br ^^.ft P .br ^^.fi .br ^&space |
| 71 | |
E. Scott Daniels | 06e85b7 | 2019-08-06 16:29:00 -0400 | [diff] [blame] | 72 | .dv proto_start .sp 1 .cc .5i .st 9 .sf Courier-bold .nf |
| 73 | .dv proto_end .fo on .sf ^&text_font .st ^&text_size .sp .3 |
| 74 | |
E. Scott Daniels | 4240b8b | 2019-08-01 10:36:14 -0400 | [diff] [blame] | 75 | .** fonts and font macros |
| 76 | .dv ital \fI$1\fR |
| 77 | .dv bold \fB$1\fR |
| 78 | .dv cw \f(CW$1\fP |
| 79 | .dv set_font_prop .br ^^.ft P |
| 80 | |
| 81 | .ju off |
| 82 | .in 0 |
| 83 | |
| 84 | .dv indent ^^.ll -0.5i &space ^^.in +0.25i |
| 85 | .dv uindent ^^.in -0.25i &space ^^.ll +0.5i |
| 86 | |