![如何使用 tkz-tab 包给该代码中的该区域着色?](https://linux22.com/image/337308/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20tkz-tab%20%E5%8C%85%E7%BB%99%E8%AF%A5%E4%BB%A3%E7%A0%81%E4%B8%AD%E7%9A%84%E8%AF%A5%E5%8C%BA%E5%9F%9F%E7%9D%80%E8%89%B2%EF%BC%9F.png)
我怎样才能做到这一点?
\documentclass{article}
\usepackage{tkz-tab}
\begin{document}
\begin{tikzpicture}
\tikzset{h style/.style = {solid,fill=red!50}}
\tikzset{t style/.style = {solid}}
\tkzTabInit[color,espcl=1.5]%
{$x$ / 1,$g(x)$ / 1}%
{$-\infty$,$1$,$2$,$+\infty$}%
\tkzTabLine{,h,d,-,z,+}
\end{tikzpicture}
\end{document}
答案1
像这样
\documentclass{article}
\usepackage{tkz-tab}
\begin{document}
\begin{tikzpicture}
\tikzset{t style/.style = {solid}}
\tkzTabInit[color,espcl=1.5]%
{$x$ / 1,$g(x)$ / 1}%
{$-\infty$,$1$,$2$,$+\infty$}%
\tkzTabLine{,h,d,-,z,+}
\draw[fill=red!50] (T12) rectangle (N21);
\end{tikzpicture}
\end{document}
表格(T12
和N21
)的锚点在手册中提到tkz-tab