Rob Mahurin on Thu, 26 Apr 2001 11:42:33 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Re: using Xfig with LaTeX


On Wed, Apr 25, 2001 at 11:57:15PM -0400, MaD dUCK wrote:
> beating around my thesis, i am trying several methods of including
> Xfig drawings in LaTeX. currently, i am using fig2dev to create .eps
> file, which I \psfig into the document. nevertheless, while the result
> is fine, mpage seems unable to handle the documents and corrupts the
> .ps file right around the included picture (which is rotated 90
> degrees by mpage). furthermore, latex2html can't extract a single of
> these pictures and just reports errors, leaving .png files of zero
> length everywhere.
> 
> so i am interested to hear how you guys embed .fig files in latex with
> the ability to scale them to a certain width. and yes, it should be a
> batch process to be run from Makefile.

I do this by creating exporting to .eps from Xfig's file menu (it'll
even prompt you if you've not saved yet, so it's two-click).  I
include use a style which contains the following:

\usepackage{graphicx}
[...]
\newcommand{\smepsfigure}[4][htbp]{
\begin{figure}[#1]
     \begin{center}
  \begin{minipage}{0.4\textwidth}
        {\includegraphics[width=0.9\textwidth]{#2}}
  \end{minipage}
     \caption{#3}
     \label{#4}
     \end{center}
\end{figure}
}

I've also got a \medepsfigure and an \epsfigure with larger
minipages.  (I forget why I changed the size of the minipage instead of
the width= line.)  So now I can do

\epsfigure[placement]{file.eps}{This is the caption for this figure}{fig:label}

or copy what I've already written if I need something different.

I use psnup from the psutils package instead of mpage and have had no
problems with it.  I've not tried latex2html.

Hope that helps,

Rob

-- 
About the time we think we can make ends meet, somebody moves the ends.
		-- Herbert Hoover



______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug