I've been trying to make a centered figure in my document. It is rather wide and I want it at the top. I am using memoir and twocolumn. I've tried the \usepackage{multicols} before, but it introduced a lot more errors than my current setup. It works pretty nicely, but figures can be hard to get right. I've tried
\begin{figure}[t]
\centering
\includegraphics[width=0.9\textwidth]{attachments/xrdceo2.png}
\caption{...}
\label{fig:XRDCeO2}
\end{figure}
Which works, but it is not centered by any means (few pixels) and it gets worse the lower text width gets. Another method I tried were to use \makebox which worked until something were written in the next column as it were transparent.
\begin{figure}[t]
\centering
\makebox[\textwidth][c]{\includegraphics[width=0.9\textwidth]{attachments/xrdceo2.png}}
\caption{Orthorhombric unit cell of tin selenide, \ce{SnSe}, at \SI{100}{K}.}
\label{fig:XRD_CeO2}
\end{figure}
I've also been giving minipage a try, but without luck.
Thanks in advance.
MWE:
\documentclass[11pt,openany,british,a4paper,twoside,twocolumn]{memoir}
\usepackage{graphicx}
\usepackage{etoolbox}
\usepackage{fancyhdr}
\usepackage{lipsum}
\begin{document}
\lipsum
\begin{figure}[t]
\centering
\includegraphics[width=0.9\textwidth]{xrdceo2.png}
\caption{...}
\label{fig:XRDCeO2}
\end{figure}
\lipsum
\end{document}

\begin{figure*}...\end{figure*}? See also https://tex.stackexchange.com/questions/3173/ – imnothere Oct 31 '22 at 08:09mwepackage, https://ctan.org/tex-archive/macros/latex/contrib/mwe. – daleif Oct 31 '22 at 08:13figure*environment, but it forces it to use the next unused page instead. @daleif Sorry! It should hopefully be updated and okay. – JonasDenmark Oct 31 '22 at 08:23