包 pgf 错误:没有已知名为 A 的形状

包 pgf 错误:没有已知名为 A 的形状

我正在尝试绘制一个双色图,但我的代码无法编译。有趣的是,在我使用 babel 包更改文档语言之前,我没有遇到任何问题。

这是我的代码:

   \begin{tikzpicture}
      \graph[circular placement, radius=2cm,
             empty nodes, nodes={circle,draw}, edges={dashed}] {
        \foreach \x in {A,...,F} {
          \foreach \y in {\x,...,F} {
            \x -- \y;
          };
        };
      };
      \foreach \x [count=\idx from 0] in {A,...,F} {
        \pgfmathparse{90 + \idx * (360 / 6)}
        \node at (\pgfmathresult:2.5cm) {\x};
      };
      \draw (A) edge[red, thick] node[black] {} (D);
      \draw (A) edge[red, thick] node[black] {} (C);
      \draw (A) edge[red, thick] node[black] {} (E);
      \draw (A) edge[blue, thick] node[black] {} (B);
      \draw (A) edge[blue, thick] node[black] {} (F);
    \end{tikzpicture}

我很感激任何帮助!

编辑:包含所用包的完整代码:

    \usepackage{amsmath,amsfonts,amssymb,amsthm, lmodern}
    \usepackage[margin=1.4in]{geometry}
    \usepackage{bbold}
    \usepackage{soul}
    \usepackage{tikz}
    \usepackage{setspace}
    \usepackage{amsfonts}
    \usepackage{graphicx}
    \usepackage{subcaption}
    \usepackage{xcolor}
    \usetikzlibrary{graphs,graphs.standard}
    \usetikzlibrary{positioning}
    \usepackage{epigraph}
    \usepackage{caption} 
    \usepackage{hyperref}
    \usepackage{blkarray}
    \usepackage[czech]{babel}
    \usepackage[utf8]{inputenc}
    
    \begin{document}
\begin{figure}[h!]
\centering
       \begin{tikzpicture}
          \graph[circular placement, radius=2cm,
                 empty nodes, nodes={circle,draw}, edges={dashed}] {
            \foreach \x in {A,...,F} {
              \foreach \y in {\x,...,F} {
                \x -- \y;
              };
            };
          };
          \foreach \x [count=\idx from 0] in {A,...,F} {
            \pgfmathparse{90 + \idx * (360 / 6)}
            \node at (\pgfmathresult:2.5cm) {\x};
          };
          \draw (A) edge[red, thick] node[black] {} (D);
          \draw (A) edge[red, thick] node[black] {} (C);
          \draw (A) edge[red, thick] node[black] {} (E);
          \draw (A) edge[blue, thick] node[black] {} (B);
          \draw (A) edge[blue, thick] node[black] {} (F);
        \end{tikzpicture}
\end{figure}
    \end{document}

相关内容