兩欄文章中的圖

兩欄文章中的圖

我有一個兩列的文章文檔,我想在其中放置一個橫跨兩個(獨立)表(使用tabularx)上方兩列的圖形,每列一個。我已經關注了答案這裡,但它在不同的頁面上為我提供了表格和圖形。我究竟做錯了什麼?

微量元素:

\documentclass[twocolumn]{article}
\usepackage{mwe}
\usepackage{tabularx}
\usepackage{graphicx}
\begin{document}

\begin{figure*}
\centering
\includegraphics[width=0.5\textwidth]{example-image-a}
\end{figure*}

\begin{tabularx}{\columnwidth}{l|X}
1 & Some text\\
2 & Some more text 
\end{tabularx} 

\newpage

\begin{tabularx}{\columnwidth}{l|X}
3 & Some text\\
4 & Some more text 
\end{tabularx} 

\end{document}

答案1

幾乎正確:-) 但figure*總是會出現該頁面它出現在原始程式碼中,因此您不能在第一頁上執行此操作(如果您需要,您需要做一些更棘手的事情),並且您需要\noindent避免段落縮進,使全寬表格不適合一行。

在此輸入影像描述

\documentclass[twocolumn]{article}
\usepackage{tabularx}
\usepackage{graphicx}
\begin{document}



\begin{figure*}
\centering
\includegraphics[width=0.5\textwidth]{example-image-a}
\end{figure*}

aaa

\pagebreak

aaa

\pagebreak

\noindent\begin{tabularx}{\columnwidth}{l|X}
1 & Some text\\
2 & Some more text 
\end{tabularx} 

\newpage

\noindent\begin{tabularx}{\columnwidth}{l|X}
3 & Some text\\
4 & Some more text 
\end{tabularx} 

\end{document}

相關內容