我正在使用\center
命令在两列上显示一个图形。问题是我无法正确引用该图形。以下是最小示例:
\documentclass[11pt, twoside]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[]{caption}
\usepackage{kantlipsum} % dummy text
\usepackage{multicol}
\captionsetup{compatibility=false}
\begin{document}
\begin{multicols}{2}
% Dummy texts
\kant[1]
\end{multicols}
% Figure
\begin{center}
\includegraphics[width=\textwidth]{Picture1.png}
\label{fig:pic1}
\captionof{figure}{Sample image 1}
\end{center}
\begin{multicols}{2}
% Refer the figure
As shown in Figure \ref{fig:pic1},
\end{multicols}
\end{document}
如屏幕截图所示,图形编号显示不正确。有人知道如何修复这个问题吗?