! LaTeX Error: Unknown graphics extension: .fig.

Asked by Luqman Munawar لقمان منور

I receive an error message when I run make:
! LaTeX Error: Unknown graphics extension: .fig.

transfig is installed on my Ubuntu 6.10.

Following is the latex source file:
---------------------------------------//main.tex --------------------------------------------
\documentclass{report}

\usepackage{graphicx}

\begin{document}

\title{My Report}
\author{Luqman Munawar}

\maketitle

\tableofcontents{}
\listoffigures
\listoftables

\chapter{chapter number one}
\includegraphics[width=\linewidth]{networking_scenario.fig}

\chapter{chapter number two}
\end{document}
------------------------------------END main.tex \\ ----------------------------------------

Any idea what is the cause of this problem? Is there a bug in Edgy related to latex-make?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu latex-make Edit question
Assignee:
No assignee Edit question
Solved by:
Luqman Munawar لقمان منور
Solved:
Last query:
Last reply:
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#1

Have you set XFIG_FILES = networking_scenario.fig in your makefile?

If not, that may be why.

Revision history for this message
Luqman Munawar لقمان منور (luqman-munawar) said :
#2

Thank Alan,

I have changed my Makefile to:

%cat Makefile
XFIG_FILES = networking_scenario.fig
include LaTeX.mk

But unfortunately that gives same error message...

Luqman

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#3

My very good friend Hugo (who knows lots more about latex than I) says:-

"He needs to run it through a preprocessor first"

"You run fig2dev on it twice, Once with -L ps, and once with -L pstex_t (I think)"

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#4

Oops, pressed " add answer " too soon, Hugo's still talking...

" That generates two files -- one that you can include directly (extension .pstex_t), and one .ps file that contains everything except the text."

Time passes...

" OK, the .pstex_t file is included directly with \input{filename.pstex_t} (Wrapped in a \begin{figure} block as appropriate) That will then set the text, and import the .ps file generated earlier. "

Revision history for this message
gene bandelaria (genebandelaria) said :
#5

thank you so much but im using ubuntu 6.06 lts dapper drake.i'm a new person
in linux universe.and a little knowledge in computer didn't go at school.
thats why i'm digging a lot of thing at this place.thank you for support to
the person like me.

On 3/28/07, Luqman Munawar لقمان منور <email address hidden>
wrote:
>
> New support request #4460 on latex-make in ubuntu:
> https://answers.launchpad.net/ubuntu/+source/latex-make/+ticket/4460
>
> I receive an error message when I run make:
> ! LaTeX Error: Unknown graphics extension: .fig.
>
> transfig is installed on my Ubuntu 6.10.
>
> Following is the latex source file:
> ---------------------------------------//main.tex
> --------------------------------------------
> \documentclass{report}
>
> \usepackage{graphicx}
>
> \begin{document}
>
> \title{My Report}
> \author{Luqman Munawar}
>
> \maketitle
>
> \tableofcontents{}
> \listoffigures
> \listoftables
>
> \chapter{chapter number one}
> \includegraphics[width=\linewidth]{networking_scenario.fig}
>
> \chapter{chapter number two}
> \end{document}
> ------------------------------------END main.tex \\
> ----------------------------------------
>
>
> Any idea what is the cause of this problem? Is there a bug in Edgy related
> to latex-make?
>
>
>
>

Revision history for this message
Best Luqman Munawar لقمان منور (luqman-munawar) said :
#6

Actually, I have already work experience with latex and can insert graphics with following commands:

\begin{figure}
\includegraphics{networking_scenario.eps}
\caption{Networking Scenario\label{fig:networking_scenario}}
\end{figure}

I read in the make-latex documentation that there is not need to export figures to eps or other formats to include it in latex documents. They suggested includegraphics[width=\linewidth]{networking_scenario.fig} which wasn't working.

Anyhow, I just solved the problem by placing this one line additionally in the Makefile:

LU_FLAVORS=DVI DVIPDF

Per default latex-make uses pdflatex which does not work properly with graphics utility. %.tex -> %.dvi -> %.pdf works fine that's why I changed the flavor to DVI DVIPDF and voila it works fine.

Thanks anybody for taking your time...
Luqman Munawar

Revision history for this message
Luqman Munawar لقمان منور (luqman-munawar) said :
#7

I wrote the last message too early:

includegraphics[width=\linewidth]{networking_scenario.fig}

is not working but I can use eps graphics in latex-make after adding the previously mentioned line "LU_FLAVORS=DVI DVIPDF" in Makefile.

Anyhow, now I can use latex-make for my purpose and the extra time spent on exporting %.fig -> %.eps is not too much that would further search for the original solution.

Cheers,

Revision history for this message
Luqman Munawar لقمان منور (luqman-munawar) said :
#8

I finally solved the original probleml. Only figlatex was not being used which is essential for make-latex using .fig graphics.

Just add this in the preamble of .tex file:
\usepackage{figlatex}

Regards,

Revision history for this message
Ghada Alnifie (ghadax) said :
#9

hi,

i had a similar error, here is the conclussion i got to:
when I compiled from latex -> pdf, i got the error msg that said "! LaTeX Error: Unknown graphics extension: .eps" and my .eps diagrams did not appear. However, when I compiled latex -> ps -> pdf, all .eps diagrams were displayed correctly.