1

Say given a list of items:

Item 1: 
Item 2:
Item 3:
Item 4:

I want this list to be split into two columns with images aligned on each side of them. Much like a centered bar-graph (If there's a way to do that with a package, that would work too).

Image   Item1 Item3   Image
Image   Item2 Item4   Image

How might I go about creating the two columns to align to the center of the column?

  • 2
    Put everything in a table? \begin{tabular}{ll} ... \end{tabular} – Maarten Dhondt Mar 2 '14 at 14:13
  • 1
    The listliketab can do things like that. Take a look at the doc if it suits your needs. Another way of doing things would be to use the floatrow package, and a sideways caption; floatrow allows to customise such captions pretty much; in particular, they can be placed at the top-left side of the figure. – Bernard Mar 2 '14 at 14:23
  • When mixing images and text it generally pays to use \raisebox on the images. – John Kormylo Mar 3 '14 at 0:14
1

There are a number of ways of achieving your desired output, although it may depend heavily on what your list actually looks like, and how you wish to manage this for (say) a long list of items.

Below I've structured the output using tabularx so it fills the entire \linewidth. Images in columns 1 and 4 are vertically aligned to their tops (thanks to adjustbox), ensuring that large content in columns 2 and 3 remain visually in line.

enter image description here

\documentclass{article}

\usepackage[margin=1in]{geometry}
\usepackage[export]{adjustbox}
\usepackage[nopar]{lipsum}
\usepackage{tabularx}

\begin{document}

\noindent
\begin{tabularx}{\linewidth}{ @{}
    l % Left column image
    >{\raggedleft}X % Left column item
    >{\raggedright\arraybackslash}X % Right column item
    r % Right column image
    @{} }
  \includegraphics[width=.2\textwidth,valign=t]{example-image-a} &
  Item 1 &
  Item 3 &
  \includegraphics[width=.2\textwidth,valign=t]{example-image-c} \\
  \includegraphics[width=.2\textwidth,valign=t]{example-image-b} &
  Item 2 &
  Item 4 &
  \includegraphics[width=.2\textwidth,valign=t]{example-image}
\end{tabularx}

\clearpage

\noindent
\begin{tabularx}{\linewidth}{ @{}
    l % Left column image
    >{\raggedleft}X % Left column item
    >{\raggedright\arraybackslash}X % Right column item
    r % Right column image
    @{} }
  \includegraphics[width=.1\textwidth,valign=t]{example-image-a} &
  \lipsum[1] &
  \lipsum[3] &
  \includegraphics[width=.1\textwidth,valign=t]{example-image-c} \\
  \includegraphics[width=.1\textwidth,valign=t]{example-image-b} &
  \lipsum[2] &
  \lipsum[4] &
  \includegraphics[width=.1\textwidth,valign=t]{example-image}
\end{tabularx}

\end{document}

This list-like structure is maintained manually and doesn't break aross the page boundary.

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.