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

Jurg
  • 567
  • 1
  • 7
  • 18

1 Answers1

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.

Smylic
  • 834
  • 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 00:53