为什么乳胶文件中不显示图形而显示文本而不是它
Why Figure is not displayed in the latex file and text is shown instead of it
我是 Latex 的新手,正在尝试将图形添加到 Latex 文件中,如下所示:
\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}
但是,不显示图形,而是显示文本本身而不是图形,例如结果文件如下:
那么,请问该问题的解决方案是什么。
使用 \def\includegraphics{}
可以重新定义命令不执行任何操作。如果你想让它包含你的图像,请不要进行这样的重新定义。
\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}
我是 Latex 的新手,正在尝试将图形添加到 Latex 文件中,如下所示:
\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}
但是,不显示图形,而是显示文本本身而不是图形,例如结果文件如下:
那么,请问该问题的解决方案是什么。
使用 \def\includegraphics{}
可以重新定义命令不执行任何操作。如果你想让它包含你的图像,请不要进行这样的重新定义。
\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}