Problem entering graphics in LaTeX manuscript

53 views
Skip to first unread message

warren page

unread,
Aug 29, 2025, 1:05:43 PMAug 29
to LaTeX Users Group
Using TeXShop (v.5.49) on MacBookPro (Ventura 13.3.1(a))  manuscript opens as a pdf. On closing it immediately reopens as an editable LaTeX file that can't enter graphics. The error message is "can't find Figure n in line \includegraphics{Figure n} for a pdf and eps figure.
Screenshot.pdf

Peter Flynn

unread,
Aug 29, 2025, 2:40:30 PMAug 29
to latexusersgroup
On Fri 29 Aug 2025, 18:06 'warren page' via LaTeX Users Group, <latexus...@googlegroups.com> wrote:
Using TeXShop (v.5.49) on MacBookPro (Ventura 13.3.1(a))  manuscript opens as a pdf.

I'm afraid I don't understand that. If it's a PDF then it's not a "manuscript" but just a PDF, and you can't edit it.

When you say "manuscript" do you mean a LaTeX document that you have typed (or downloaded)? [I'm assuming it's not an image of an actual (handwritten) manuscript.]

On closing it immediately reopens as an editable LaTeX file

In TeXshop? Like a real .tex file? Starting with \documentclass?

that can't enter graphics. The error message is "can't find Figure n in line \includegraphics{Figure n} for a pdf and eps figure. 

Do you have an image file named "Figure n" in the same folder?

What processor are you using, pdflatex or LuaLaTeX?

Tip: never, never, never use spaces in filenames, and always end with the file type, eg Figure-n.jpg or whatever.

Also: you can only use EPS files with the original LaTeX (not pdflatex or anything later). For pdflatex, XeLaTeX, and LuaLaTeX you must use JPG, PNG, or PDF files for images.

Peter

warren page

unread,
Sep 2, 2025, 2:34:18 PMSep 2
to LaTeX Users Group
Thank you Peter for attention to my problem. I apologize that I was not crystal clear on the issue.  To write an article, I copied the first page from an earlier  pdfLaTeX document (produced by Miktex) and  then used LaTeX to complete the manuscript. (I realize now that when I opened the document the pdf version completely overlapped the editable teX version, which is why it seemed to open after I closed its pdf version.)
I used Figure n in my post only as a placeholder or indicator for Figure1.pdf or Figure1.eps and for Figure2.pdf or Figure2.eps. I got the same error message in each case. (See my post's included attachment.)
I'm not sure if my processor is using LaTeX or pdflatex, or a combination of both. Perhaps this is what is causing the problem.
Whatever guidance you others can offer will be most welcome and deeply appreciated.
Warren

Peter Flynn

unread,
Sep 2, 2025, 3:38:07 PMSep 2
to latexus...@googlegroups.com
On 02/09/2025 19:34, 'warren page' via LaTeX Users Group wrote:
> To write an article, I copied the first page from an earlier
> pdfLaTeX document (produced by Miktex) and then used LaTeX to
> complete the manuscript.

OK. And that worked OK, right?

> (I realize now that when I opened the document the pdf version
> completely overlapped the editable teX version, which is why it
> seemed to open after I closed its pdf version.)

You mean the PDF window opened obscuring the TeXShop edit window?
This may be something to do with the size and resolution of the screen
(although I don't know what the Mac window manager does in respect of
placement when new windows open). Can you move the windows apart so you
can see the edit window as well as the PDF display (ie side-by-side)?
That way they should stay there even when you close down TeXShop (or
reboot) and then re-open it.

> I used Figure n in my post only as a placeholder or indicator for
> Figure1.pdf or Figure1.eps and for Figure2.pdf or Figure2.eps.

Ah, OK, thanks. EPS won't really be any good to you: all modern LaTeX
engines assume PDF or JPG or PNG for images.

> I got the same error message in each case. (See my post's included
> attachment.)

That's a photograph taken with a camera and it's a bit blurred. Can you
make a real screenshot? You should be able to press Shift-Command-3 to
capture the entire screen, or Shift-Command-4 to capture a selected
portion. The screenshots will be saved as files on your desktop.

But the error message seems to be "Figure1.pdf not found". This usually
means exactly what it says: there is no such file in the folder where
the wp.tex file is. Is it perhaps somewhere else, maybe in a subfolder?

> I'm not sure if my processor is using LaTeX or pdflatex, or a
> combination of both.

It says what it is on the first line of the log window:

This is pdfTeX, version...etc

(wp.tex then invokes LaTeX, so you are running pdflatex).

> Perhaps this is what is causing the problem.

No, the problem is the absence of Figure1.pdf. Check for spelling, and
is it really a capital F?

> Whatever guidance you others can offer will be most welcome and
> deeply appreciated.

Personally, I now recommend using LuaLaTeX as your processor because
it's under active development, it provides native support for Unicode,
and it lets you use all your system fonts, which pdflatex cannot do. But
that's a side-issue right now: you need to find that missing file.

Do keep us posted!

Peter

warren page

unread,
Sep 4, 2025, 1:16:42 PMSep 4
to latexus...@googlegroups.com
Thanks Peter. I’ve now tried unsuccessfully to include a pdf and a jpg file in the document. The document now opens but the pdf (or jpg) graphic is missing.
So I’m attaching a screenshot and hope this will be helpful. I can send you a copy of the document file (4 pages) if you would like to one it and see what is not working.
For sure Peter, I am deeply grateful for your attention to making this work.
Warren


Screenshot 2025-09-03 at 1.10.12 PM.png

Werner Grundlingh

unread,
Sep 4, 2025, 1:30:12 PMSep 4
to latexus...@googlegroups.com
The current error is showing that the file Figure1.pdf can't be found. 

So, the big question here: Is Figure1.pdf within the same folder as wp.tex? If not, move it there and try again.

Peter Flynn

unread,
Sep 4, 2025, 4:24:54 PMSep 4
to 'warren page' via LaTeX Users Group
On 04/09/2025 18:16, 'warren page' via LaTeX Users Group wrote:
> Thanks Peter. I’ve now tried unsuccessfully to include a pdf and a
> jpg file in the document.

But you did that before and it didn't work because the file Figure1.pdf
was not in the folder where your document is.

Have you found that file and put it in the right place?

Until you do that, it won't work.

> The document now opens but the pdf (or jpg) graphic is missing.

We know that. You have to go find it. I don't understand why you have
not done this.

> So I’m attaching a screenshot and hope this will be helpful.

No, it's the same as before.

> I can send you a copy of the document file (4 pages) if you would
> like to one it and see what is not working.

We know what is not working. The file Figure1.pdf is not in the same
folder as your LaTeX document (wp.tex). Go and find that file and put it
in the same folder as your document.

Peter

warren page

unread,
Sep 5, 2025, 1:02:20 PMSep 5
to latexus...@googlegroups.com
I’m sorry, I don’t understand what I’m missing. Figure1.pdf was and IS in the same folder wpText 4 that contains my document file wp.tex. I can’t put Figure1.pdf into wp.tex. Seems latest screenshot.


Screenshot 2025-09-05 at 12.51.16 PM.png

Peter Flynn

unread,
Sep 5, 2025, 1:15:39 PMSep 5
to latexusersgroup
In that case can you please open the Finder and go to the folder and take a screen shot showing the ow.tex AND Figure1.pdf files present.

I suspect there is something weird about the filename, possibly a space that must not be there.

Especially as you seem to have a folder name with a space in it. See https://latex.silmaril.ie/formattinginformation/commands.html#filenames for details.

Peter
With apologies for top-posting, I'm on a cellphone with a mailer that has no proper editing facilities.

On Fri 5 Sept 2025, 18:02 'warren page' via LaTeX Users Group, <latexus...@googlegroups.com> wrote:
I’m sorry, I don’t understand what I’m missing. Figure1.pdf was and IS in the same folder wpText 4 that contains my document file wp.tex. I can’t put Figure1.pdf into wp.tex. Seems latest screenshot.


--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to latexusersgro...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/latexusersgroup/EDDEB95E-EA6B-4392-8FB3-CC17E064839A%40aol.com.
> --
> You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to latexusersgro...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/latexusersgroup/ad50eae5-5bb8-434b-8f91-a8c22ff347a6%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to latexusersgro...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/latexusersgroup/EDDEB95E-EA6B-4392-8FB3-CC17E064839A%40aol.com.

Werner Grundlingh

unread,
Sep 5, 2025, 1:21:24 PMSep 5
to LaTeX Users Group
The filename you list in the folder is "Figure 1.pdf" (note the space) and you're trying to include "Figure1.pdf" (no space).

My suggestion is to remove the space(s) in your filenames and try again.

Peter Flynn

unread,
Sep 5, 2025, 1:57:44 PMSep 5
to latexusersgroup
Well spotted! 

This is why you should NEVER use spaces in file or folder names 😃

P


--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to latexusersgro...@googlegroups.com.

warren page

unread,
Sep 6, 2025, 12:25:55 PMSep 6
to latexus...@googlegroups.com
I’m not sure what you are requesting re "In that case can you please open the Finder (open Finder only shows the icons for Hard Drive, Network, Seagate Backup)  and go to the folder (which folder?) and take a screen shot showing the ow.tex (what is the ow.tex?)  AND Figure1.pdf files present.” 
The attached screenshot now indicates ‘`overflow \hbox 269.2934py too wide) at lines 25-26 [][]” and “Float too large for page on input line 28.” I get a similar message using Figure1.jpg. Could the problem be due to the pdf graphic (attached)?

Screenshot 2025-09-06 at 11.16.34 AM.png

Screenshot 2025-09-06 at 11.22.06 AM.png



Werner Grundlingh

unread,
Sep 6, 2025, 1:10:26 PMSep 6
to LaTeX Users Group
Now that you renamed the image from Figure 1.pdf (with a space) to Figure1.pdf (no space), the image is included. And yes, the image is too wide without scaling. You can add options to adjust the width/height or scale, for example:

\includegraphics[width=0.5\linewidth]{<image>}% a relative length, 50% of the line width
\includegraphics[height=200pt]{<image>}% an absolute length (a reference to various lengths: https://tex.stackexchange.com/q/8260/5764)
\includegraphics[scale=0.25]{<image>}% scaling factor
...

For more options, see section 4.4 Including Graphics Files in the graphics guide.

Peter Flynn

unread,
Sep 6, 2025, 4:14:11 PMSep 6
to 'warren page' via LaTeX Users Group
On 06/09/2025 17:25, 'warren page' via LaTeX Users Group wrote:
> I’m not sure what you are requesting re "In that case can you please
> open the Finder

If you've never seen a list of your files and folders before,
the Finder is the Mac program that shows them.

> open Finder only shows the icons for Hard Drive, Network, Seagate Backup

That's correct. You can click on HardDrive to open the disk and see your
files.
I don't know how you have organised your files and folders, but I am
assuming
that somewhere in Hard Drive there is an entry for Users, and inside it
is an
entry for your name, and you can then click on the folder where you keep
your
LaTeX document. That will show you all your files.

URGENTLY you need to check the list at
https://latex.silmaril.ie/formattinginformation/introduction.html#ecdllist1
so that you are properly equipped to use your computer.

> and go to the folder (which folder?)

The one where your wp.tex file is.

> and take
> a screen shot showing the ow.tex (what is the ow.tex?)

My apologies, I mistyped it. It's wp.tex which is your current LaTeX
document.

> The attached screenshot now indicates ‘`overflow \hbox 269.2934py too
> wide) at lines 25-26 [][]” and “Float too large for page on input line
> 28.” I get a similar message using Figure1.jpg. Could the problem be due
> to the pdf graphic (attached)?

Werner has already explained the problem, your image filename contained
a space.

Peter

warren page

unread,
Sep 6, 2025, 6:23:42 PMSep 6
to latexus...@googlegroups.com
Yes, Inside Users is my name, When I click this, I see a number of folders, including bin that contains many subfolders (some with latex and pdflatex). Nowhere do I see my folder cmj style files that contains wptext 4 and my LaTerX document wp.tex. 


On Sep 6, 2025, at 4:13 PM, Peter Flynn <angleb...@gmail.com> wrote:

 in Hard Drive there is an entry for Users, and inside it is an
entry for your name, and you can then click on the folder where you keep your
LaTeX document. That will show you all your files.

I looked at your reference andnobiced the statement: Converting LaTeX to or from another format means it will unavoidably lose some formatting so features in one format may not process in the other i.e; cannot be translated. This maybe the source of my problem. I began my article in mathmag.sty and then continued to write the document in cmj's style files. If this is the problem, I don’t know how to fix it.

Peter Flynn

unread,
Sep 7, 2025, 12:11:44 PMSep 7
to 'warren page' via LaTeX Users Group
On 06/09/2025 23:23, 'warren page' via LaTeX Users Group wrote:
> Yes, Inside Users is my name, When I click this, I see a number of
> folders, including bin that contains many subfolders (some with
> latex and pdflatex). Nowhere do I see my folder cmj style files that
> contains wptext 4 and my LaTeX document wp.tex.

It has to be there somewhere, unless you (or TeXShop) has created your
wp.tex file in some very weird location. Which is possible.

What happens if you type wp.tex into the Search box at the top right
corner of your Mac screen?

Or in TeXShop, with wp.tex open, click on File > Open ... what folder
does it open (should be wptext 4), and you should be able to see
whereabouts on disk it is.

Either way, this is why I sent to link to
https://latex.silmaril.ie/formattinginformation/introduction.html#ecdllist1
because it's so important that you learn and understand what folder
and files are, and where on your disk they are located. As you have seen,
without that knowledge, it's incredibly hard for anyone to help you.

> I looked at your reference and noticed the statement: Converting
> LaTeX to or from another format means it will unavoidably lose some
> formatting so features in one format may not process in the other
> i.e; cannot be translated.

Correct. In LaTeX you can type \(E=mc^2\) and LaTeX will create a
nicely-formatted equation. If you convert that file to a system
with no math support, you'll just get some characters and no
formatted equation. Not all text systems have every formatting
behaviour.

> This maybe the source of my problem.

No. Werner has already pointed out the error: you had a PDF file
with a space in the name. Nothing to do with LaTeX. Don't ever
put spaces in filenames or folder names, not ever. Nor special
characters like accents, punctuation or non-text symbols (with
two exceptions below). Stick to the characters A-Z, a-z, 0-9,
hyphen (-), underscore (_) and dot (.) then your filename and
foldernames will work on any computer anywhere.

> I began my article in mathmag.sty and then continued to write the
> document in cmj's style files. If this is the problem, I don’t know
> how to fix it.

I'm afraid I don't know either of them, but you are quite correct,
they probably don't offer identical facilities. Even some well-
known packages use different names for the same thing because they
were written by different people at different times.

But neither of the ones you mention (mathmag and cmi) seem to be
on CTAN, the repository of LaTeX styles, so they may be homebrew
styles done for Overleaf or something else. This means they may
not have any meaningful documentation or traceable author, so
finding stuff out may mean asking other users.

Peter

Reply all
Reply to author
Forward
0 new messages