我正在尝试建立一个流程图模板:
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb,graphicx}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\pagestyle{empty}
\usepackage{tikz}
\usetikzlibrary{positioning,calc,shapes,arrows,shapes.multipart}
\tikzset{
papDescision/.style = {
diamond,
draw,
text width = 20 mm,
align = center,
text badly centered,
inner sep = 1 pt,
font=\ttfamily\footnotesize,
line width = 1,
minimum width = 30mm,
minimum height = 7mm,
},
papStart/.style = {
rectangle,
draw,
align = center,
text width = 20 mm,
text badly centered,
inner sep = 4 pt,
rounded corners,
font=\ttfamily\footnotesize,
line width = 1,
minimum width = 30mm,
minimum height = 7mm,
},
papEnd/.style = {
rectangle,
draw,
align = center,
text width = 20 mm,
text badly centered,
inner sep = 4 pt,
rounded corners,
font=\ttfamily\footnotesize,
line width = 1,
minimum width = 30mm,
minimum height = 7mm,
},
papData/.style = {
trapezium,
draw,
align = center,
text width = 20 mm,
text badly centered,
inner sep = 4 pt,
trapezium left angle=70,
trapezium right angle=110,
font=\ttfamily\footnotesize,
line width = 1,
minimum width = 30mm,
minimum height = 7mm,
},
papFunction/.style = {
draw,
rectangle split,
rectangle split horizontal,
rectangle split parts = 3,
align = center,
% text width = 4.5 em,
text badly centered,
inner sep = 4 pt,
font=\ttfamily\footnotesize,
line width = 1,
minimum width = 30mm,
minimum height = 7mm,
},
papInstruction/.style = {
rectangle,
draw,
align = center,
text width = 20 mm,
text badly centered,
inner sep = 4 pt,
font=\ttfamily\footnotesize,
line width = 1,
minimum width = 30mm,
minimum height = 7mm,
},
papLine/.style = {
draw,
-stealth,
font=\ttfamily\footnotesize,
line width = 1,
},
}
\usepackage{pifont}
\newcommand{\papYes}{\ding{51}}
\newcommand{\papNo}{\ding{55}}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[node distance = 12mm, auto]
\node [papStart] (Start1)
{Start};
\node [papDescision, below of = Start1, yshift= -9mm] (Desc1)
{word word word};
\node [papData, below of = Desc1, yshift= -10mm] (Trap1)
{word};
\node [papFunction, below of = Trap1] (Func1)
{\nodepart{two}\shortstack{Predefined\\Process}};
\node [papFunction, right of = Trap1, xshift=25mm] (Func2)
{\nodepart{two}word};
\node [papInstruction, below of = Func2] (Func3)
{word};
\node [papEnd, below of = Func1, yshift= -3mm] (End)
{word};
\coordinate [below of = Func1, yshift= 5mm] (join1);
\path [papLine] (Start1) -- (Desc1);
\path [papLine] (Desc1) -- node [at start] {\papYes} (Trap1);
\path [papLine] (Func3) |- (join1);
\path [papLine] (Func1) -- (End);
\path [papLine] (Desc1) -| node [at start] {\papNo} (Func2);
\path [papLine] (Func2) -- (Func3);
\path [papLine] (Trap1) -- (Func1);
\end{tikzpicture}
\end{figure}
\end{document}!
如何设置papFunction
侧面的最小宽度和较小的条纹?
谢谢并问候 Alex
答案1
您可以设置rectangle split empty part width
为负长度。例如,添加rectangle split empty part width=-8pt
会产生: