# Wide figure in a 2 column document (figure* doesn't work)

I am new to this environment, but I believe I have checked other questions related to mine problem, still couldn't find a solution. What I want is to have a wider figure in a two column document. I am trying to use

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


Program gives an error. I have included all the packages I know. What else could the problem be?

Thanks

Here is the document class statement

\documentclass[twocolumn]{IEEEtran}


Here are the packages I am including

\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}


Here is a part of the figure that I would like to have as a one column.

\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*}


But when I use figure* instead of figure at the end it gives ;

• Please add a MWE – user56567 Aug 14 '14 at 16:29
• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. In your situation, additional information about the errors (at least a transcript of the error message) could also prove useful. – T. Verron Aug 14 '14 at 16:31
• "Program gives an error" is rather unspecific. Could you at least report the error message you're getting -- preferably together with an MWE that gives rise to the error message? – Mico Aug 14 '14 at 16:36
• Including all the packages you know may well be problematic if you know of many packages since they are likely to conflict with each other! – cfr Aug 14 '14 at 23:55
• Package subfigure is deprecated, use subfig or subcaption instead. And please read the link on preparing a MWE. – Johannes_B Aug 15 '14 at 9:40

The problem is in the order with which you load the packages: stfloats (assuming you really want to use it) should go before fixltx2e or the float will disappear.

I get no error from your minimal example, however, only the disappearance of the float.

Note however that

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


is useless; just do \usepackage{graphicx}. The option [cmex10] to amsmath shouldn't be used as it is for compatibility with very old TeX distributions.

The packages mdwtab and mdwmath are unmaintained and likely to conflict with other packages. Also subfigure is obsolete; use

\usepackage[caption=false]{subfig}


and change \subfigure into \subfloat` in the document.

• Changing the order really worked, thanks a lot. I didn't know the order matters. – Can Aug 15 '14 at 9:52