# XeLaTeX portrait jpg photo insertion

I'm using XeLaTeX to produce photobooks. Searching for info on placing portrait jpg's on a page with adjacent column text similar to published photo books. Have no Problem with landscape mode with text at bottom. Any pointers gratefully received and will be followed up.

-

## 1 Answer

Minipages

If you position photos and text in varying places, you could put two minipage environments next to each other - one for the picture, the other contains the text. The minipage environment understands some arguments for vertical alignment.

Tables

To typeset several photos and texts within columns, you could consider to use a tabular environment. The tabularx package comes handy if you would like to fit the text width. For example:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{tabularx}
\usepackage{array}
\begin{document}
\noindent\begin{tabularx}{\textwidth}{lX}
\includegraphics{photo1} & First photo \\
\includegraphics{photo2} & Text for second photo
\end{tabularx}
\end{document}


I used the demo option, so we don't need real photos to compile, they are replaced by black filled rectangles.

Tables spanning over pages

If you would like to keep a column formatting across page borders, you could use the longtable package.

Alignment

Note that an picture embedded by \includegraphics has the base line at its bottom. Knowing that is important for the alignment, both with minipage and tabular environments. It might be necessary sometimes to use \raisebox or \raise to make adjustments. For top alignment, sometimes there's a trick used, just inserting \vspace{0pt} right before \includegraphics.

-
Thanks Stephan. The code snippet compiled perfectly. This looks like a really promising approach. Will read up on all the little nuances you have included. Not sure yet if this approach includes variable column width. Have already produced a pdf for a Blurb photobook following an existing template. All photos were landscape and am now trying to introduce more professional design elements. –  alan keates Nov 21 '10 at 13:37
Answered my own question re column width. Includegraphics takes both height and width parameters. Placement of text anywhere adjacent to photo will complete this task. –  alan keates Nov 21 '10 at 14:32