\documentclass{article}
\usepackage{CJKutf8}
\usepackage{tikz}
\usepackage{mathpazo}
\usetikzlibrary{shapes.geometric,arrows}
\thispagestyle{empty}
\begin{document}
\begin{CJK}{UTF8}{gbsn}
\tikzstyle{startstop}=[rectangle,rounded corners,minimum width=3cm,minimum height=1cm,text centered,draw=black,fill=red!30]
\tikzstyle{io}=[trapezium,trapezium left angle=70,trapezium right angle=110,minimum width=3cm,minimum height=1cm,text centered,draw=black,fill=blue!30]
\tikzstyle{process}=[rectangle,minimum width=3cm,minimum height=1cm,text centered,draw=black,fill=orange!30]
\tikzstyle{decision}=[diamond,minimum width=3cm,minimum height=1cm,text centered,draw=black,fill=green!30]
\tikzstyle{arrow}=[thick,->,>=stealth]
\begin{tikzpicture}[node distance=2cm]
\node(start)[startstop]{开始};
\node(in1)[io,below of=start]{输入};
\node(pro1)[process,below of=in1]{操作1};
\node(dec1)[decision,below of=pro1]{判断?};
\node(pro2a)[process,below of=dec1]{操作2a};
\node(pro2b)[process,right of=dec1,xshift=2cm]{操作2b};
\node(out)[io,below of=pro2a]{输出};
\node(stop)[startstop,below of=out]{结束};
\draw[arrow](start)--(in1);
\draw[arrow](in1)--(pro1);
\draw[arrow](pro1)--(dec1);
\draw[arrow](dec1)--(pro2a);
\draw[arrow](dec1)--(pro2b);
\draw[arrow](dec1)--node[anchor=east]{是}(pro2a);
\draw[arrow](dec1)--node[anchor=north]{否}(pro2b);
\draw[arrow](pro2b)|-(pro1);
\draw[arrow](pro2a)--(out);
\draw[arrow](out)--(stop);
\end{tikzpicture}
\end{CJK}
\end{document}
用时一小时零8分。超级慢。
好处:
- 加强了对关键词记忆
- mathpazo
- shapes.geometric
- tikzpagestyle
- minimum
- trapezium
- trapezium left angle=70
- trapezium right angle=110
- rounded corners
- text centered
- diamond
- decision
- node()[]{}
- tikzstyle
\tikzstyle{arrow}=[thick,->,>=stealth]
xshift
- (dec1)- -node[]{}(pro2a)
- anchor=north
- 学习了一种配色
- 开始结束 red!30
- 输入输出 blue!30
- 操作 orange!30
- 判断 green!30
通过写上面的要点,我相信,明天写一遍这个流程图会提高一些效率。
掌握一个工具需要一个过程,只是不知道需要多久。
总结要点用时13分钟。