I have the following LaTex code:
% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
\documentclass[14pt, a4paper]{article} % use larger type; default would be 10pt
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\usepackage{listings}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{shapes.multipart}
\oddsidemargin=-15.4mm
\textwidth=190mm
\headheight=-32.4mm
\textheight=277mm
\tolerance=100
\parindent=0pt
\parskip=8pt
\pagestyle{empty}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=blue!50]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=red!50]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=gray!50]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!50]
\tikzstyle{loop} = [rectangle split, rectangle split parts=2,draw, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=gray!50]
\tikzstyle{arrow} = [thick,->,>=stealth]
\begin{document}
{\textbf{Задача 1.}}
\\
Схема алгоритма:
\\
\begin{center}
\begin{tikzpicture}[node distance=2cm]
\node (start) [startstop] {Начало};
\node (input) [io, below of=start] {Ввод n};
\node (ds1) [decision, below of=input, yshift=-0.4cm]{n = 0?};
\node (y-case) [process, right of=ds1, xshift=2cm]{pow = 1};
\node (while) [loop, below of=ds1, yshift=-0.4cm]{
\nodepart{one} While n > 0
\nodepart{two}
\begin{tabular}{cc}
n = n //10 \\
pow = pow +1 \\
\end{tabular}
};
\node (output) [io, below of=while, ]{Вывод pow};
\node (stop) [startstop, below of=output] {Конец программы};
\draw[arrow] (start) -- (input);
\draw[arrow] (input) -- (ds1);
\draw[arrow] (ds1) -- node[anchor=south]{Yes}(y-case);
\draw[arrow] (y-case) |- (while);
\draw[arrow] (ds1) -- node[anchor=east]{No}(while);
\draw[arrow] (while) -- (output);
\draw[arrow] (output) -- (stop);
\end{tikzpicture}
\end{center}
\end{document}
How can I define the behavior of the "NO" arrow to make it go from the left corner of the diamond block (now it goes from the bottom corner)?
article
does not have a 14pt option\draw
command will let the arrow start from the nearest point of the diamond and go in a straight line to the target node.