TransWikia.com

insert picture at the top of tabular

TeX - LaTeX Asked on March 24, 2021

Insert Picture A at the top Left of the cell, then insert Picture B at the center of the cell (or move it from center by 5pt), I am not good using tikz, please example why you are using specific code in order to understand

documentclass[20pt,twoside]{report}

usepackage{graphicx}


usepackage{tikz}
usepackage{tabularx}


begin{document}
begin{minipage}[t]{0.4linewidth}
Hello
end{minipage}
hfill
begin{minipage}[t]{0.55linewidth}

begin{tabularx}{0.9linewidth}{|X|X|X|}
    hline
includegraphics[width=.2textwidth]{example-image-a}
includegraphics[width=.2textwidth]{example-image-b}
& item 13 & item 21  

hline
end{tabularx}

    
end{minipage}  


end{document}

enter image description here

One Answer

documentclass[twoside]{report}
usepackage{graphicx}
usepackage{tikz}
usetikzlibrary{matrix}
usepackage{tabularx}

begin{document}
begin{minipage}[t]{0.4linewidth}
Hello
end{minipage}
hfill
begin{minipage}[t]{0.55linewidth}

begin{tabularx}{0.9linewidth}{|l|X|X|}
    hline%
tikz[baseline=(Cats-1-1.base)]{
matrix[matrix of nodes, nodes={inner sep=0pt},ampersand replacement=&] (Cats){
includegraphics[width=.15textwidth]{example-image-a} & 
                                                       & includegraphics[width=.07textwidth]{example-image-b} };}
& item 13 & item 21  

hline
end{tabularx}
  
end{minipage}  


end{document}

enter image description here

Answered by vi pa on March 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP