2 #############################################################################
6 #############################################################################
8 # Copyright (c) 1996 X Consortium
9 # Copyright (c) 1996 Dalrymple Consulting
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to deal
13 # in the Software without restriction, including without limitation the rights
14 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 # copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
25 # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 # OTHER DEALINGS IN THE SOFTWARE.
29 # Except as contained in this notice, the names of the X Consortium and
30 # Dalrymple Consulting shall not be used in advertising or otherwise to
31 # promote the sale, use or other dealings in this Software without prior
32 # written authorization.
34 #############################################################################
36 # Written 5/29/96 by Fred Dalrymple
38 #############################################################################
40 # ***** change the following paths if your installation of nsgmls and / or
41 # ***** DocBook isn't into the default places.
45 DOCBOOK
=$SGMLS/davenport
48 # ***** modify the following line (to "=false") if you're not using the
49 # ***** Elan Documentor's Workbench
55 # Everything below this line should be pretty standard and not require
64 #CATALOG=$DOCBOOK/docbook.cat
65 CATALOG
=/etc
/sgml.catalog
66 DECL
=$DOCBOOK/docbook.dcl
76 then echo "usage: docbook-to-man docbook-instance"
81 then cat > /tmp
/dtm.$$.psinc
<<\
!
84 ...
\" transcript compatibility
for postscript use.
86 ...
\" synopsis
: .P
! <file.ps
>
90 .fl
\" force out current output buffer
93 ...
\" the following is from Ken Flowers
-- it prevents dictionary overflows
94 \\!/tempdict
200 dict def tempdict begin
96 .sy
cat \\$1\" bring
in postscript
file
97 ...
\" the following line matches the tempdict above
101 .sp
\\$2u \" move below the image
104 else cat > /tmp
/dtm.$$.psinc
<<\
!
107 ...
\" transcript compatibility
for postscript use.
109 ...
\" synopsis
: .P
! <file.ps
>
118 .fl
\" force out current output buffer
119 \
!!save
/psv exch def currentpoint translate
0 0 moveto
122 .sy
sed -e 's/^/!/' \\$1\" bring
in postscript
file
128 cat >> /tmp
/dtm.$$.psinc
<<\
!
130 .ie
\a\\*(f1
\a\a .ds f1
\\n
(.f
131 .el .ie
\a\\*(f2
\a\a .ds f2
\\n
(.f
132 .el .ie
\a\\*(f3
\a\a .ds f3
\\n
(.f
133 .el .ie
\a\\*(f4
\a\a .ds f4
\\n
(.f
134 .el .tm ? font overflow
138 .ie
!\a\\*(f4
\a\a \
{\
142 .el .ie !\a\\*(f3\a\a \{\
146 .el .ie
!\a\\*(f2
\a\a \
{\
150 .el .ie !\a\\*(f1\a\a \{\
154 .el .tm ? font underflow
163 cat > /tmp
/dtm.$$.prolog
<<!
164 <!DOCTYPE RefEntry PUBLIC
"-//Davenport//DTD DocBook V3.0//EN" [
169 (cat /tmp
/dtm.$$.psinc
;
170 $PARSER -gl -wno-idref -m$CATALOG $DECL /tmp
/dtm.$$.prolog
$INSTANCE |
171 $INSTANT $INSTANT_OPT -croff.cmap
-sroff.sdata
-tdocbook-to-man.ts
)
173 #(cat /tmp/dtm.$$.psinc;
174 # $PARSER -gl -wno-idref -m$CATALOG $DECL $INSTANCE |
175 # $INSTANT $INSTANT_OPT -croff.cmap -sroff.sdata -tdocbook-to-man.ts)
177 rm -f /tmp
/dtm.$$.psinc
178 rm -f /tmp
/dtm.$$.prolog