Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The following code instructs TikZ to draw an obtuse triangle. Except for the placement of the letter "C" in the diagram, the diagram is drawn correctly. I want to move the letter "C" downwards a little more so that it is not on the triangle.

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}

\begin{tikzpicture}
\path (110:4.5) coordinate (A) (-30:3) coordinate (B) (0:0) coordinate (C);
\draw (A)
-- (B) node [at start, above left]{$A$} node [midway, right]{$c$}
-- (C) node [at start, right]{$B$} node [midway, below] {$a$}
-- (A) node [at start, below, left]{$C$} node [midway, left]  {$b$} -- cycle;
\coordinate (P) at ($(B)!(A)!(C)$);
\draw[dashed] (A) -- (P) node [below, left]{$P$} node [midway, left]{$h$} -- (C);
\draw[dashed] (P) -- node [midway, below]{$x$}(C);
\draw[|<->|] ($(B)!7mm!90:(P)$)--node[fill=white,sloped] {$a + x$} ($(P)!7mm!-90:(B)$);
\draw pic[draw, angle radius=2mm,"$\theta$",angle eccentricity=2] {angle = B--C--A};
\tkzMarkRightAngle(A,P,C);
\end{tikzpicture}

\end{document}
share|improve this question

2 Answers 2

Use the key yshift=:

output

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}

\begin{tikzpicture}
\path (110:4.5) coordinate (A) (-30:3) coordinate (B) (0:0) coordinate (C);
\draw (A)
-- (B) node [at start, above left]{$A$} node [midway, right]{$c$}
-- (C) node [at start, right]{$B$} node [midway, below] {$a$}
-- (A) node [at start, below, left, yshift=-2mm]{$C$} node [midway, left]  {$b$} -- cycle;
\coordinate (P) at ($(B)!(A)!(C)$);
\draw[dashed] (A) -- (P) node [below, left]{$P$} node [midway, left]{$h$} -- (C);
\draw[dashed] (P) -- node [midway, below]{$x$}(C);
\draw[|<->|] ($(B)!7mm!90:(P)$)--node[fill=white,sloped] {$a + x$} ($(P)!7mm!-90:(B)$);
\draw pic[draw, angle radius=2mm,"$\theta$",angle eccentricity=2] {angle = B--C--A};
\tkzMarkRightAngle(A,P,C);
\end{tikzpicture}

\end{document}
share|improve this answer

You are giving the key below,left which tikz takes only as left (the latest key). It should be below left without , in the middle. So

node [at start, below left]{$C$}

would give you

enter image description here

You can also use just below (which is better than left). If you want absolute control, you may use

below left=below length and left length

like

below left=0mm and -1mm

Code:

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}

\begin{tikzpicture}
\path (110:4.5) coordinate (A) (-30:3) coordinate (B) (0:0) coordinate (C);
\draw (A)
-- (B) node [at start, above left]{$A$} node [midway, right]{$c$}
-- (C) node [at start, right]{$B$} node [midway, below] {$a$}
-- (A) node [at start, below left=0mm and -1mm]{$C$} node [midway, left]  {$b$} -- cycle;
\coordinate (P) at ($(B)!(A)!(C)$);
\draw[dashed] (A) -- (P) node [below, left]{$P$} node [midway, left]{$h$} -- (C);
\draw[dashed] (P) -- node [midway, below]{$x$}(C);
\draw[|<->|] ($(B)!7mm!90:(P)$)--node[fill=white,sloped] {$a + x$} ($(P)!7mm!-90:(B)$);
\draw pic[draw, angle radius=2mm,"$\theta$",angle eccentricity=2] {angle = B--C--A};
\tkzMarkRightAngle(A,P,C);
\end{tikzpicture}

\end{document}

enter image description here

share|improve this answer
    
Using "below left" is fine. Thanks. Why doesn't TikZ compile the optional command "left below"? Is "below below left" an option? –  user60254 Aug 31 at 23:15
1  
@user60254 left below and below below left are not defined and hence are not possible. –  Harish Kumar Aug 31 at 23:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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