Graphics, Figures & Tablesincludegraphics doesn't show graphics but file name

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
csam8754
Posts: 9
Joined: Thu Jun 19, 2014 4:35 pm

includegraphics doesn't show graphics but file name

Post by csam8754 »

Hi there!

I'm having trouble to include graphics into the Biomed Central Latex Template (http://www.biomedcentral.com/authors/tex).

The following code produces the output as shown in the attachement underneath.

Code: Select all

Code, edit and compile here:
\begin{figure}
\centering
\includegraphics{/img/fig5.png}
\caption{Caption}
\label{fig:my_label}
\end{figure}
\begin{figure}
\centering
\includegraphics{lion-logo}
\caption{Caption}
\label{fig:test}
\end{figure}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Attachments
screen.png
screen.png (4.31 KiB) Viewed 24117 times
Last edited by cgnieder on Sat Jun 28, 2014 10:32 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

includegraphics doesn't show graphics but file name

Post by Johannes_B »

It is important to always boil down your code to a minimum working example. Please follow the link to learn how to prepare one.

So, just a shot into the blue: Did you set option demo or draft either as a global option or an option to package graphicx?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
csam8754
Posts: 9
Joined: Thu Jun 19, 2014 4:35 pm

includegraphics doesn't show graphics but file name

Post by csam8754 »

Well, it's not easy for me to reduce the code to a minimum working example since I'm using this massive Biomed Central Template.

However the head of my *.tex file goes like this:

Code: Select all

Code, edit and compile here:
%% BioMed_Central_Tex_Template_v1.06
%% %
% bmc_article.tex ver: 1.06 %
% %
%%IMPORTANT: do not delete the first line of this template
%%It must be present to enable the BMC Submission system to
%%recognise this template!!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% LaTeX template for BioMed Central %%
%% journal article submissions %%
%% %%
%% <8 June 2012> %%
%% %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% For instructions on how to fill out this Tex template %%
%% document please refer to Readme.html and the instructions for %%
%% authors page on the biomed central website %%
%% http://www.biomedcentral.com/info/authors/ %%
%% %%
%% Please do not use \input{...} to include other tex files. %%
%% Submit your LaTeX manuscript as one .tex document. %%
%% %%
%% All additional figures and files should be attached %%
%% separately and not embedded in the \TeX\ document itself. %%
%% %%
%% BioMed Central currently use the MikTex distribution of %%
%% TeX for Windows) of TeX and LaTeX. This is available from %%
%% http://www.miktex.org %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% additional documentclass options:
% [doublespacing]
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
But there are many more files included such as *.sty, *.cls ...

You link is not working. Thanks for your response so far! :)
Last edited by cgnieder on Sat Jun 28, 2014 10:33 pm, edited 1 time in total.
csam8754
Posts: 9
Joined: Thu Jun 19, 2014 4:35 pm

Re: includegraphics doesn't show graphics but file name

Post by csam8754 »

I'm using ShareLatex.com and neither can I find the word "demo" nor "draft" within my *.tex file ...
csam8754
Posts: 9
Joined: Thu Jun 19, 2014 4:35 pm

includegraphics doesn't show graphics but file name

Post by csam8754 »

Adding "\usepackage{graphicx}" doesn't help either
Last edited by cgnieder on Sat Jun 28, 2014 10:34 pm, edited 1 time in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

includegraphics doesn't show graphics but file name

Post by Johannes_B »

As seen in the comment block, use percent sign to comment out those two lines.

Code: Select all

Code, edit and compile here:
%\def\includegraphic{}
%\def\includegraphics{}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Now you need to load graphicx in order to have this command defined.

But read the comment block carefully. You need to remove those comments and submit the figures separately.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
csam8754
Posts: 9
Joined: Thu Jun 19, 2014 4:35 pm

includegraphics doesn't show graphics but file name

Post by csam8754 »

Again thanks for your quick response! Unfortunately it's still not working. I am now using /usepackage{graphicx} and commented out the two lines but the outcome is not what I want (see attachement). I did some research on the internet and maybe it as something to do with a demo option of graphicx or something but I don't really get it.

Thanks for the advice with the figures by the way. However it's just a project for university so i think it'll be ok to include some images.

Code: Select all

Code, edit and compile here:
%% BioMed_Central_Tex_Template_v1.06
%% %
% bmc_article.tex ver: 1.06 %
% %
%%IMPORTANT: do not delete the first line of this template
%%It must be present to enable the BMC Submission system to
%%recognise this template!!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% LaTeX template for BioMed Central %%
%% journal article submissions %%
%% %%
%% <8 June 2012> %%
%% %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% For instructions on how to fill out this Tex template %%
%% document please refer to Readme.html and the instructions for %%
%% authors page on the biomed central website %%
%% http://www.biomedcentral.com/info/authors/ %%
%% %%
%% Please do not use \input{...} to include other tex files. %%
%% Submit your LaTeX manuscript as one .tex document. %%
%% %%
%% All additional figures and files should be attached %%
%% separately and not embedded in the \TeX\ document itself. %%
%% %%
%% BioMed Central currently use the MikTex distribution of %%
%% TeX for Windows) of TeX and LaTeX. This is available from %%
%% http://www.miktex.org %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% additional documentclass options:
% [doublespacing]
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Attachments
test.png
test.png (2.76 KiB) Viewed 24110 times
csam8754
Posts: 9
Joined: Thu Jun 19, 2014 4:35 pm

Re: includegraphics doesn't show graphics but file name

Post by csam8754 »

I'm sorry, within the latest post I messed up the file name! ... It's now working. Thank you very much for your help with this question and in the other thread as well!
Post Reply