TeX - LaTeX Asked by BennyS on January 20, 2021
I want to create a simple n x 1 table with a thick colored border on the left side.
documentclass{article}
usepackage{amsmath}
usepackage{tabularx}
usepackage{array,booktabs,arydshln,xcolor,colortbl}
newcommandVRule[1][arrayrulewidth]{vrule width #1}
begin{document}
LARGE
begin{tabular}{!{color{blue!70}VRule[4pt]}m{4cm}}
{ABC}
{DEF}
{GHI}
{JKL}
{MNO}
{PQRS}
end{tabular}
end{document}
Result1:
Result2 (using NiceMatrix):
Since I am using latex because I like the correct and clean look, some minor things dont please me.
I already did some research but none of the solutions in the internet solved my problem. Using NiceTabular gets rid of problem #1, but the spacing problem still remains.
Two examples: left a wee bit modified your code, right with use of the nicematrix
:
documentclass{article}
usepackage{array}
usepackage[table]{xcolor}
usepackage{nicematrix}
begin{document}
LARGE
arrayrulecolor{blue!70}
setlength{arrayrulewidth}{4pt}
begin{tabular}{| l<{vphantom{Q}}}
ABC
DEF
GHI
JKL
MNO
PQRS
end{tabular}
quad
begin{NiceTabular}{|l<{vphantom{Q}}}
ABC
DEF
GHI
JKL
MNO
PQRS
end{NiceTabular}
end{document}
Why the blue line is at NiceTabular
longer, we should ask author of package: @F. Pantigny ...
Answered by Zarko on January 20, 2021
Depending on the intended se case, a simple tabular
inside of a tcolorbox
could be an alternative apporach:
documentclass{article}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}{
enhanced,
hbox,
boxrule=0pt,
frame hidden,
borderline west={4pt}{0pt}{blue!70},
colback=white,
sharp corners,
boxsep=0pt
}
begin{document}
begin{mybox}
begin{tabular}{@{}l}
ABC
DEF
GHI
JKL
MNO
PQRS
end{tabular}
end{mybox}
end{document}
Answered by leandriis on January 20, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP