Skip to content

Commit

Permalink
Fix examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
cchalmers committed Jan 29, 2015
1 parent 00d21e5 commit a228739
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/group-transparency.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Diagrams.Backend.PGF.CmdLine

-- Example of group opacity.

type D2 = Diagram PGF V2 Double
type D2 = Diagram PGF

main = defaultMain (frame 10 xs)

Expand Down
2 changes: 1 addition & 1 deletion examples/hbox.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Diagrams.TwoD.Vector (perp)

import Diagrams.Size

type D2 = Diagram PGF V2 Double
type D2 = Diagram PGF

-- The simplest way to construct a hbox with an envelope is to use
--
Expand Down
4 changes: 2 additions & 2 deletions examples/sums.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Control.Lens ((<&>))
import Diagrams.Prelude
import Diagrams.Backend.PGF.CmdLine

type D2 = Diagram PGF V2 Float
type D2 = Diagram PGF

maxSum = 6 :: Int

Expand All @@ -13,7 +13,7 @@ sumTo n = show $ (n * (n + 1)) `div` 2
mkSum :: Int -> OnlineTeX D2
mkSum n = onlineHbox (displayStyle tex)
<&> centerXY
<&> named n
<&> named n
where
tex | n == maxSum = sumTo maxSum
| otherwise = sumTo n ++ " + \\sum_{i=" ++ show (n+1) ++ "}^{" ++ show maxSum ++ "} i"
Expand Down
4 changes: 2 additions & 2 deletions examples/triangle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import Diagrams.Prelude
import Diagrams.Backend.PGF.CmdLine
import Diagrams.TwoD.Vector (perp)

-- Example using TeX primatives to make a text box with given width. Also
-- Example using TeX primatives to make a text box with given width. Also
-- includes roundedRect background and labeling.

type D2 = Diagram PGF V2 Double
type D2 = Diagram PGF

main = onlineMain example

Expand Down

0 comments on commit a228739

Please sign in to comment.