0

I have a requirement to arrge the images on the top part of a LaTex document as follows. enter image description here

But when I type the following code, although I believe I should get whats shown ablove, what I get is as follows

enter image description here

I am extemely interested in knowing the error in my logic. I am new to LaTex therefore, I would highly appreciate if I could know the error I have made in my code. my code is pasted below.

\documentclass{article}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[export]{adjustbox}
\usepackage{subcaption}
\graphicspath{ {images/} }


\begin{document}
 \begin{flushleft}
 \begin{figure}[t!]
 \includegraphics [width =0.45\linewidth]{image2}
 \end{figure}
 \end{flushleft}
 \begin{flushright}
 \begin{figure}[t!]
 \includegraphics [width =0.45\linewidth]{image1}
 \includegraphics [width =0.45\linewidth]{image3}
 \end{figure}
\end{flushright}
 %\includegraphics [ width =0.45\linewidth ]{image1}
\end{document}

If you may need the images, you can download them from here.

Denis
  • 125
  • 1
  • 1
    Regarding your code: You have two text blocks below each other. In the first one, text is typeset flush left (= ragged right); however, there is no text, so this formatting has no effect. In the second one, text is typeset flush right (= ragged left); however, there is no text, so this formatting has no effect. Additionally, both blocks contain figures which appear at the indicated positions below each other. The flushleft and flushright formatting has no effect on the figures, since they are independent floating objects. – gernot Sep 04 '16 at 11:44
  • In the second figure, the images appear side by side, since they are within the same figure environment and \textwidth is wide enough for both of them. – gernot Sep 04 '16 at 11:49
  • @gernot Thank you for answering my question and telling my mistake. It is of most importance to me. – Denis Sep 04 '16 at 12:29

1 Answers1

2

The simplest is to put the images in a tabular, the big image in a \multirow, scaled so that its height has the height of the right column, and smashed. Part of the work has to be by trial and errors. Here is an example with three of my images:

\documentclass{article}
\usepackage[showframe]{geometry}%
\usepackage{graphicx}
\usepackage{multirow}
\usepackage[export]{adjustbox}
\usepackage{subcaption}
\graphicspath{ {images/} }

\begin{document}

\begin{figure}[t!]
  \centering
  \begin{tabular}{cc}
      & \includegraphics [width=0.3\linewidth]{dejeuner1} \\[2ex]
    \multirow{-2}{*}[-1.35ex]{\smash{\includegraphics [scale=0.31]{traccia-table}}}
      & \includegraphics [width=0.3\linewidth]{magouvernante}
  \end{tabular}
\end{figure}

\end{document} 

enter image description here

Bernard
  • 271,350
  • I tried. but your code does not compile. Are you sure this compiles? – Denis Sep 04 '16 at 12:41
  • 1
    @Qwertylicious Works fine here, but I had to use different images of course, since I don't have the three images used by Bernard. – Torbjørn T. Sep 04 '16 at 12:45
  • 1
    @Qwertylicious: I'm quite sure, but you have to use images you have (I could post them here, but I think it's irrelevant. However, if you have a link to post them, I'll do it if you wish). Of course with other images, the numerical values will change, but you can begin with this code (changing the names of the graphic files) as a starting point, then adjust the numerical values for spacing, scaling, &c. – Bernard Sep 04 '16 at 13:08
  • So do you experts suggest this is the best method to insert images to LaTex Documents? – Denis Sep 04 '16 at 13:14
  • And thank you for your time. i'm going to try harder to compile this code. and will update my success here. – Denis Sep 04 '16 at 13:14
  • I don't know if it's the best method for inserting images of different sizes. You also can take a look at the floatrow packag. Its documentation has some examples of special layouts. – Bernard Sep 04 '16 at 13:18
  • 1
    @Torbjørn: The images are surrealist objects by Swiss painter Meret Oppenheim, easy to find on the web. – Bernard Sep 04 '16 at 13:21
  • 1
    Perhaps, but I couldn't be bothered, so I used example-image, example-image-a and example-image-b. When the mwe package is installed, they're always available. – Torbjørn T. Sep 04 '16 at 13:25