![如何消除錯誤的額外網格線?](https://rvso.com/image/420760/%E5%A6%82%E4%BD%95%E6%B6%88%E9%99%A4%E9%8C%AF%E8%AA%A4%E7%9A%84%E9%A1%8D%E5%A4%96%E7%B6%B2%E6%A0%BC%E7%B7%9A%EF%BC%9F.png)
下面的程式碼給我一個錯誤:
我該如何擺脫這些不好的額外線條?請參閱底部的圖片。
\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}
答案1
由於 tabularx 需要 X 類型列而導致的錯誤
將 tabularx 轉換為表格
刪除線寬指令
misscellaneous --使用行顏色而不是列顏色