问题描述
使用某会议的latex模板(双栏)完成论文时,出现了插入图片特别大、无法调整大小的问题:
- latex代码
\documentclass[conference,a4paper]{XXX}
...
\usepackage[dvips]{graphicx}
...
\begin{document}
...
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=\linewidth]{Latex/2.jpg}
%\includegraphics[width=\linewidth]{Fig1-TimesNewRomanPSMT.eps}
%\fbox{ \rule[-17mm]{0pt}{30mm} FIGURE }
\end{center}
\caption{Magnetization as a function of applied field.}
\vspace*{-3pt}
{\hfill\footnotesize Note how the caption is centered in the column.\hfill}
\end{figure}
...
\end{document}
- 图片插入结果
解决方案
-
直接将
\usepackage[dvips]{graphicx}
修改为\usepackage{graphicx}
即可
-
原因
- dvips是一个将 DVI 到 PostScript 的驱动程序,适用于latex编译eps图片
- 因此原模版使用latex编译,插入的eps图片是可以正常显示的
- 实际编译的时候默认使用的pdflatex, 所以原模版无法使用,需要将dvips去掉才可以正常编译png、jpg和pdf格式的图片
- dvips是一个将 DVI 到 PostScript 的驱动程序,适用于latex编译eps图片