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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{intersections}
\usepackage{amsmath}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}

\begin{document}

\begin{tikzpicture}[scale=2]%,cap=round,>=latex]

\coordinate [label=left:$C$] (A) at (-1.5cm,-1.cm);
\coordinate [label=right:$A$] (C) at (1.5cm,-1.0cm);
\coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
\draw (A) -- node[sloped,above] {$\textrm{Hypotenous}$} (B) -- node[right,rotate=-90,xshift=-9mm] {$\textrm{Oposite Side}$} (C) -- node[below] {$\textrm{Adjacent Side}$} (A);

\draw (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);
\tkzMarkAngle[size=0.5cm,color=black,mark=](C,A,B) 
\end{tikzpicture}

\end{document}

enter image description here

Question:1 In the given figure you will see that the word opposite side is mixing with the side AB. I want to modify this.

Question:2 Second thing is i would like to label angle ACB as thita(its a Greek later \theta).

share|improve this question
    
Quick question: why have you labeled coordinate (A) as C and coordinate (C) as A? It makes your code look messy, to be honest. Also, you can remove all the \textrm{ } constructs, as the label is text by default. – hooy Feb 19 at 10:04

For your first question, you only need to specify that you want the label to be above the line, i.e. type:

node[above right,rotate=-90,xshift=-9mm] {$\textrm{Oposite Side}$}

This will place the label as desired.

NB: you may type below to have this label on the other side.

share|improve this answer
    
Yes it works. THanks – snehal Feb 19 at 9:40
    
I don't think it needs to be above right, just above would work (maybe). – David Z Feb 19 at 13:29
    
I have just tested it, and this code without right will put the label on the top right side instead of middle of the side. – Damien Dtx Feb 19 at 13:34
    
Use node[above,sloped] instead, that is the easiest and most used solution. – hooy Feb 19 at 17:15

Addition of \tkzLabelAngle can be used to label theta. Modified code below.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{intersections}
\usepackage{amsmath}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}

\begin{document}

\begin{tikzpicture}[scale=2]%,cap=round,>=latex]

\coordinate [label=left:$C$] (A) at (-1.5cm,-1.cm);
\coordinate [label=right:$A$] (C) at (1.5cm,-1.0cm);
\coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
\draw (A) -- node[sloped,above] {$\textrm{Hypotenous}$} (B) -- node[above right,rotate=-90,xshift=-9mm] {$\textrm{Oposite Side}$} (C) -- node[below] {$\textrm{Adjacent Side}$} (A);

\draw (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);
\tkzMarkAngle[size=0.5cm,color=black,mark=](C,A,B) 
\tkzLabelAngle[pos=0.65](C,A,B){$\theta$}
\end{tikzpicture}

\end{document}
share|improve this answer
    
You make it so easy. – snehal Feb 19 at 10:08
    
thanks a lot. Doe – snehal Feb 19 at 10:09

The same code but change your code in 18th line as shown below

\draw (A) -- node[sloped,above] {$\textrm{Hypotenous}$} (B) -- node[left,rotate=90,xshift= 11mm, yshift=-3mm] {$\textrm{Oposite Side}$} (C) -- node[below] {$\textrm{Adjacent Side}$} (A);

triangle

share|improve this answer

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.