2 列文档中的宽图(图*不起作用)

2 列文档中的宽图(图*不起作用)

我是这个环境的新手,但我相信我已经检查了与我的问题相关的其他问题,仍然找不到解决方案。我想要的是在一个两列文档中有一个更宽的图形。我正在尝试使用

\begin{figure*}
\end{figure*}

程序出错。我已经包含了我知道的所有软件包。还有什么问题?

谢谢

以下是文档类声明

\documentclass[twocolumn]{IEEEtran}

以下是我包含的包

\usepackage{ifpdf}
\usepackage{cite}
\ifCLASSINFOpdf
   \usepackage[pdftex]{graphicx}
\else
\fi
\usepackage[cmex10]{amsmath}
\interdisplaylinepenalty=2500
\usepackage{algorithmic}
\usepackage{array}
\usepackage{mdwmath}
\usepackage{mdwtab}
\usepackage{eqparbox}
\usepackage[tight,footnotesize]{subfigure}
\usepackage{fixltx2e}
\usepackage{stfloats}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage[showframe]{geometry}
\usepackage{lipsum}

这是我想作为一列的图形的一部分。

\begin{figure*}
\begin{tikzpicture}[snake=zigzag, line before snake = 5mm, line after snake = 5mm]
%draw horizontal line
\draw (0,0) -- (6,0);
\draw[snake] (6,0) -- (8,0);

%draw vertical lines
\foreach \x in {0,2,5,8}
   \draw (\x cm,3pt) -- (\x cm,-3pt);
%draw nodes
\draw (0,0) node[below=3pt] {$ t_0 $} node[above=3pt] {$   $};
\draw (1,0) node[below=3pt] {$  $} node[above=2pt] {$ h_1 $};
\draw (2,0) node[below=3pt] {$ t_1^1 $} node[above=3pt] {$  $};
\draw (3.5,0) node[below=3pt] {$  $} node[above=2pt] {$ h_2 $};
\draw (5,0) node[below=3pt] {$ t_2^1 $} node[above=3pt] {$ $};
\draw (5.75,0) node[below=3pt] {$  $} node[above=2pt] {$ h_3 $};
\draw (7.25,0) node[below=3pt] {$  $} node[above=2pt] {$ h_N $};
\draw (8,0) node[below=3pt] {$ t_N^1 $} node[above=3pt] {$ $};
\end{tikzpicture}
\begin{tikzpicture}[snake=zigzag, line before snake = 5mm, line after snake = 5mm]
%draw horizontal line
\draw (0,0) -- (6,0);
\draw[snake] (6,0) -- (8,0);
%draw vertical lines
\foreach \x in {0,3,5,8}
   \draw (\x cm,3pt) -- (\x cm,-3pt);
%draw nodes
\draw (0,0) node[below=3pt] {$ t_0 $} node[above=3pt] {$   $};
\draw (1.5,0) node[below=3pt] {$  $} node[above=2pt] {$ d_1 $};
\draw (3,0) node[below=3pt] {$ t_1^2 $} node[above=3pt] {$ $};
\draw (4,0) node[below=3pt] {$  $} node[above=2pt] {$ d_2 $};
\draw (5,0) node[below=3pt] {$ t_2^2 $} node[above=3pt] {$  $};
\draw (5.5,0) node[below=3pt] {$  $} node[above=2pt] {$ d_3 $};
\draw (6.1,0) node[below=3pt] {$ t_3^2 $} node[above=3pt] {$  $};
\draw (7.25,0) node[below=3pt] {$  $} node[above=2pt] {$ d_M $};
\draw (8,0) node[below=3pt] {$ t_M^2 $} node[above=3pt] {$ $};
\end{tikzpicture}
\end{figure*}`

但是当我在末尾使用 figure* 而不是 figure 时,它​​会给出;

在此处输入图片描述

答案1

问题在于您加载包的顺序:(stfloats假设您确实想使用它)应该先加载fixltx2e,否则浮点数就会消失。

然而,从您的最小示例中我没有发现任何错误,只有浮点数的消失。

但请注意

\ifCLASSINFOpdf
   \usepackage[pdftex]{graphicx}
\else
\fi

是无用的;只需执行。不应使用\usepackage{graphicx}选项,因为它是为了与非常旧的 TeX 发行版兼容。[cmex10]amsmath

软件包mdwtabmdwmath无人维护,可能与其他软件包冲突。也subfigure已过时;使用

\usepackage[caption=false]{subfig}

并在文档中更改\subfigure为。\subfloat

相关内容