{-# LANGUAGE OverloadedStrings #-}

module Text.LaTeX.Arguments (
    -- * Renaming @LaTeX@
    Language
  , Encoding
  , URL
  , Color
  , Name , Title , Date
  , Word
  , Marker, Text
  , ItemOption
  , PlacementSpecifier
    -- * Classes
  , Class
  , article
  , proc
  , minimal
  , report
  , book
  , slides
    -- * Class Options
  , ClassOption
    -- ** Paper related
  , letterpaper
  , a4paper
  , a5paper
  , b5paper
  , executivepaper
  , legalpaper
    -- ** @fleqn@,@leqno@
  , fleqn , leqno
    -- ** Title related
  , titlepage
  , notitlepage
    -- ** Column related
  , onecolumn
  , twocolumn
    -- ** Sides Related
  , twoside , oneside
    -- ** Landscape
  , landscape
    -- ** @Open@
  , openright , openany
    -- * Styles
  , Style
  , plain
  , headings
  , empty
    -- * Meters
    -- ** Width and Height
  , Width, Lift, Extend, Height
  , width, height, depth
  , totalheight
    -- $measures
    -- ** Measures
  , mm , cm , inch
  , pt , em , ex
  ) where

import Text.LaTeX.Monad
import Text.LaTeX.Define

import Data.List

type Language m = LaTeX m

type Encoding m = LaTeX m

type URL m = LaTeX m

type Color m = LaTeX m

type Name m = LaTeX m

type Title m = LaTeX m

type Date m = LaTeX m

type Word m = LaTeX m

type Marker m = LaTeX m

type Text m = LaTeX m

type ItemOption m = LaTeX m

type PlacementSpecifier m = LaTeX m

--

type ClassOption m = LaTeX m

letterpaper :: Monad m => ClassOption m
letterpaper = "letterpaper"

a4paper :: Monad m => ClassOption m
a4paper = "a4paper"

a5paper :: Monad m => ClassOption m
a5paper = "a5paper"

b5paper :: Monad m => ClassOption m
b5paper = "b5paper"

executivepaper :: Monad m => ClassOption m
executivepaper = "executivepaper"

legalpaper :: Monad m => ClassOption m
legalpaper = "legalpaper"

--

fleqn :: Monad m => ClassOption m
fleqn = "fleqn"

leqno :: Monad m => ClassOption m
leqno = "leqno"

--

titlepage :: Monad m => ClassOption m
titlepage = "titlepage"

notitlepage :: Monad m => ClassOption m
notitlepage = "notitlepage"

--

onecolumn :: Monad m => ClassOption m
onecolumn = "onecolumn"

twocolumn :: Monad m => ClassOption m
twocolumn = "twocolumn"

--

twoside :: Monad m => ClassOption m
twoside = "twoside"

oneside :: Monad m => ClassOption m
oneside = "oneside"

--

landscape :: Monad m => ClassOption m
landscape = "landscape"

--

openright :: Monad m => ClassOption m
openright = "openright"

openany :: Monad m => ClassOption m
openany = "openany"

--

type Class m = LaTeX m

article :: Monad m => Class m
article = "article"

proc :: Monad m => Class m
proc = "proc"

minimal :: Monad m => Class m
minimal = "minimal"

report :: Monad m => Class m
report = "report"

book :: Monad m => Class m
book = "book"

slides :: Monad m => Class m
slides = "slides"

--


type Style m = LaTeX m

plain :: Monad m => Style m
plain = "plain"

headings :: Monad m => Style m
headings = "headings"

empty :: Monad m => Style m
empty = "empty"

-- Meters

type Width m = LaTeX m

type Lift m = LaTeX m

type Extend m = LaTeX m

type Height m = LaTeX m

width :: Monad m => LaTeX m
width = comm0_ "width"

height :: Monad m => LaTeX m
height = comm0_ "height"

depth :: Monad m => LaTeX m
depth = comm0_ "depth"

totalheight :: Monad m => LaTeX m
totalheight = comm0_ "totalheight"

-- $measures
-- #Measures#

mm :: Monad m => Float -> LaTeX m
mm = (>>"mm") . lxany

cm :: Monad m => Float -> LaTeX m
cm = (>>"cm") . lxany

inch :: Monad m => Float -> LaTeX m
inch = (>>"in") . lxany

pt :: Monad m => Int -> LaTeX m
pt = (>>"pt") . lxany

em :: Monad m => Float -> LaTeX m
em = (>>"em") . lxany

ex :: Monad m => Float -> LaTeX m
ex = (>>"ex") . lxany