TransWikia.com

Extending hline within a colorbox environment

TeX - LaTeX Asked by user236014 on August 14, 2021

I am trying to extend the hlines of the following table such that they span the entire width of the colorbox, but can’t seem to figure out how. The current Latex code looks like this:

documentclass[12pt]{article}
usepackage[utf8]{inputenc}
usepackage{newtxtext}
usepackage{newtxmath}
usepackage{amsmath}
usepackage{graphicx}
usepackage{xcolor}
usepackage{float}
usepackage{multicol}
usepackage{multirow}

renewcommand{baselinestretch}{1.5}
definecolor{sky-blue}{RGB}{223,230,243}
begin{document}
begin{table}[h]
vspace{0.5cm}
setlengthfboxsep{0ex}
centering
colorbox{sky-blue}{
begin{tabular}{p{3.3cm}cp{3cm}}
hline
textbf{Distribution}&textbf{Densityfunction}&textbf{Parameters}hline
[-1.5em]
Normal&$frac{1}{sigmasqrt{2pi}}exp{left(-frac{1}{2}left(frac{x-mu}{sigma}right)^2right)}$&$muinmathbb{R},;sigma>0$
[-1.5em]
hline
[-1.5em]
Logistic&$exp{left(frac{-(x-mu)}{sigma}right)}bigg/left(sigmaleft(1+exp{left(frac{-(x-mu)}{2sigma}right)}right)^2right)$&$muinmathbb{R},;sigma>0$
[-1.5em]
hline
[-1.5em]
Gen.extremevalue&$exp{left(-left(1-cleft(frac{x-mu}{sigma}right)right)^{1/c}right)left(1-cleft(frac{x-mu}{sigma}right)right)^{1/c-1}}$&$muinmathbb{R},;c,sigma>0$
[-1.5em]
hline
end{tabular}
}
end{table}
end{document}

Which gives the following output:

enter image description here

As you can see, the hlines don’t entirely span the colorbox. I have tried adjusting the margins of the colorbox through the fboxsep command, but this does not seem to do the trick. Any ideas?

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