/usr/share/doc/groff-base/html/pic-20.html is in groff 1.22.3-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | <!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Thu Jan 28 14:57:16 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>pic-20.html</title>
</head>
<hr>
[ <a href="pic-19.html">prev</a> | <a href="pic-21.html">next</a> | <a href="pic.html">top</a> ]
<hr>
<h2>20. Some Larger Examples
<a name="20. Some Larger Examples"></a>
</h2>
<p style="margin-top: 1em"><font color="#000000">Here are a
few larger examples, with complete source code. One of our
earlier examples is generated in an instructive way using a
for loop:</font></p>
<pre style="margin-left:10%; margin-top: 1em">.PS
# Draw a demonstration up left arrow with grid box overlay
define gridarrow
{
move right 0.1
[
{arrow up left $1;}
box wid 0.5 ht 0.5 dotted with .nw at last arrow .end;
for i = 2 to ($1 / 0.5) do
{
box wid 0.5 ht 0.5 dotted with .sw at last box .se;
}
move down from last arrow .center;
[
if ( $1 == boxht ) \
then { "\fBline up left\fP" } \
else { sprintf("\fBarrow up left %g\fP", $1) };
]
]
move right 0.1 from last [] .e;
}
gridarrow(0.5);
gridarrow(1);
gridarrow(1.5);
gridarrow(2);
undef gridarrow
.PE</pre>
<p align="center" style="margin-top: 1em"><font color="#000000"><small><img src="img/pic48.png" alt="Image img/pic48.png"></small></font></p>
<p align="center" style="margin-top: 1em"><font color="#000000">Figure
20-1: Diagonal arrows (dotted boxes show the implied
0.5-inch grid)</font></p>
<p style="margin-top: 1em"><font color="#000000">Here’s
an example concocted to demonstrate layout of a large,
multiple-part pattern:</font></p>
<pre style="margin-left:10%; margin-top: 1em">.PS
define filter {box ht 0.25 rad 0.125}
lineht = 0.25;
Top: [
right;
box "\fBms\fR" "sources";
move;
box "\fBHTML\fR" "sources";
move;
box "\fBlinuxdoc-sgml\fP" "sources" wid 1.5;
move;
box "\fBTexinfo\fP" "sources";
line down from 1st box .s lineht;
A: line down;
line down from 2nd box .s; filter "\fBhtml2ms\fP";
B: line down;
line down from 3rd box .s; filter "\fBformat\fP";
C: line down;
line down from 4th box .s; filter "\fBtexi2roff\fP";
D: line down;
]
move down 1 from last [] .s;
Anchor: box wid 1 ht 0.75 "\fBms\fR" "intermediate" "form";
arrow from Top.A.end to Anchor.nw;
arrow from Top.B.end to 1/3 of the way between Anchor.nw and Anchor.ne;
arrow from Top.C.end to 2/3 of the way between Anchor.nw and Anchor.ne;
arrow from Top.D.end to Anchor.ne
{
# PostScript column
move to Anchor .sw;
line down left then down ->;
filter "\fBpic\fP";
arrow;
filter "\fBeqn\fP";
arrow;
filter "\fBtbl\fP";
arrow;
filter "\fBgroff\fP";
arrow;
box "PostScript";
# HTML column
move to Anchor .se;
line down right then down ->;
A: filter dotted "\fBpic2img\fP";
arrow;
B: filter dotted "\fBeqn2html\fP";
arrow;
C: filter dotted "\fBtbl2html\fP";
arrow;
filter "\fBms2html\fP";
arrow;
box "HTML";
# Nonexistence caption
box dashed wid 1 at B + (2,0) "These tools" "don’t yet exist";
line chop 0 chop 0.1 dashed from last box .nw to A.e ->;
line chop 0 chop 0.1 dashed from last box .w to B.e ->;
line chop 0 chop 0.1 dashed from last box .sw to C.e ->;
}
.PE</pre>
<p align="center" style="margin-top: 1em"><font color="#000000"><small><img src="img/pic49.png" alt="Image img/pic49.png"></small></font></p>
<p align="center" style="margin-top: 1em"><font color="#000000">Figure
20-2: Hypothetical production flow for dual-mode
publishing</font></p>
<p align="center" style="margin-top: 1em"><font color="#000000"><img src="img/pic50.png" alt="Image img/pic50.png"></font></p>
<p align="center" style="margin-top: 1em"><font color="#000000">Figure
20-3: Three-dimensional Boxes</font></p>
<p style="margin-top: 1em"><font color="#000000">Here the
source code for figure 20-3:</font></p>
<pre style="margin-left:10%; margin-top: 1em">.PS
# a three-dimensional block
#
# tblock(<width>, <height>, <text>)
define tblock { [
box ht $2 wid $1 \
color "gold" outlined "black" \
xslanted 0 yslanted 0 \
$3;
box ht .1 wid $1 \
color "yellow" outlined "black" \
xslanted .1 yslanted 0 \
with .sw at last box .nw;
box ht $2 wid .1 \
color "goldenrod" outlined "black" \
xslanted 0 yslanted .1 \
with .nw at 2nd last box .ne;
] }
tblock(1, .5, "Master" "1");
move -.1
tblock(.5, 1, "Slave");
.PE</pre>
<hr>
[ <a href="pic-19.html">prev</a> | <a href="pic-21.html">next</a> | <a href="pic.html">top</a> ]
<hr>
|