2 ==================================================================================
3 Copyright (c) 2020 Nokia
4 Copyright (c) 2020 AT&T Intellectual Property.
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
10 http://www.apache.org/licenses/LICENSE-2.0
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 ==================================================================================
22 Abstract: Provide general setup for all documents. It will include the
23 {X}fm common macro definitions (cmd) which provide the ability
24 to generate markdown, roff, and RST "source" from {X}fm source
25 while still allowing postscript to be generated.
27 Visit gitlab.com/rouxware/xfm for info on how to bulid
37 .** our imbeds live here
40 .** sane default for everything except rst
43 .dv textfont Helvetica
47 .** imbed output type specific macro file
49 .dv output_type &{ot!txt}
51 .** {X}fm package provided common macro definitions
58 .** check that current version of {X}fm is greater/equal to our minimum req'd
59 .if ! [ "2.3.2" CVGE ]
61 .mg ### WARN ### this document source expects {X}fm version 2.3.2 or greater; found &{_major}.&{_minor}.&_patch
68 .mg ### WARNING ### XFM_PATH should be set to reference the shared imbed files; likely these are in /usr/local/share/xfm
72 .** forward variable reference support
73 .** define a 'subroutine' to add a variable and place it into the forward reference file
74 .** fref_sub.ca contains code to execute by the set_fref macor and fref.ca contains the
75 .** forward references to include during pass2. The macro set_ref will define the variable
76 .** passed as $1 (name) with the value passed as $2 and will add it to the fref.ca file.
78 .ca shift start _fref_sub.ca
79 .** be careful... the next 'ca end' MUST be tab indented before {X} version 2.4.
80 .** with 2.4 and after it can be space indented
82 .ca expand extend _fref.ca
85 .** this ca end MUST be in col 0
87 .dv export_var .dv vname $1 ^: .dv vval $2 ^: .dv $1 $2 ^: .im _fref_sub.ca
88 .dv export_fig .dv vname $1 ^: .gv fig .ev ^`.dv vval ^^&_fig ^: ^` .im _fref_sub.ca
89 .dv export_tab .dv vname $1 ^: .gv table .ev ^`.dv vval ^^&_table ^` ^: .im _fref_sub.ca
90 .dv export_pg .dv vname $1 ^: .gv page .ev ^`.dv vval ^^&_page ^` ^: .im _fref_sub.ca
96 .** initialise the forward ref file
98 .** forward reference variables; auto generated
103 .** set up for an index when using pfm and snare file is defined
105 .** {X}fm macro definitions are too big
106 .dh 1 p=14 s=2,1 e=off
108 .dh 3 p=&{textsize!10} s=1,0
111 .ix space .sp 1 .cc 5 %c .ln ^: .sp 0
112 .ix term .br %s `^` ^`` %d
113 .ix groupb .sp .5 %s .br .ll -.25i .in +.25i
114 .ix groupe .sp .1 .in -.25i .ll +.25i
119 .dv index_col_width [ 6.5 &index_cols / .25 &index_cols 1 - * - ]
120 .dv index_here .pa .ju off .st &textsize .cd 1 i=1i w=7 ^: .h1 INDEX ^: .pn off .lw 0 .sp 0 .tt ^: .cd &index_cols i=1i w=&{index_col_width}i g=.25i ^: .in -i .ll &{index_col_width}i .ix insert
121 .im &index_snare_file