切换到较新的 tikz 后,“/tikz/mark”需要一个值

切换到较新的 tikz 后,“/tikz/mark”需要一个值

我正在新电脑上重新编译一篇旧论文(已被接受已久)。突然,我收到 tikz 错误。也许新版本出了问题?

有任何想法吗?

Package pgfkeys Error: The key "'/tikz/mark'" requires a value. I am going to ignore this key.

我已经发布了代码,但实际上,它在我的旧 tikz 中起作用,所以我认为我只需要在序言中添加一些内容。

% Define block styles
\tikzset{variable/.default=} 
\tikzstyle{decision} = [diamond, draw, %fill=blue!20, 
    text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, %fill=blue!20, 
    text width=5em, text centered, rounded corners, minimum height=4em]
    \tikzstyle{mark} = [circle, draw, %fill=blue!20, 
    text width=2em, text centered, rounded corners, minimum height=1em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,%fill=red!20, 
node distance=3cm,
    minimum height=2em]
\begin{tikzpicture}[scale=0.5,node distance = 2cm, auto]
    % Place nodes
           \footnotesize
    \node [cloud] (init) {Generate random $s$};
    \node [mark, below of = init, node distance= 1cm] (A) {A};
    \node [block, below of=A, node distance= 1.4cm] (ls1) {Local Search \nbh{Swap}};
        \node [block, below of=ls1, node distance= 2cm] (ls2) {Local Search \nbh{Change1}};
    \node [block, below of=ls2, node distance= 2cm] (ls3) {Local Search \nbh{Change2}};
    \node [decision, below of=ls3, node distance= 2cm] (decide) {$s$ $ < $ \\$s$ at A?};
%     rigth column
    \node [decision, right of=ls3,node distance= 3.2cm] (decide2) {100 000 moves or \\1 000 w/o improv?};
    \node [cloud, right of=init, node distance= 3.5cm] (exit) {Exit};
    \node [block, right of=ls1, node distance= 3.2cm] (rand) {Change $r$\% of notes randomly};
%     left column
    \node [block, left of=rand, node distance= 6.5cm] (update) {Update $s_\text{best}$};
    \node [decision, left of=ls3, node distance= 3.3cm] (decide3) {Optimum found?};
    \node [cloud, left of=decide, node distance= 3.3cm] (exit2) {Exit};
%     % Draw edges
     \path [line] (init) -- (A);
     \path [line] (A) -- (ls1);
     \path [line] (ls1) -- (ls2);
     \path [line] (ls2) -- (ls3);
     \path [line] (ls3) -- (decide);
     \path [line] (decide.west) -| node [yshift=-0.3cm, xshift=0.4cm]{yes} ([xshift=-2.2cm] A.west) |- ([yshift=+0cm, xshift=-0cm] A.west);
     \path [line] (decide3) -- node {yes} (exit2);
      \path [line] (update) -- (decide3);
      \path [line] (decide2) -- node [yshift=-0.5cm] {no} (rand);
      \path [line] (decide2) -| node [yshift=0.6cm]{yes} ([xshift=2.4cm] exit.east) |- (exit.east);
            \path [line] (decide.east) -| node[yshift=-0.27cm, xshift=-1.6cm] {no} (decide2.south);% |- (decide2.south);
            \path [line] (rand.north) |- (A.east);
            \path [line,dashed] (ls3.west) -- (update);
            \path [line,dashed] (ls2.west) -- (update);
            \path [line,dashed] (ls1.west) -- (update);
            \path [line,dashed] (rand.north) |- ([yshift=0.7cm] update.north) -| ([xshift=0cm] update.north);
\end{tikzpicture}

答案1

mark现在是一个关键词,将其更改为Mark,例如,将解决这个问题。

相关内容