5

I have this trapezoid in Tikz, and I would like to put some text inside the trapezoid, next to the angles, and also place next to each vertex, outside of the trapezoid, one of the letters A,B,C,D. I have a feeling I need to annotate (0,0) etc. for all of this, but not sure how and how to set the placement. Any ideas?

 \begin{tikzpicture}
 \newdimen\R
 \R=1cm
  \newdimen\S
   \S=1.5cm
    \draw[xshift=10.5\R] (0,0) -- (2.8\S,0) 
    -- node[rotate=-52]{} (2\S,1.1\S) -- (.8\S,1.1\S)
    -- node[rotate=52]{} (0,0);
    \draw[xshift=10.5\R] (1.4\S,-.5) node {}
    ++ (0,-.5) node {};
 \end{tikzpicture}
  • Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 May 16 '14 at 18:26
  • What are those empty nodes for? They play no role in the result. Are they placeholders where you intend to put some text, or ar they the leftover from a not fully understood copy&pasted code? I would declare some named coordinates for the corners, and then draw the path which join them, and put at them nodes for the labels. – JLDiaz May 16 '14 at 18:43
5

If you don't have to use the code you already have, there is a trapezium node shape available, in the shapes.geometric library.

\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
  \node (a)
  [shape=trapezium,
  trapezium left angle=70,
  trapezium right angle=45,
  draw,
  minimum height=1.1*1.5cm] {Inside};
  \node [above left] at (a.top left corner) {A};
 \node [above right] at (a.top right corner) {B}; 
 \node [below left] at (a.bottom left corner) {C};
 \node [below right] at (a.bottom right corner) {D}; 

 \node [below right] at (a.top left corner) {$\alpha$};
 \node [below left] at (a.top right corner) {$\beta$}; 
 \node [above right] at ([xshift=.2cm]a.bottom left corner) {$\gamma$};
 \node [above left] at ([xshift=-.3cm]a.bottom right corner) {$\varphi$}; 

\end{tikzpicture}
\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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