I am trying to create a long-table which contains images in two columns and number in third. This is the code I used:

    & \includegraphics[width=0.12\textwidth]{WM.png} & $1.0$ \\ \hline 

I'm uploading the output for one row. I want to set the chess board image in the middle of the cell and the number 1.0 in the middle of the cell too. In picture, the red boxes are the locations where I want the image and text to be. Which commands should I use to adjust elements in the table?enter image description here

  • Try \raisebox{-0.5\height}{\includegraphics{...}}.
    – Bernard
    Feb 22 '20 at 23:55

With use of \adjustimage from the adjustbox package this is simple:


\adjustboxset{width=\linewidth,valign=c, margin=0pt 3pt 0pt 3pt}
    & \adjustimage{}{example-image-duck} & $1.0$   \\ 

enter image description here

  • Thank you. This is working perfectly. Feb 23 '20 at 15:36
  • @Wave_Rider03, you cam accept answer (by clicking check mark at top left side of answer). With this you give recognition to people, who help you and move your question to group of solved questions.
    – Zarko
    Feb 23 '20 at 17:33

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.