{-# LANGUAGE OverloadedStrings #-}

-- |
-- 
-- /For contributors: This module was automatically generated by HaTeX-meta./
-- /So, please, don't make any change here directly, because/
-- /this is intended to be generated from/
-- "Text.LaTeX.Packages.Hyperref" /module via HaTeX-meta,/
-- /and therefore, changes must to be done in these places./

module Text.LaTeX.Packages.Hyperref.Monad
 ( -- * Hyperref package
   hyperref
   -- * Hyperref commands
 , HRefOption (..)
 , URL
 , createURL
 , href
 , url
 , nolinkurl
 , hyperbaseurl
 , hyperimage
 , autoref
   ) where

import Text.LaTeX.Base.Writer
import Text.LaTeX.Base.Render
import Text.LaTeX.Base.Types
import qualified Text.LaTeX.Packages.Hyperref as App
import Text.LaTeX.Packages.Hyperref(HRefOption,URL)

{-|
The 'hyperref' package.

>  usepackage [] hyperref

-}
hyperref :: String
hyperref = App.hyperref


createURL :: String -> URL
createURL = App.createURL

-- | Reference to an 'URL'.

href ::   (Monad m) => [HRefOption] -> URL -> LaTeXT_ m -> LaTeXT_ m
href a1 a2 a3
  = do a3 <- extractLaTeX_ a3
       textell ( App.href a1 a2 a3)

-- | Write an 'URL' hyperlinked.

url ::   (Monad m) => URL -> LaTeXT_ m
url a1 = do textell ( App.url a1)

-- | Write an 'URL' without creating a hyperlink.

nolinkurl ::   (Monad m) => URL -> LaTeXT_ m
nolinkurl a1 = do textell ( App.nolinkurl a1)

-- | Establish a base 'URL'.

hyperbaseurl ::   (Monad m) => URL -> LaTeXT_ m
hyperbaseurl a1 = do textell ( App.hyperbaseurl a1)

{-|
@hyperimage imgURL t@:
  The link to the image referenced by the @imgURL@ is inserted, using @t@ as the anchor.
-}
hyperimage ::   (Monad m) => URL -> LaTeXT_ m -> LaTeXT_ m
hyperimage a1 a2
  = do a2 <- extractLaTeX_ a2
       textell ( App.hyperimage a1 a2)

-- | This is a replacement for the usual @ref@ command that places a contextual label in front of the reference.

autoref ::   (Monad m) => Label -> LaTeXT_ m
autoref a1 = do textell ( App.autoref a1)