如何解决“编译时难以理解 \tikz@texfont -> amsfonts”?

如何解决“编译时难以理解 \tikz@texfont -> amsfonts”?

我的流程图一直存在以下问题:

我想是因为我正在使用一种字体:amsfonts

\begin{scope}[start chain=going below,
nodes={on chain,draw,minimum height=1.7em,inner xsep=1ex,
    equal size,rounded corners,join,font=\amsfonts},

但是,我希望流程图的字体与文本的字体相同。我不确定这里的字体大小是多少。我假设是amsfonts

在此处输入图片描述

在此处输入图片描述

\documentclass[12pt,oneside]{book}

\usepackage{amsmath}
\usepackage{enumitem, url}
\usepackage{eqparbox}
\newbox\eqnodebox

\usepackage{tikz}
\tikzset{equal size/.style={execute at begin
    node={\setbox\eqnodebox=\hbox\bgroup},
    execute at end node={\egroup\eqmakebox[#1][c]{\copy\eqnodebox}}},
    equal size/.default=A}

\usetikzlibrary{arrows.meta,
                chains,
                positioning}
\usepackage{makecell, multirow, tabularx} %for table multirow


\begin{document}


\begin{figure}[h!]
\centering
\begin{tikzpicture}[node distance=0.5cm]
\begin{scope}[start chain=going below,
    nodes={on chain,draw,minimum height=1.7em,inner xsep=1ex,
        equal size,rounded corners,join,font=\amsfonts},
    every join/.style={-{Triangle[length=2mm,width=4mm]},line width=1.5mm,
        gray!50,shorten >=1mm,shorten <=1mm}]
 \node{Sample 1}; 
 \node{Sample 1}; 
  \node{Sample 1}; 
   \node{Sample 1}; 
    \node{Sample 1}; 
\end{scope}
\end{tikzpicture}
\caption{Testing Sample 1 Sample 1.}
\label{fig:flowchart}
\end{figure}

\end{document}

相关内容