So I have the following tikz code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\coordinate (O) at (0,0);
\path (O) -- ++(4,0) coordinate (B);
\path[name path=l1] (O) -- ++(40:10);
\path[name path=l2] (B) -- ++(120:10);
\draw [name intersections={of=l1 and l2, by=A}]
(O) -- (A) node[midway, above left] {$a$} -- (B) -- cycle node[midway, below] {$b$};
\draw (O) ++(0.5,0) arc [start angle=0, end angle=40, radius=0.5] node[above right, midway] {$\theta$};
\node[left] at (O) {$O$};
\node[above] at (A) {$A$};
\node[right] at (B) {$B$};
\end{tikzpicture}
\end{document}
Here, the theta label is being covered by the line OA. This is a problem because it doesn't look very good. I want to put it lower down so that it is no longer being covered. However the only other "direction" I can put on the node is right, which will cause the theta label to be covered by the line OB. How can I set the direction or anchor such that it is now exactly between the two lines?


poskey (replacemidwaywithpos=0.1looks reasonably good in this particular case), but there might be a better solution. (actually it looks like that everything uses manual specification anyway. E.g. https://tex.stackexchange.com/questions/34640/best-way-to-create-this-image-square-and-angle / https://tex.stackexchange.com/questions/502638/move-label-of-an-angle-in-tikz ) – user202729 Dec 23 '21 at 01:16