TeX - LaTeX Asked by user228207 on April 27, 2021
I want to place five subfigures into one figure. The first one is a wide rectangle. The other four are closer to squares. []
documentclass[12pt]{scrreport}
usepackage{graphicx}
graphicspath{ {images/} }
usepackage{framed}
usepackage{float}
begin{document}
begin{figure}
centering
begin{subfigure}[t]{1textwidth}
centering
includegraphics[width=0.35linewidth, angle =90 ]{a}
caption{a}
label{fig:a}
end{subfigure}
begin{subfigure}[b]{.5textwidth}
centering
includegraphics[width=.6linewidth,cfbox=green 1pt 1pt]{b}quad
caption{b}
label{b}
end{subfigure}
begin{subfigure}[c]{0.5textwidth}
centering
includegraphics[width=.6linewidth,cfbox=red 1pt 1pt]{c}
caption{c}
label{fig:c}
end{subfigure}
begin{subfigure}[d]{0.5textwidth}
centering
includegraphics[width=.7linewidth,cfbox=green 1pt 1pt]{d}
caption{d}
label{d}
end{subfigure}
begin{subfigure}[e]{0.5textwidth}
centering
includegraphics[width=.7linewidth,cfbox=red 1pt 1pt]{e}
caption{e}
label{fig:e}
end{subfigure}
caption{blabla}
end{minipage}
end{figure}
end{document}
Probably the following example code can help get you started. Just replace the filename
placholder with the actual file names, remove [demo]
from the graphicx
package, compile and see if it suits your needs:
documentclass[12pt]{scrreport}
usepackage[demo]{graphicx} % remove the demo option in your actual document!
usepackage{subcaption}
begin{document}
begin{figure}
centering
begin{subfigure}{1textwidth}
centering
includegraphics[width=linewidth]{filename}
caption{}
label{fig:a}
end{subfigure}
begin{subfigure}[b]{.45textwidth}
centering
includegraphics[width=linewidth]{filename}
caption{}
label{b}
end{subfigure}
hfill
begin{subfigure}[b]{0.45textwidth}
centering
includegraphics[width=linewidth]{filename}
caption{}
label{fig:c}
end{subfigure}
begin{subfigure}[b]{.45textwidth}
centering
includegraphics[width=linewidth]{filename}
caption{}
label{d}
end{subfigure}
hfill
begin{subfigure}[b]{0.45textwidth}
centering
includegraphics[width=linewidth]{filename}
caption{}
label{fig:e}
end{subfigure}
caption{blabla}
label{figurelabel}
end{figure}
end{document}
Correct answer by leandriis on April 27, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP