LaTeX forum ⇒ Graphics, Figures & TablesProblem with reading image name in LaTeX Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
ciema7
Posts: 10
Joined: Sat Nov 10, 2018 2:31 am

Problem with reading image name in LaTeX

Postby ciema7 » Sat Nov 17, 2018 12:38 pm

Hello Friends,

I have really simple question. Can You advise me why I cannot type to this code (which insert picture) full name or any numbers in the file name and I can only insert the one letter to provide inserting picture? I mean when I name my picture for example "graphics" or "g1" it won't work, but when I insert "g" as a name it will ! Is there any solution or do i have to name each of my pictures as "a", "b", "c", "d".... etc ? Here is my code:

  1. \begin{figure}[ht]
  2. \centering
  3. \includegraphics[width=12cm, height=8cm]graphics
  4. \caption{This is the picture description}
  5. \label{fig:graphics}
  6. \end{figure}


Thank You in advance for help.
Last edited by Stefan Kottwitz on Sat Nov 17, 2018 12:58 pm, edited 1 time in total.
Reason: code marked

User avatar
Stefan Kottwitz
Site Admin
Posts: 9203
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Nov 17, 2018 12:57 pm

Hi,

the image name is an argument (parameter) for the \includegraphics command. Such mandatory arguments have to be in curly braces. So this would work:

  1. \includegraphics[width=12cm, height=8cm]{graphics}


Stefan
Site admin

ciema7
Posts: 10
Joined: Sat Nov 10, 2018 2:31 am

Postby ciema7 » Sat Nov 17, 2018 1:01 pm

Stefan Kottwitz wrote:Hi,

the image name is an argument (parameter) for the \includegraphics command. Such mandatory arguments have to be in curly braces. So this would work:

  1. \includegraphics[width=12cm, height=8cm]{graphics}


Stefan


Of course. Thank You very much :)


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 4 guests