module Text.LaTeX.Packages.Relsize
(
prelsize
, relsize
, larger, smaller
, relscale
, textlarger, textsmaller, textscale
) where
import Text.LaTeX.Base.Class
import Text.LaTeX.Base.Render (rendertex)
import Text.LaTeX.Base.Syntax
import Text.LaTeX.Base.Types
prelsize :: ClassName
prelsize = "relsize"
relsize :: LaTeXC l => Int -> l
relsize i = fromLaTeX $ TeXComm "relsize" [FixArg $ rendertex i]
larger :: LaTeXC l => Maybe Int -> l
larger Nothing = comm0 "larger"
larger (Just i) = fromLaTeX $ TeXComm "larger" [OptArg $ rendertex i]
smaller :: LaTeXC l => Maybe Int -> l
smaller Nothing = comm0 "smaller"
smaller (Just i) = fromLaTeX $ TeXComm "smaller" [OptArg $ rendertex i]
relscale :: LaTeXC l => Float -> l
relscale f = fromLaTeX $ TeXComm "relscale" [FixArg $ rendertex f]
textlarger :: LaTeXC l => Maybe Int -> l -> l
textlarger Nothing = comm1 "textlarger"
textlarger (Just i) = liftL $ \l -> TeXComm "textlarger" [OptArg $ rendertex i, FixArg l]
textsmaller :: LaTeXC l => Maybe Int -> l -> l
textsmaller Nothing = comm1 "textsmaller"
textsmaller (Just i) = liftL $ \l -> TeXComm "textsmaller" [OptArg $ rendertex i, FixArg l]
textscale :: LaTeXC l => Float -> l -> l
textscale f = liftL $ \l -> TeXComm "textscale" [FixArg $ rendertex f, FixArg l]