Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 233f8aae1f33ee5e61554ecb56b0fdf6 > files > 53

ifm-5.1-11.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>4 Using IFM</TITLE>
<META NAME="description" CONTENT="4 Using IFM">
<META NAME="keywords" CONTENT="ifm">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="ifm.css">

<LINK REL="next" HREF="node8.htm">
<LINK REL="previous" HREF="node6.htm">
<LINK REL="up" HREF="ifm.htm">
<LINK REL="next" HREF="node8.htm">
</HEAD>

<BODY >

<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html249"
  HREF="node8.htm">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> 
<A NAME="tex2html245"
  HREF="ifm.htm">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> 
<A NAME="tex2html239"
  HREF="node6.htm">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> 
<A NAME="tex2html247"
  HREF="node1.htm">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html250"
  HREF="node8.htm">5 Language</A>
<B> Up:</B> <A NAME="tex2html246"
  HREF="ifm.htm">IFM</A>
<B> Previous:</B> <A NAME="tex2html240"
  HREF="node6.htm">3 Solving the Game</A>
 &nbsp; <B>  <A NAME="tex2html248"
  HREF="node1.htm">Contents</A></B> 
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL CLASS="ChildLinks">
<LI><A NAME="tex2html251"
  HREF="node7.htm#SECTION00071000000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">1</SPAN> Running the Program</A>
<LI><A NAME="tex2html252"
  HREF="node7.htm#SECTION00072000000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN> Types of Output</A>
<UL>
<LI><A NAME="tex2html253"
  HREF="node7.htm#SECTION00072100000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">1</SPAN> PostScript Maps (<TT>ps</TT>)</A>
<LI><A NAME="tex2html254"
  HREF="node7.htm#SECTION00072200000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">2</SPAN> Fig Maps (<TT>fig</TT>)</A>
<LI><A NAME="tex2html255"
  HREF="node7.htm#SECTION00072300000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">3</SPAN> Tk Drawing Commands (<TT>tk)</TT></A>
<LI><A NAME="tex2html256"
  HREF="node7.htm#SECTION00072400000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">4</SPAN> ASCII Text (<TT>text</TT>)</A>
<LI><A NAME="tex2html257"
  HREF="node7.htm#SECTION00072500000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">5</SPAN> Recording Commands (<TT>rec</TT>)</A>
<LI><A NAME="tex2html258"
  HREF="node7.htm#SECTION00072600000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">6</SPAN> Task Dependencies (<TT>dot</TT>)</A>
<LI><A NAME="tex2html259"
  HREF="node7.htm#SECTION00072700000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">7</SPAN> Raw Data (<TT>raw</TT>)</A>
</UL>
<BR>
<LI><A NAME="tex2html260"
  HREF="node7.htm#SECTION00073000000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">3</SPAN> Customization</A>
<LI><A NAME="tex2html261"
  HREF="node7.htm#SECTION00074000000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">4</SPAN> Output Variables</A>
<LI><A NAME="tex2html262"
  HREF="node7.htm#SECTION00075000000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">5</SPAN> Predefined Styles</A>
<LI><A NAME="tex2html263"
  HREF="node7.htm#SECTION00076000000000000000"><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">6</SPAN> Backward Compatibility</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION00070000000000000000"></A><A NAME="sec:using-ifm"></A>
<BR>
<SPAN CLASS="arabic">4</SPAN> Using IFM
</H1>

<P>

<H2><A NAME="SECTION00071000000000000000">
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">1</SPAN> Running the Program</A>
</H2>

<P>
IFM is run from the command line. The general form of the command is:

<P>

<DL COMPACT>
<DT>
<DD>ifm&nbsp;[options]&nbsp;[file...]
</DD>
</DL>On startup, IFM does the following. Firstly, the system initialization file
is read. This sets defaults used by everyone. This file is called <TT>ifm-init.ifm</TT>,
and is found by searching a standard set of directories. You can prepend to
this search path by setting the environment variable <TT>IFMPATH</TT> to be
a colon-separated list of directories.

<P>
Then, if you have a personal initialization file, that is read. This file is
found in the directory specified by your <TT>HOME</TT> environment variable.
On Unix-like systems it is called <TT>.ifmrc</TT>, and on Win32 systems it is
called <TT>ifm.ini</TT>. You can use this file to customize the default variable
settings for different types of output.

<P>
Then input from the file(s) on the command-line is read. If no files were specified,
<TT>stdin</TT> is read. A filename equal to <TT>-</TT> also indicates that <TT>stdin</TT>
should be read at that point.

<P>
Before IFM sees any input, it's passed through a preprocessor, in a similar
manner to C programs. See Section <A HREF="node8.htm#sec:preprocessor">5.9</A> for more details.

<P>
If any of the <TT>-map</TT>, <TT>-items</TT>, <TT>-tasks</TT> or <TT>-show</TT>
options was specified, the appropriate output is produced. If not, only a syntax
check of the input is done.

<P>
When producing output, the output format specified by the <TT>-format</TT> option
is used. If this was not specified, the first format in the list which supports
this type of output is chosen.

<P>
Some of the output formats use additional library files to do their work. For
example, the PostScript output format prepends a standard ``prologue'' file
to all output. These files are found using the same search path as the system
initialization file (see above).

<P>
Here's a summary of the command-line options (which can be abbreviated), starting
with the output options:

<P>

<UL>
<LI>[<TT>-m,&nbsp;-map[=SECTIONS]</TT>]&nbsp;
<BR>
Draw a map of the game. You can optionally specify a list of the map sections
to print. The list is a comma-separated set of map section numbers (starting
from 1) and can include ranges. For example, the argument <TT>1,3-5</TT> would
print map sections 1, 3, 4 and 5. If the list isn't specified, all sections
are printed.
</LI>
<LI>[<TT>-i,&nbsp;-items</TT>]Print a list of items which appear in the game.
</LI>
<LI>[<TT>-t,&nbsp;-tasks</TT>]Print a list of tasks required to solve the game.
</LI>
<LI>[<TT>-f,&nbsp;-format</TT>&nbsp;<TT>FORMAT</TT>]&nbsp;
<BR>
Specify the output format.
</LI>
<LI>[<TT>-o,&nbsp;-output</TT>&nbsp;<TT>FILE</TT>]&nbsp;
<BR>
Write to the specified file, instead of stdout.
</LI>
</UL>Next comes the auxiliary options:

<P>

<UL>
<LI>[<TT>-S,&nbsp;-style&nbsp;STYLE</TT>]&nbsp;
<BR>
Set a global style. See Section <A HREF="#sec:customization">4.3</A> for more details. This
option may be repeated.
</LI>
<LI>[<TT>-s,&nbsp;-set&nbsp;VAR=VALUE</TT>]&nbsp;
<BR>
Set a customization variable. This overrides any settings in the input files.
This option may be repeated.
</LI>
<LI>[<TT>-w,&nbsp;-nowarn</TT>]Don't print warnings.
</LI>
<LI>[<TT>-noinit</TT>]Don't read your personal init file.
</LI>
</UL>These are the preprocessor options:

<P>

<UL>
<LI>[<TT>-I,&nbsp;-include&nbsp;DIR</TT>]&nbsp;
<BR>
Prepend the specified directory to the library and include file search path.
This option may be repeated.
</LI>
<LI>[<TT>-Dvar[=val]</TT>]Define a preprocessor symbol. This option may be
repeated.
</LI>
<LI>[<TT>-P</TT>]Just show the results of preprocessing the input.
</LI>
</UL>Finally, here are the information options:

<P>

<UL>
<LI>[<TT>-show</TT>&nbsp;<TT>TYPE</TT>]Show one of several types of information, and
exit. The <TT>TYPE</TT> argument can be one of:

<P>

<UL>
<LI>[<TT>maps</TT>]Show a list of all the map sections defined in the input. This
is useful for finding the numbers of the map sections you want to print.
</LI>
<LI>[<TT>path</TT>]Show the directories that are searched for library and include
files.
</LI>
<LI>[<TT>vars</TT>]Show a complete list of defined variables, in a format suitable
for feeding back into IFM. See Section <A HREF="#sec:output-variables">4.4</A>.
</LI>
</UL>
</LI>
<LI>[<TT>-version</TT>]Print the program version.
</LI>
<LI>[<TT>-help</TT>]Just print some usage information.
</LI>
</UL>
<P>

<H2><A NAME="SECTION00072000000000000000">
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN> Types of Output</A>
</H2>

<P>
IFM has three different types of output (a map, a list of items, and a list
of tasks) and several different output formats, which are described in the following
sections. Not all types of output are produced by each output format. Table
<A HREF="#tab:output-formats">1</A> shows what's available for each format.<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="1560"></A>
<TABLE>
<CAPTION><STRONG>Table 1:</STRONG>
IFM output formats</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER">
<TABLE CELLPADDING=3 BORDER="1" ALIGN="CENTER">
<TR><TD ALIGN="RIGHT">&nbsp;</TD>
<TD ALIGN="CENTER">PostScript</TD>
<TD ALIGN="CENTER">Fig</TD>
<TD ALIGN="CENTER">Tk</TD>
<TD ALIGN="CENTER">Text</TD>
<TD ALIGN="CENTER">Rec</TD>
<TD ALIGN="CENTER">Dot</TD>
<TD ALIGN="CENTER">Raw</TD>
</TR>
<TR><TD ALIGN="RIGHT">Map</TD>
<TD ALIGN="CENTER">Yes</TD>
<TD ALIGN="CENTER">Yes</TD>
<TD ALIGN="CENTER">Yes</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">Yes</TD>
</TR>
<TR><TD ALIGN="RIGHT">Items</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">Yes</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">Yes</TD>
</TR>
<TR><TD ALIGN="RIGHT">Tasks</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">&nbsp;</TD>
<TD ALIGN="CENTER">Yes</TD>
<TD ALIGN="CENTER">Yes</TD>
<TD ALIGN="CENTER">Yes</TD>
<TD ALIGN="CENTER">Yes</TD>
</TR>
</TABLE>
</DIV>

<P>
</TD></TR>
</TABLE>
</DIV><P></P>
<BR>

<P>
All the map output formats display map sections in the same way, so that what
you get with one format looks much the same as another.<A NAME="tex2html8"
  HREF="footnode.htm#foot610"><SUP><SPAN CLASS="arabic">6</SPAN></SUP></A>
<P>

<H3><A NAME="SECTION00072100000000000000">
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">1</SPAN> PostScript Maps (<TT>ps</TT>)</A>
</H3>

<P>
This produces a PostScript map suitable for printing. Several map sections may
be printed per page, and the maps are printed over as many pages as it takes.
Automatic packing is done to try to get a good fit on the page. Also, portrait
or landscape is chosen depending on whichever gives the best fit. Fonts of room
and item text are scaled to fit them in the room boxes, if required.

<P>

<H3><A NAME="SECTION00072200000000000000">
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">2</SPAN> Fig Maps (<TT>fig</TT>)</A>
</H3>

<P>
This produces a map which can be read (and edited) by Xfig, and any other programs
which understand Fig format. The map sections are packed to get a best fit automatically,
in a similar manner to PostScript, but since Fig has no concept of pages, it
is most useful when you're printing each map section individually. There's a
utility program called <TT>ifm2dev</TT> which automatically does this--see
Section <A HREF="node10.htm#sec:ifm2dev">7.1</A>.

<P>
Fig format is also useful if you want to print poster-sized maps over several
pages. The <TT>-M</TT> option of <TT>fig2dev</TT> (part of the <TT>transfig</TT>
package) will automatically do this.

<P>

<H3><A NAME="SECTION00072300000000000000">
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">3</SPAN> Tk Drawing Commands (<TT>tk)</TT></A>
</H3>

<P>
This produces map commands for input to <TT>tkifm</TT>, a simple graphical interface
to IFM (see Section <A HREF="node10.htm#sec:tkifm">7.3</A>). It isn't very useful to produce this
output yourself--<TT>tkifm</TT> does that internally to build its map pictures.
But you can control its display by setting variables in the usual way.

<P>

<H3><A NAME="SECTION00072400000000000000">
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">4</SPAN> ASCII Text (<TT>text</TT>)</A>
</H3>

<P>
This produces human-readable output for items and tasks. The output should be
fairly self-explanatory.

<P>

<H3><A NAME="SECTION00072500000000000000"></A><A NAME="sec:recording"></A>
<BR>
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">5</SPAN> Recording Commands (<TT>rec</TT>)
</H3>

<P>
This output produces a list of commands suitable for feeding to IF interpreters
in playback mode. All the commands in the output are converted to uppercase.

<P>
In order for this to work properly, you have to give commands that the game
will understand. The <TT>cmd</TT> attribute of rooms, links, joins and tasks
can help with this. Currently there's no item <TT>cmd</TT> attribute, so you
have to make sure that the item description is recognized by the game (for <TT>get</TT>
and <TT>drop</TT> commands). Also, if a task is implicitly done in the game
without you having to type any commands (e.g.&nbsp;visiting a room), you can indicate
this by using <TT>cmd&nbsp;none</TT>.

<P>
Of course, a recording will only play back properly in an interpreter if it
provides correct game commands. Random events can't be dealt with by IFM, and
will probably cause playback to fail. But you can work around this with an interpreter
that is able to fix the random seed at startup (e.g.<TT>&nbsp;frotz</TT>). This
should eliminate most (but not all) of the problems of randomness.

<P>

<H3><A NAME="SECTION00072600000000000000">
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">6</SPAN> Task Dependencies (<TT>dot</TT>)</A>
</H3>

<P>
This produces a graph of the dependencies of tasks on each other, in Graphviz
(dot) format. You'll need to have Graphviz installed in order to display the
graph; you can get it from www.graphviz.org.

<P>

<H3><A NAME="SECTION00072700000000000000">
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">7</SPAN> Raw Data (<TT>raw</TT>)</A>
</H3>

<P>
This produces raw data for all output formats, intended for use by other programs
(and the IFM regression test suite). Each entry consists of a number of data
lines, and is separated from other entries by a blank line. Each data line consists
of an attribute, a colon, and its value. The attributes should be self-explanatory.

<P>

<H2><A NAME="SECTION00073000000000000000"></A><A NAME="sec:customization"></A>
<BR>
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">3</SPAN> Customization
</H2>

<P>
You can change the appearance of many output features according to your taste.
You do this by setting the values of the variables that control those features.
This section tells you how to use variables--for a complete list of the customization
variables available, see Section <A HREF="#sec:output-variables">4.4</A>.

<P>
As a first example, the background colour of rooms is determined by the variable
<TT>room_colour</TT>. Its default value is ``white''. It can be changed
like this:

<P>

<DL COMPACT>
<DT>
<DD>room_colour&nbsp;=&nbsp;&#34;beige&#34;;
</DD>
</DL>Setting a variable like this will affect all output formats. But in some cases
you don't want to do that. A good example is the one above--if you don't have
a colour printer, you may not want to have beige rooms printed (they'll come
out greyish). To get around that, you can set variables that are specific to
a particular output format:

<P>

<DL COMPACT>
<DT>
<DD>tk.room_colour&nbsp;=&nbsp;&#34;beige&#34;;
</DD>
</DL>This says to set the variable to ``beige'' only if producing Tk output.
The default for all other formats is still ``white''.

<P>
You can also customize the appearance of individual rooms and links on the map,
by using different display styles. A display style is just a group of variable
settings with a given name. For example, suppose you're making a map of Colossal
Cave and want to mark rooms where you can refill your water bottle. You can
define a style called, say, Water, like this:

<P>

<DL COMPACT>
<DT>
<DD>style&nbsp;Water;

<P>
room_colour&nbsp;=&nbsp;&#34;light&nbsp;blue&#34;;

<P>
endstyle;
</DD>
</DL>The values of variables that are set between the <TT>style</TT> and <TT>endstyle</TT>
clauses only apply to things drawn in that style. Now, if you declare rooms
like this:

<P>

<DL COMPACT>
<DT>
<DD>room&nbsp;&#34;At&nbsp;End&nbsp;Of&nbsp;Road&#34;;

<P>
room&nbsp;&#34;Inside&nbsp;Building&#34;&nbsp;dir&nbsp;e&nbsp;go&nbsp;in&nbsp;style&nbsp;Water;
</DD>
</DL>then the room ``Inside Building'' will be drawn with a light blue background.
You can customize individual links in a similar manner.

<P>
An alternative way to define a variable in a particular style is to use the
<TT>in&nbsp;style</TT> clause, like this:

<P>

<DL COMPACT>
<DT>
<DD>room_colour&nbsp;=&nbsp;&#34;light&nbsp;blue&#34;&nbsp;in&nbsp;style&nbsp;Water;
</DD>
</DL>If a style only changes a single variable, this may be more convenient.

<P>
If you assign a style (say, called ``newstyle'') to an object, but don't
define it anywhere in your input, then IFM will look for a file called <TT>newstyle.ifm</TT>
using the standard search path. If the file exists, it is expected to define
style ``newstyle''. For example, you could put the ``Water'' style definition
above into a file called <TT>Water.ifm</TT> somewhere on the IFM search path,
and it would be read automatically. This is useful if, for example, you want
to use the same style in several different maps.

<P>
You can define global styles using the <TT>-style</TT> command-line option;
these apply to all IFM objects. Global styles are most useful when setting variables
that affect the overall appearance of the output, in conjunction with the file
search method described above (e.g.&nbsp;a file containing general colour and font
definitions).

<P>

<H2><A NAME="SECTION00074000000000000000"></A><A NAME="sec:output-variables"></A>
<BR>
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">4</SPAN> Output Variables
</H2>

<P>
There are many variables available for customizing output. Most of them are
for customizing map output. Their names, descriptions and default values are
all contained in the IFM initialization file. You can change this file to set
global defaults for everybody, or alternatively set your own preferences in
your personal init file.

<P>
Here's the original initialization file that came bundled with IFM.

<P>

<DL COMPACT>
<DT>
<DD>
<BR>
<PRE  CLASS="verbatim">############################################################## -*- Perl -*-###
# System IFM init file
##############################################################################

# This file contains the default definitions for all variables used by the
# output formats.  Changing these values will affect all users.

# Each variable listed below has a comment next to it indicating which
# type(s) of output are controlled by it.

# The default values are designed to give nice results in all formats.  The
# default for PostScript is to produce maps for monochrome printing on one
# or more pages of A4 paper.  The default for Fig is to produce one big
# page (which can be split into multiple pages later).

# The map output formats differ in their treatment of fonts.  In PostScript
# and Fig, the font and font size are specified separately, via the *_font
# and *_fontsize variables.  In Tk, they are both specified together, via
# the *_fontdef variables.

# In PostScript and Fig output, a font size represents the maximum desired
# size -- the actual size may be scaled down in order to fit the text into
# an enclosing space (e.g. a room box).

# In Tk output, all line width values are interpreted as integers.

##############################################################################
# General variables
##############################################################################

# File of colour definitions, which contains the RGB values of each colour
# referred to below (and a good many more).  It's just the rgb.txt file
# found on Unix/X11 systems.  See that file for a list of available
# colours.  You can use the same colour names for the Tk output, since it
# uses the standard X colours.
colour_file = "ifm-rgb.txt";	# ps fig tk

# Prolog file that gets prepended to all the PostScript output.  This
# defines all the procedures for drawing everything.
prolog_file = "ifm-pro.ps";	# ps

# Scale factor which is applied to all fonts.  This is a convenience
# variable to make font adjustments easier.
font_scale = 1;			# ps fig

##############################################################################
# Page variables
##############################################################################

# Default page size.  Available page sizes are: A3, A4, A, B, C, Legal,
# Letter.
page_size = "A4";		# ps fig

# If defined, these set a custom page size which overrides the 'page_size'
# variable.  Units are in cm.
page_width = undef;		# ps fig
page_height = undef;		# ps fig

# Margin space to be left on each page, in cm.
page_margin = 2;		# ps fig

# Whether to rotate each page to landscape.  If not defined, then rotation
# is decided on a per-page basis in order to get the best fit.
page_rotate = undef;		# ps

# Whether to show the main title on each page.
show_page_title = 1;		# ps

# Appearance of the main title (if shown).
page_title_font = "Times-Bold";	# ps
page_title_fontsize = 18;	# ps
page_title_colour = "black";	# ps

# Whether to show a border around each page.
show_page_border = 0;		# ps fig

# Colour of the page border (if drawn).
page_border_colour = "black";	# ps fig

# Colour of the page background (if border is drawn).
page_background_colour = "white"; # ps fig

# Whether to scale Fig layout to fit on a single page.  Most of the time,
# this doesn't make things look good.
fit_page = 0;			# fig

##############################################################################
# Map section variables
##############################################################################

# Whether to show the map title.
show_map_title = 1;		# ps fig

# Appearance of the title printed above each map section.
map_title_font = "Times-Bold";	# ps fig
map_title_fontsize = 14;	# ps fig
map_title_colour = "black";	# ps fig

# Whether to show a border around each map section.
show_map_border = 0;		# ps fig

# Colour of the map border (if drawn).
map_border_colour = "black";	# ps fig

# Colour of the map background (if border is drawn).
map_background_colour = "white"; # ps fig
tk.map_background_colour = "wheat"; # tk

# Minimum space, in rooms, between map sections when packed together.
map_section_spacing = 1;	# ps fig

# Maximum width and height of the Tk map canvas window, in rooms.  Sizes
# bigger than this will cause scrollbars to appear.
map_canvas_width = 8;		# tk
map_canvas_height = 6;		# tk

##############################################################################
# Room variables
##############################################################################

# Space allocated for each room, in cm.  In PostScript and Fig, this is the
# maximum size -- the actual size may be reduced in order to fit things on
# the page.
room_size = 3;			# ps fig tk

# Proportion of the room space that's taken up by the room dimensions.
# These values should be less than 1 or you'll have no space left for link
# lines.
room_width = 0.8;		# ps fig tk
room_height = 0.65;		# ps fig tk

# Default background colour of rooms.
room_colour = "white";		# ps fig tk

# Offset and colour of room 'shadows'.  This is a pseudo-3D effect which
# makes rooms look raised off the page.  The offsets are a proportion of
# the allocated room space.  Note that you can change the direction of the
# room shadow by negating one or both of the offsets.
room_shadow_xoff = 0.05;	# ps fig tk
room_shadow_yoff = 0.05;	# ps fig tk
room_shadow_colour = "grey50";	# ps fig tk

# Width and colour of the room box lines.
room_border_width = 1;		# ps fig tk
room_border_colour = "black";	# ps fig tk

# Whether to draw dashed room borders.
room_border_dashed = 0;		# ps fig

# Width and colour of the room exit lines.
room_exit_width = 1;		# ps fig tk
room_exit_colour = "black";	# ps fig tk

# Colour, font and fontsize of room description text.
room_text_colour = "black";	# ps fig tk
room_text_font = "Times-Bold";	# ps fig
room_text_fontsize = 10;	# ps fig
room_text_fontdef = "Times 10 bold"; # tk

# Whether to show non-hidden item descriptions in rooms.
show_items = 1;			# ps fig tk

# Colour, font and fontsize of item description text (if shown).
item_text_colour = "black";	# ps fig tk
item_text_font = "Times-Italic";# ps fig
item_text_fontsize = 6;		# ps fig
item_text_fontdef = "Times 8 italic"; # tk

# Whether to append room tag names to room descriptions.  If so, they are
# appended in square brackets, like [this].
show_tags = 0;			# ps fig tk

##############################################################################
# Link style variables
##############################################################################

# Width and colour of link lines.
link_line_width = 1;		# ps fig tk
link_colour = "black";		# ps fig tk

# Size of oneway link arrows, as a proportion of the allocated room space.
link_arrow_size = 0.1;		# ps tk

# Whether to draw link lines as splines.
link_spline = 1;		# fig tk

# Whether to draw dashed link lines.
link_dashed = 0;		# ps fig

# Appearance of text that's associated with link lines.  The Tk default is
# to colour them differently for readability.
link_text_font = "Times-Roman";	# ps fig
link_text_fontsize = 6;		# ps fig
link_text_fontdef = "Times 8 bold"; # tk
link_text_colour = "black";	# ps fig
tk.link_text_colour = "red";	# tk

# Text strings indicating up/down/in/out on links.  PostScript is currently
# a special case: the strings either side of the '/' are extracted and
# printed at either ends of the link, near the room they come from.
link_updown_string = "U/D";	# ps fig tk
link_inout_string = "I/O";	# ps fig tk

##############################################################################
# Join style variables
##############################################################################

# Whether to indicate joins in the room text.
show_joins = 1;			# ps fig tk

# Join string format (gets put in parentheses in those rooms that join to
# other rooms).  The value should be "number" or "letter".
join_format = "number";		# ps fig tk

##############################################################################
# Game solver variables
##############################################################################

# These variables modify the overall behaviour of the game solver.

# Whether to keep unused items (i.e. those which were obtained via some
# task or other, but currently have no use).
keep_unused_items = 1;		# text rec

# Whether to treat all tasks as safe (reckless mode!).
all_tasks_safe = 0;		# text rec

# Whether to print game solver info messages (helps with figuring out what
# it's up to).
solver_messages = 0;		# text rec

##############################################################################
# Task dependency variables
##############################################################################

# Whether to group tasks by the room they're done in.  This can either
# enhance the task structure or make it look a complete mess.
task_graph_rooms = 0;		# dot

# Whether to show orphan tasks (those with no previous/next dependencies).
# Useful for completeness, but it clutters things up a lot.
task_graph_orphans = 0;		# dot

# Graph attributes, in Graphviz format.
task_graph_attr = "";		# dot

# Node attributes, in Graphviz format.
task_graph_node = "shape=box";  # dot

# Link attributes, in Graphviz format.
task_graph_link = "";		# dot

##############################################################################
# End of initialization file
##############################################################################
</PRE>
<P>

</DD>
</DL>
<P>

<H2><A NAME="SECTION00075000000000000000"></A><A NAME="sec:style-defs"></A>
<BR>
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">5</SPAN> Predefined Styles
</H2>

<P>
IFM comes with a few predefined style files, as shown in Table <A HREF="#tab:styles">2</A>.<A NAME="tex2html9"
  HREF="footnode.htm#foot679"><SUP><SPAN CLASS="arabic">7</SPAN></SUP></A> The ``scope'' field indicates which type of IFM object it applies to. Styles
that have global scope can meaningfully be used by the <TT>-style</TT> command-line
option.<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="1572"></A>
<TABLE>
<CAPTION><STRONG>Table 2:</STRONG>
Predefined styles</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER">
<TABLE CELLPADDING=3 BORDER="1" ALIGN="CENTER">
<TR><TH ALIGN="LEFT"><SPAN  CLASS="textbf">Style</SPAN></TH>
<TH ALIGN="LEFT"><SPAN  CLASS="textbf">Scope</SPAN></TH>
<TH ALIGN="LEFT"><SPAN  CLASS="textbf">Description</SPAN></TH>
</TR>
<TR><TD ALIGN="LEFT"><TT>helvetica</TT></TD>
<TD ALIGN="LEFT">Global</TD>
<TD ALIGN="LEFT">Use Helvetica fonts everywhere in maps</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT>puzzle</TT></TD>
<TD ALIGN="LEFT">Room</TD>
<TD ALIGN="LEFT">Mark room as containing a puzzle</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT>special</TT></TD>
<TD ALIGN="LEFT"><TT>Link</TT></TD>
<TD ALIGN="LEFT">Mark link as being special in some way</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT>reckless</TT></TD>
<TD ALIGN="LEFT">Global</TD>
<TD ALIGN="LEFT">Treat all tasks as safe when solving the game</TD>
</TR>
<TR><TD ALIGN="LEFT"><TT>verbose</TT></TD>
<TD ALIGN="LEFT">Global</TD>
<TD ALIGN="LEFT">Print verbose solver messages</TD>
</TR>
</TABLE>
</DIV>

<P>
</TD></TR>
</TABLE>
</DIV><P></P>
<BR>

<P>

<H2><A NAME="SECTION00076000000000000000">
<SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">6</SPAN> Backward Compatibility</A>
</H2>

<P>
If you have any existing IFM maps created with previous versions of IFM, you
may find that some of them don't work properly any more. That's because some
old IFM features have been replaced with better ones; here's a list of the problems
you may encounter.

<P>

<UL>
<LI>The old <TT>puzzle</TT> and <TT>special</TT> attributes have been removed. You
must use the corresponding styles instead--see Section <A HREF="#sec:style-defs">4.5</A>.
</LI>
<LI>Include files are now included with <TT>%include</TT>, not <TT>include</TT>.
This is because IFM now uses a separate preprocessor to manage included files;
see Section <A HREF="node8.htm#sec:preprocessor">5.9</A> for details.
</LI>
<LI>The old concept of ``aliases'' has been removed. You can get the same effect
by using <TT>%define</TT>--again, see Section <A HREF="node8.htm#sec:preprocessor">5.9</A>. If
you used any old aliased variables, you must now include the file <TT>ifm-compat.ifm</TT>
to fix things.
</LI>
</UL>

<P>

<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html249"
  HREF="node8.htm">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> 
<A NAME="tex2html245"
  HREF="ifm.htm">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> 
<A NAME="tex2html239"
  HREF="node6.htm">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> 
<A NAME="tex2html247"
  HREF="node1.htm">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html250"
  HREF="node8.htm">5 Language</A>
<B> Up:</B> <A NAME="tex2html246"
  HREF="ifm.htm">IFM</A>
<B> Previous:</B> <A NAME="tex2html240"
  HREF="node6.htm">3 Solving the Game</A>
 &nbsp; <B>  <A NAME="tex2html248"
  HREF="node1.htm">Contents</A></B> </DIV>
<!--End of Navigation Panel-->

</BODY>
</HTML>