0

My flow chart keeps having the problem below:

I think because I am using a font: 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},

However, I want my flow char having the same font as my text. I am not sure what is my font size here. I assume is amsfonts

enter image description here

enter image description here

\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}
egreg
  • 1,121,712
aan
  • 2,663
  • 4
    Drop the key font=\amsfonts. This is not a valid command. The font size will be the one of the ambient text unless you change it, so you do not need to add a key for that, let alone font=\amsfonts. –  May 24 '20 at 09:27
  • @Schrödinger'scat thanks! It works. If I want to use a specific font type, is it possible? Beside font=\sffamily? – aan May 24 '20 at 09:34
  • 3
    Are there font options? I bet there are. Just look e.g. at this post. There are many. \sffamily is not a font but a family, you could also use font=\ttfamily. You can change the font weight with font=\bfseries and you can combine all those. –  May 24 '20 at 09:37

0 Answers0