Wednesday, December 07, 2005

Using LaTeX in Xfig

Introduction

xfig is a drawing package that's ideal for producing diagrams that can be imported into LATEX and many other word processing packages.

First familiarise yourself with the layout. Down the left is a panel of command buttons. Put the pointer on the icons to see what they do. The boxes along the bottom change according to the command you're using. Along the top is a menubar. The File option is concerned with loading and saving. The Help menu leads to full documentation.

Top left, under the menu bar, is a description of the current mode. Initially it says READY. Select a mode or load a file. Top right in the Mouse Buttons box, is a description of what the 3 mouse buttons currently do.

Unlike some graphics editors, xfig makes you select the function, then choose the object. Try drawing some objects. Keep an eye on the top corners of the window to get feedback. You'll notice that the objects sometimes have little boxes (handles) at their extremities. These are what you need to click on when you need to choose an object or vertex. Try moving and rotating some objects.

If you want to change the color of an object, fill it in, add arrows to lines, etc, click the edit button then select the object. A dialog box will appear that lets you change many features. If you want to change the same feature(s) of many objects, use the Update command.

For More: User's Manual

FAQ


Use LATEX In Your Fig

1. Inside xfig, add the LaTeX expressions to the figure, using $...$ to switch to math-mode where necessary.

2. Use the "special text" mode using the "Text flags" menu at the bottom of the screen to add math symbols.

3. Export the figure from xfig twice: firstly using the format "Combined PS/LaTeX (both parts)" to a file such as "test.pstex". This step will give two outputs: "test.pstex" and "test.pstex_t".

4. Create a driver file (e.g., test.tex) containing something like:

\documentclass{article}
\usepackage{epsfig}
\usepackage{color} (note: you might not might not need to do this)
\setlength{\textwidth}{100cm}
\setlength{\textheight}{100cm}
\begin{document}
\pagestyle{empty}
\input{test.pstex_t}
\end{document}

5. Run the commands:

latex fig1.tex
dvips -E test.dvi -o test.eps

6. You should now have a file named "test.eps" which can be included (with scaling and rotation if desired) in other LaTeX documents.



Installation

Download

For Unix/Linux users, see instruction . (It works fine for me with 3.2.4 amd 3.2.5 alpha. )

For Windows users, see instruction . (Never tried.)

3 comments:

Anonymous said...

I think a package "pstricks" is also needed to use it. I tried it with epsfig only but it gave some error. when i used it with pstricks then it worked fine. :) Thanks..

Anonymous said...

louis vuitton, uggs on sale, replica watches, tory burch outlet, louboutin pas cher, louboutin shoes, oakley sunglasses, replica watches, tiffany jewelry, louis vuitton, polo ralph lauren outlet, louis vuitton, ralph lauren pas cher, burberry, oakley sunglasses, gucci outlet, nike free, prada handbags, ugg boots, air max, nike air max, oakley sunglasses, air jordan pas cher, kate spade outlet, polo ralph lauren outlet, chanel handbags, louboutin outlet, nike air max, louis vuitton outlet, nike outlet, christian louboutin outlet, longchamp pas cher, longchamp, oakley sunglasses, longchamp outlet, sac longchamp, ray ban sunglasses, nike roshe run, jordan shoes, longchamp outlet, cheap oakley sunglasses, tiffany and co, ugg boots, michael kors, nike free, louis vuitton outlet, prada outlet, ray ban sunglasses, ray ban sunglasses, louboutin

Anonymous said...

converse outlet, instyler, hollister, insanity workout, asics running shoes, herve leger, hollister, abercrombie and fitch, reebok shoes, ralph lauren, new balance, babyliss, longchamp, nike air max, vans shoes, p90x workout, vans, bottega veneta, ghd, jimmy choo shoes, chi flat iron, nike roshe, mont blanc, lululemon, mac cosmetics, celine handbags, soccer jerseys, nike huarache, hollister, birkin bag, louboutin, beats by dre, mcm handbags, wedding dresses, ferragamo shoes, nfl jerseys, timberland boots, lancel, gucci, soccer shoes, north face outlet, north face outlet, ray ban, nike air max, nike trainers, baseball bats, iphone cases, valentino shoes, oakley, converse