![在 LaTex 中使用 {IEEEtran} 时,如何使用页面全宽将图形排列在页面中心](https://linux22.com/image/447177/%E5%9C%A8%20LaTex%20%E4%B8%AD%E4%BD%BF%E7%94%A8%20%7BIEEEtran%7D%20%E6%97%B6%EF%BC%8C%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E9%A1%B5%E9%9D%A2%E5%85%A8%E5%AE%BD%E5%B0%86%E5%9B%BE%E5%BD%A2%E6%8E%92%E5%88%97%E5%9C%A8%E9%A1%B5%E9%9D%A2%E4%B8%AD%E5%BF%83.png)
我正在使用 Overleaf 并使用 IEEEtran 模板撰写论文。我想将一个图形显示在整个页面宽度上并位于页面的中心。但是双列模板不允许我这样做。我的图形代码如下。我根据模板的一侧限制了图像的大小,所以请忽略这一点。我尝试了这figure
两种figure*
方法,但由于 ieeetran 模板,我的图形只显示在页面的一半。下面给出了测试代码示例。
\documentclass[conference]{IEEEtran}
\usepackage[pdftex]{graphicx}
\usepackage{graphicx, array, blindtext}
\usepackage{graphicx}
\usepackage{url}
\begin{document}
\begin{figure*}[t]
\centering
\begin{tabular}{c c c}
\includegraphics[scale = 0.097]{Result_SAR.png} &
\includegraphics[scale = 0.1]{exp_0008_Footprint.png} &
\includegraphics[scale = 0.097]{exp_0008_polygons_900x900.png}\\
\includegraphics[scale = 0.097]{Result_SAR.png} &
\includegraphics[scale = 0.1]{exp_0009_Footprint.png} &
\includegraphics[scale = 0.097]{exp_0009_polygons_900x900.png}\\
\includegraphics[scale = 0.097]{Result_SAR.png} &
\includegraphics[scale = 0.1]{exp_0012_Footprint.png} &
\includegraphics[scale = 0.097]{exp_0012_polygons_900x900.png}\\
\includegraphics[scale = 0.097]{Result_SAR.png} &
\includegraphics[scale = 0.1]{exp_0013_Footprint.png} &
\includegraphics[scale = 0.097]{exp_0013_polygons_900x900.png}\\
\includegraphics[scale = 0.097]{Result_SAR.png} &
\includegraphics[scale = 0.1]{exp_0018_Footprint.png} &
\includegraphics[scale = 0.097]{exp_0018_polygons_900x900.png}\\
\includegraphics[scale = 0.097]{Result_SAR.png} &
\includegraphics[scale = 0.1]{exp_0019_Footprint.png} &
\includegraphics[scale = 0.097]{exp_0019_polygons_900x900.png}\\
\includegraphics[scale = 0.097]{Result_SAR.png} &
\includegraphics[scale = 0.1]{ensembled_footprint.png} &
\includegraphics[scale = 0.097]{ensembled_polygons_900x900.png}\\
\end{tabular}
\caption{\label Experiments Results and Polygons}
\end{figure*}
\end{document}
答案1
您可以使用环境 strip
(包cuted
)将宽材料插入到双列文档中的所需位置。
显然它不支持浮点数,所以您必须使用\captionof{figure}{<text>}
插入标题(包caption
)。
% !TeX TS-program = pdflatex
\documentclass[conference]{IEEEtran}
\usepackage{graphicx, array, blindtext}
\usepackage{kantlipsum} % only for dummy text
\usepackage[format=hang]{caption} % captionof <<<<<
\usepackage{cuted} % wide content <<<<
\begin{document}
1. \kant[1]
\begin{strip} % start wide material
\centering
\begin{tabular}{c c c}
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\end{tabular}
\captionsetup{width=0.8\linewidth}
\captionof{figure}{ Experiments Results and Polygons Experiments Results and Polygon Experiments Results and Polygon}\label{fig:exp}
\end{strip} % end wide material
2. \kant[2]
\end{document}
更新后续问题:长图不适合整个页面。
表格不会跨页。将图表放在新页面的开头,或将表格一分为二,如下例所示。
% !TeX TS-program = pdflatex
\documentclass[conference]{IEEEtran}
\usepackage{graphicx, array, blindtext}
\usepackage{kantlipsum} % only for dummy text
\usepackage[format=hang]{caption} % captionof <<<<<
\usepackage{cuted} % wide content <<<<
\begin{document}
1. \kant[1-4]
\begin{strip} % start wide material
\centering
\begin{tabular}{c c c}
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\end{tabular}
\captionsetup{width=0.8\linewidth}
\captionof{figure}{(a) Experiments Results and Polygons Experiments Results and Polygon Experiments Results and Polygon \emph{(cont. in next page)} }\label{fig:exp1}
\addtocounter{figure}{-1} %reset counter
\begin{tabular}{c c c}
\includegraphics[scale =0.25]{example-image-a}&
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\includegraphics[scale =0.25]{example-image-a} &
\includegraphics[scale =0.25]{example-image-b} &
\includegraphics[scale =0.25]{example-image-c}\\
\end{tabular}
\captionsetup{width=0.8\linewidth}
\captionof{figure}{(b) Experiments Results and Polygons Experiments Results and Polygon Experiments Results and Polygon}\label{fig:exp2}
\end{strip} % end wide material
2. \kant[2-6]
\end{document}