LaTeX forum ⇒ Page Layout ⇒ subfigures alignment horizontally Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Posts: 19
Joined: Sun Nov 20, 2016 8:12 pm

subfigures alignment horizontally

Hi,
I want to align many subfigures horizontally in pairs. It worked with me using the below code only in once, and images appear vertically if I use the same code again in consecutive pages.

\documentclass[a4paper,12pt]{report}  \begin{document}       \begin{figure}[h]	\begin{subfigure}[b]{0.5\linewidth}		\centering		\includegraphics[width=\textwidth]{pic1}	\end{subfigure}\hfill 	\begin{subfigure}[b]{0.5\linewidth}		\centering		\includegraphics[width=\textwidth]{pic2}	\end{subfigure}	\caption{}	\label{}\end{figure}\end{document}

I have been trying for a long time to fix subfigures positions!. Any suggestion to solve this?

Regards

Tags:

Johannes_B
Site Moderator
Posts: 3804
Joined: Thu Nov 01, 2012 4:08 pm
A blank line will always lead to vertical content, as it is a paragraph break. Remove the blan ine or put a % at the very beginning.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.