1

I have recently started learning latex, and i have the following latex code with two minipages, and two sections in the first section i added two images, then i added an other minipage and a section within it, but i don't know why i am not able to align the second section title with that of the first section, i tried with hspace with no success:

\documentclass[a4paper,11pt]{article}
\usepackage[spanish]{babel}
\usepackage[pdftex]{graphicx}
\usepackage{wrapfig}
\usepackage{placeins}
\begin{document}
\title{Imagenes, Tablas y Ecuaciones}
\date{}
\maketitle
\section{Imagenes}
\begin{minipage}[t]{4.8in}
\subsection{Super mario}
\begin{wrapfigure}{}{0.3\textwidth}
 \includegraphics[width=0\linewidth,height=5cm]{mario.png} 
 \caption {Super mario} 
\label{mario}
\end{wrapfigure}
 \flushright \vspace{-0.7in} \hspace{2cm} \subsection{Tux}
\begin{wrapfigure}{H}{9in}
 \vspace{-7.5cm} \hspace{10cm} \includegraphics[width=3cm,height=4cm]{tux.png} 
 \hspace{4cm} \caption {Tux} 
\label{mario}
\end{wrapfigure}
\end{minipage}

\begin{minipage}[t]{8in}
\vspace{2cm}   \section{Tabla}
\end{minipage}

\end{document}

and here is the result i am getting now: enter image description here

is there anyway to align 1.Imagenes with 2.Tabla without affecting the images placement ?

  • Did you try beginning the first minipage before section 1. Imagenes? – Bernard Jun 5 '16 at 15:00
  • Don't use \flushright; the correct command is \raggedleft – egreg Jun 5 '16 at 16:24
1

Put the first \begin{minipage} just before \section{Imagenes}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.