4

I wonder how I can remove the white space between the diamond node and the link in the following MWE.

\documentclass[10pt]{article}

\usepackage{tikz}
\usetikzlibrary{positioning,shapes,arrows}

\usepackage[a4paper, margin=0.2in, includefoot]{geometry}

\usepackage{fontspec,lipsum}
\defaultfontfeatures{Ligatures=TeX}
\setromanfont{Century Gothic}

\begin{document}

\tikzset{font=\Large,
every node/.style=
    {rectangle,rounded corners,
    draw=black,
    very thick,
    align=center
    }}

\begin{tikzpicture}[node distance = 2cm, auto]
\node (a) {AAAAA};
\node[diamond, below=of a] (R) {BBBBB};
\node[below right=of R](d){CCCCC};
\draw[->][ultra thick](R.east) -| node[above, draw=none,near start,yshift=0.1cm] {No} (d.north);
\draw[->][ultra thick](a.south) -- (R.north);
\end{tikzpicture}

\end{document}
3

The rounded corners modify the what it should have been a sharp corner path but not moving the anchors accordingly. A quick fix is to add shorten < and shorten > keys to nudge the start/end points of the paths

\documentclass[10pt]{article}

\usepackage{tikz}
\usetikzlibrary{positioning,shapes,arrows}

\usepackage[a4paper, margin=0.2in, includefoot]{geometry}

\usepackage{fontspec,lipsum}
\defaultfontfeatures{Ligatures=TeX}
\setromanfont{Century Gothic}

\begin{document}

\tikzset{font=\Large,
every node/.style=
    {rectangle,rounded corners,
    draw=black,
    very thick,
    align=center
    }}

\begin{tikzpicture}[node distance = 2cm, auto]
\node (a) {AAAAA};
\node[diamond, below=of a] (R) {BBBBB};
\node[below right=of R](d){CCCCC};
\draw[->,shorten <=-2pt][ultra thick](R.east) -| node[above, draw=none,near start,yshift=0.1cm] {No} (d.north);
\draw[->,shorten >=-2pt][ultra thick](a.south) -- (R.north);
\end{tikzpicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.