TransWikia.com

How to get rid of erroneous extra grid lines?

TeX - LaTeX Asked by user224528 on July 2, 2021

The below code is giving me an error:

How do I get rid of these bad extra lines? See image at the bottom.

begin{document}

begin{table}

begin{tabularx}{linewidth}{|r|r|r|r|r|}

hline

multicolumn{1}{|>{columncolor[gray]{.9}}c|}{$x$} &
multicolumn{1}{ >{columncolor[gray]{.9}}c|}{textbf{Actual}} &
multicolumn{1}{ >{columncolor[gray]{.9}}c|}{textbf{Approx.}} &
multicolumn{1}{ >{columncolor[gray]{.9}}c|}{textbf{% diff}} &
multicolumn{1}{ >{columncolor[gray]{.9}}c|}{textbf{% grow}} 



hline

2 & 1.0000 & 0.5576 & -44.2% & 0.0%  hline
3 & 2.0000 & 1.4943 & -25.3% & 168.0%  hline

end{tabularx}

end{table}

end{document}

Here’s the output:
enter image description here

Another error:
enter image description here

One Answer

error due to tabularx which requires a X type column

convert tabularx to tabular

delete linewidth command

misscellaneous --use rowcolor instead of columncolor

Correct answer by js bibra on July 2, 2021

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