Server IP : 195.201.23.43 / Your IP : 18.217.163.75 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/groff/html/ |
Upload File : |
<!-- Creator : groff version 1.22.4 --> <!-- CreationDate: Sat Mar 21 12:27:30 2020 --> <!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> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small>.PS <br> # Draw a demonstration up left arrow with grid box overlay <br> define gridarrow <br> { <br> move right 0.1 <br> [ <br> {arrow up left $1;} <br> box wid 0.5 ht 0.5 dotted with .nw at last arrow .end; <br> for i = 2 to ($1 / 0.5) do <br> { <br> box wid 0.5 ht 0.5 dotted with .sw at last box .se; <br> } <br> move down from last arrow .center; <br> [ <br> sprintf("\fBarrow up left %g\fP", $1) <br> ] <br> ] <br> move right 0.1 from last [] .e; <br> } <br> gridarrow(0.5); <br> gridarrow(1); <br> gridarrow(1.5); <br> gridarrow(2); <br> undef gridarrow <br> .PE</small></font></p> <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> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small>.PS <br> define filter {box ht 0.25 rad 0.125} <br> lineht = 0.25; <br> Top: [ <br> right; <br> box "\fBms\fR" "sources"; <br> move; <br> box "\fBHTML\fR" "sources"; <br> move; <br> box "\fBlinuxdoc-sgml\fP" "sources" wid 1.5; <br> move; <br> box "\fBTexinfo\fP" "sources";</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small>line down from 1st box .s lineht; <br> A: line down; <br> line down from 2nd box .s; filter "\fBhtml2ms\fP"; <br> B: line down; <br> line down from 3rd box .s; filter "\fBformat\fP"; <br> C: line down; <br> line down from 4th box .s; filter "\fBtexi2roff\fP"; <br> D: line down; <br> ] <br> move down 1 from last [] .s; <br> Anchor: box wid 1 ht 0.75 "\fBms\fR" "intermediate" "form"; <br> arrow from Top.A.end to Anchor.nw; <br> arrow from Top.B.end to 1/3 of the way between Anchor.nw and Anchor.ne; <br> arrow from Top.C.end to 2/3 of the way between Anchor.nw and Anchor.ne; <br> arrow from Top.D.end to Anchor.ne <br> { <br> # PostScript column <br> move to Anchor .sw; <br> line down left then down ->; <br> filter "\fBpic\fP"; <br> arrow; <br> filter "\fBeqn\fP"; <br> arrow; <br> filter "\fBtbl\fP"; <br> arrow; <br> filter "\fBgroff\fP"; <br> arrow; <br> box "PostScript";</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small># HTML column <br> move to Anchor .se; <br> line down right then down ->; <br> A: filter dotted "\fBpic2img\fP"; <br> arrow; <br> B: filter dotted "\fBeqn2html\fP"; <br> arrow; <br> C: filter dotted "\fBtbl2html\fP"; <br> arrow; <br> filter "\fBms2html\fP"; <br> arrow; <br> box "HTML";</small></font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000"><small># Nonexistence caption <br> box dashed wid 1 at B + (2,0) "These tools" "don’t yet exist"; <br> line chop 0 chop 0.1 dashed from last box .nw to A.e ->; <br> line chop 0 chop 0.1 dashed from last box .w to B.e ->; <br> line chop 0 chop 0.1 dashed from last box .sw to C.e ->; <br> } <br> .PE</small></font></p> <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> <p style="margin-left:10%; margin-top: 1em"><font color="#000000">.PS <br> # a three-dimensional block <br> # <br> # tblock(<width>, <height>, <text>)</font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000">define tblock { [ <br> box ht $2 wid $1 \ <br> color "gold" outlined "black" \ <br> xslanted 0 yslanted 0 \ <br> $3; <br> box ht .1 wid $1 \ <br> color "yellow" outlined "black" \ <br> xslanted .1 yslanted 0 \ <br> with .sw at last box .nw; <br> box ht $2 wid .1 \ <br> color "goldenrod" outlined "black" \ <br> xslanted 0 yslanted .1 \ <br> with .nw at 2nd last box .ne; <br> ] }</font></p> <p style="margin-left:10%; margin-top: 1em"><font color="#000000">tblock(1, .5, "Master" "1"); <br> move -.1 <br> tblock(.5, 1, "Slave"); <br> .PE</font></p> <hr> [ <a href="pic-19.html">prev</a> | <a href="pic-21.html">next</a> | <a href="pic.html">top</a> ] <hr>Private