Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Figure Insert issue

17 views
Skip to first unread message

J.Jack.J.

unread,
May 21, 2012, 11:53:14 AM5/21/12
to
I have inserted a figure and, above it, in the compiled output, the
address of the file appears How do I get rid of it?

Cheers.

b.kleine

unread,
May 21, 2012, 12:00:13 PM5/21/12
to
The stuff we would like to see in a situation like this is called:

Minimal Working Example.

Try to make one and most probably you will have found the solution
before you come back to this list/forum.

Bernhard

J.Jack.J.

unread,
May 21, 2012, 7:18:30 PM5/21/12
to
Here goes:
<<
\documentclass[11pt,A4]{article}
\usepackage{times,fancyhdr}
\usepackage{graphicx}
\usepackage{amsmath}
\pagestyle{fancy}

\cfoot{\thepage}

\begin{document}

\begin{figure}
\centering
\includegraphics{C:/Documents and Settings/User/Desktop/Figures/
Fig1.pdf}
\caption{text}
\label{fig:Fig1}
\end{figure}
\end{document}
>>

I'd also be grateful for advice as to how to get the caption above the
page number on the page on which it appears.

With thanks.

azrazer

unread,
May 22, 2012, 2:35:52 AM5/22/12
to
Dear JJJ,
well using your MWE does not raise the issues you've mentioned so far.
- is your final file containing the pdf file you want to insert ?
- do you get errors during compilation ? if so, what are these ?
- your caption eventually appears above the page number (it is
doubtful it will appear below it...)

(here, your mwe gives a page with an empty header, a figure on a page,
with a caption and a footer containing pagenumber centered --as you
would expect from the source)

Cheers,
azra.

On 22/05/2012 01:18, J.Jack.J. wrote :[...]

J.Jack.J.

unread,
May 22, 2012, 9:07:00 AM5/22/12
to
On May 22, 7:35 am, azrazer <a...@glop.com> wrote:
> Dear JJJ,
> well using your MWE does not raise the issues you've mentioned so far.
>   - is your final file containing the pdf file you want to insert ?

Yes.

>   - do you get errors during compilation ? if so, what are these ?

No.

Cheers.

J.Jack.J.

unread,
May 22, 2012, 10:00:38 AM5/22/12
to
When you put this together with the fact that, as if on a whim, my
TeXnicCenter often decides it won't automatically display the output
file, I wonder if it's all down to some issue with the installation of
TeXnicCenter. Will I have to do a complete reinstallation -- MikTex
and all?

With thanks?

Ulrike Fischer

unread,
May 22, 2012, 10:26:10 AM5/22/12
to
Am Mon, 21 May 2012 16:18:30 -0700 (PDT) schrieb J.Jack.J.:


>>> I have inserted a figure and, above it, in the compiled output, the
>>> address of the file appears How do I get rid of it?

> \includegraphics{C:/Documents and Settings/User/Desktop/Figures/
> Fig1.pdf}


Don't use absolute pathes, especially when they contain spaces. Put
the graphic in your document folder or a subfolder (naturally also
without spaces or other dubious symbols in their name).


--
Ulrike Fischer

J.Jack.J.

unread,
May 22, 2012, 10:35:06 AM5/22/12
to
I don't understand. Documents and Settings *does* contain spaces and
that won't be changed when it's in my document folder, which is on my
Desktop. And I originally had them in the document folder but this
problem still arose.
Thanks.

Ulrike Fischer

unread,
May 22, 2012, 10:49:01 AM5/22/12
to
Am Tue, 22 May 2012 07:35:06 -0700 (PDT) schrieb J.Jack.J.:

>>>>> I have inserted a figure and, above it, in the compiled output, the
>>>>> address of the file appears How do I get rid of it?

>>> \includegraphics{C:/Documents and Settings/User/Desktop/Figures/
>>> Fig1.pdf}

>> Don't use absolute pathes, especially when they contain spaces. Put
>> the graphic in your document folder or a subfolder (naturally also
>> without spaces or other dubious symbols in their name).

> I don't understand. Documents and Settings *does* contain spaces and
> that won't be changed when it's in my document folder, which is on my
> Desktop.

It doesn't matter if the folder itself has a space, but it matters
if you use a path with spaces in the argument of \includegraphics.
The following example is a document which resides together with
test-pics.pdf in the folder "I:/Z-Test/test with space". The first
\includegraphics works fine, the second prints parts of the pathes
in the document:

\documentclass{article}

\usepackage{graphicx}
\begin{document}

\begin{figure}
\centering
\includegraphics[width=4cm]{Test-pics.pdf}

\includegraphics[width=4cm]{I:/Z-Test/test with
space/Test-pics.pdf}
\caption{text}
\label{fig:Fig1}
\end{figure}
\end{document}


You can try to quote the name (but then you must remove the
extension):

\includegraphics[width=4cm]{"I:/Z-Test/test with space/Test-pics"}

But my advice is: don't use pathes with spaces in your tex file.

--
Ulrike Fischer

azrazer

unread,
May 22, 2012, 10:49:07 AM5/22/12
to
The main point is : DON'T USE ABSOLUTE PATHES.
What Ulrike meant is that you should put your "Fig1.pdf" file in the
same directory as your .tex source file, and then use
\includegraphics{Fig1.pdf}.
cheers;

azra

Heiko Oberdiek

unread,
May 22, 2012, 12:23:27 PM5/22/12
to
If pdfTeX is used, then package grffile helps with spaces in graphics
file names.

> But my advice is: don't use pathes with spaces in your tex file.

Agreed.
The TeX world consists of many programs from many authors and times,
also from times, where file names usually do not contain spaces.
0 new messages