这是一张用 TikZ 排版围棋棋盘的精美图片。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shadows}
%% -----------------------------------------------------------------------------
\definecolor{wood}{rgb}{0.80,0.65,0.36}
\newcommand{\goban}[2]{
\clip (0.3,0.3) rectangle (#1+0.5,#2+0.5);
\fill [color=wood] (0,0) rectangle (20,20);
\draw [step=1] (1,1) grid (19,19);
\draw [thick] (1,1) -- (1,19) -- (19, 19) -- (19, 1) -- cycle;
\foreach \row in {4, 10, 16} {
\foreach \column in {4, 10, 16} {
\fill (\row,\column) circle (0.07);
}
}
}
\tikzstyle{stone}=[
ball color = #1!70!gray,
circle,
%drop shadow,
minimum size = 0.95cm
]
\newcommand{\wstone}[2]{\node[black,stone=white] at (#1) {#2};}
\newcommand{\bstone}[2]{\node[white,stone=black] at (#1) {#2};}
%% -----------------------------------------------------------------------------
\begin{document}
%
\begin{tikzpicture}
\goban {10} {7}
\bstone {4,4} {}
\wstone {6,3} {1}
\bstone {3,6} {2}
\wstone {4,2} {3}
\bstone {3,3} {4}
\wstone {9,3} {5}
\end{tikzpicture}
%
\end{document}
%% -----------------------------------------------------------------------------
“阴影”被注释掉了。如果我取消注释,阴影就会出现在应该出现的位置,但整个图片也会变暗。为什么会发生这种情况?我该如何避免?
答案1
我建议使用另一个 pdf 查看器检查输出,看看是否也有差异。这可能是阅读器的问题。