LaTeX forum ⇒ Graphics, Figures & TablesLatex: Image on the left and table on the right

Information and discussion about graphics, figures & tables in LaTeX documents.
allawi
Posts: 3
Joined: Mon Feb 04, 2019 6:36 pm

Latex: Image on the left and table on the right

Postby allawi » Mon Feb 04, 2019 6:44 pm

Hi there,

I'm looking to create a table that has an image on the left showing the component. I have an example in the image attach, I'm trying to replicate this.

This is how i want it to look like.
test.png
test.png (50.45 KiB) Viewed 2606 times

User avatar
Johannes_B
Site Moderator
Posts: 4185
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Feb 04, 2019 7:42 pm

Welcome to the forum.
\documentclass{article}

\usepackage{adjustbox}
\begin{document}

\begin{table}
	\adjustimage{width=3cm,valign=c}{example-image}\quad%
	\begin{tabular}{ll}
		Model & blurred \\
		$V_\mathrm{in}$ & blurred \\
		$V_\mathrm{out}$ & blurred \\
		$I_{\max}$ & blurred \\
		Features & blurred \\
		Features & blurred \\
		Features & blurred \\
		Features & blurred \\
		Features & blurred \\
		Features & blurred \\
	\end{tabular}
\end{table}

\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

allawi
Posts: 3
Joined: Mon Feb 04, 2019 6:36 pm

Postby allawi » Mon Feb 04, 2019 7:59 pm

Thank you Johannes for your quick replay and welcoming. I have tried your code but it is not aligning a 100% attaching the results.

test.png
test.png (60.44 KiB) Viewed 2603 times


This is the code I have added
\begin{table}
	\adjustimage{width=3cm,valign=c}{Illustrations/QFN-40-Backside}\quad%
	\caption{Table for test} \label{fig:test}
	\begin{tabular}{ll}
		Model & blurred \\
		$V_\mathrm{in}$ & blurred \\
		$V_\mathrm{out}$ & blurred \\
		$I_{\max}$ & blurred \\
	\end{tabular}
\end{table}

User avatar
Johannes_B
Site Moderator
Posts: 4185
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Feb 04, 2019 9:09 pm

Without testing the code, the caption should come first. Please try.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

allawi
Posts: 3
Joined: Mon Feb 04, 2019 6:36 pm

Postby allawi » Tue Feb 05, 2019 1:37 am

Johannes_B wrote:Without testing the code, the caption should come first. Please try.


That worked, thank you. One last question please.

The current alignment of caption is a bit off from the table. Is it possible to make it centered as well?

test.png
test.png (114.9 KiB) Viewed 2580 times

User avatar
Johannes_B
Site Moderator
Posts: 4185
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Feb 05, 2019 7:45 am

Just add \centering after \begin{table}.
\documentclass{article}

\usepackage{adjustbox}
\usepackage{caption}
\usepackage{showframe}
\begin{document}

\begin{table}
	\caption{The following is not about Wombats}
	\centering
	\adjustimage{width=3cm,valign=c}{example-image}\quad%
	\begin{tabular}{ll}
		Model & blurred \\
		$V_\mathrm{in}$ & blurred \\
		$V_\mathrm{out}$ & blurred \\
		$I_{\max}$ & blurred \\
		Features & blurred \\
		Features & blurred \\
		Features & blurred \\
		Features & blurred \\
		Features & blurred \\
		Features & blurred \\
	\end{tabular}
\end{table}

\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 7 guests