Source
-5 2.5 setxrange
-0.5 1 setyrange

1 setxyrapport
50 setxunit
7.5 setborder

/A {-2 0} def
/B {2 0} def
/C {-0.4 0} def


[A B] ligne
[A B C] points

(A) A [1.5 dup] dltext
(B) B [1.5 dup] drtext
(C) C [1.5 dup] dctext

<latex>
$ p|AB| $
</latex>
-1.6 0 [1.5 dup] urtexlabel

<latex>
$ (1-p)|AB| $
</latex>
0 0 [1.5 dup] urtexlabel

<latex>
$\rm{Abb}.\,5$
</latex>
-4 -0.1 [2.0 dup] uctexlabel