E. Scott Daniels | 392168d | 2019-11-06 15:12:38 -0500 | [diff] [blame] | 1 | .** vim: ts=4 sw=4 noet: |
| 2 | .if false |
| 3 | ================================================================================== |
| 4 | Copyright (c) 2019 Nokia |
| 5 | Copyright (c) 2018-2019 AT&T Intellectual Property. |
| 6 | |
| 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | you may not use this file except in compliance with the License. |
| 9 | You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | ================================================================================== |
| 19 | .fi |
| 20 | |
| 21 | .if false |
| 22 | Mnemonic: setup.im |
| 23 | Abstract: Look at environment variables and pull in the correct setup prep |
| 24 | imbed file based on the desired output type (when running tfm). |
| 25 | Obviously, when running pfm we are always generating postscirpt |
| 26 | so this isn't really doing much. |
| 27 | Date: 6 November 2019 |
| 28 | .fi |
| 29 | |
| 30 | .if ! _setup_im |
| 31 | |
| 32 | .** if LIB is in the environment we expect it to point at our parent |
| 33 | .gv e LIB lib |
| 34 | .if ! lib |
| 35 | .dv lib .. |
| 36 | .fi |
| 37 | |
| 38 | .** CAUTION: xfm comparisons are reverse polish so "a b =" is true if a == b. |
| 39 | .if pfm |
| 40 | .dv ot postscript |
| 41 | .im &{lib}/generic_ps.im |
| 42 | .ei |
| 43 | .gv e OUTPUT_TYPE ot |
| 44 | .if "&ot" "txt" = |
| 45 | .im &{lib}/txt.im |
| 46 | .fi |
| 47 | .if "&ot" "rst" = |
| 48 | .im &{lib}/rst.im |
| 49 | .fi |
| 50 | .if "&ot" "markdown" = |
| 51 | .im &{lib}/markdown.im |
| 52 | .fi |
| 53 | .if "&ot" "troff" = |
| 54 | .im &{lib}/roff.im |
| 55 | .fi |
| 56 | .fi |
| 57 | |
| 58 | .** if we can set a license into the output, do it early |
| 59 | .cd 1 11i |
| 60 | &line_len(10i) |
| 61 | .im license.im |
| 62 | .cd 1 6.5i m=0 i=0 |
| 63 | &line_len( 6i) |
| 64 | |
E. Scott Daniels | 117030c | 2020-04-10 17:17:02 -0400 | [diff] [blame^] | 65 | .if ! textsize |
| 66 | .dv textsize 10 |
| 67 | .fi |
| 68 | .if ! textfont |
| 69 | .dv textfont Helvetica |
| 70 | .fi |
| 71 | |
E. Scott Daniels | 392168d | 2019-11-06 15:12:38 -0500 | [diff] [blame] | 72 | .dv _setup_im 1 |
| 73 | .fi |