For example, move the mouse to the button that looks like the outline of the letter "P" (usually found at the far left, near the top). In xfig, a tool tip will indicate "POLYGON drawing", and the "Mouse Buttons" box will indicate that the left mouse button will invoke "Change Mode". In jfig, the message area will read, "create a polygon". Click the left mouse button on this button and move the mouse to the canvas. Both programs will now indicate that the left mouse button is to be used to select the first point. Click the left mouse button somewhere on the canvas. Both programs indicate that the left button selects the next point and that the right button cancels. However, jfig also indicates that the middle button selects the final point; i.e., jfig allows the drawing of a "polygon" consisting of just two points and one line segment. Click the left button somewhere else on the canvas. Now both programs indicate that the middle button selects the final point. You may continue selecting intermediate points with the left mouse button until you are ready to select the last point of the polygon (this is different from the first point). When you are ready for the last point, click the middle button to finish the polygon.
If you are using Windows, you may not have a middle mouse button (at least as far as Windows can tell). If this is the case, holding down the "Alt" key while clicking the left mouse button (in jfig, not xfig) is equivalent to a middle mouse button click. See the "Mouse Buttons..." entry in the Help menu for more details.
In xfig, when text input is selected, there is a window near the bottom right that shows the current font. If you click on this window, a menu of fonts will appear. By default, this menu will contain the PostScript fonts, which are the font used for WYSIWYG text generation. If you click on the entry, "Use LaTex Fonts", the menu will change to a shorter list of fonts to be used for LaTeX text entry. If you choose one of these fonts, you may include LaTeX commands within your text, and it will later be formatted by LaTeX. However, within xfig you will see only raw LaTeX. To switch the font menu back to PostScript fonts, click the "Use PostScript" entry.
In jfig, when text input is selected, there is a choice box at the bottom containing the choices, "normal" and "special". When "normal" is selected, WYSIWYG text entry is enabled. When "special" is selected, LaTeX text entry is selected.
xfig interfaces with fig2dev via the "Export" dialog. Although several of the options in its "Language" menu may prove useful, I recommend using the "Combined PS/LaTeX (both parts)" option. Exporting using this option generates two files: a PostScript file with a suffix of pstex and a LaTeX file with a suffix of pstex_t. Most of the graphics will be converted directly to PostScript and saved in the first file. However, any text using LaTeX fonts will be included in the second file as LaTeX commands. The second file will also contain the LaTeX commands necessary to import the first file into the document.
jfig also has an "Export" menu, but don't try to use it - there are too many bugs. Instead, you can use fig2dev directly. Here is a bat file containing the fig2dev commands needed to produce the PostScript and LaTeX files as described in the above paragraph. Assuming you have a file "name.fig" in your current directory and that both pstex.bat and fig2dev.exe are in your search path, the command
pstex namewill produce files name.pstex and name.pstex_t.
\usepackage[dvips]{graphicx}You can then include a figure contained in the files, "name.pstex" and "name.pstex_t" by using the command:
\input{name.pstex_t}where you want the figure to appear. The DVI file produced by running latex on this file will contain references to any PostScript files used. Most DVI previewers will import these PostScript files and render the graphics correctly. Running dvips on the DVI file will then produce a single PostScript file containing the entire document.
Copyright 2000, Rod Howell. The syllabus and all lectures for this course are copyrighted materials. During this course, students are prohibited from selling notes to or being paid for taking notes by any person or commercial firm without the express written permission of Rod Howell.
Last updated July 8, 2000.