In the MWE below, how can I get to adjust the position of the node labels? Note that the nodes are defined by
dot/.style={circle,inner sep=1pt,fill,label={#1},name=#1}
but I cannot figure out how to keep the same setting will being able to adjust the positioning of the label. For example, something like dot=M,left
or dot=M,right
. The original source of the code is gotten from https://tex.stackexchange.com/a/21759/10898
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\tikzset{
right angle quadrant/.code={
\pgfmathsetmacro\quadranta{{1,1,-1,-1}[#1-1]} % Arrays for selecting quadrant
\pgfmathsetmacro\quadrantb{{1,-1,-1,1}[#1-1]}},
right angle quadrant=1, % Make sure it is set, even if not called explicitly
right angle length/.code={\def\rightanglelength{#1}}, % Length of symbol
right angle length=2ex, % Make sure it is set...
right angle symbol/.style n args={3}{
insert path={
let \p0 = ($(#1)!(#3)!(#2)$) in % Intersection
let \p1 = ($(\p0)!\quadranta*\rightanglelength!(#3)$), % Point on base line
\p2 = ($(\p0)!\quadrantb*\rightanglelength!(#2)$) in % Point on perpendicular line
let \p3 = ($(\p1)+(\p2)-(\p0)$) in % Corner point of symbol
(\p1) -- (\p3) -- (\p2)
}
}
}
\begin{document}
\begin{tikzpicture}[dot/.style={circle,inner sep=1pt,fill,label={#1},name=#1},
extended line/.style={shorten >=-#1,shorten <=-#1},
extended line/.default=1cm]
\node [dot=L] at (1,0) {};
\node [dot=M] at (4,0) {};
\node [dot=N] at (4,5) {};
\draw [extended line=0.5cm] (L) -- (M) node [below,midway] {3};
\draw [extended line=0.5cm] (L) -- (N) node [above left,midway] {6};
\draw [extended line=0.5cm] ($(L)!(N)!(M)$) -- (N) node [right,midway] {$x$};
\draw [red,right angle symbol={M}{N}{L}];
\end{tikzpicture}
\end{document}
Note, what am looking for is to move the N
to the right, L
to lower left and M
to lower right.