0

In the attachment of my dissertation, I would like to add some pictures. They are all .jpg files.

For my work it would make sense to place two figures next to each other with a little space between them, using up the whole width of the page except for the boarders.

Can anyone tell me how to do this? I know, it's a lot I'm asking for but I've been messing with several methodes and none of them give me the result I want.

Thank you very much for your help in advance.

Jurg

  • does each image need a separate numbered caption? – David Carlisle Oct 14 '13 at 21:33
  • 2
    This answer solves your problem? – Fran Oct 14 '13 at 21:46
  • Could you please add some details? Do you want captions to the images? Are the images' dimensions the same or different? How many of them do you have? – egreg Oct 14 '13 at 23:08
  • @DavidCarlisle: Yes, they do. – Jurg Oct 20 '13 at 16:21
  • @egreg: The dimensions of the pictures are the same. I need to include 24 Pictures. – Jurg Oct 20 '13 at 16:23
1

I used the following macro for the same purpose.

\usepackage{graphicx}
\usepackage{xargs}

\newlength{\tmplength}
\newcommandx{\illustrations}[8][1=0.5, 2=htb]{%
    \setlength{\tmplength}{\textwidth}
    \addtolength{\tmplength}{-#1\textwidth}
    \begin{figure}[#2]
        \tabcolsep = 0pt
        \begin{tabular}{p{#1\textwidth}p{\tmplength}}
            \centering \includegraphics{pictures/#4} & \centering \includegraphics{pictures/#7} \tabularnewline
            \centering \captionof{figure}{\label{#3}#5} & \centering \captionof{figure}{\label{#6}#8}
        \end{tabular}%
    \end{figure}%
}

Usage is the following:

\illustrations
    [<part of page for the first picture>]
    [<position of figure>]
    {<label of the first picture>}
    {<filename of the first picture>}
    {<caption text for the first picture>}
    {<label of the second picture>}
    {<filename of the second picture>}
    {<caption text for the second picture>}

However all my pictures were in the “pictures” subdirectory. If you have another path you may fix it in macro. Also you can add argument(s) for scaling pictures.

  • Thank you very much for your answer. As I am very new to LaTeX, this seems quite difficult. I don't semm to get it to work. Shouldn't there be an easier way? If not, I will have to give it another try. – Jurg Oct 20 '13 at 16:32
  • One more note. If you compile your TeX-file to dvi and use graphicx package, then EPS is the only supported format. If you compile it directly to pdf using pdfLaTeX, then supported formats are jpg, png and pdf. Use \includegraphics and all dependent macro (like mine) carefully. If you have any other problem, provide information about it from log-file. – Smylic Oct 21 '13 at 0:53

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.