以下のコードではエラーが発生します:
これらの不要な余分な線を取り除くにはどうすればよいでしょうか? 下部の画像を参照してください。
\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
X 型の列を必要とする tabularx によるエラー
tabularx を tabular に変換する
線幅削除コマンド
その他 --列色の代わりに行色を使用する