Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an option key for images alignment in tables #3

Open
Basmah1961 opened this issue Jul 5, 2024 · 1 comment
Open

Adding an option key for images alignment in tables #3

Basmah1961 opened this issue Jul 5, 2024 · 1 comment

Comments

@Basmah1961
Copy link

image

I think it is also good to add a key so align text baseline to the middle of the image

\documentclass[11pt, a4paper]{article}

\usepackage{adjustbox}

\usepackage{nicematrix}

\begin{document}

\noindent%
\begin{NiceTabularX}{\linewidth}[rules/color=[gray]{0.75}, hvlines, cell-space-limits=0pt]{@{}l X[l, t] X[l, t]@{}}
	
	\RowStyle[bold]{}
	Header 1
	& Header 2   
	& Header 3
	\\
	
	Description
	& The quick brown fox jumps over the lazy dog 
	& The quick brown fox jumps over the lazy dog 
	\\
	
	\smash{{\rlap{\raisebox{0pt}{\rule{\dimexpr \textwidth \relax}{0.1pt}}}}}%
	\Block[t]{1-1}{Text 1 \\ Text 2 \\ Text 3 \\ Text 4}
	& \adjincludegraphics[valign=t, width=\linewidth, margin=0pt 0pt 0pt 0pt]{example-image-a} 
	& \adjincludegraphics[valign=t, width=\linewidth, margin=0pt 0pt 0pt 0pt]{example-image-b}
	\\
	
\end{NiceTabularX}

\end{document}
@fpantigny
Copy link
Owner

It's possible by using valign=c instead of valign=t in the instructions \adjincludegraphics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants