英文:
Overleaf: How to have several images in one page, like a collage, with figure caption in between?
问题
为了我的论文,我想展示一些图片,就像这样:
在A4纸上的图片拼贴
在Overleaf中编写这个的最佳方法是什么?
到目前为止,我已经能够使用以下代码将图片放在我想要的位置,但是我不知道如何像我想要的那样将图题放在图片之间。我能够在我想要的图题位置放一些文本,但如果我在那个位置写\caption{}
,就会出现错误。
\begin{figure}
\centering
\begin{tabular}{@{} c c @{}}
\begin{tabular}{@{} c @{}}
\includegraphics[width=0.48\textwidth]{Pictures/M&M/01_sampling.png} \\[10ex]
Text \\[1ex]
\includegraphics[width=0.48\textwidth]{Pictures/M&M/06_sorting.png}
\end{tabular}
&
\begin{tabular}{@{} c @{}}
\includegraphics[width=0.48\textwidth]{Pictures/M&M/02_sampling.png} \\[1ex]
\includegraphics[width=0.48\textwidth]{Pictures/M&M/03_sampling.png}\\[1ex]
\includegraphics[width=0.48\textwidth]{Pictures/M&M/04_sampling.png}\\[1ex]
\includegraphics[width=0.48\textwidth]{Pictures/M&M/05_sampling.png}
\end{tabular}
\end{tabular}
\caption{}\label{whatever}
\end{figure}
英文:
For my thesis I want to show some pictures, like this:
Image collage on A4
What is the best way to code this in overleaf?
So far I was able to get the pictures somewhat in the places I wanted them with the following code. However, I don't know how to get the Figure caption in between the pictures like I want it. I was able to put some text in the place where I want the figure caption, but if I write \caption{}
in that place, it gives an error.
\begin{figure}
\centering
\begin{tabular}{@{} c c @{}}
\begin{tabular}{@{} c @{}}
\includegraphics[width=0.48\textwidth]{Pictures/M&M/01_sampling.png} \\[10ex]
Text \\[1ex]
\includegraphics[width=0.48\textwidth]{Pictures/M&M/06_sorting.png}
\end{tabular}
&
\begin{tabular}{@{} c @{}}
\includegraphics[width=0.48\textwidth]{Pictures/M&M/02_sampling.png} \\[1ex]
\includegraphics[width=0.48\textwidth]{Pictures/M&M/03_sampling.png}\\[1ex]
\includegraphics[width=0.48\textwidth]{Pictures/M&M/04_sampling.png}\\[1ex]
\includegraphics[width=0.48\textwidth]{Pictures/M&M/05_sampling.png}
\end{tabular}
\end{tabular}
\caption{}\label{whatever}
\end{figure}
答案1
得分: 0
所以过了一段时间,我找到了这个完美运行的选项:
\begin{figure}[!htp]
\centering
\valign{#\cr
\hsize=0.48\textwidth
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/01_sampling.png}}\vfill
\caption{文本}\vspace{5pt}
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/06_sorting.png}}\cr
\noalign{\hfill}
\hsize=0.48\textwidth
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/02_sampling.png}}\vfill
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/03_sampling.png}}\vfill
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/04_sampling.png}}\vfill
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/05_sampling.png}}\cr
}
\end{figure}
英文:
So after some time I found this option which worked perfectly:
\begin{figure}[!htp]
\centering
\valign{#\cr
\hsize=0.48\textwidth
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/01_sampling.png}}\vfill
\caption{Text}\vspace{5pt}
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/06_sorting.png}}\cr
\noalign{\hfill}
\hsize=0.48\textwidth
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/02_sampling.png}}\vfill
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/03_sampling.png}}\vfill
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/04_sampling.png}}\vfill
\subfloat{\includegraphics[width=\hsize]{Pictures/M&M/05_sampling.png}}\cr
}
\end{figure}
答案2
得分: -1
Instead of using a tabular, I think using subfigures with subcaptions (https://www.overleaf.com/learn/latex/How_to_Write_a_Thesis_in_LaTeX_(Part_3)%3A_Figures%2C_Subfigures_and_Tables#Subfigures) may give better results. You can then add a subcaption to image 1 to get it below that image.
英文:
Instead of using a tabular, I think using subfigures with subcaptions (https://www.overleaf.com/learn/latex/How_to_Write_a_Thesis_in_LaTeX_(Part_3)%3A_Figures%2C_Subfigures_and_Tables#Subfigures) may give better results. You can then add a subcaption to image 1 to get it below that image.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论