[comp.windows.x] how to put graphics into TeX under x

hubert@spica.ucsb.edu (Hung-Hsien Hubert Chang) (11/27/89)

Well, I got one problem in putting graphics into TeX under 

X window system. I have drown a rectangle in xfig and save the

file. The general step is to "fig2tex " the file and it is 

O.K. The problem comes when I "tex" the converted file.

The message is undefined control sequence. I wonder why.

The following is the complete messaage:



Using TeX2.93, old TeX is in /usr/local/bin (except on shamrock)
.
This is TeX, C Version 2.93 (no format preloaded)
(/test.tex
! Undefined control sequence.
l.1 \mbox
         {\beginpicture
?


How to solve this problem? 

Thanks in advancd.         

-----------------------------------------------------------------

E-mail:hubert@apple.ucsbuxa.ucsb.edu or 6500chh@ucsbuxa.bitnet

rostamia@umbc5.umbc.edu (Rouben Rostamian) (11/27/89)

In article <3141@hub.UUCP> hubert@spica.ucsb.edu (Hung-Hsien Hubert Chang) writes:
>Well, I got one problem in putting graphics into TeX under 
>X window system. I have drown a rectangle in xfig and save the
>file. The general step is to "fig2tex " the file and it is 
>O.K. The problem comes when I "tex" the converted file.
>The message is undefined control sequence. I wonder why.
>The following is the complete messaage:
>
>Using TeX2.93, old TeX is in /usr/local/bin (except on shamrock)
>.
>This is TeX, C Version 2.93 (no format preloaded)
>(/test.tex
>! Undefined control sequence.
>l.1 \mbox
>         {\beginpicture
>?
>
>How to solve this problem? 
>

\mbox is a LaTeX command.  I guess xfig generates a LaTeX, not a TeX, document. 
Try including the xfig output in a LaTeX document, as in:

% This is myfile.tex
\documentstyle{article}
\begin{ducument}
\input{figure.tex}  % where figure.tex is the output of the xfig program
\end{document}

Then execute the command "latex myfile.tex"


Rouben Rostamian                               Phone: 301 455-2458
Department of Mathematics                      e-mail:
University of Maryland Baltimore County        rostamian@umbc.bitnet
Baltimore, MD 21228                            rostamian@umbc3.umbc.edu