Why Figure is not displayed in the latex file and text is shown instead of it

I am newbie in latex and trying to add figure into the latex file as follows:

\documentclass{bmcart} %%% Load packages \usepackage{amsthm,amsmath} \usepackage[utf8]{inputenc} %unicode support \usepackage{mathtools} \usepackage{amsmath} \usepackage{graphicx} \def\includegraphic{} \def\includegraphics{} \startlocaldefs \endlocaldefs \begin{document} \begin{figure}[h!] \includegraphics{figures/GBMfigure3.jpg} \caption{show the results of the different settings for the parameters of the penalty model for solving the problem \ref{q11}.} \end{figure} \end{document} 

But, the figure is not displayed and the text itself is displayed instead of the figure, for example the resulted file is as below:

enter image description here

So, what's the solution of that issue please.

0

1 Answer

With \def\includegraphics{} you redefine the command to do nothing. If you want it to include your image, don't do such a redefinition.

\documentclass{bmcart} %%% Load packages \usepackage{amsthm,amsmath} \usepackage[utf8]{inputenc} %unicode support \usepackage{mathtools} \usepackage{amsmath} \usepackage{graphicx} %\def\includegraphic{} %\def\includegraphics{} \startlocaldefs \endlocaldefs \begin{document} \begin{figure}[h!] \includegraphics{example-image-duck} \caption{show the results of the different settings for the parameters of the penalty model for solving the problem \ref{q11}.} \end{figure} \end{document} 

enter image description here

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like