SmtC: Show me the Code
Ole Peter Smith
Instituto de Matemática e Estatística
Universidade Federal de Goiás
http://www.olesmith.com.br

TikZ (Palestra)
O dia que bosta valesse ouro.
Os pobres todos nascerão sem c*.
Grafitti.
< Nodes & Text | TiKZ Labels | Styles >

Label & Marks: tkz library

  • Segment:
    • Label:
      \tkzLabelSegment[pos=0.5,left](P1,P2) {$l_{12}$};
    • Mark:
      \tkzMarkSegment[size=0.5,mark=|](P1,P2);
  • Angle:
    • Label:
      \tkzLabelAngle[pos=0.9](P1,P2,P3) {$l_{12}$};
    • Mark:
      \tkzMarkAngle[size=0.5,mark=||](P1,P2,P3);
TiKZ Listing: Fig.tikz.tex. PDF   PNG   SVG   ZIP*  
%TiKZ radians confuses \tkzMarkAngle and friends
\begin{tikzpicture}
  \tikzmath{\R=2;};

  %Sizing of canvas
   \tikzmath{\Rho=1.2*\R;};
   \filldraw [white] (\Rho,\Rho) -- (-\Rho,\Rho) -- (-\Rho,-\Rho) -- (\Rho,-\Rho) -- cycle;
  
   \coordinate (O) at (0,0);
   
   \coordinate (P1) at (30:\R);
   \coordinate (P2) at (120:\R);
   \coordinate (P3) at (180:\R);
  
   \filldraw  (O) circle (1pt) node [right] {$O$};
   \filldraw  (P1) circle (1pt) node [right] {$P_1$};
   \filldraw  (P2) circle (1pt) node [left] {$P_2$};
   \filldraw  (P3) circle (1pt) node [above] {$P_3$};

   \draw (P1) -- (P2) -- (P3) -- cycle;
   \draw (0,0) circle(\R);
   
   \tkzLabelSegment[pos=0.5,above](P1,P2) {$l_{12}$};
   \tkzMarkSegment[mark=|](P1,P3);
   \tkzMarkSegment[pos=0.25,mark=||](P1,P2);

   
   \tkzLabelAngle[pos=0.75](P1,P3,P2) {$\theta_3$};
   \tkzMarkAngle[size=0.5](P1,P3,P2);
   
   \tkzLabelAngle[pos=0.75](P1,P2,P3) {$\theta_2$};
   \tkzMarkAngle[size=0.35,mark=|](P3,P2,P1);
\end{tikzpicture}
< Nodes & Text | TiKZ Labels | Styles >
Messages:
0 secs.