user8644317
user8644317

Reputation:

How to add .fig file into a Latex document?

I created in Xfig a .fig file and now I have to add it to my Latex document. Can someone help me with this problem because I'm new in Latex and tried this code bellow but it doesen't work. I searched for various solutions but still I become this error.

\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document}

\begin{figure}[!htb]
        \center{\includegraphics[width=2]{myfigure.fig}}
\end{figure}

\end{document}

I just want to center a figure on the page but the error is: Cannot determine size of graphic in myfigure.fig (no Bounding Box).

Upvotes: 0

Views: 6066

Answers (1)

Werner
Werner

Reputation: 15105

The .fig file/format is not supported for inclusion into (La)TeX as an image. You need to export the image to a supported format via the File > Export dialog. Supported formats include Postscript, EPS as PDF stand-alone vector formats, combined files (vector + LaTeX for text) and many of the raster formats (like BMP, PNG and JPEG).

enter image description here

Also, use \centering to centre an image within the figure environment.

Upvotes: 2

Related Questions