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 | |
| 53 | .dv line_len ^^.ll $1 |
| 54 | .dv space .br ^^.sp 1 .br |
| 55 | .dv half_space .br ^^.sp 1 .br |
| 56 | .dv mult_space .br ^^.sp $1 .br |
| 57 | .dv beg_list |
| 58 | .dv end_list |
| 59 | .dv beg_dlist .dv udi -$1 ^: ^^.in +$1 .br ^^.sp 1 .br |
| 60 | .dv end_dlist .br ^^.in &udi .br |
| 61 | .dv ditem ^^.ti ^&udi .br ^&space .br \fB$1\fR .br |
| 62 | .dv item ^&space \(bu |
| 63 | .dv li ^&space \(bu |
| 64 | .** .dv di ^&ditem |
| 65 | .dv di ^^.ti ^&udi .br ^&space .br \fB$1\fR .br |
| 66 | |
| 67 | .dv ex_start ^^.IP .br ^^.nf .br ^^.ft CW .br .nf |
| 68 | .dv ex_end .fo on .br ^^.ft P .br ^^.fi .br ^&space |
| 69 | |
| 70 | .** fonts and font macros |
| 71 | .dv ital \fI$1\fR |
| 72 | .dv bold \fB$1\fR |
| 73 | .dv cw \f(CW$1\fP |
| 74 | .dv set_font_prop .br ^^.ft P |
| 75 | |
| 76 | .ju off |
| 77 | .in 0 |
| 78 | |
| 79 | .dv indent ^^.ll -0.5i &space ^^.in +0.25i |
| 80 | .dv uindent ^^.in -0.25i &space ^^.ll +0.5i |
| 81 | |