Debian Codegraph @

tutorial/type_overview.html

raw symbols SCIP
1
2 <HTML>
3 <!--
4 ***********************************************************************
5 FUNNELWEB MANUAL WEB PAGE
6 =========================
7 Copyright (c) Ross N. Williams 1992,1999. All rights reserved.
8
9 Permission is granted to redistribute and use this manual in
10 any medium, with or without modification, provided that all
11 notices (including, without limitation, the copyright
12 notice, this permission notice, any record of modification,
13 and all legal notices) are preserved on all copies, that all
14 modifications are clearly marked, and that modified versions
15 are not represented as the original version unless all the
16 modifications since the manual's original release by Ross N.
17 Williams (www.ross.net) consist of translations or other
18 transformations that alter only the manual's form, not its
19 content. THIS MANUAL IS PROVIDED "AS IS" AND WITHOUT ANY
20 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
21 LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
22 FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY
23 LAW THERE IS ABSOLUTELY NO WARRANTY.
24
25 ***********************************************************************
26 -->
27
28 <HEAD>
29 <TITLE>3.1 Overview</TITLE>
30 <STYLE TYPE="text/css"> <!-- A {text-decoration: none} // --> </STYLE>
31 </HEAD>
32 <BODY BACKGROUND="binary/background.gif"
33 BGCOLOR="#FFFFFF"
34 TEXT="#000000"
35 VLINK="#660000"
36 LINK="#FF0000"
37 ALINK="#CC0000">
38
39 <TABLE WIDTH="490">
40 <TR>
41 <TD WIDTH="130" VALIGN="top">
42 <IMG SRC="binary/d_clear.gif" ALT="" WIDTH="130" HEIGHT="1"><BR>
43
44 <FONT SIZE="2">
45 <BR>
46
47 <A HREF="http://www.ross.net/"
48 TARGET="rosshome"
49 onClick="window.open('','rosshome','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
50 >
51 <IMG SRC="binary/rossnet_logo.gif"
52 WIDTH="64" HEIGHT="32"
53 BORDER="0" ALT="RossNet"
54 HSPACE="0" VSPACE="1"></A><BR>
55 <BR>
56
57 <A HREF="../index.shtml"
58 TARGET="funnelweb"
59 onClick="window.open('','funnelweb','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
60 >
61 <IMG SRC="binary/linklogo.gif"
62 WIDTH="64" HEIGHT="32"
63 BORDER="0" ALT="FunnelWeb"
64 HSPACE="0" VSPACE="1"></A><BR>
65 <BR>
66 <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD BGCOLOR="#000000">
67 <A HREF="../reference/index.html"
68 TARGET="funnelwebreference"
69 onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
70 ><FONT COLOR="#FFFFFF"><B>Reference</B></FONT></A><BR>
71 <BR>
72 <A HREF="../developer/index.html"
73 TARGET="funnelwebdeveloper"
74 onClick="window.open('','funnelwebdeveloper','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
75 ><FONT COLOR="#FFFFFF"><B>Developer</B></FONT></A><BR>
76 <BR>
77 <A HREF="index.html"><FONT COLOR="#FFFFFF"><B>Tutorial</B></FONT></A><BR>
78 <A HREF="intro.html"><FONT COLOR="#FFFFFF">1 Introduction</FONT></A><BR>
79 <A HREF="macro.html"><FONT COLOR="#FFFFFF">2 Macros</FONT></A><BR>
80 <A HREF="type.html"><FONT COLOR="#FFFFFF">3 Typesetting</FONT></A><BR>
81 <A HREF="example.html"><FONT COLOR="#FFFFFF">4 Example</FONT></A><BR>
82 <A HREF="hints.html"><FONT COLOR="#FFFFFF">5 Hints</FONT></A><BR>
83 <A HREF="examples.html"><FONT COLOR="#FFFFFF">6 Examples</FONT></A><BR>
84 <A HREF="web.html"><FONT COLOR="#FFFFFF">7 Webmaking</FONT></A><BR>
85
86 <BR>
87 <A HREF="search.html"><FONT COLOR="#FFFFFF"><B>SEARCH</B></FONT></A><BR>
88 </FONT>
89 </TD></TR></TABLE>
90
91
92 </TD>
93 <TD WIDTH="360" VALIGN="top">
94 <FONT SIZE="3">
95
96
97 <A HREF="../reference/index.html"><IMG SRC="binary/title.gif"
98 WIDTH="302" HEIGHT="24"
99 BORDER="0" ALT="FunnelWeb Tutorial Manual"
100 HSPACE="0" VSPACE="0"></A>
101 <P><FONT SIZE="5">3.1 Overview</FONT><BR>
102
103
104
105 <P>The previous sections of this manual have focused solely on the
106 macro facilities of FunnelWeb (which are more or less covered
107 completely). As a result, the example documents you have
108 seen so far have been gross distortions of "normal"
109 FunnelWeb documents. Normal FunnelWeb documents
110 often contain as much
111 documentation as code. While there
112 are applications where FunnelWeb can be used solely as a
113 macro preprocessor, many applications will use its
114 typesetting facilities as well.
115
116 <P>The macro definitions discussed in the macro tutorial
117 completely define the contents of the product files that
118 FunnelWeb will generate. These macro definitions can be
119 arranged in any order, and nothing external to them can
120 affect the contents of the product files. The macros can be
121 thought of as a group of self-contained islands.
122
123 <P>Although FunnelWeb will can process the macros all on
124 their own, the full power of FunnelWeb is realized only when
125 the macros are surrounded by a sea of documentation. This
126 sea can take two forms: directives and free text. Some of
127 the directives control things such as the maximum input line
128 length. However, most of them are typesetting directives
129 that affect the printed documentation. Thus a FunnelWeb
130 document can be viewed as a sequence of <STRONG>macro
131 definitions</STRONG>, <STRONG>directives</STRONG>, and
132 <STRONG>free text</STRONG>.
133
134 <P>Unlike the product files which consist of unscrambled
135 macro calls, the documentation file is more or less a direct
136 representation of the input file. Each part of the input
137 file appears in the documentation file in the order in which
138 it appears in the input file. However, each different kind
139 of part is typeset [Note: Here the term "typeset"
140 is used loosely to refer to FunnelWeb's generation of
141 typesetter commands for each construct in the input file.
142 Strictly, the term should be used only to describe the
143 actions of a typesetter program (e.g. TeX).] in a
144 different manner. Macros are typeset in a particular style,
145 with the macro body appearing in <SAMP>tt font</SAMP> (see some
146 FunnelWeb printed documentation for an example). Typesetter
147 directives have specific defined effects (more later). Free
148 text is typeset exactly as it is, except that each block of
149 text between blank lines is filled and justified as a
150 paragraph.
151
152 <P>The following example demonstrates how all this works.
153 Type in the following as <SAMP>example.fw</SAMP> and run it
154 through FunnelWeb with the command "<TT>fw&nbsp;example&nbsp;+t</TT>".
155 The "<TT>+t</TT>" instructs FunnelWeb to generate a
156 documentation file called <SAMP>example.tex</SAMP>. Run the
157 file through TeX and print it. Examine the files
158 <SAMP>example.out</SAMP> and <SAMP>example.tex</SAMP>.
159
160 <P>
161 <PRE>
162 You are reading some free text before the
163 macro. Free text can consist of any text
164 (not containing the FunnelWeb special
165 character) including typesetter commands
166 such as $, %, #, and TeX which
167 will be typeset to appear exactly as
168 they do in the input file!
169 Look out! Here comes a macro!
170
171 @O@&lt;example.out@&gt;==@{@-
172 This text is part of
173 a macro definition.
174 @}
175
176 This is free text following the macro. This
177 sentence contains two @{inline@} typesetter
178 @/directives@/. Now here is a non-inline
179 typesetting directive.
180
181 @t new_page
182
183 This sentence will appear on the next page.
184 </PRE>
185
186 <P>At the top of the <SAMP>example.tex</SAMP> documentation
187 file will be a set of TeX macro definitions. The TeX code
188 corresponding to the input above appears at the end of the
189 file. It should look something like this.
190
191 <P>
192 <PRE>
193 You are reading some free text before the
194 macro. Free text can consist of any text
195 (not containing the FunnelWeb special
196 character) including typesetter commands
197 such as \$, \%, \#, and \TeX{} which
198 will be typeset to appear exactly as
199 they do in the input file!
200 Look out! Here comes a macro!
201
202 \fwbeginmacro
203 \fwfilename{example.out,1}\fwequals
204 \fwodef \fwbtx[This text is part of
205 a macro definition.
206 ]fwetx=%
207 \fwcdef
208 \fwbeginmacronotes
209 \fwisafile{This macro is attached to an output file.}
210 \fwendmacronotes
211 \fwendmacro
212
213 This is free text following the macro. This sentence contains
214 two \fwlit{inline} typesetter \fwemp{directives}.
215 Now here is a non-inline typesetting directive.
216
217 \fwnewpage
218
219 This sentence will appear on the next page.
220 </PRE>
221
222 <P>The following points explain the <SAMP>example.tex</SAMP>
223 file.
224
225 <P><BLOCKQUOTE><B>You don't have to know TeX:</B> If you don't
226 know TeX, don't pay too much attention to this section. You
227 don't need to know TeX to use FunnelWeb.</BLOCKQUOTE>
228
229 <P><BLOCKQUOTE><B>In order:</B> FunnelWeb has merely transformed
230 the input. It hasn't rearranged it.</BLOCKQUOTE>
231
232 <P><BLOCKQUOTE><B>Free text:</B> Most of the free text has been
233 simply copied over. The TeX typesetter justifies and fills
234 all paragraphs fed to it by default, so most of the text has
235 just been copied verbatim.</BLOCKQUOTE>
236
237 <P><BLOCKQUOTE><B>TeX codes:</B> The characters and sequences
238 which TeX treats as special have been neutralized in the
239 documentation file. For example, "<TT>$</TT>" has become
240 "<TT>\$</TT>". By default, FunnelWeb allows the user to
241 write any text as free text and not have to worry about
242 accidentally invoking typesetter features.</BLOCKQUOTE>
243
244 <P><BLOCKQUOTE><B>fw sequences:</B> The <SAMP>fw</SAMP> sequences
245 (e.g. <SAMP>\fwbeginmacro</SAMP>) invoke TeX macros
246 defined earlier in the documentation file (and not shown
247 here).</BLOCKQUOTE>
248
249 <P><BLOCKQUOTE><B>The macro:</B> The macro is typeset using a
250 set of predefined TeX macros. See the printed documentation
251 to see what this looks like on paper.</BLOCKQUOTE>
252
253 <P><BLOCKQUOTE><B>Typesetter directives:</B> Unlike the TeX
254 command sequences (which were neutralized), the FunnelWeb
255 typesetter directives turn into TeX macro calls. For
256 example, "<TT>@{inline@}</TT>" became
257 "<TT>\fwlit{inline}</TT>".</BLOCKQUOTE>
258
259 <P>FunnelWeb can also generate documentation in HTML form.
260 Just replace the <SAMP>+t</SAMP> option with the <SAMP>+u</SAMP> option.
261
262 <P>In summary, FunnelWeb produces typeset documentation
263 that transforms, but does not reorder, the input file.
264 Macros are typeset in a specific style. FunnelWeb typesetter
265 directives have particular well-defined effects. Free text
266 is filled and justified, but will otherwise appear in the
267 printed documentation exactly as it appears in the input
268 file.
269
270
271 <P>
272 <TABLE WIDTH="100%">
273 <TR>
274 <TD ALIGN="left" VALIGN="bottom"><A HREF="type.html"><IMG SRC="binary/fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up"></A></TD>
275 <TD ALIGN="center" VALIGN="bottom"><A HREF="type.html"><IMG SRC="binary/fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up"></A></TD>
276 <TD ALIGN="right" VALIGN="bottom"><A HREF="type_independence.html"><IMG SRC="binary/fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next"></A></TD>
277 </TR>
278 </TABLE>
279
280
281
282 <HR>
283 <FONT SIZE="2">
284 <A HREF="mailto:[email protected]">Webmaster</A>&nbsp;&nbsp;&nbsp;
285 <A HREF="copyright.html">Copyright &copy; Ross N. Williams 1992,1999. All rights reserved.</A><BR>
286 </FONT>
287
288 </FONT>
289 </TD>
290 </TR>
291 </TABLE>
292
293
294 </BODY>
295
296 <!-- *********************************************************************** -->
297 <!-- End Of A FunnelWeb Manual Web Page (www.ross.net/funnelweb/) -->
298 <!-- *********************************************************************** -->
299
300 </HTML>