Tikz 适应箭头

Tikz 适应箭头

我想以三种方式调整下图中的箭头。

首先,我希望它们都更厚一些。

其次,我希望连接“第二篇论文”和“第三篇论文”的箭头不是填充的,而是内部为白色,带有黑色边框。

第三,我希望所有箭头都与顶部中心的底部矩形相连。

 \documentclass[10pt,a4paper]{article} 
    \usepackage[hmargin=2cm,vmargin=1cm]{geometry}
    \renewcommand{\rmdefault}{bch} % change default font

    \usepackage[english]{babel}
    \usepackage[utf8]{inputenc}
\usepackage{tikz} 
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,positioning,shapes.symbols,chains}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% BEGIN DOCUMENT
\begin{document}

\begin{figure}[h]
\centering
\begin{tikzpicture}
[node distance = 1cm, auto,font=\footnotesize,
% STYLES
every node/.style={node distance=3cm},
% The comment style is used to describe the characteristics of each force
comment/.style={rectangle, inner sep= 5pt, text width=4cm, node distance=0.25cm, font=\scriptsize\sffamily},
% The force style is used to draw the forces' name
force/.style={rectangle, draw, fill=white, inner sep=5pt, text width=4cm, text centered, minimum height=1.2cm}] 

% Draw forces
\node [rectangle, draw , line width=0.5mm , fill=white, inner sep=5pt, text width=8cm, text centered, minimum height=1.2cm, minimum width=11cm] (root) {\small{\textbf{Root}}};

\node [force, below of=root] (second) {\textbf{$2^{nd}$ Essay} };
\node [force, left=1cm of second] (first) {\textbf{$1^{st}$ Essay} };
\node [force, right=1cm of second] (third) {\textbf{$3^{rd}$ Essay}};

\path[->,thick] 
(root) edge (first)
(root) edge (second)
(root) edge (third)
(second) edge (third);

\end{tikzpicture} 
\end{figure}

\end{document}

我希望一次问几个问题并不违反任何规则。提前感谢您的帮助。

安德烈亚斯

答案1

  1. 您可以通过增加来使线条变粗line width
  2. 您可以指定箭头应连接到北锚。
  3. 您可以使用arrows.metapostaction绘制空心箭头。

我还删除了这里没有使用的库。

\documentclass[10pt,a4paper]{article} 
\usepackage[hmargin=2cm,vmargin=1cm]{geometry}
\renewcommand{\rmdefault}{bch} % change default font
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{tikz} 
\usetikzlibrary{arrows.meta,positioning}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% BEGIN DOCUMENT
\begin{document}

\begin{figure}[h]
\centering
\begin{tikzpicture}
[node distance = 1cm, auto,font=\footnotesize,
% STYLES
every node/.style={node distance=3cm},
% The comment style is used to describe the characteristics of each force
comment/.style={rectangle, inner sep= 5pt, text width=4cm, node distance=0.25cm, font=\scriptsize\sffamily},
% The force style is used to draw the forces' name
force/.style={rectangle, draw, fill=white, inner sep=5pt, text width=4cm, text centered, minimum height=1.2cm}] 

% Draw forces
\node [rectangle, draw , line width=0.5mm , fill=white, inner sep=5pt, text width=8cm, text centered, minimum height=1.2cm, minimum width=11cm] (root) {\small{\textbf{Root}}};

\node [force, below=of root] (second) {\textbf{$2^{nd}$ Essay} };
\node [force, left=1cm of second] (first) {\textbf{$1^{st}$ Essay} };
\node [force, right=1cm of second] (third) {\textbf{$3^{rd}$ Essay}};

\path[-{Latex[length=7pt]},line width=1pt] 
(root) edge (first.north)
(root) edge (second.north)
(root) edge (third.north)
(second) edge[line width=1.6pt,-{Latex[length=7pt,fill=white,line width=0.4pt]},
postaction={draw,line width=0.8pt,white,-,shorten >=5pt,shorten <=0.3pt}] (third);
\end{tikzpicture} 
\end{figure}
\end{document}

在此处输入图片描述

相关内容