<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>XFIG User Manual - FAQ</title>
<link rev="made" href="mailto:VEF00200@niftyserve.or.jp">
</head>

<body>
<img src="images/xfig-title.gif" alt="XFIG Users Manual">
<p>
<h1>PRELIMINARY - NOT YET RELEASED</h1>
<p>
[ <b>English Version</b>
 | <a href="japanese/index.html">Japanese Version</a> ]
<p>
[ <a href="index.html">Contents</a>
 | <a href="introduction.html">Operating Manual</a>
 | <a href="features_bugs.html">New Features and Bugs Fixed</a><br>
 | <b>Technical Information</b>
 | <a href="authors.html">Authors</a> ]
<p>
[ <a href="options.html">Options and Resources</a>
 | <a href="installation.html">Installation</a>
 | <b>FAQ</b><br>
 | <a href="i18n.html">Japanese Support (or Internationalization)</a>
 | <a href="fig-format.html">Fig Format 3.2</a> ]

<p>
<hr>

<h1>FAQ</h1>

<h2><a name="faq-general">General Questions</a></h2>

<ol>
<li><a href="#get_xfig">Where can I get <b>xfig/TransFig</b>?</a>

<p>
<li><a href="#convert">Do I need to convert old <b>Fig</b> files to the new version?<br>
(Also, can <b>xfig</b> and <b>fig2dev</b> read older <b>Fig</b> files?)</a>

<p>
<li><a href="#edit_eps">Can I edit PostScript files with <b>xfig</b>?</a>

<p>
<li><a href="#depth">I can't seem to control the drawing order of objects</a>

<p>
<li><a href="#splines">My splines are being changed somehow from version 3.1 of <b>xfig</b></a>

<p>
<li><a href="#install_pers">How can I install <b>xfig</b> in a personal directory?</a>
</ol>

<h2><a name="faq-running">Problems when running <b>xfig</b></a></h2>

<ol>
<li><a href="#nocolor">I don't get any color in <b>xfig</b>'s buttons</a>

<p>
<li><a href="#icons">Icons in the side and bottom panels appear then disappear</a>

<p>
<li><a href="#action">A warning about some action not found occurs,
like ``Warning: Actions not found: ModeOpenCompound''</a>

<p>
<li><a href="#xclip">An X error occurs with <tt>X_SetClipRectangles</tt> as the Request code,
or thick line shows through arrowhead in certain orientations</a>

<p>
<li><a href="#latexfonts">When using LaTeX fonts in <b>xfig</b>
I always end up with PostScript fonts</a>

<p>
<li><a href="#arc-boxes">Arc-boxes don't appear correctly
when viewing an exported PostScript file with GhostScript</a>

<p>
<li><a href="#oscillates">The window oscillates and fights with the window manager
when I click on a mode button or try to resize the <b>xfig</b> window</a>

<p>
<li><a href="#openw_icon">OpenWindows sometimes loses track of <b>xfig</b>'s icon</a>

<p>
<li><a href="#hp_cap">On HP machines, the capitalization of some letters
in the edit text window are wrong</a>
</ol>

<h2><a name="faq-compile">Problems when compiling <b>xfig</b></a></h2>

<ol>
<li><a href="#alpha">On a DEC Alpha the compiler may complain about something 
like ``.mask must have pcreg from .frame set if any bits are set in .mask or .fmask''
in the file <tt>u_bound.c</tt></a>

<p>
<li><a href="#xpointer"><tt>XPointer</tt> is undefined or unknown when 
I compile <b>xfig</b></a>

<p>
<li><a href="#get_appl">On Sun machines the linker may give erroneous
error messages about <tt>_get_applicationShellWidgetClass</tt> and 
<tt>_get_wmShellWidgetClass</tt> are undefined</a>

<p>
<li><a href="#hp_bus">On some HP computers,
the compiler dies with bus error in the file <tt>u_undo.c</tt></a>

<p>
<li><a href="#hp_opt">On some HP computers using native <tt>cc</tt> compiler
there is a problem with +O3 optimization</a>

<p>
<li><a href="#jpeg_prob">On Linux, you may get errors such as
``undefined reference to `jpeg_write_scanlines' ''</a>
</ol>

<hr>

<h3><a name="get_xfig">Where can I get <b>xfig/TransFig</b>?</a></h3>

<b>xfig</b> and <b>TransFig</b> are <a href="authors.html#xfig">freeware</a>
and you can get them from several sites.
See <a href="installation.html#install-xfig">Installing <b>xfig</b></a> about this.
<hr>

<h3><a name="convert">Do I need to convert old <b>Fig</b> files to the new version?</a></h3>

No. Every version of <b>xfig</b> and <b>TransFig (fig2dev)</b> can read <b>Fig</b> files
of any older version.  When you load one into <b>xfig</b> it converts
it to the latest version.  When you save it again it is saved in
that version.

<hr>

<h3><a name="edit_eps">Can I edit PostScript files with <b>xfig</b>?</a></h3>

No, but you can ``paint'' over them with <b>Fig</b> objects to add annotation or other objects.
Or you can convert the PostScript file into the <b>Fig</b> format using
<a href="installation.html#pstoedit"><b>pstoedit</b></a>
and then edit the <b>Fig</b> file using <b>xfig</b> in the usual way.

<hr>

<h3><a name="depth">I can't seem to control the drawing order of objects</a></h3>
When you have two or more objects that overlap and the drawing order is
important, you must set the <a href="indicator-panel.html#depth"><i>depth</i></a>
of each object to guarantee the drawing order.

<hr>

<h3><a name="splines">My splines are being changed somehow from version 3.1 of
 <b>xfig</b></a></h3>

<b>xfig</b> 3.2 uses a new type of spline
called an <a href="authors.html#xspline">X-Spline</a>.
X-splines allow the user to mix interpolation and approximation
points in the same curve. More precisely, it means that an X-spline curve
is neither an interpolated spline nor an approximated one, it is BOTH
(the behaviour of each point is controlled by one single parameter
called "shape factor").
<p>
<b>Caveat:</b> Because spline models of previous versions (quadratic B-splines
and Bezier with hidden points) are no longer supported, curves that are
present in version 3.1 and older files are automatically converted to
X-splines. This translation is only an approximation process. It means
that the converted curves are not exactly the same as the original ones.
Though the translation usually provides almost identical curves, some
hand-fitting may be needed in some pathological cases.

<hr>

<h3><a name="install_pers">How can I install <b>xfig</b> in a personal 
directory?</a></h3>

There are several files that you need:
<p>
<dl>
<dt><tt>xfig</tt>, <tt>fig2dev</tt>
<dd>These files should be put in your command search path.

<dt><tt>CompKeyDB</tt>
<dd>Set the <tt>XFIGLIBDIR</tt> variable in the <tt>Imakefile</tt>
to the directory you want this file to go into, or specify the file
with resource ``<tt>Fig*keyFile: <i>your_lib_area</i>/CompKeyDB</tt>''.

<dt><tt>Fig</tt> and <tt>Fig-color</tt> (from the <tt>Fig.ad</tt> 
and <tt>Fig-color.ad</tt> files)
<dd>Set the shell environment variable <tt>XAPPLRESDIR</tt>
to the directory where you want these files to go.

<dt><tt>Doc/html</tt>
<dd>You must copy this whole directory (and its sub-directory) to the directory
where <tt>XFIGLIBDIR</tt> in the Imakefile points (use <tt>cp -r</tt>).

<dt><tt>Doc/xfig-howto.pdf</tt> and <tt>Doc/xfig.pdf</tt>
<dd>You must copy these two files to to the directory
where <tt>XFIGLIBDIR</tt> in the Imakefile points.

</dl>

<hr>

<h3><a name="nocolor">I don't get any color in <b>xfig</b>'s buttons</a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>You didn't install the app-defaults files correctly
and/or you don't have the customization resource set.

<p>
<dt>SOLUTION:
<dd>You should install the app-defaults files <tt>Fig</tt> and <tt>Fig-color</tt>
(<tt>Fig.ad</tt> and <tt>Fig-color.ad</tt> in <b>xfig</b> source distribution)
into the appropriate directory.
You should also put the string ``<tt>*customization: -color</tt>''
in a global resource file that gets loaded into the X server resources
(<tt>.Xdefaults</tt>), and then restart the X server.
<p>
<b>Explanation:</b>
Since X11R5, there has been a general resource <tt>*customization</tt> which
can be set to the string <tt>-color</tt> which tells the system to look for
an app-default file with the suffix <tt>-color</tt> (e.g. <tt>Fig-color</tt>)
and read that instead of the usual (<tt>Fig</tt>).
Inside <tt>Fig-color</tt> is an <tt>#include</tt> statement to read the
normal <tt>Fig</tt> app-default file to get everything else not pertaining to 
color.
</dl>

<hr>

<h3><a name="icons">Icons in side and bottom panels appear then disappear</a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>On Linux (2.0.29 at least), the libNextaw version of the Athena Widget
set (libXaw) seem to cause this problem.

<p>
<dt>SOLUTION:
<dd>Relink with vanilla libXaw or libXaw3d.
</dl>

<hr>

<h3><a name="action">A warning about some action not found occurs,
like ``Warning: Actions not found: ModeOpenCompound''</a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>You didn't install the current app-defaults files.

<p>
<dt>SOLUTION:
<dd>Install the app-default files (<tt>Fig.ad</tt> and <tt>Fig-color.ad</tt>)
which comes with the <b>xfig</b>.  
<br>
This is most easily done with ``<tt>make install</tt>''.
</dl>

<hr>

<h3><a name="xclip">X error occurs with <tt>X_SetClipRectangles</tt> as the Request code,
or thick line shows through arrowhead in certain orientations</a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>In X11R5 Xlib, there was a bug in the clipping algorithm.

<p>
<dt>SOLUTION:
<dd>Switch to X11R6 or apply the following patch to
<tt>mit/lib/X/XPolyReg.c</tt> in the X11R5 library:

<pre>
*** XPolyReg.c.orig	Tue Dec 15 12:01:22 1992
--- XPolyReg.c	Wed Nov 15 09:41:13 1995
***************
*** 402,408 ****
  	    if (numRects &amp;&amp; pts-&gt;x == rects-&gt;x1 &amp;&amp; pts-&gt;y == rects-&gt;y2 &amp;&amp;
  		pts[1].x == rects-&gt;x2 &amp;&amp;
  		(numRects == 1 || rects[-1].y1 != rects-&gt;y1) &amp;&amp;
! 		(!i || pts[2].y &gt; pts[1].y)) {
  		rects-&gt;y2 = pts[1].y + 1;
  		continue;
  	    }
--- 402,409 ----
  	    if (numRects &amp;&amp; pts-&gt;x == rects-&gt;x1 &amp;&amp; pts-&gt;y == rects-&gt;y2 &amp;&amp;
  		pts[1].x == rects-&gt;x2 &amp;&amp;
  		(numRects == 1 || rects[-1].y1 != rects-&gt;y1) &amp;&amp;
! 		/* Fixed version from X11 R6 */
! 		(i &amp;&amp; pts[2].y &gt; pts[1].y)) {
  		rects-&gt;y2 = pts[1].y + 1;
  		continue;
  	    }
</pre>
</dl>

<hr>

<h3><a name="latexfonts">When using LaTeX fonts in <b>xfig</b>
I always end up with PostScript fonts</a></h3>

<dl>
<dt>POSSIBLE CAUSE AND SOLUTION:
<dd>To put fonts under the control of LaTeX when generating PostScript output,
you must tag the text object as 
``<a href="indicator-panel.html#text-flags">special</a>'' and then use
<a href="command-panel.html#export">Combined PostScript/LaTeX</a> (pstex) 
output mode.
This mode forces special text objects to be passed through to LaTeX,
allowing the use of Math mode and Computer Modern fonts among other things.
</dl>

<hr>

<h3><a name="arc-boxes">Arc-boxes don't appear correctly
when viewing an exported PostScript file with GhostScript</a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>Ghostscript version 4.01 has a bug with the <tt>arcto</tt> operators.

<p>
<dt>SOLUTION:
<dd>Get <a href="installation.html#get_ghost">Ghostscript 4.03</a> or newer.
</dl>

<hr>

<h3><a name="oscillates">The window oscillates and fights with the window manager
when I click on a mode button or try to resize the <b>xfig</b> window</a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>Perhaps the resource ``<tt>*allowShellResize: true</tt>'' has been set 
because another program requires it to be true.

<p>
<dt>SOLUTION:
<dd>Change the resource to be specific to the programs which need it,
or set the resource ``<tt>Fig*allowShellResize: false</tt>''.
<br>
Note: this is in the <tt>Fig.ad</tt> file that comes with <b>xfig</b>,
which is installed when you do a ``<tt>make install</tt>''.
</dl>

<hr>

<h3><a name="openw_icon">OpenWindows sometimes loses track of <b>xfig</b>'s icon</a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>Cause unknown.

<p>
<dt>SOLUTION:
<dd>Here is a temporary kludge. Place the line:
<p>
<pre>
  Fig*iconPixmap:  <i>your_lib_area</i>/fig.icon.X
</pre>
<p>
in your <tt>.Xdefaults</tt> file and copy the file <tt>fig.icon.X</tt>
into directory <tt><i>your_lib_area</i></tt>.
</dl>

<hr>

<h3><a name="hp_cap">On HP machines, the capitalization of some letters in the
 edit text window are wrong</a></h3>

<dl>
<dt>POSSIBLE CAUSE AND SOLUTION:
<dd>Make sure that the <tt>CompKeyDB</tt> file has the lowercase letter
definitions <i>before</i> the uppercase definitions.
This should be the case for the  <tt>CompKeyDB</tt> file
shipped with <b>xfig</b> 2.1.5 and later.
</dl>

<hr>

<h3><a name="alpha">On a DEC Alpha the compiler may complain about something 
about something like ``.mask must have pcreg from .frame set if any 
bits are set in .mask or .fmask''
in the file <tt>u_bound.c</tt></a></h3>

<dl>
<dt>POSSIBLE CAUSE AND SOLUTION:
<dd>Set the optimization level to <tt>-O1</tt> at least for that file.
</dl>

<hr>

<h3><a name="xpointer"><tt>XPointer</tt> is undefined or unknown when 
I compile <b>xfig</b></a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>You are probably trying to compile <b>xfig</b> on an old OpenWindows
system which doesn't have the <tt>XPointer</tt> typedef.

<p>
<dt>SOLUTION:
<dd>You will have to either upgrade to a newer version of OpenWindows
or switch to the public X server from the
<a href="http://www.camb.opengroup.org/x/">Open Group</a>.
</dl>

<hr>

<h3><a name="get_appl">On Sun machines the linker may give erroneous 
error messages about <tt>_get_applicationShellWidgetClass</tt> and 
<tt>_get_wmShellWidgetClass</tt> are undefined</a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>It is a problem with the Sun shared libraries
and the way X11 builds the shared Xmu library.

<p>
<dt>SOLUTION:
<dd>It doesn't affect the operation of <b>xfig</b> and you can ignore it.
<p>
Or you may compile with ``<tt>-Bstatic -lXmu -Bdynamic</tt>''.
<p>
To really solve the problem if you are using OpenWindows 3.0
(X11R4-based Xt), please contact your local Sun office and request the
following patches:
<p>
<pre>
     Patch i.d.      Description
     100512-02       4.1.x OpenWindows 3.0 libXt Jumbo patch
     100573-03       4.1.x OpenWindows 3.0 undefined symbols when using
			     shared libXmu
</pre>

<p>
A source patch for use with the MIT X11R4 libraries was developed by
Conrad Kimball (cek@sdc.boeing.com); it retrofits into R4 some fixes
made in R5 to get around this problem. The patch is on export in [1/93]
<tt>contrib/X11R4_sunos4.1.2_patch_version3.Z</tt>.
<p>
The other option is to use X11R5 or X11R6.
</dl>

<hr>

<h3><a name="hp_bus">On some HP computers,
the compiler dies with bus error in the file <tt>u_undo.c</tt></a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>There is a bug in the HP compiler.
This problem may occur on some HP computers,
including HP 750 running HP-UX 8.05.

<p>
<dt>SOLUTION:
<dd>Workaround the problem by adding
an extra statement between two statements in <tt>u_undo.c</tt>:
<p>
<dl>
<dt><font color="#dd0066">Original:</font>
<dd>
<pre>
undo_glue()
{
    list_delete_compound(&amp;objects.compounds, saved_objects.compounds);
    tail(&amp;objects, &amp;object_tails);

</pre>

<p>
<dt><font color="#dd0066">New:</font>
<dd>
<pre>
undo_glue()
{
    list_delete_compound(&amp;objects.compounds, saved_objects.compounds);
&gt;&gt;&gt;	    /* HP-UX 8.05 compiler bug fix -- don't ask */
&gt;&gt;&gt;	    last_action = last_action;
    tail(&amp;objects, &amp;object_tails);
</pre>
</dl>
</dl>

<hr>

<h3><a name="hp_opt">On some HP computers using native <tt>cc</tt> compiler
there is a problem with +O3 optimization</a></h3>

<dl>
<dt>SOLUTION:
<dd>Use <tt>+O2</tt> instead of <tt>+O3</tt> or get patch from HP for the compiler;
connect to http://support.mayfield.hp.com/ and choose
<b>Patch Browsing and Downloading</b>.
</dl>

<hr>

<h3><a name="jpeg_prob">On Linux, you may get errors such as
``undefined reference to `jpeg_write_scanlines' ''</a></h3>

<dl>
<dt>POSSIBLE CAUSE:
<dd>On most Linux machines, there is an old version of the JPEG library
already installed, and is incompatible with <b>xfig</b>.
<b>xfig</b> can't use a JPEG library older than Version 5b.

<p>
<dt>SOLUTION:
<dd>Delete its library files (usually <tt>/usr/local/lib/libjpeg.so</tt>
and <tt>/usr/local/lib/libjpeg.a</tt>)
and the header file (usually <tt>/usr/local/include/jpegdata.h</tt>).
</dl>

<hr>

Goto <a href="index.html">TOP</a>

<p>
<a href="authors.html#manual"><i>written by us</i></a>

</body>
</html>

