## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Help with insert figure into tabular Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
ciema7
Posts: 10
Joined: Sat Nov 10, 2018 2:31 am

### Help with insert figure into tabular

Hello All, below You can see my code. I would like to create figure in the first 'record' (image in the first row and first column of table (tabularx) presented below. Could You help me ? I've just started my adventure with LATEX so sorry for possible mistakes.
I suppose that this code below does not work because of line & {\includegraphics[width=0.3\textwidth, height=60mm]{images/k.png}}, I have no idea how to replace that line with simple code and solve my problem.
\documentclass{article}\usepackage{listings}\usepackage{inputenc}\usepackage{graphicx}\usepackage{polski}\usepackage{geometry} \usepackage{textcomp} \usepackage{gensymb}\usepackage{parskip}\usepackage{multirow}\usepackage{tabularx}\usepackage{enumitem}\usepackage{booktabs}\usepackage{array}\lstset{language=matlab,numbers=left,basicstyle=\footnotesize} \begin{document} \newgeometry{tmargin=2.5cm, bmargin=2.5cm, lmargin=3.5cm, rmargin=3.5cm}    \begin{tabularx}{14,69 cm}{|c|c|c||}\hline&\multirow{-2}{12cm}{ \center \Large \textbf{Faculty}} \\& \multicolumn{1}{c|}{} \\ \cline{2-2} &  \\& \multicolumn{1}{c|}{\huge \underline {{MES and MEB }}}  \\ &\multirow{3}{12cm}{ \center \large REPORT}  \\  \cline{1-2}  & \\&\multirow{1}{12cm}{ \center \textit {Frame Analysis}}  \\ Temat: & \\\hline& \\Grupa: I 05 & \multicolumn{1}{c|}{\large \textbf  {XX, XXYZ}}  \\\hline&   {\includegraphics[width=0.3\textwidth, height=60mm]{images/k.png}} \end{tabularx}

Johannes_B
Site Moderator
Posts: 3928
Joined: Thu Nov 01, 2012 4:08 pm
Hi and welcome,

the code you presented works fine, if i replace the image with a dummy image and add \end{document}.
Your output looks a bit like a title page. Maybe you are interested in Customize the titlepage and Title Creation.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 9223
Joined: Mon Mar 10, 2008 9:44 pm
Indeed, the code is ok!

It seems that LaTeX just doesn't find the file images/k.png. Do you get an error message? Can you post the .log file here, as attachment? The Attachments link is below the text edit field, when writing a post here.

Look for this image file. Perhaps put it directly in the folder of your document and just write {\includegraphics[width=0.3\textwidth, height=60mm]{k}} in that table cell.

Also note, that for supporting png images you need to run pdfLaTeX, that is, compiling to PDF directly, not LaTeX in DVI mode.

Stefan

ciema7
Posts: 10
Joined: Sat Nov 10, 2018 2:31 am
Thank You very much it really works !
Last edited by ciema7 on Sat Nov 10, 2018 5:52 pm, edited 2 times in total.

Johannes_B
Site Moderator
Posts: 3928
Joined: Thu Nov 01, 2012 4:08 pm
Doesn't AGH provide a ready to use template?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.