我在环境中添加图形时遇到以下问题multicol
:
\documentclass[10pt, twoside]{book}
\usepackage{graphicx}
\usepackage{subfig}
\begin{document}
\begin{multicols}{2}
a test file for picture inclusion along with the captions and labeling
\begin{figure}
\centering
\includegraphics[width=5cma]{Cauchy_sequence_illustration-png}\\
\caption{Lets see}\label{pinki}
\end{figure}
\end{multicols}
\begin{figure}
\centering
\includegraphics[width=5cm]{Cauchy_sequence_illustration-png}\\
\caption{Lets see}\label{pinki}
\end{figure}
\end{document}
此后,当我按下Ctrl+ Shift+时X(通常我以 DVI 格式进行编译,然后单击“dvi--->pdf”将其转换为 PDF 文档。),multicol
环境中的图片未显示在 YAP Viewer 中,但第二张图片(在multicol
环境之外)与标题一起显示。
请帮我解决这个问题。请注意,我使用的是.ps
格式中的图形。根据说明,我不允许使用任何其他格式。
答案1
multicol
figure
包与环境(浮点型)配合得不好。使用 并使用来自(或)包的宏\includegraphics
添加标题,您更有可能成功。\captionof
caption
\capt-of
\documentclass[10pt, twoside]{book}
\usepackage[demo]{graphicx} %%% remove demo in your file
\usepackage{multicol}
\usepackage{caption}
\begin{document}
\begin{multicols}{2}
a test file for picture inclusion along with the captions and labeling
{ \centering
\includegraphics[width=\columnwidth]{Cauchy_sequence_illustration-png}\\
\captionof{figure}{Lets see}\label{pinki}
}
\end{multicols}
\begin{figure}[htb]
\centering
\includegraphics[width=5cm]{Cauchy_sequence_illustration-png}\\
\caption{Lets see}\label{pinki}
\end{figure}
\end{document}