3

I am trying to create a user manual in latex. I'm trying to use a 2 column table, one column has a list and the other column has a screenshot

This is what I'm trying to do enter image description here

I can create a minpage, but it's not aligned correctly and i can't get the borders

\begin{minipage}[c]{0.45\textwidth}
    \begin{enumerate}
       \item    Open File Explorer 
       \item    Type sudo apt-get install
    \end{enumerate}
 \end{minipage}
 \hfill
 \begin{minipage}[t]{0.45\textwidth}
      \includegraphics[width=\textwidth]{example-image}
      \caption{caption within minipage}
 \end{minipage}

enter image description here

1 Answers1

1

Welcome to TeX.SE! There are almost countless options. However, as the thing you seem to aim at looks like a tabular, why not using a tabular for that. (The \raisebox trick is borrowed from here.)

\documentclass{article}
\usepackage{graphicx,array,caption}
\begin{document}
\begin{tabular}{|m{0.45\textwidth}|m{0.45\textwidth}|}
\hline
\multicolumn{2}{|c|}{Instructions}
\\
\hline
\begin{enumerate}
 \item    Open File Explorer 
 \item    Type sudo apt-get install
\end{enumerate} &
\raisebox{-0.67\totalheight}{%
\includegraphics[width=0.9\linewidth]{example-image-duck}}
\\
&  
\captionof{figure}{caption without minipage} \\
\hline
\end{tabular}
\end{document}

enter image description here

  • Thanks. It worked. However, when I enter an image the whole table aligns to the center, so that there is a big left margin – Ateet Patel Oct 24 '18 at 13:22