summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fmp/fmp-doc.hs
blob: cbece3f233773db4f0907a9236a5a5002a688351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--
-- This is file `fmp-doc.hs',
-- generated with the docstrip utility.
--
-- The original source files were:
--
-- fmp.dtx  (with options: `examples')
-- 
-- Example source code for the FMP package
-- 
module FMPDoc where
import FMP
import FMPTree

example1           = binom 5
    where
    ce             = circle empty
    binom 0        = node ce []
    binom n        = node ce [edge (binom i)
                              | i <- [(n-1),(n-2)..0]]
                     #setAlign AlignRight

example2           = box (math "U" |||
                          ooalign [toPicture [cArea a 0.7,
                                              cArea b 0.7,
                                              cArea ab 0.4],
                                   bOverA])
    where
    cArea a c      = toArea a #setColor c
    bOverA         = column [math "B" #setBGColor white,
                             vspace 50,
                             math "A" #setBGColor white]
    a              = transformPath (scaled 30) fullcircle
    b              = transformPath (scaled 30 & shifted (0,-30))
                     fullcircle
    ab             = buildCycle a b