# Problem with figures spanning across 2-column

I am trying to add a figure that spans across 2-columns. It works on my local installation of TexWorks, however when I try to compile the exact same LaTeX code on ShareLatex.com it doesn't appear. The problem also occurs to one of my colleagues, who is using TeXstudio.

Here is how it is written:

\begin{figure*}[t]
\centering
\includegraphics[width=2.1\columnwidth]{figures/myfigure}
\caption{
Sample caption
}
\label{fig:trajectories}
\end{figure*}


Surprisingly, this works right away on all three IDEs (only difference is figure instead of figure*:

\begin{figure}[t]
\centering
\includegraphics[width=2.1\columnwidth]{figures/myfigure}
\caption{
Sample caption
}
\label{fig:trajectories}
\end{figure}

• How can we possibly answer this in its current form? We don't have a complete example. We can't guess how to complete the code to create one, even substituting a standard image - I'm assuming this doesn't happen with a standard class or, rather, I'm not prepared to open an account just on the off-chance I might be able to reproduce it with one - and we have no information about what 'it doesn't work' means other than that it doesn't appear. No indications of the errors, warnings or log file messages you get at all. – cfr Apr 2 '16 at 0:34
• You probably don't have a subdirectory named "figures" on ShareLatex. Thus, instead of \includegraphics[width=2.1\columnwidth]{figures/myfigure}, you should try \includegraphics[width=\textwidth]{myfigure}. Of course, myfigure.pdf must be in the ShareLatex directory. – Mico Apr 2 '16 at 0:52