
Estoy usando rmarkdown para producir este tipo de informe. Utilicé framebox para mostrar que los tamaños de las imágenes no son los mismos. Estoy intentando alinear 11 imágenes (6 imágenes por fila, 2 filas), con diferentes tamaños, agregar un título en la parte superior y un párrafo debajo de cada imagen. El título es una mezcla de 1 y 2 líneas.Imágenes
\setmainfont{Roboto}
\newfontfamily\Ofont{Oswald}
\newfontfamily\ORfont{Oswald Regular}
\newfontfamily\RMfont{Roboto Medium}
\newfontfamily\RLfont{Roboto Light}
\renewcommand{\baselinestretch}{1}
\setlength{\columnsep}{0.2cm}
\begin{multicols}{6}
\begin{center}
\textbf{\ORfont{\fontsize{11}{48} \selectfont \\Agriculture}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Agriculture}}\\
\vspace{10mm}\textbf{\ORfont{\fontsize{11}{48} \selectfont \\Transport}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Transport}}\\
\vspace{10mm}\columnbreak
\textbf{\ORfont{\fontsize{11}{48} \selectfont \\Education}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Education}}\\
\vspace{10mm}\textbf{\ORfont{\fontsize{11}{48} \selectfont Water, Sanitation \&\\Urban Services}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Water, Sanitation & Urban Services}}\\
\vspace{10mm}\columnbreak
\textbf{\ORfont{\fontsize{11}{48} \selectfont \\Energy}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Energy}}\\
\vspace{10mm}\textbf{\ORfont{\fontsize{11}{48} \selectfont Industry \&\\Mining}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Industry & Mining}}\\
\vspace{10mm}\columnbreak
\textbf{\ORfont{\fontsize{11}{48} \selectfont \\Finance}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Finance}}\\
\vspace{10mm}\textbf{\ORfont{\fontsize{11}{48} \selectfont \\Real Estate}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Real Estate}}\\
\vspace{10mm}\columnbreak
\textbf{\ORfont{\fontsize{11}{48} \selectfont \\Health}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Health}}\\
\vspace{10mm}\textbf{\ORfont{\fontsize{11}{48} \selectfont \\Others}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Others}}\\
\vspace{10mm}\columnbreak
\textbf{\ORfont{\fontsize{11}{48} \selectfont Information \&\\Communications}}\\
\vspace{1cm}\framebox{\includegraphics[height=0.25\textheight]{Information & Communications}}\\
\vspace{10mm}\columnbreak
\end{center}
\end{multicols}
Respuesta1
La forma más sencilla de alinear todas las imágenes es probablemente colocarlas en una tabla, por ejemplo utilizando el tabular
entorno. Hice un pequeño ejemplo aquí, con imágenes en blanco. Para tener el texto centrado tanto vertical como horizontalmente en cada celda, definí un nuevo tipo de columna C
basado en el m
tipo de columna del array
paquete. También tenga en cuenta que probablemente no necesite utilizar ninguno framebox
incluso si los tamaños de las imágenes son diferentes, ya que puede especificar el tamaño directamente en el argumento opcional de includegraphics
.
\documentclass[11pt]{article}
\usepackage{array}
\usepackage[demo]{graphicx}
\usepackage[margin=2cm]{geometry}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\newlength{\colwidth}
\setlength{\colwidth}{2.8cm}
\begin{document}
\begin{table}
\centering
\begin{tabular}{C{\colwidth}C{\colwidth}C{\colwidth}C{\colwidth}C{\colwidth}C{\colwidth}}
Agriculture & Finance & Information \& communications & Title 4 & Title 5 & Title 6 \\
\includegraphics[width=0.8\linewidth]{a} &
\includegraphics[width=0.8\linewidth]{b} &
\includegraphics[width=0.8\linewidth]{c} &
\includegraphics[width=0.8\linewidth]{d} &
\includegraphics[width=0.8\linewidth]{e} &
\includegraphics[width=0.8\linewidth]{f} \\
11 projects &
11 projects &
11 projects &
11 projects &
11 projects &
11 projects \\
\$US 11.0m &
\$US 11.0m &
\$US 11.0m &
\$US 11.0m &
\$US 11.0m &
\$US 11.0m \\[4mm]
Ttile 7 & Title 8 & Title 9 & Title 10 & Title 11 & Title 12 \\
\includegraphics[width=0.8\linewidth]{g} &
\includegraphics[width=0.8\linewidth]{h} &
\includegraphics[width=0.8\linewidth]{i} &
\includegraphics[width=0.8\linewidth]{j} &
\includegraphics[width=0.8\linewidth]{k} &
\includegraphics[width=0.8\linewidth]{l} \\
11 projects &
11 projects &
11 projects &
11 projects &
11 projects &
11 projects \\
\$US 11.0m &
\$US 11.0m &
\$US 11.0m &
\$US 11.0m &
\$US 11.0m &
\$US 11.0m \\
\end{tabular}
\end{table}
\end{document}