我想将五个子图放入一个图形中。第一个是宽矩形。其他四个更接近正方形。[ ]
\documentclass[12pt]{scrreport}
\usepackage{graphicx}
\graphicspath{ {images/} }
\usepackage{framed}
\usepackage{float}
begin{document}
\begin{figure}
\centering
\begin{subfigure}[t]{1\textwidth}
\centering
\includegraphics[width=0.35\linewidth, angle =90 ]{a}
\caption{a}
\label{fig:a}
\end{subfigure}
\begin{subfigure}[b]{.5\textwidth}
\centering
\includegraphics[width=.6\linewidth,cfbox=green 1pt 1pt]{b}\quad
\caption{b}
\label{b}
\end{subfigure}
\begin{subfigure}[c]{0.5\textwidth}
\centering
\includegraphics[width=.6\linewidth,cfbox=red 1pt 1pt]{c}
\caption{c}
\label{fig:c}
\end{subfigure}
\begin{subfigure}[d]{0.5\textwidth}
\centering
\includegraphics[width=.7\linewidth,cfbox=green 1pt 1pt]{d}
\caption{d}
\label{d}
\end{subfigure}
\begin{subfigure}[e]{0.5\textwidth}
\centering
\includegraphics[width=.7\linewidth,cfbox=red 1pt 1pt]{e}
\caption{e}
\label{fig:e}
\end{subfigure}
\caption{blabla}
\end{minipage}
\end{figure}
\end{document}
答案1
以下示例代码可能有助于您入门。只需将filename
占位符替换为实际文件名,从包[demo]
中删除graphicx
,编译并查看它是否适合您的需求:
\documentclass[12pt]{scrreport}
\usepackage[demo]{graphicx} % remove the demo option in your actual document!
\usepackage{subcaption}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}{1\textwidth}
\centering
\includegraphics[width=\linewidth]{filename}
\caption{}
\label{fig:a}
\end{subfigure}
\begin{subfigure}[b]{.45\textwidth}
\centering
\includegraphics[width=\linewidth]{filename}
\caption{}
\label{b}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\linewidth]{filename}
\caption{}
\label{fig:c}
\end{subfigure}
\begin{subfigure}[b]{.45\textwidth}
\centering
\includegraphics[width=\linewidth]{filename}
\caption{}
\label{d}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\linewidth]{filename}
\caption{}
\label{fig:e}
\end{subfigure}
\caption{blabla}
\label{figurelabel}
\end{figure}
\end{document}