-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | The Haskell LaTeX library.
--   
--   This library implements the LaTeX syntax and provides some useful
--   abstractions.
--   
--   Some of the things you can do with HaTeX are:
--   
--   <ul>
--   <li>Write LaTeX documents with all the advantages you already have in
--   Haskell: recursion, type system, high order functions, ...</li>
--   <li>Create a LaTeX backend for your own program.</li>
--   <li>Parse a LaTeX file and obtain its Abstract Syntax Tree (AST).</li>
--   <li>Pretty-print Haskell values in LaTeX.</li>
--   <li>Generate TikZ scripts (images!) easily.</li>
--   </ul>
--   
--   Browse the <tt>examples</tt> directory in the source distribution to
--   see some simple examples. It might help you to get started. The HaTeX
--   User's Guide is available at
--   <a>https://github.com/Daniel-Diaz/hatex-guide/blob/master/README.md</a>.
--   We also have a mailing list
--   (<a>http://projects.haskell.org/cgi-bin/mailman/listinfo/hatex</a>)
--   and an IRC channel (<tt>#hatex</tt>). If you just want to read a short
--   introduction, read the <a>Text.LaTeX</a> module.
--   
--   If you prefer to write in LaTeX and all you want is to <i>program</i>
--   some parts of the document, or if you already have the LaTeX document
--   written and you just want to add some automatically generated LaTeX
--   code somewhere, check haskintex:
--   <a>http://daniel-diaz.github.io/projects/haskintex</a>. It allows you
--   to embed Haskell in LaTeX. It also makes you easy to use HaTeX within
--   a LaTeX document.
@package HaTeX
@version 3.19.0.0


-- | LaTeX syntax description in the definition of the <a>LaTeX</a>
--   datatype. If you want to add new commands or environments not defined
--   in the library, import this module and use <a>LaTeX</a> data
--   constructors.
module Text.LaTeX.Base.Syntax

-- | Measure units defined in LaTeX. Use <a>CustomMeasure</a> to use
--   commands like <tt>textwidth</tt>. For instance:
--   
--   <pre>
--   rule Nothing (CustomMeasure linewidth) (Pt 2)
--   </pre>
--   
--   This will create a black box (see <tt>rule</tt>) as wide as the text
--   and two points tall.
data Measure

-- | A point is 1/72.27 inch, that means about 0.0138 inch or 0.3515 mm.
Pt :: Double -> Measure

-- | Millimeter.
Mm :: Double -> Measure

-- | Centimeter.
Cm :: Double -> Measure

-- | Inch.
In :: Double -> Measure

-- | The height of an "x" in the current font.
Ex :: Double -> Measure

-- | The width of an "M" in the current font.
Em :: Double -> Measure

-- | You can introduce a <a>LaTeX</a> expression as a measure.
CustomMeasure :: LaTeX -> Measure

-- | Different types of syntax for mathematical expressions.
data MathType
Parentheses :: MathType
Square :: MathType
Dollar :: MathType
DoubleDollar :: MathType

-- | Type of <tt>LaTeX</tt> blocks.
data LaTeX

-- | Raw text.
TeXRaw :: Text -> LaTeX

-- | Constructor for commands. First argument is the name of the command.
--   Second, its arguments.
TeXComm :: String -> [TeXArg] -> LaTeX

-- | Constructor for commands with no arguments. When rendering, no space
--   or <tt>{}</tt> will be added at the end.
TeXCommS :: String -> LaTeX

-- | Constructor for environments. First argument is the name of the
--   environment. Second, its arguments. Third, its content.
TeXEnv :: String -> [TeXArg] -> LaTeX -> LaTeX

-- | Mathematical expressions.
TeXMath :: MathType -> LaTeX -> LaTeX

-- | Line break command.
TeXLineBreak :: (Maybe Measure) -> Bool -> LaTeX

-- | A expression between braces.
TeXBraces :: LaTeX -> LaTeX

-- | Comments.
TeXComment :: Text -> LaTeX

-- | Sequencing of <a>LaTeX</a> expressions. Use <a>&lt;&gt;</a>
--   preferably.
TeXSeq :: LaTeX -> LaTeX -> LaTeX

-- | An empty block. <i>Neutral element</i> of <a>&lt;&gt;</a>.
TeXEmpty :: LaTeX

-- | An argument for a <a>LaTeX</a> command or environment.
data TeXArg

-- | Fixed argument.
FixArg :: LaTeX -> TeXArg

-- | Optional argument.
OptArg :: LaTeX -> TeXArg

-- | Multiple optional argument.
MOptArg :: [LaTeX] -> TeXArg

-- | An argument enclosed between <tt>&lt;</tt> and <tt>&gt;</tt>.
SymArg :: LaTeX -> TeXArg

-- | Version of <a>SymArg</a> with multiple options.
MSymArg :: [LaTeX] -> TeXArg

-- | An argument enclosed between <tt>(</tt> and <tt>)</tt>.
ParArg :: LaTeX -> TeXArg

-- | Version of <a>ParArg</a> with multiple options.
MParArg :: [LaTeX] -> TeXArg

-- | An associative operation.
(<>) :: Semigroup a => a -> a -> a
infixr 6 <>

-- | Escape LaTeX reserved characters in a <a>String</a>.
protectString :: String -> String

-- | Escape LaTeX reserved characters in a <a>Text</a>.
protectText :: Text -> Text

-- | Traverse a <a>LaTeX</a> syntax tree and returns the commands (see
--   <a>TeXComm</a> and <a>TeXCommS</a>) that matches the condition and
--   their arguments in each call.
matchCommand :: (String -> Bool) -> LaTeX -> [(String, [TeXArg])]

-- | Look into a <a>LaTeX</a> syntax tree to find any call to the command
--   with the given name. It returns a list of arguments with which this
--   command is called.
--   
--   <pre>
--   lookForCommand = (fmap snd .) . matchCommand . (==)
--   </pre>
--   
--   If the returned list is empty, the command was not found. However, if
--   the list contains empty lists, those are callings to the command with
--   no arguments.
--   
--   For example
--   
--   <pre>
--   lookForCommand "author" l
--   </pre>
--   
--   would look for the argument passed to the <tt>\author</tt> command in
--   <tt>l</tt>.
lookForCommand :: String -> LaTeX -> [[TeXArg]]

-- | Traverse a <a>LaTeX</a> syntax tree and returns the environments (see
--   <a>TeXEnv</a>) that matches the condition, their arguments and their
--   content in each call.
matchEnv :: (String -> Bool) -> LaTeX -> [(String, [TeXArg], LaTeX)]

-- | Similar to <a>lookForCommand</a>, but applied to environments. It
--   returns a list with arguments passed and content of the environment in
--   each call.
--   
--   <pre>
--   lookForEnv = (fmap (\(_,as,l) -&gt; (as,l)) .) . matchEnv . (==)
--   </pre>
lookForEnv :: String -> LaTeX -> [([TeXArg], LaTeX)]

-- | The function <a>texmap</a> looks for subexpressions that match a given
--   condition and applies a function to them.
--   
--   <pre>
--   texmap c f = runIdentity . texmapM c (pure . f)
--   </pre>
texmap :: (LaTeX -> Bool) -> (LaTeX -> LaTeX) -> LaTeX -> LaTeX

-- | Version of <a>texmap</a> where the function returns values in a
--   <a>Monad</a>.
texmapM :: (Applicative m, Monad m) => (LaTeX -> Bool) -> (LaTeX -> m LaTeX) -> LaTeX -> m LaTeX

-- | Extract the content of the <tt>document</tt> environment, if present.
getBody :: LaTeX -> Maybe LaTeX

-- | Extract the preamble of a <a>LaTeX</a> document (everything before the
--   <tt>document</tt> environment). It could be empty.
getPreamble :: LaTeX -> LaTeX
instance GHC.Show.Show Text.LaTeX.Base.Syntax.Measure
instance GHC.Generics.Generic Text.LaTeX.Base.Syntax.Measure
instance GHC.Classes.Eq Text.LaTeX.Base.Syntax.Measure
instance Data.Data.Data Text.LaTeX.Base.Syntax.Measure
instance GHC.Show.Show Text.LaTeX.Base.Syntax.LaTeX
instance GHC.Generics.Generic Text.LaTeX.Base.Syntax.LaTeX
instance GHC.Classes.Eq Text.LaTeX.Base.Syntax.LaTeX
instance Data.Data.Data Text.LaTeX.Base.Syntax.LaTeX
instance GHC.Show.Show Text.LaTeX.Base.Syntax.TeXArg
instance GHC.Generics.Generic Text.LaTeX.Base.Syntax.TeXArg
instance GHC.Classes.Eq Text.LaTeX.Base.Syntax.TeXArg
instance Data.Data.Data Text.LaTeX.Base.Syntax.TeXArg
instance GHC.Show.Show Text.LaTeX.Base.Syntax.MathType
instance GHC.Generics.Generic Text.LaTeX.Base.Syntax.MathType
instance GHC.Classes.Eq Text.LaTeX.Base.Syntax.MathType
instance Data.Data.Data Text.LaTeX.Base.Syntax.MathType
instance GHC.Base.Monoid Text.LaTeX.Base.Syntax.LaTeX
instance GHC.Base.Semigroup Text.LaTeX.Base.Syntax.LaTeX
instance Data.String.IsString Text.LaTeX.Base.Syntax.LaTeX
instance Test.QuickCheck.Arbitrary.Arbitrary Text.LaTeX.Base.Syntax.Measure
instance Test.QuickCheck.Arbitrary.Arbitrary Text.LaTeX.Base.Syntax.LaTeX
instance Test.QuickCheck.Arbitrary.Arbitrary Text.LaTeX.Base.Syntax.TeXArg
instance Data.Hashable.Class.Hashable Text.LaTeX.Base.Syntax.Measure
instance Data.Hashable.Class.Hashable Text.LaTeX.Base.Syntax.TeXArg
instance Data.Hashable.Class.Hashable Text.LaTeX.Base.Syntax.LaTeX
instance Data.Hashable.Class.Hashable Text.LaTeX.Base.Syntax.MathType


-- | Definition of the <a>LaTeXC</a> class, used to combine the classic
--   applicative and the latter monadic interfaces of <i>HaTeX 3</i>. The
--   user can define new instances as well, adding flexibility to the way
--   <i>HaTeX</i> is used.
module Text.LaTeX.Base.Class

-- | This is the class of <a>LaTeX</a> code generators. It has
--   <a>Monoid</a> and <a>IsString</a> as superclasses.
class (Monoid l, IsString l) => LaTeXC l

-- | This method must take a function that combines a list of <a>LaTeX</a>
--   values into a new one, and creates a function that combines
--   <tt>l</tt>-typed values. The combining function can be seen as a
--   function with 0 or more <a>LaTeX</a> arguments with a <a>LaTeX</a>
--   value as output.
liftListL :: LaTeXC l => ([LaTeX] -> LaTeX) -> [l] -> l

-- | The class of monoids (types with an associative binary operation that
--   has an identity). Instances should satisfy the following laws:
--   
--   <ul>
--   <li><pre>x <a>&lt;&gt;</a> <a>mempty</a> = x</pre></li>
--   <li><pre><a>mempty</a> <a>&lt;&gt;</a> x = x</pre></li>
--   <li><tt>x <a>&lt;&gt;</a> (y <a>&lt;&gt;</a> z) = (x <a>&lt;&gt;</a>
--   y) <a>&lt;&gt;</a> z</tt> (<a>Semigroup</a> law)</li>
--   <li><pre><a>mconcat</a> = <a>foldr</a> '(&lt;&gt;)'
--   <a>mempty</a></pre></li>
--   </ul>
--   
--   The method names refer to the monoid of lists under concatenation, but
--   there are many other instances.
--   
--   Some types can be viewed as a monoid in more than one way, e.g. both
--   addition and multiplication on numbers. In such cases we often define
--   <tt>newtype</tt>s and make those instances of <a>Monoid</a>, e.g.
--   <tt>Sum</tt> and <tt>Product</tt>.
--   
--   <b>NOTE</b>: <a>Semigroup</a> is a superclass of <a>Monoid</a> since
--   <i>base-4.11.0.0</i>.
class Semigroup a => Monoid a

-- | Identity of <a>mappend</a>
mempty :: Monoid a => a

-- | An associative operation
--   
--   <b>NOTE</b>: This method is redundant and has the default
--   implementation <tt><a>mappend</a> = '(&lt;&gt;)'</tt> since
--   <i>base-4.11.0.0</i>.
mappend :: Monoid a => a -> a -> a

-- | Fold a list using the monoid.
--   
--   For most types, the default definition for <a>mconcat</a> will be
--   used, but the function is included in the class definition so that an
--   optimized version can be provided for specific types.
mconcat :: Monoid a => [a] -> a

-- | Map a <a>LaTeX</a> value to its equivalent in any <a>LaTeXC</a>
--   instance.
fromLaTeX :: LaTeXC l => LaTeX -> l

-- | Lift a inner function of <a>LaTeX</a> values into any <a>LaTeXC</a>
--   instance.
liftL :: LaTeXC l => (LaTeX -> LaTeX) -> l -> l

-- | Variant of <a>liftL</a> with a two arguments function.
liftL2 :: LaTeXC l => (LaTeX -> LaTeX -> LaTeX) -> l -> l -> l

-- | Variant of <a>liftL</a> with a three arguments function.
liftL3 :: LaTeXC l => (LaTeX -> LaTeX -> LaTeX -> LaTeX) -> l -> l -> l -> l

-- | A simple (without arguments) and handy command generator using the
--   name of the command.
--   
--   <pre>
--   comm0 str = fromLaTeX $ TeXComm str []
--   </pre>
comm0 :: LaTeXC l => String -> l

-- | A one parameter command generator using the name of the command. The
--   parameter will be rendered as a fixed argument.
--   
--   <pre>
--   comm1 str = liftL $ \l -&gt; TeXComm str [FixArg l]
--   </pre>
comm1 :: LaTeXC l => String -> l -> l

-- | A two parameter command generator using the name of the command. The
--   parameters will be rendered as fixed arguments.
--   
--   <pre>
--   comm2 str = liftL2 $ \l1 l2 -&gt; TeXComm str [FixArg l1, FixArg l2]
--   </pre>
comm2 :: LaTeXC l => String -> l -> l -> l

-- | A three parameter command generator using the name of the command. The
--   parameters will be rendered as fixed arguments.
--   
--   <pre>
--   comm3 str = liftL2 $ \l1 l2 l3 -&gt; TeXComm str [FixArg l1, FixArg l2, FixArg l3]
--   </pre>
comm3 :: LaTeXC l => String -> l -> l -> l -> l

-- | Like <a>comm0</a> but using <a>TeXCommS</a>, i.e. no "{}" will be
--   inserted to protect the command's end.
--   
--   <pre>
--   commS = fromLaTeX . TeXCommS
--   </pre>
commS :: LaTeXC l => String -> l

-- | A lifted version of the <a>TeXBraces</a> constructor.
--   
--   <pre>
--   braces = liftL TeXBraces
--   </pre>
braces :: LaTeXC l => l -> l
squareBraces :: LaTeXC l => l -> l
instance Text.LaTeX.Base.Class.LaTeXC Text.LaTeX.Base.Syntax.LaTeX


-- | The final purpose of this module is to render a Text value from a
--   <a>LaTeX</a> value. The interface is abstracted via a typeclass so you
--   can cast to <a>Text</a> other types as well. Also, some other handy
--   <a>Text</a>-related functions are defined.
module Text.LaTeX.Base.Render

-- | A space efficient, packed, unboxed Unicode text type.
data Text

-- | Class of values that can be transformed to <a>Text</a>. You mainly
--   will use this to obtain the <a>Text</a> output of a <a>LaTeX</a>
--   value. If you are going to write the result in a file, consider to use
--   <a>renderFile</a>.
--   
--   Consider also to use <a>rendertex</a> to get <a>Render</a>able values
--   into <a>LaTeX</a> blocks.
--   
--   If you want to make a type instance of <a>Render</a> and you already
--   have a <a>Show</a> instance, you can use the default instance.
--   
--   <pre>
--   render = fromString . show
--   </pre>
class Show a => Render a
render :: Render a => a -> Text

-- | Render every element of a list and append results.
renderAppend :: Render a => [a] -> Text

-- | Render every element of a list and append results, separated by the
--   given <a>Char</a>.
renderChars :: Render a => Char -> [a] -> Text

-- | Render every element of a list and append results, separated by
--   commas.
renderCommas :: Render a => [a] -> Text

-- | Use this function to render a <a>LaTeX</a> (or another one in the
--   <a>Render</a> class) value directly in a file.
renderFile :: Render a => FilePath -> a -> IO ()

-- | If you can transform a value to <a>Text</a>, you can insert that
--   <a>Text</a> in your <a>LaTeX</a> code. That is what this function
--   does.
--   
--   <i>Warning: </i><a>rendertex</a><i> does not escape LaTeX reserved
--   characters.</i> <i>Use </i><a>protectText</a><i> to escape them.</i>
rendertex :: (Render a, LaTeXC l) => a -> l

-- | If you are going to insert the content of a file in your <a>LaTeX</a>
--   data, use this function to ensure your encoding is correct.
readFileTex :: FilePath -> IO Text

-- | Show a signed floating number using standard decimal notation using 5
--   decimals.
showFloat :: RealFloat a => a -> String
instance Text.LaTeX.Base.Render.Render Data.Text.Internal.Text
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Base.Syntax.Measure
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Base.Syntax.LaTeX
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Base.Syntax.TeXArg
instance Text.LaTeX.Base.Render.Render GHC.Types.Int
instance Text.LaTeX.Base.Render.Render GHC.Integer.Type.Integer
instance Text.LaTeX.Base.Render.Render GHC.Types.Float
instance Text.LaTeX.Base.Render.Render GHC.Types.Double
instance Text.LaTeX.Base.Render.Render GHC.Word.Word8
instance Text.LaTeX.Base.Render.Render GHC.Types.Bool
instance Text.LaTeX.Base.Render.Render a => Text.LaTeX.Base.Render.Render [a]


-- | <a>LaTeX</a> values pretty printer.
--   
--   Still experimental. Give it a try and send us your feedback! :)
module Text.LaTeX.Base.Pretty

-- | Pretty print a <a>LaTeX</a> value. It produces a more human-friendly
--   output than <a>render</a>.
--   
--   This function should be used only for debugging purposes since it may
--   change the semantics of the input in order to create a prettier
--   output. In other words, running a LaTeX compiler in the output file of
--   <tt>renderFile fp l</tt> may produce a different document than running
--   it in the output of <tt>writeFile fp (prettyLaTeX l)</tt>. You should
--   use <a>renderFile</a> unless you really need to read the LaTeX file.
prettyLaTeX :: LaTeX -> String

-- | This function transforms a value of type <a>LaTeX</a> to a <a>Doc</a>.
--   You can then choose how to print this <a>Doc</a> value using the
--   function from the <a>Text.PrettyPrint.Free</a> module.
docLaTeX :: LaTeX -> Doc ()


-- | The <i>LaTeX</i> parser.
--   
--   Use <a>parseLaTeX</a> to parse a <a>Text</a> containing <i>LaTeX</i>
--   code. If the <a>Text</a> is in a file, you may want to use
--   <a>parseLaTeXFile</a>. Use this module together with
--   <a>Text.LaTeX.Base.Syntax</a> to perform analysis and transformations
--   of <i>LaTeX</i> code. The parser (<a>parseLaTeX</a>) is related with
--   the renderer (<a>render</a>) by the following property:
--   
--   <i>If <tt>t :: Text</tt> is a syntactically valid LaTeX block,
--   then:</i>
--   
--   <pre>
--   fmap render (parseLaTeX t) == Right t
--   </pre>
--   
--   This property says two things:
--   
--   <ul>
--   <li>Given a valid LaTeX input, <a>parseLaTeX</a> returns a
--   <a>LaTeX</a> value.</li>
--   <li>If the parsed value is again rendered, you get the initial
--   input.</li>
--   </ul>
--   
--   In other words, <a>parseLaTeX</a> is a partial function defined over
--   the set of valid LaTeX files, and <a>render</a> is its <i>left</i>
--   inverse.
module Text.LaTeX.Base.Parser

-- | Parse a <a>Text</a> sequence as a <a>LaTeX</a> block. If it fails, it
--   returns an error string.
parseLaTeX :: Text -> Either ParseError LaTeX

-- | Read a file and parse it as <a>LaTeX</a>.
parseLaTeXFile :: FilePath -> IO (Either ParseError LaTeX)

-- | The abstract data type <tt>ParseError</tt> represents parse errors. It
--   provides the source position (<a>SourcePos</a>) of the error and a
--   list of error messages (<a>Message</a>). A <tt>ParseError</tt> can be
--   returned by the function <a>parse</a>. <tt>ParseError</tt> is an
--   instance of the <a>Show</a> and <a>Eq</a> classes.
data ParseError

-- | Extracts the source position from the parse error
errorPos :: ParseError -> SourcePos

-- | Extracts the list of error messages from the parse error
errorMessages :: ParseError -> [Message]

-- | This abstract data type represents parse error messages. There are
--   four kinds of messages:
--   
--   <pre>
--   data Message = SysUnExpect String
--                | UnExpect String
--                | Expect String
--                | Message String
--   </pre>
--   
--   The fine distinction between different kinds of parse errors allows
--   the system to generate quite good error messages for the user. It also
--   allows error messages that are formatted in different languages. Each
--   kind of message is generated by different combinators:
--   
--   <ul>
--   <li>A <a>SysUnExpect</a> message is automatically generated by the
--   <a>satisfy</a> combinator. The argument is the unexpected input.</li>
--   <li>A <a>UnExpect</a> message is generated by the <a>unexpected</a>
--   combinator. The argument describes the unexpected item.</li>
--   <li>A <a>Expect</a> message is generated by the <a>&lt;?&gt;</a>
--   combinator. The argument describes the expected item.</li>
--   <li>A <a>Message</a> message is generated by the <a>fail</a>
--   combinator. The argument is some general parser message.</li>
--   </ul>
data Message
SysUnExpect :: !String -> Message
UnExpect :: !String -> Message
Expect :: !String -> Message
Message :: !String -> Message

-- | Extract the message string from an error message
messageString :: Message -> String

-- | The abstract data type <tt>SourcePos</tt> represents source positions.
--   It contains the name of the source (i.e. file name), a line number and
--   a column number. <tt>SourcePos</tt> is an instance of the <a>Show</a>,
--   <a>Eq</a> and <a>Ord</a> class.
data SourcePos

-- | Extracts the line number from a source position.
sourceLine :: SourcePos -> Line

-- | Extracts the column number from a source position.
sourceColumn :: SourcePos -> Column

-- | Extracts the name of the source from a source position.
sourceName :: SourcePos -> SourceName

-- | Configuration for the LaTeX parser.
data ParserConf
ParserConf :: [String] -> ParserConf

-- | This is the list of names of the environments such that their content
--   will be parsed verbatim.
[verbatimEnvironments] :: ParserConf -> [String]

-- | Default parser configuration, used by <a>parseLaTeX</a> and
--   <a>parseLaTeXFile</a>.
--   
--   Defaults:
--   
--   <pre>
--   verbatimEnvironments = ["verbatim"]
--   </pre>
defaultParserConf :: ParserConf
parseLaTeXWith :: ParserConf -> Text -> Either ParseError LaTeX
parseLaTeXFileWith :: ParserConf -> FilePath -> IO (Either ParseError LaTeX)

-- | Parser with <a>Text</a> input and <a>ParserConf</a> environment.
type Parser = Parsec Text ParserConf

-- | The <a>LaTeX</a> parser.
latexParser :: Parser LaTeX

-- | Parser of a single <a>LaTeX</a> constructor, no appending blocks.
latexBlockParser :: Parser LaTeX


-- | <a>Texy</a> class, as proposed in
--   <a>http://deltadiaz.blogspot.com.es/2013/04/hatex-36-proposal-texy-class.html</a>.
module Text.LaTeX.Base.Texy

-- | Class of types that can be pretty-printed as <a>LaTeX</a> values.
class Texy t
texy :: (Texy t, LaTeXC l) => t -> l
instance Text.LaTeX.Base.Texy.Texy Text.LaTeX.Base.Syntax.LaTeX
instance Text.LaTeX.Base.Texy.Texy Data.Text.Internal.Text
instance Text.LaTeX.Base.Texy.Texy GHC.Types.Int
instance Text.LaTeX.Base.Texy.Texy GHC.Integer.Type.Integer
instance Text.LaTeX.Base.Texy.Texy GHC.Types.Float
instance Text.LaTeX.Base.Texy.Texy GHC.Types.Double
instance Text.LaTeX.Base.Texy.Texy GHC.Types.Char
instance Data.Fixed.HasResolution a => Text.LaTeX.Base.Texy.Texy (Data.Fixed.Fixed a)
instance Text.LaTeX.Base.Texy.Texy GHC.Types.Bool
instance Text.LaTeX.Base.Texy.Texy Text.LaTeX.Base.Syntax.Measure


-- | Some types shared along the library.
module Text.LaTeX.Base.Types

-- | Class names are represented by a <a>String</a>.
type ClassName = String

-- | Package names are represented by a <a>String</a>.
type PackageName = String

-- | Page styles are represented by a <a>String</a>.
type PageStyle = String

-- | Type of labels.
data Label

-- | Create a label from its name.
createLabel :: String -> Label

-- | Get the name of a label.
labelName :: Label -> String

-- | Vertical position.
data Pos
Bottom :: Pos
Center :: Pos
Top :: Pos

-- | Horizontal position.
data HPos
HLeft :: HPos
HCenter :: HPos
HRight :: HPos

-- | Type of table specifications.
data TableSpec

-- | Left-justified column.
LeftColumn :: TableSpec

-- | Centered column.
CenterColumn :: TableSpec

-- | Right-justified column.
RightColumn :: TableSpec

-- | Paragraph column with text vertically aligned at the top.
ParColumnTop :: LaTeX -> TableSpec

-- | Paragraph column with text vertically aligned at the middle. Requires
--   <tt>array</tt> package.
ParColumnMid :: LaTeX -> TableSpec

-- | Paragraph column with text vertically aligned at the bottom. Requires
--   <tt>array</tt> package.
ParColumnBot :: LaTeX -> TableSpec

-- | User defined column. Requires <tt>array</tt> package.
NameColumn :: String -> TableSpec

-- | Can be used before a <a>LeftColumn</a>, <a>CenterColumn</a>,
--   <a>RightColumn</a>, <a>ParColumnTop</a>, <a>ParColumnMid</a> or a
--   <a>ParColumnBot</a> specification. Inserts the code directly in front
--   of the entry of the column. Requires <tt>array</tt> package.
BeforeColumn :: LaTeX -> TableSpec

-- | Can be used after a <a>LeftColumn</a>, <a>CenterColumn</a>,
--   <a>RightColumn</a>, <a>ParColumnTop</a>, <a>ParColumnMid</a> or a
--   <a>ParColumnBot</a> specification. Inserts the code directly in front
--   of the entry of the column. Requires <tt>array</tt> package.
AfterColumn :: LaTeX -> TableSpec

-- | Vertical line between two columns.
VerticalLine :: TableSpec

-- | Double vertical line between two columns.
DVerticalLine :: TableSpec

-- | Column separator. Requires <tt>array</tt> package.
Separator :: LaTeX -> TableSpec

-- | Measure units defined in LaTeX. Use <a>CustomMeasure</a> to use
--   commands like <tt>textwidth</tt>. For instance:
--   
--   <pre>
--   rule Nothing (CustomMeasure linewidth) (Pt 2)
--   </pre>
--   
--   This will create a black box (see <tt>rule</tt>) as wide as the text
--   and two points tall.
data Measure

-- | A point is 1/72.27 inch, that means about 0.0138 inch or 0.3515 mm.
Pt :: Double -> Measure

-- | Millimeter.
Mm :: Double -> Measure

-- | Centimeter.
Cm :: Double -> Measure

-- | Inch.
In :: Double -> Measure

-- | The height of an "x" in the current font.
Ex :: Double -> Measure

-- | The width of an "M" in the current font.
Em :: Double -> Measure

-- | You can introduce a <a>LaTeX</a> expression as a measure.
CustomMeasure :: LaTeX -> Measure
instance GHC.Show.Show Text.LaTeX.Base.Types.TableSpec
instance GHC.Show.Show Text.LaTeX.Base.Types.HPos
instance GHC.Show.Show Text.LaTeX.Base.Types.Pos
instance GHC.Show.Show Text.LaTeX.Base.Types.Label
instance GHC.Classes.Eq Text.LaTeX.Base.Types.Label
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Base.Types.TableSpec
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Base.Types.HPos
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Base.Types.Pos
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Base.Types.Label
instance Data.String.IsString Text.LaTeX.Base.Types.Label


-- | This module is the <i>Prelude</i> of LaTeX functions. It includes
--   commands, environments, and some other useful abstractions, that don't
--   require you to import additional LaTeX packages.
module Text.LaTeX.Base.Commands

-- | Insert a raw piece of <a>Text</a>. This functions doesn't escape
--   <tt>LaTeX</tt> reserved characters, it insert the text just as it is
--   received.
--   
--   <i>Warning:</i> This function is <i>unsafe</i>, in the sense that it
--   does not check that the input text is a valid LaTeX <i>block</i>. Make
--   sure any braces, commands or environments are properly closed.
raw :: LaTeXC l => Text -> l

-- | Calling <a>between</a> <tt>c l1 l2</tt> puts <tt>c</tt> between
--   <tt>l1</tt> and <tt>l2</tt> and appends them.
--   
--   <pre>
--   between c l1 l2 = l1 &lt;&gt; c &lt;&gt; l2
--   </pre>
between :: Monoid m => m -> m -> m -> m

-- | Create a comment.
comment :: LaTeXC l => Text -> l

-- | This operator appends a comment after a expression. For example:
--   
--   <pre>
--   textbf "I'm just an example." %: "Insert a few words here."
--   </pre>
--   
--   The implementation is
--   
--   <pre>
--   (%:) l = (l &lt;&gt;) . comment
--   </pre>
--   
--   Since you are writing in Haskell, you may not need to output comments
--   as you can add them in the Haskell source. I added this feature for
--   completeness. It may be useful for debugging the output as well.
(%:) :: LaTeXC l => l -> Text -> l

-- | Set the title of your document.
title :: LaTeXC l => l -> l

-- | Set the author(s) of the document.
author :: LaTeXC l => l -> l

-- | Set a date for your document.
date :: LaTeXC l => l -> l

-- | Set either an institute or an organization for the document. It does
--   <i>not</i> work for a document of the <a>article</a> class.
institute :: LaTeXC l => Maybe l -> l -> l
thanks :: LaTeXC l => l -> l

-- | Set the document class. Needed in all documents.
documentclass :: LaTeXC l => [ClassOption] -> ClassName -> l

-- | Import a package. First argument is a list of options for the package
--   named in the second argument.
usepackage :: LaTeXC l => [l] -> PackageName -> l
linespread :: LaTeXC l => Float -> l
article :: ClassName
proc :: ClassName
report :: ClassName
minimal :: ClassName
book :: ClassName
slides :: ClassName

-- | A class option to be passed to the <a>documentclass</a> function.
data ClassOption
Draft :: ClassOption
TitlePage :: ClassOption
NoTitlePage :: ClassOption
OneColumn :: ClassOption
TwoColumn :: ClassOption
OneSide :: ClassOption
TwoSide :: ClassOption
Landscape :: ClassOption
OpenRight :: ClassOption
OpenAny :: ClassOption
Fleqn :: ClassOption
Leqno :: ClassOption
FontSize :: Measure -> ClassOption
Paper :: PaperType -> ClassOption
CustomOption :: String -> ClassOption
customopt :: String -> ClassOption
draft :: ClassOption
titlepage :: ClassOption
notitlepage :: ClassOption
onecolumn :: ClassOption
twocolumn :: ClassOption
oneside :: ClassOption
twoside :: ClassOption

-- | Changes the layout of the document to print in landscape mode
landscape :: ClassOption

-- | Makes chapters begin either only on right hand pages
openright :: ClassOption

-- | Makes chapters begin on the next page available.
openany :: ClassOption

-- | Typesets displayed formulae left-aligned instead of centred.
fleqn :: ClassOption

-- | Places the numbering of formulae on the left hand side instead of the
--   right.
leqno :: ClassOption

-- | LaTeX available paper types.
data PaperType
A0 :: PaperType
A1 :: PaperType
A2 :: PaperType
A3 :: PaperType
A4 :: PaperType
A5 :: PaperType
A6 :: PaperType
B0 :: PaperType
B1 :: PaperType
B2 :: PaperType
B3 :: PaperType
B4 :: PaperType
B5 :: PaperType
B6 :: PaperType
Letter :: PaperType
Executive :: PaperType
Legal :: PaperType
a0paper :: ClassOption
a1paper :: ClassOption
a2paper :: ClassOption
a3paper :: ClassOption
a4paper :: ClassOption
a5paper :: ClassOption
a6paper :: ClassOption
b0paper :: ClassOption
b1paper :: ClassOption
b2paper :: ClassOption
b3paper :: ClassOption
b4paper :: ClassOption
b5paper :: ClassOption
b6paper :: ClassOption
letterpaper :: ClassOption
executivepaper :: ClassOption
legalpaper :: ClassOption
pagestyle :: LaTeXC l => PageStyle -> l
thispagestyle :: LaTeXC l => PageStyle -> l
plain :: PageStyle
headings :: PageStyle
empty :: PageStyle
myheadings :: PageStyle

-- | Used in conjunction with <a>myheadings</a> for setting both the left
--   and the right heading.
markboth :: LaTeXC l => l -> l -> l

-- | Used in conjunction with <a>myheadings</a> for setting the right
--   heading.
markright :: LaTeXC l => l -> l

-- | The <a>document</a> environment contains the body of the document.
document :: LaTeXC l => l -> l

-- | Append a blank comment. eol :: LaTeXC l =&gt; l eol = comment ""
--   
--   Generate the title. It normally contains the <a>title</a> name of your
--   document, the <a>author</a>(s) and <a>date</a>.
maketitle :: LaTeXC l => l

-- | Create the table of contents, automatically generated from your
--   <a>section</a>s, <a>subsection</a>s, and related functions.
tableofcontents :: LaTeXC l => l

-- | Abstract section.
abstract :: LaTeXC l => l -> l
appendix :: LaTeXC l => l
part :: LaTeXC l => l -> l

-- | Start a new chapter with the given title.
chapter :: LaTeXC l => l -> l

-- | Start a new section with a given title.
section :: LaTeXC l => l -> l

-- | Start a new subsection.
subsection :: LaTeXC l => l -> l

-- | Start a new sub<i>sub</i>section.
subsubsection :: LaTeXC l => l -> l

-- | Start a paragraph.
paragraph :: LaTeXC l => l -> l

-- | Start a subparagraph (minimal level of sectioning).
subparagraph :: LaTeXC l => l -> l

-- | Render the date at compilation time.
today :: LaTeXC l => l

-- | Render the current page.
thePage :: LaTeXC l => l

-- | TeX logo.
tex :: LaTeXC l => l

-- | The <tt>LaTeX</tt> logo.
latex :: LaTeXC l => l

-- | LaTeX logo.
laTeX2 :: LaTeXC l => l
laTeXe :: LaTeXC l => l

-- | Horizontal dots.
ldots :: LaTeXC l => l

-- | Vertical dots.
vdots :: LaTeXC l => l

-- | Diagonal dots.
ddots :: LaTeXC l => l

-- | Print the HaTeX logo.
hatex :: LaTeXC l => l

-- | Print the HaTeX 3 logo.
hatex3 :: LaTeXC l => l
version :: Version

-- | Print the HaTeX logo, beside the complete version number.
hatex_version :: LaTeXC l => l

-- | Start a new paragraph
par :: LaTeXC l => l

-- | Start a new line. It can be used only in paragraph mode.
newline :: LaTeXC l => l

-- | Start a new line. The exactly meaning depends on the context where it
--   is used. In normal running text when it forces a line break it is
--   essentially a shorthand for '\\newline' (does not end horizontal mode
--   or end the paragraph, it just inserts some glue and penalties at that
--   point into the horizontal material so that when the paragraph does end
--   a line break will occur at that point with the short line padded with
--   white space). In alignment environments (like <a>tabular</a>), it
--   starts a new row, so use <a>newline</a> instead to start a new line.
lnbk :: LaTeXC l => l

-- | Like <a>lnbk</a>, <a>lnbk_</a> introduces a line break, but preventing
--   a page break.
lnbk_ :: LaTeXC l => l

-- | Like <a>lnbk</a>, introduces a line break. But it has an argument that
--   specifies how much extra vertical space is to be inserted before the
--   next line. This can be a negative amount.
lnbkspc :: LaTeXC l => Measure -> l

-- | Like <a>lnbkspc</a>, <a>lnbkspc_</a> introduces a line break with an
--   extra vertical space, but preventing a page break.
lnbkspc_ :: LaTeXC l => Measure -> l
newpage :: LaTeXC l => l
cleardoublepage :: LaTeXC l => l
clearpage :: LaTeXC l => l

-- | Request to break the current line at the point of the command
--   stretching the line so that it extends to the right margin. The number
--   must be a number from 0 to 4. The higher the number, the more
--   insistent the request is (0 means it will be easily ignored and 4
--   means do it anyway). When this line break option is used, LaTeX will
--   try to produce the best line breaks possible.
linebreak :: LaTeXC l => l -> l

-- | Like <a>linebreak</a>, but prevents a like break instead of requesting
--   one.
nolinebreak :: LaTeXC l => l -> l
pagebreak :: LaTeXC l => l -> l
nopagebreak :: LaTeXC l => l -> l
hspace :: LaTeXC l => Measure -> l
hspace_ :: LaTeXC l => Measure -> l

-- | Add vertical white space, except at the end of a page.
vspace :: LaTeXC l => Measure -> l

-- | Add vertical white space, even at the end of a page.
vspace_ :: LaTeXC l => Measure -> l

-- | Add extra vertical white space. In a sequence of <a>addvspace</a> the
--   length of the final white space is given by the maximum of the
--   individual lengths.
addvspace :: LaTeXC l => Measure -> l

-- | Fill out all available horizontal space.
hfill :: LaTeXC l => l

-- | Fill out all available vertical space.
vfill :: LaTeXC l => l

-- | Fill out all available horizontal space with dots.
dotfill :: LaTeXC l => l

-- | Fill out all available horizontal space with a line.
hrulefill :: LaTeXC l => l
stretch :: LaTeXC l => Double -> l
smallskip :: LaTeXC l => l
medskip :: LaTeXC l => l
bigskip :: LaTeXC l => l
baselineskip :: LaTeXC l => l
indent :: LaTeXC l => l
noindent :: LaTeXC l => l
textwidth :: LaTeXC l => l
textheight :: LaTeXC l => l
linewidth :: LaTeXC l => l

-- | The point of <a>verbatim</a> is to include text that will <i>not</i>
--   be parsed as LaTeX in any way at all, but should simply appear as
--   given in the document, in a separate display in typewriter font.
verbatim :: LaTeXC l => Text -> l

-- | Include text, as given and in typewriter, but in-line. Note that, for
--   LaTeX-specific technical reasons, verbatim text can generally only be
--   used "at the top level", not in e.g. section titles or other
--   command-arguments.
--   
--   Unlike <a>verbatim</a>, which LaTeX implements as an ordinary
--   environment, its command <a>verb</a> uses a syntax trick to avoid
--   braking its parsing when the literal text contains a closing brace:
--   rather than using braces at all, the first character after
--   <tt>\verb</tt> will be the right delimiter as well. Translating this
--   method to HaTeX wouldn't really make sense since Haskell has string
--   literals with their own escaping possibilities; instead, we make it
--   secure by automatically choosing a delimiter that does not turn up in
--   the given string.
verb :: LaTeXC l => Text -> l

-- | Set the given argument to bold font face.
textbf :: LaTeXC l => l -> l
textit :: LaTeXC l => l -> l

-- | Set the given argument to monospaced font.
texttt :: LaTeXC l => l -> l
textrm :: LaTeXC l => l -> l
textsf :: LaTeXC l => l -> l
textmd :: LaTeXC l => l -> l
textup :: LaTeXC l => l -> l
textsl :: LaTeXC l => l -> l

-- | Set the given argument to small caps format.
textsc :: LaTeXC l => l -> l
textnormal :: LaTeXC l => l -> l
underline :: LaTeXC l => l -> l
emph :: LaTeXC l => l -> l
tiny :: LaTeXC l => l -> l
scriptsize :: LaTeXC l => l -> l
footnotesize :: LaTeXC l => l -> l
small :: LaTeXC l => l -> l
normalsize :: LaTeXC l => l -> l
large :: LaTeXC l => l -> l
large2 :: LaTeXC l => l -> l
large3 :: LaTeXC l => l -> l
huge :: LaTeXC l => l -> l
huge2 :: LaTeXC l => l -> l

-- | Environment of ordered lists. Use <a>item</a> to start each list item.
enumerate :: LaTeXC l => l -> l

-- | Environment of unordered lists. Use <a>item</a> to start each list
--   item.
itemize :: LaTeXC l => l -> l

-- | An item of a list (see <a>enumerate</a> or <a>itemize</a>). The
--   optional argument sets the design of the item.
item :: LaTeXC l => Maybe l -> l

-- | Left-justify the argument.
flushleft :: LaTeXC l => l -> l

-- | Right-justify the argument.
flushright :: LaTeXC l => l -> l

-- | Center-justify the argument.
center :: LaTeXC l => l -> l
quote :: LaTeXC l => l -> l
verse :: LaTeXC l => l -> l
cite :: LaTeXC l => l -> l
description :: LaTeXC l => l -> l

-- | Minipage environment.
minipage :: LaTeXC l => Maybe Pos -> l -> l -> l

-- | Figure environment. Use this for floating
--   <a>Text.LaTeX.Packages.Graphicx</a> content out of the text block and
--   giving it a <a>caption</a>. The figure can be referred to with
--   <a>ref</a> from elsewhere in the document.
figure :: LaTeXC l => Maybe Pos -> l -> l

-- | Table environment. Use this for floating a <a>tabular</a> out of the
--   text block and giving it a <a>caption</a>. The table can be referred
--   to with <a>ref</a>.
table :: LaTeXC l => Maybe Pos -> l -> l
pagenumbering :: LaTeXC l => l -> l

-- | Arabic numerals.
arabic :: LaTeXC l => l

-- | Lowercase roman numerals.
roman :: LaTeXC l => l

-- | Uppercase roman numerals.
roman_ :: LaTeXC l => l

-- | Lowercase letters.
alph :: LaTeXC l => l

-- | Uppercase letters.
alph_ :: LaTeXC l => l
mbox :: LaTeXC l => l -> l
fbox :: LaTeXC l => l -> l
parbox :: LaTeXC l => Maybe Pos -> Measure -> l -> l
framebox :: LaTeXC l => Maybe Measure -> Maybe HPos -> l -> l
makebox :: LaTeXC l => Maybe Measure -> Maybe HPos -> l -> l
raisebox :: LaTeXC l => Measure -> Maybe Measure -> Maybe Measure -> l -> l

-- | Produce a simple black box.
rule :: LaTeXC l => Maybe Measure -> Measure -> Measure -> l
caption :: LaTeXC l => l -> l
label :: LaTeXC l => l -> l
ref :: LaTeXC l => l -> l
pageref :: LaTeXC l => l -> l

-- | The <a>tabular</a> environment can be used to typeset tables with
--   optional horizontal and vertical lines.
tabular :: LaTeXC l => Maybe Pos -> [TableSpec] -> l -> l

-- | <a>tabularnewline</a> ends a row in array or tabular environments. The
--   '\' command has different meanings in different contexts. It can end a
--   line in normal text, or it can end an array or tabular line. It may be
--   preferrable to use <a>newline</a> and in the first case, and
--   <a>tabularnewline</a> in the second.
tabularnewline :: LaTeXC l => l
tabularnewlineSpc :: LaTeXC l => Measure -> l

-- | <a>arraybackslash</a> resets the definition of '\' to
--   <a>tabularnewline</a>.
arraybackslash :: LaTeXC l => l

-- | Like <a>tabular</a> but in math mode by default
array :: LaTeXC l => Maybe Pos -> [TableSpec] -> l -> l

-- | Column separator.
(&) :: LaTeXC l => l -> l -> l

-- | Horizontal line.
hline :: LaTeXC l => l

-- | <tt>cline i j</tt> writes a partial horizontal line beginning in
--   column <tt>i</tt> and ending in column <tt>j</tt>.
cline :: LaTeXC l => Int -> Int -> l

-- | Cell taking multiple columns.
multicolumn :: LaTeXC l => Int -> [TableSpec] -> l -> l

-- | If you are able to arrange some data in matrix form, you might want to
--   use this function to quickly generate a tabular with your data. Each
--   element of the matrix is rendered using the <a>Texy</a> instance of
--   its type. If you want a custom instance for an already instantiated
--   type, wrap that type using <tt>newtype</tt>, and then create your own
--   instance. Since every element of a matrix must be of the same type,
--   for mixed tables you might want to create an union type. For example,
--   if your data matrix contains <a>Int</a>s and <a>Double</a>s:
--   
--   <pre>
--   data Number = R Double | I Int
--   
--   instance Texy Number where
--     texy (R x) = texy x
--     texy (I x) = texy x
--   </pre>
--   
--   Now you can have a matrix of type <tt>Matrix Number</tt> and use it to
--   render your mixed data in a LaTeX table.
--   
--   The function <a>matrixTabular</a> does not give you many options, so
--   it is not as flexible as generating the table by yourself, but it uses
--   a reasonable standard style.
--   
--   A very simple example:
--   
--   <pre>
--   matrixTabular (fmap textbf ["x","y","z"]) $
--     fromList 3 3 [ (1 :: Int)..]
--   </pre>
--   
--   This code generates the following table:
--   
--   
--   For more examples see the file <tt>Examples/tables.hs</tt>, included
--   in the source distribution.
--   
--   For more info about how to generate and manipulate matrices, see
--   <a>Data.Matrix</a>.
matrixTabular :: (LaTeXC l, Texy a) => [l] -> Matrix a -> l
centering :: LaTeXC l => l
raggedleft :: LaTeXC l => l
raggedright :: LaTeXC l => l
footnote :: LaTeXC l => l -> l
protect :: LaTeXC l => l -> l
hyphenation :: LaTeXC l => l -> l
hyp :: LaTeXC l => l

-- | Quotation marks.
qts :: LaTeXC l => l -> l

-- | Import an external file and insert its content <i>as it is</i>.
input :: LaTeXC l => FilePath -> l

-- | Similar to <a>input</a>, but forces a page break.
--   
--   <i>Note: the file you are including cannot include other files.</i>
include :: LaTeXC l => FilePath -> l
instance GHC.Show.Show Text.LaTeX.Base.Commands.ClassOption
instance GHC.Show.Show Text.LaTeX.Base.Commands.PaperType
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Base.Commands.ClassOption
instance Data.String.IsString Text.LaTeX.Base.Commands.ClassOption
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Base.Commands.PaperType


-- | This module provides functionality for check a <a>LaTeX</a> value for
--   possibly undesired things (like the call to an undefined label),
--   returning <a>Warning</a>s. These are called <a>Warning</a>s because
--   they never terminate the program execution.
module Text.LaTeX.Base.Warnings

-- | List of possible warnings.
data Warning

-- | There is an unused label. Argument is its name.
UnusedLabel :: Text -> Warning

-- | There is a reference to an undefined label. Arguments is the name.
UndefinedLabel :: Text -> Warning

-- | No class selected with <tt>documentclass</tt>.
NoClassSelected :: Warning

-- | No <tt>document</tt> inserted.
NoDocumentInserted :: Warning

-- | Custom warning for custom checkings. Use it as you want.
CustomWarning :: Text -> Warning

-- | A <a>TeXCheck</a> is a function that checks possible warnings from a
--   <a>LaTeX</a> value. Use the <a>Monoid</a> instance to combine check
--   functions.
data TeXCheck

-- | Apply a checking.
check :: TeXCheck -> LaTeX -> [Warning]

-- | Build a <a>TeXCheck</a> from a function.
checkFromFunction :: (LaTeX -> [Warning]) -> TeXCheck

-- | Checking for unused labels or references tu undefined labels.
checkLabels :: TeXCheck

-- | Check if a document class is specified for the document (using
--   <tt>documentclass</tt>).
checkClass :: TeXCheck

-- | Check if the <tt>document</tt> environment is called in a
--   <a>LaTeX</a>.
checkDoc :: TeXCheck

-- | Check with <a>checkLabels</a>, <a>checkClass</a> and <a>checkDoc</a>.
checkAll :: TeXCheck
instance GHC.Show.Show Text.LaTeX.Base.Warnings.Warning
instance GHC.Classes.Eq Text.LaTeX.Base.Warnings.Warning
instance GHC.Base.Semigroup Text.LaTeX.Base.Warnings.TeXCheck
instance GHC.Base.Monoid Text.LaTeX.Base.Warnings.TeXCheck


-- | The writer monad applied to <a>LaTeX</a> values. Useful to compose
--   <a>LaTeX</a> values using the <tt>do</tt> notation:
--   
--   <pre>
--   anExample :: Monad m =&gt; LaTeXT m ()
--   anExample = do
--     documentclass [] article
--     author "Daniel Monad"
--     title "LaTeX and do notation"
--     document $ do
--       maketitle
--       section "Some words"
--       "Using " ; texttt "do" ; " notation "
--       "you avoid many ocurrences of the "
--       texttt "(&lt;&gt;)" ; " operator and a lot of "
--       "parentheses. With the cost of a monad."
--   </pre>
--   
--   Since <a>LaTeXT</a> is a monad transformer, you can do also:
--   
--   <pre>
--   anotherExample :: LaTeXT IO ()
--   anotherExample = lift (readFileTex "foo") &gt;&gt;= verbatim
--   </pre>
--   
--   This way, it is easy (without carrying arguments) to include IO
--   outputs in the LaTeX document, like files, times or random objects.
--   
--   Another approach could be to have custom counters, label management or
--   any other user-defined feature.
--   
--   Of course, you can always use the simpler interface provided by the
--   plain <a>LaTeX</a> type.
module Text.LaTeX.Base.Writer

-- | <a>WriterT</a> monad transformer applied to <a>LaTeX</a> values.
data LaTeXT m a

-- | Running a <a>LaTeXT</a> computation returns the final <a>LaTeX</a>
--   value.
runLaTeXT :: LaTeXT m a -> m (a, LaTeX)

-- | This is the usual way to run the <a>LaTeXT</a> monad and obtain a
--   <a>LaTeX</a> value.
--   
--   <pre>
--   execLaTeXT = liftM snd . runLaTeXT
--   </pre>
--   
--   If <tt>anExample</tt> is defined as above (at the top of this module
--   documentation), use the following to get the LaTeX value generated
--   out.
--   
--   <pre>
--   myLaTeX :: Monad m =&gt; m LaTeX
--   myLaTeX = execLaTeXT anExample
--   </pre>
execLaTeXT :: Monad m => LaTeXT m a -> m LaTeX

-- | Type synonym for empty <a>LaTeXT</a> computations.
type LaTeXT_ m = LaTeXT m ()

-- | The <a>LaTeXT</a> monad transformed applied to <a>Identity</a>.
type LaTeXM = LaTeXT Identity

-- | A particular case of <a>runLaTeXT</a>.
--   
--   <pre>
--   runLaTeXM = runIdentity . runLaTeXT
--   </pre>
runLaTeXM :: LaTeXM a -> (a, LaTeX)

-- | A particular case of <a>execLaTeXT</a>.
--   
--   <pre>
--   execLaTeXM = runIdentity . execLaTeXT
--   </pre>
execLaTeXM :: LaTeXM a -> LaTeX

-- | Version of <a>execLaTeXT</a> with possible warning messages. This
--   function applies <a>checkAll</a> to the <a>LaTeX</a> output.
execLaTeXTWarn :: Monad m => LaTeXT m a -> m (LaTeX, [Warning])

-- | This function run a <a>LaTeXT</a> computation, lifting the result
--   again in the monad.
extractLaTeX :: Monad m => LaTeXT m a -> LaTeXT m (a, LaTeX)

-- | Executes a <a>LaTeXT</a> computation, embedding it again in the
--   <a>LaTeXT</a> monad.
--   
--   <pre>
--   extractLaTeX_ = liftM snd . extractLaTeX
--   </pre>
--   
--   This function was heavily used in the past by HaTeX-meta to generate
--   those <tt>.Monad</tt> modules. The current purpose is to implement the
--   <a>LaTeXC</a> instance of <a>LaTeXT</a>, which is closely related.
extractLaTeX_ :: Monad m => LaTeXT m a -> LaTeXT m LaTeX

-- | With <a>textell</a> you can append <a>LaTeX</a> values to the state of
--   the <a>LaTeXT</a> monad.
textell :: Monad m => LaTeX -> LaTeXT m ()

-- | Just like <a>rendertex</a>, but with <a>LaTeXT</a> output.
--   
--   <pre>
--   rendertexM = textell . rendertex
--   </pre>
rendertexM :: (Render a, Monad m) => a -> LaTeXT m ()

-- | Lift a function over <a>LaTeX</a> values to a function acting over the
--   state of a <a>LaTeXT</a> computation.
liftFun :: Monad m => (LaTeX -> LaTeX) -> (LaTeXT m a -> LaTeXT m a)

-- | Lift an operator over <a>LaTeX</a> values to an operator acting over
--   the state of two <a>LaTeXT</a> computations.
--   
--   <i>Note: The returned value is the one returned by the</i> <i>second
--   argument of the lifted operator.</i>
liftOp :: Monad m => (LaTeX -> LaTeX -> LaTeX) -> (LaTeXT m a -> LaTeXT m b -> LaTeXT m b)

-- | A helper function for building monad transformers, e.g.
--   
--   <pre>
--   instance MonadReader r m =&gt; MonadReader r (LaTeXT m) where
--     ask = lift ask
--     local = mapLaTeXT . local
--   </pre>
--   
--   This declaration could be included here, but it would add a dependency
--   on mtl.
mapLaTeXT :: (m (a, LaTeX) -> m (a, LaTeX)) -> LaTeXT m a -> LaTeXT m a

-- | Lift a computation from the argument monad to the constructed monad.
lift :: (MonadTrans t, Monad m) => m a -> t m a

-- | Lift a computation from the <a>IO</a> monad.
liftIO :: MonadIO m => IO a -> m a
instance GHC.Base.Functor f => GHC.Base.Functor (Text.LaTeX.Base.Writer.LaTeXT f)
instance GHC.Base.Applicative f => GHC.Base.Applicative (Text.LaTeX.Base.Writer.LaTeXT f)
instance Control.Monad.Trans.Class.MonadTrans Text.LaTeX.Base.Writer.LaTeXT
instance GHC.Base.Monad m => GHC.Base.Monad (Text.LaTeX.Base.Writer.LaTeXT m)
instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Text.LaTeX.Base.Writer.LaTeXT m)
instance (GHC.Base.Monad m, a ~ ()) => Text.LaTeX.Base.Class.LaTeXC (Text.LaTeX.Base.Writer.LaTeXT m a)
instance (GHC.Base.Monad m, a ~ ()) => Data.String.IsString (Text.LaTeX.Base.Writer.LaTeXT m a)
instance (GHC.Base.Monad m, GHC.Base.Monoid a) => GHC.Base.Monoid (Text.LaTeX.Base.Writer.LaTeXT m a)
instance (GHC.Base.Applicative m, GHC.Base.Semigroup a) => GHC.Base.Semigroup (Text.LaTeX.Base.Writer.LaTeXT m a)


-- | This module exports those minimal things you need to work with HaTeX.
--   Those things are:
--   
--   <ul>
--   <li>The <a>LaTeX</a> datatype.</li>
--   <li>The <a>&lt;&gt;</a> operator, to append <a>LaTeX</a> values.</li>
--   <li>The <a>Text.LaTeX.Base.Render</a> module, to render a <a>LaTeX</a>
--   value into <a>Text</a>.</li>
--   <li>The <a>Text.LaTeX.Base.Types</a> module, which contains several
--   types used by other modules.</li>
--   <li>The <a>Text.LaTeX.Base.Commands</a> module, which exports the
--   LaTeX standard commands and environments.</li>
--   <li>The <a>Text.LaTeX.Base.Writer</a> module, to work with the monad
--   interface of the library.</li>
--   <li>The <a>Text.LaTeX.Base.Texy</a> module, which exports the
--   <a>Texy</a> class. Useful to pretty-print values in LaTeX form.</li>
--   </ul>
module Text.LaTeX.Base

-- | Type of <tt>LaTeX</tt> blocks.
data LaTeX

-- | Escape LaTeX reserved characters in a <a>String</a>.
protectString :: String -> String

-- | Escape LaTeX reserved characters in a <a>Text</a>.
protectText :: Text -> Text

-- | The class of monoids (types with an associative binary operation that
--   has an identity). Instances should satisfy the following laws:
--   
--   <ul>
--   <li><pre>x <a>&lt;&gt;</a> <a>mempty</a> = x</pre></li>
--   <li><pre><a>mempty</a> <a>&lt;&gt;</a> x = x</pre></li>
--   <li><tt>x <a>&lt;&gt;</a> (y <a>&lt;&gt;</a> z) = (x <a>&lt;&gt;</a>
--   y) <a>&lt;&gt;</a> z</tt> (<a>Semigroup</a> law)</li>
--   <li><pre><a>mconcat</a> = <a>foldr</a> '(&lt;&gt;)'
--   <a>mempty</a></pre></li>
--   </ul>
--   
--   The method names refer to the monoid of lists under concatenation, but
--   there are many other instances.
--   
--   Some types can be viewed as a monoid in more than one way, e.g. both
--   addition and multiplication on numbers. In such cases we often define
--   <tt>newtype</tt>s and make those instances of <a>Monoid</a>, e.g.
--   <tt>Sum</tt> and <tt>Product</tt>.
--   
--   <b>NOTE</b>: <a>Semigroup</a> is a superclass of <a>Monoid</a> since
--   <i>base-4.11.0.0</i>.
class Semigroup a => Monoid a

-- | Identity of <a>mappend</a>
mempty :: Monoid a => a

-- | An associative operation
--   
--   <b>NOTE</b>: This method is redundant and has the default
--   implementation <tt><a>mappend</a> = '(&lt;&gt;)'</tt> since
--   <i>base-4.11.0.0</i>.
mappend :: Monoid a => a -> a -> a

-- | Fold a list using the monoid.
--   
--   For most types, the default definition for <a>mconcat</a> will be
--   used, but the function is included in the class definition so that an
--   optimized version can be provided for specific types.
mconcat :: Monoid a => [a] -> a

-- | An associative operation.
(<>) :: Semigroup a => a -> a -> a
infixr 6 <>


-- | This module is a re-export of the Base module. You may find it shorter
--   to import. Below you can also find a short overview of HaTeX.
--   
--   Historically, this module also exported the Packages module. But,
--   since it's more common to import the Base module and, then, only the
--   packages you need (instead of all of them), this module has been
--   upgraded supporting it.
--   
--   For this reason, the module <tt>Text.LaTeX.Packages</tt> no longer
--   exists.
module Text.LaTeX


-- | Module for the package <tt>amsfonts</tt>.
module Text.LaTeX.Packages.AMSFonts

-- | AMSFonts package. Example:
--   
--   <pre>
--   usepackage [] amsfonts
--   </pre>
amsfonts :: ClassName

-- | This font is useful for representing sets like R (real numbers) or Z
--   (integers). For instance:
--   
--   <pre>
--   "The set of real numbers are represented by " &lt;&gt; mathbb "R" &lt;&gt; "."
--   </pre>
--   
--   Or in monadic form:
--   
--   <pre>
--   "The set of real numbers are represented by " &gt;&gt; mathbb "R" &gt;&gt; "."
--   </pre>
--   
--   <i>Note the use of overloaded strings.</i>
mathbb :: LaTeXC l => l -> l

-- | Fraktur font.
mathfrak :: LaTeXC l => l -> l

-- | Number sets
naturals :: LaTeXC l => l
integers :: LaTeXC l => l
rationals :: LaTeXC l => l
reals :: LaTeXC l => l
complexes :: LaTeXC l => l
trealPart :: LaTeXC l => l -> l
timagPart :: LaTeXC l => l -> l


-- | AMSMath support. Also numeric instances (<a>Num</a>, <a>Fractional</a>
--   and <a>Floating</a>) for <a>LaTeX</a> and <a>LaTeXT</a>.
module Text.LaTeX.Packages.AMSMath

-- | AMSMath package. Example:
--   
--   <pre>
--   usepackage [] amsmath
--   </pre>
amsmath :: PackageName

-- | Inline mathematical expressions.
math :: LaTeXC l => l -> l

-- | Displayed mathematical expressions, i.e. in a seperate line / block.
mathDisplay :: LaTeXC l => l -> l

-- | A numbered mathematical equation (or otherwise math expression).
equation :: LaTeXC l => l -> l

-- | The unnumbered variant of <a>equation</a>.
equation_ :: LaTeXC l => l -> l

-- | An array of aligned equations. Use <a>&amp;</a> to specify the points
--   that should horizontally match. Each equation is numbered, unless
--   prevented by <a>nonumber</a>.
align :: LaTeXC l => [l] -> l

-- | The unnumbered variant of <a>align</a>.
align_ :: LaTeXC l => [l] -> l

-- | The cases environment allows the writing of piecewise functions
cases :: LaTeXC l => l -> l

-- | A reference to a numbered equation. Use with a <a>label</a> defined in
--   the scope of the equation refered to.
eqref :: LaTeXC l => l -> l

-- | Prevent an equation from being numbered, where the environment would
--   by default do that.
nonumber :: LaTeXC l => l

-- | Surround a LaTeX math expression by parentheses whose height
--   automatically matches the expression's. Translates to
--   <tt>\left(...\right)</tt>.
autoParens :: LaTeXC l => l -> l

-- | Like <a>autoParens</a>, but with square brackets. Equivalent to
--   <tt><a>autoBrackets</a>"[""]"</tt>.
autoSquareBrackets :: LaTeXC l => l -> l

-- | Like <a>autoParens</a>, but with curly brackets.
autoBraces :: LaTeXC l => l -> l

-- | Like <a>autoParens</a>, but with angle brackets 〈 ... 〉. Equivalent to
--   <tt><a>autoBrackets</a> <a>langle</a> <a>rangle</a></tt>.
autoAngleBrackets :: LaTeXC l => l -> l

-- | Use custom LaTeX expressions as auto-scaled delimiters to surround
--   math. Suitable delimiters include |...| (absolute value), ‖...‖ (norm,
--   <a>dblPipe</a>), ⌊...⌋ (round-off Gauss brackets, <a>lfloor</a> /
--   <a>rfloor</a>) etc..
autoBrackets :: LaTeXC l => LaTeX -> LaTeX -> l -> l

-- | Left angle bracket, 〈.
langle :: LaTeXC l => l

-- | Right angle bracket, 〉.
rangle :: LaTeXC l => l

-- | Left floor, ⌊.
lfloor :: LaTeXC l => l

-- | Right floor, ⌋.
rfloor :: LaTeXC l => l

-- | Left ceiling, ⌈.
lceil :: LaTeXC l => l

-- | Right ceiling, ⌉.
rceil :: LaTeXC l => l

-- | Double vertical line, used as delimiter for norms (‖ ... ‖).
dblPipe :: LaTeXC l => l

-- | Superscript.
(^:) :: LaTeXC l => l -> l -> l

-- | Subscript.
(!:) :: LaTeXC l => l -> l -> l

-- | Sub- and superscript, both stacked.
(!^) :: LaTeXC l => l -> (l, l) -> l

-- | Sine function symbol.
tsin :: LaTeXC l => l

-- | Arcsine function symbol.
arcsin :: LaTeXC l => l

-- | Cosine function symbol.
tcos :: LaTeXC l => l

-- | Arccosine function symbol.
arccos :: LaTeXC l => l

-- | Tangent function symbol.
ttan :: LaTeXC l => l

-- | Arctangent function symbol.
arctan :: LaTeXC l => l

-- | Cotangent function symbol.
cot :: LaTeXC l => l

-- | Arccotangent function symbol.
arccot :: LaTeXC l => l

-- | Hyperbolic sine function symbol.
tsinh :: LaTeXC l => l

-- | Hyperbolic cosine function symbol.
tcosh :: LaTeXC l => l

-- | Hyperbolic tangent function symbol.
ttanh :: LaTeXC l => l

-- | Hyperbolic cotangent function symbol.
coth :: LaTeXC l => l

-- | Secant function symbol.
sec :: LaTeXC l => l

-- | Cosecant function symbol.
csc :: LaTeXC l => l

-- | Exponential function symbol.
texp :: LaTeXC l => l

-- | Logarithm function symbol.
tlog :: LaTeXC l => l

-- | Natural logarithm symbol.
ln :: LaTeXC l => l

-- | Root notation. Use <tt>tsqrt (Just n) x</tt> for the <tt>n</tt>th root
--   of <tt>x</tt>. When <a>Nothing</a> is supplied, the function will
--   output a square root.
tsqrt :: LaTeXC l => Maybe l -> l -> l

-- | Defines a new function symbol. Note that function symbols defined in
--   this way will not be automatically translated by babel.
operatorname :: LaTeXC l => l -> l

-- | Sigma sumation symbol. Use <a>sumFromTo</a> instead if you want to
--   specify the limits of the sum.
tsum :: LaTeXC l => l

-- | Sigma sumation symbol with limits.
sumFromTo :: LaTeXC l => l -> l -> l

-- | Pi product symbol. Use <a>prodFromTo</a> if you want to specify the
--   limits of the product.
prod :: LaTeXC l => l

-- | Pi product symbol with limits.
prodFromTo :: LaTeXC l => l -> l -> l

-- | Integral symbol. Use <a>integralFromTo</a> if you want to specify the
--   limits of the integral.
integral :: LaTeXC l => l

-- | Integral symbol with limits of integration.
integralFromTo :: LaTeXC l => l -> l -> l

-- | Partial-differentiation symbol ∂
partial :: LaTeXC l => l

-- | Total-differentiation (or integration-variable) symbol d (non-italic!)
totald :: LaTeXC l => l

-- | Partial-differentiation of variable, e.g. <i>∂x</i>.
partialOf :: LaTeXC l => l -> l

-- | Total-differentiation of variable, or integration over variable, e.g.
--   d<i>x</i>.
totaldOf :: LaTeXC l => l -> l

-- | Plus-or-minus operator (±). Also available as symbol <a>pm</a>.
(+-) :: LaTeXC l => l -> l -> l
infixl 6 +-

-- | Minus-or-plus operator (∓). Also available as symbol <a>mp</a>.
(-+) :: LaTeXC l => l -> l -> l
infixl 6 -+

-- | Centered-dot operator (⋅).
cdot :: LaTeXC l => l -> l -> l

-- | "x-cross" multiplication operator (×).
times :: LaTeXC l => l -> l -> l

-- | Division operator.
div_ :: LaTeXC l => l -> l -> l

-- | Fraction operator.
frac :: LaTeXC l => l -> l -> l

-- | Like <a>frac</a> but smaller (uses subscript size for the numerator
--   and denominator.
tfrac :: LaTeXC l => l -> l -> l

-- | Asterisk operator (*).
--   
--   <pre>
--   infixl 7 *:
--   </pre>
(*:) :: LaTeXC l => l -> l -> l
infixl 7 *:

-- | Star operator (★).
star :: LaTeXC l => l -> l -> l

-- | Ring operator (∘).
circ :: LaTeXC l => l -> l -> l

-- | Bullet operator (∙).
bullet :: LaTeXC l => l -> l -> l

-- | Equal.
--   
--   <pre>
--   infixr 4 =:
--   </pre>
(=:) :: LaTeXC l => l -> l -> l
infixr 4 =:

-- | Not equal (≠).
--   
--   <pre>
--   infixr 4 /=:
--   </pre>
(/=:) :: LaTeXC l => l -> l -> l
infixr 4 /=:

-- | Lesser.
(<:) :: LaTeXC l => l -> l -> l

-- | Lesser or equal (≤).
(<=:) :: LaTeXC l => l -> l -> l

-- | Greater.
(>:) :: LaTeXC l => l -> l -> l

-- | Greater or equal (≥).
(>=:) :: LaTeXC l => l -> l -> l

-- | Much less (≪).
ll :: LaTeXC l => l -> l -> l

-- | Much greater (≫).
gg :: LaTeXC l => l -> l -> l

-- | Identical / defined-as / equivalent (≡).
equiv :: LaTeXC l => l -> l -> l

-- | Proportional-to (∝).
propto :: LaTeXC l => l -> l -> l

-- | Parallel (‖).
parallel :: LaTeXC l => l -> l -> l

-- | Perpendicular (⟂). This is the infix version of <a>bot</a>.
perp :: LaTeXC l => l -> l -> l

-- | Element-of (∈).
in_ :: LaTeXC l => l -> l -> l

-- | Mirrored element-of (∋).
ni :: LaTeXC l => l -> l -> l

-- | Not element of (∉).
notin :: LaTeXC l => l -> l -> l

-- | Subset-of (⊂).
subset :: LaTeXC l => l -> l -> l

-- | Superset-of (⊃).
supset :: LaTeXC l => l -> l -> l

-- | Set intersection (∩).
cap :: LaTeXC l => l -> l -> l

-- | Set union (∪).
cup :: LaTeXC l => l -> l -> l

-- | Set minus (∖).
setminus :: LaTeXC l => l -> l -> l

-- | Angle pointing downwards (∨).
vee :: LaTeXC l => l -> l -> l

-- | Angle pointing upwards (∧).
wedge :: LaTeXC l => l -> l -> l

-- | Circled plus operator (⊕).
oplus :: LaTeXC l => l -> l -> l

-- | Circled minus operator (⊖).
ominus :: LaTeXC l => l -> l -> l

-- | Circled multiplication cross (⊗).
otimes :: LaTeXC l => l -> l -> l

-- | Circled slash (⊘).
oslash :: LaTeXC l => l -> l -> l

-- | Circled dot operator (⊙).
odot :: LaTeXC l => l -> l -> l

-- | Add a hat accent above a symbol.
hat :: LaTeXC l => l -> l

-- | Add a tilde accent above a symbol.
tilde :: LaTeXC l => l -> l

-- | Add a bar accent above a symbol.
bar :: LaTeXC l => l -> l

-- | Add a vector arrow accent above a symbol.
vec :: LaTeXC l => l -> l

-- | Add a wide hat accent above a symbol.
widehat :: LaTeXC l => l -> l

-- | Add a wide tilde accent above a symbol.
widetilde :: LaTeXC l => l -> l

-- | Add a dot accent above a symbol, as used to denote a derivative.
dot :: LaTeXC l => l -> l

-- | Add a dot accent above a symbol, as used to denote a second
--   derivative.
ddot :: LaTeXC l => l -> l

-- | Add a triple dot accent above a symbol, as used to denote a third
--   derivative.
dddot :: LaTeXC l => l -> l

-- | Add a wide line accent above a symbol.
overline :: LaTeXC l => l -> l

-- | <i>α</i> symbol.
alpha :: LaTeXC l => l

-- | <i>β</i> symbol.
beta :: LaTeXC l => l

-- | <i>γ</i> symbol.
gamma :: LaTeXC l => l

-- | Γ symbol.
gammau :: LaTeXC l => l

-- | <i>δ</i> symbol.
delta :: LaTeXC l => l

-- | Δ symbol.
deltau :: LaTeXC l => l

-- | <i>ϵ</i> symbol.
epsilon :: LaTeXC l => l

-- | <i>ε</i> symbol.
varepsilon :: LaTeXC l => l

-- | <i>ζ</i> symbol.
zeta :: LaTeXC l => l

-- | <i>η</i> symbol.
eta :: LaTeXC l => l

-- | <i>θ</i> symbol.
theta :: LaTeXC l => l

-- | <i>ϑ</i> symbol.
vartheta :: LaTeXC l => l

-- | Θ symbol.
thetau :: LaTeXC l => l

-- | <i>ι</i> symbol.
iota :: LaTeXC l => l

-- | <i>κ</i> symbol.
kappa :: LaTeXC l => l

-- | <i>λ</i> symbol.
lambda :: LaTeXC l => l

-- | Λ symbol.
lambdau :: LaTeXC l => l

-- | <i>μ</i> symbol.
mu :: LaTeXC l => l

-- | <i>ν</i> symbol.
nu :: LaTeXC l => l

-- | <i>ξ</i> symbol.
xi :: LaTeXC l => l

-- | Ξ symbol.
xiu :: LaTeXC l => l

-- | <i>π</i> symbol.
pi_ :: LaTeXC l => l

-- | <i>ϖ</i> symbol.
varpi :: LaTeXC l => l

-- | Π symbol.
piu :: LaTeXC l => l

-- | <i>ρ</i> symbol.
rho :: LaTeXC l => l

-- | <i>ϱ</i> symbol.
varrho :: LaTeXC l => l

-- | <i>σ</i> symbol.
sigma :: LaTeXC l => l

-- | <i>ς</i> symbol.
varsigma :: LaTeXC l => l

-- | Σ symbol.
sigmau :: LaTeXC l => l

-- | <i>τ</i> symbol.
tau :: LaTeXC l => l

-- | <i>υ</i> symbol.
upsilon :: LaTeXC l => l

-- | Υ symbol.
upsilonu :: LaTeXC l => l

-- | <i>ϕ</i> symbol.
phi :: LaTeXC l => l

-- | <i>φ</i> symbol.
varphi :: LaTeXC l => l

-- | Φ symbol.
phiu :: LaTeXC l => l

-- | <i>χ</i> symbol.
chi :: LaTeXC l => l

-- | <i>ψ</i> symbol.
psi :: LaTeXC l => l

-- | Ψ symbol.
psiu :: LaTeXC l => l

-- | <i>ω</i> symbol.
omega :: LaTeXC l => l

-- | Ω symbol.
omegau :: LaTeXC l => l

-- | Plus-or-minus symbol (±). Also available as infix <a>+-</a>.
pm :: LaTeXC l => l

-- | Minus-or-plus symbol (∓).
mp :: LaTeXC l => l

-- | A right-arrow, →.
to :: LaTeXC l => l

-- | A right-arrow for function definitions, ↦.
mapsto :: LaTeXC l => l

-- | An implication arrow, =⇒.
implies :: LaTeXC l => l

-- | <i>For all</i> symbol, ∀.
forall :: LaTeXC l => l

-- | <i>Exists</i> symbol, ∃.
exists :: LaTeXC l => l

-- | Dagger symbol, †.
dagger :: LaTeXC l => l

-- | Double dagger symbol, ‡.
ddagger :: LaTeXC l => l

-- | Infinity symbol.
infty :: LaTeXC l => l

-- | Dotless letter i. Strictly speaking this is not a part of the AMSMath
--   package, but it is defined here for convenience.
imath :: LaTeXC l => l

-- | Dotless letter j. Strictly speaking this is not a part of the AMSMath
--   package, but it is defined here for convenience.
jmath :: LaTeXC l => l

-- | Bottom symbol ⟂. For the infix version see <a>perp</a>.
bot :: LaTeXC l => l

-- | Default math symbol font.
mathdefault :: LaTeXC l => l -> l

-- | Bold face.
mathbf :: LaTeXC l => l -> l

-- | Roman, i.e. not-italic math.
mathrm :: LaTeXC l => l -> l

-- | Escape from math mode, into a normal-text box. Unlike <a>mathrm</a>,
--   this won't squash spaces, i.e. you can write actual sentences. You can
--   embed <a>math</a> again within such a box.
text :: LaTeXC l => l -> l

-- | Calligraphic math symbols.
mathcal :: LaTeXC l => l -> l

-- | Sans-serif math.
mathsf :: LaTeXC l => l -> l

-- | Typewriter font.
mathtt :: LaTeXC l => l -> l

-- | Italic math. Uses the same glyphs as <a>mathdefault</a>, but with
--   spacings intended for multi-character symbols rather than
--   juxtaposition of single-character symbols.
mathit :: LaTeXC l => l -> l

-- | LaTeX rendering of a matrix using <tt>pmatrix</tt> and a custom
--   function to render cells. Optional argument sets the alignment of the
--   cells. Default (providing <a>Nothing</a>) is centered.
--   
--   <pre>
--   ( M )
--   </pre>
pmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l

-- | LaTeX rendering of a matrix using <tt>bmatrix</tt> and a custom
--   function to render cells. Optional argument sets the alignment of the
--   cells. Default (providing <a>Nothing</a>) is centered.
--   
--   <pre>
--   [ M ]
--   </pre>
bmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l

-- | LaTeX rendering of a matrix using <tt>Bmatrix</tt> and a custom
--   function to render cells. Optional argument sets the alignment of the
--   cells. Default (providing <a>Nothing</a>) is centered.
--   
--   <pre>
--   { M }
--   </pre>
b2matrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l

-- | LaTeX rendering of a matrix using <tt>vmatrix</tt> and a custom
--   function to render cells. Optional argument sets the alignment of the
--   cells. Default (providing <a>Nothing</a>) is centered.
--   
--   <pre>
--   | M |
--   </pre>
vmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l

-- | LaTeX rendering of a matrix using <tt>Vmatrix</tt> and a custom
--   function to render cells. Optional argument sets the alignment of the
--   cells. Default (providing <a>Nothing</a>) is centered.
--   
--   <pre>
--   || M ||
--   </pre>
v2matrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l

-- | quad space equal to the current font size (= 18 mu)
quad :: LaTeXC l => l

-- | qquad twice of quad (= 36 mu)
qquad :: LaTeXC l => l

-- | , space equal to 3/18 of quad (= 3 mu)
thinspace :: LaTeXC l => l

-- | : space equal to 4/18 of quad (= 4 mu)
medspace :: LaTeXC l => l

-- | : space equal to 5/18 of quad (= 5 mu)
thickspace :: LaTeXC l => l

-- | ! space equal to -3/18 of quad (= -3 mu)
negspace :: LaTeXC l => l

-- | (space after backslash) equivalent of space in normal text
space :: LaTeXC l => l
instance GHC.Num.Num Text.LaTeX.Base.Syntax.LaTeX
instance GHC.Real.Fractional Text.LaTeX.Base.Syntax.LaTeX
instance GHC.Float.Floating Text.LaTeX.Base.Syntax.LaTeX
instance (GHC.Base.Monad m, a ~ ()) => GHC.Num.Num (Text.LaTeX.Base.Writer.LaTeXT m a)
instance (GHC.Base.Monad m, a ~ ()) => GHC.Real.Fractional (Text.LaTeX.Base.Writer.LaTeXT m a)
instance (GHC.Base.Monad m, a ~ ()) => GHC.Float.Floating (Text.LaTeX.Base.Writer.LaTeXT m a)
instance Text.LaTeX.Base.Texy.Texy a => Text.LaTeX.Base.Texy.Texy (GHC.Real.Ratio a)
instance (Text.LaTeX.Base.Texy.Texy a, Text.LaTeX.Base.Texy.Texy b) => Text.LaTeX.Base.Texy.Texy (a, b)
instance (Text.LaTeX.Base.Texy.Texy a, Text.LaTeX.Base.Texy.Texy b, Text.LaTeX.Base.Texy.Texy c) => Text.LaTeX.Base.Texy.Texy (a, b, c)
instance (Text.LaTeX.Base.Texy.Texy a, Text.LaTeX.Base.Texy.Texy b, Text.LaTeX.Base.Texy.Texy c, Text.LaTeX.Base.Texy.Texy d) => Text.LaTeX.Base.Texy.Texy (a, b, c, d)
instance Text.LaTeX.Base.Texy.Texy a => Text.LaTeX.Base.Texy.Texy (Data.Matrix.Matrix a)
instance Text.LaTeX.Base.Texy.Texy a => Text.LaTeX.Base.Texy.Texy [a]


-- | Module for the package <tt>amssymb</tt>.
module Text.LaTeX.Packages.AMSSymb

-- | AMSSymb package. Example:
--   
--   <pre>
--   usepackage [] amssymb
--   </pre>
amssymb :: ClassName

-- | <i>✔</i> symbol.
checkmark :: LaTeXC l => l


-- | Package for theorem environments.
module Text.LaTeX.Packages.AMSThm

-- | AMSThm package. Example:
--   
--   <pre>
--   usepackage [] amsthm
--   </pre>
amsthm :: PackageName

-- | Create a new <a>theorem</a> environment type. Arguments are
--   environment name (this will be the argument when using the
--   <a>theorem</a> function) and the displayed title.
--   
--   For example:
--   
--   <pre>
--   newtheorem "prop" "Proposition"
--   </pre>
--   
--   <pre>
--   theorem "prop" "This is it."
--   </pre>
newtheorem :: LaTeXC l => String -> l -> l

-- | Use a environment created by <a>newtheorem</a>.
theorem :: LaTeXC l => String -> l -> l

-- | The <a>proof</a> environment. The first optional argument is used to
--   put a custom title to the proof.
proof :: LaTeXC l => Maybe l -> l -> l

-- | Insert the <i>QED</i> symbol.
qedhere :: LaTeXC l => l

-- | Different styles for <a>theorem</a>s.
data TheoremStyle
Plain :: TheoremStyle
Definition :: TheoremStyle
Remark :: TheoremStyle
CustomThmStyle :: String -> TheoremStyle

-- | Set the theorem style. Call this function in the preamble.
theoremstyle :: LaTeXC l => TheoremStyle -> l
instance GHC.Show.Show Text.LaTeX.Packages.AMSThm.TheoremStyle
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.AMSThm.TheoremStyle


-- | The <tt>babel</tt> package is used to write documents in languages
--   other than US English.
--   
--   CTAN page for babel: <a>http://ctan.org/pkg/babel</a>.
module Text.LaTeX.Packages.Babel

-- | Babel package. When writing in a single language, the simplest way of
--   using it is with <a>uselanguage</a>.
--   
--   In the preamble, use the following (if your language of choice is
--   Spanish):
--   
--   <pre>
--   uselanguage Spanish
--   </pre>
--   
--   To see a list of available languages, check the <a>Language</a> type.
babel :: PackageName

-- | Languages.
data Language

-- | Bulgarian.
Bulgarian :: Language

-- | Brazilian Portuguese.
Brazilian :: Language

-- | Canadian French.
Canadien :: Language

-- | Czech.
Czech :: Language

-- | Dutch.
Dutch :: Language

-- | English.
English :: Language

-- | Finnish.
Finnish :: Language

-- | Parisian French.
Francais :: Language

-- | French.
French :: Language

-- | French.
FrenchB :: Language

-- | Old German.
German :: Language

-- | New German.
NGerman :: Language

-- | Icelandic.
Icelandic :: Language

-- | Italian.
Italian :: Language

-- | Hungarian.
Magyar :: Language

-- | Portuguese.
Portuguese :: Language

-- | Russian.
Russian :: Language

-- | Spanish.
Spanish :: Language

-- | Ukranian.
Ukranian :: Language

-- | Import the <a>babel</a> package using a given <a>Language</a>.
--   
--   <pre>
--   uselanguage l = usepackage [texy l] babel
--   </pre>
--   
--   If you are using more than one language, consider to use
--   <a>uselanguageconf</a>.
uselanguage :: LaTeXC l => Language -> l

-- | Language configuration. You may use one with <a>uselanguageconf</a>.
data LangConf
LangConf :: Language -> [Language] -> LangConf
[mainLang] :: LangConf -> Language
[otherLangs] :: LangConf -> [Language]

-- | Import the <a>label</a> package using a given language configuration,
--   featuring a main language and some others. For example:
--   
--   <pre>
--   uselanguageconf $ LangConf English [German]
--   </pre>
--   
--   This will use English as main language, and German as secondary.
uselanguageconf :: LaTeXC l => LangConf -> l

-- | Switch to a given <a>Language</a>.
selectlanguage :: LaTeXC l => Language -> l

-- | Use a <a>Language</a> locally.
otherlanguage :: LaTeXC l => Language -> l -> l

-- | The function <a>foreignlanguage</a> takes two arguments; the second
--   argument is a phrase to be typeset according to the rules of the
--   language named in its first argument.
foreignlanguage :: LaTeXC l => Language -> l -> l
instance GHC.Show.Show Text.LaTeX.Packages.Babel.LangConf
instance GHC.Show.Show Text.LaTeX.Packages.Babel.Language
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Babel.Language
instance Text.LaTeX.Base.Texy.Texy Text.LaTeX.Packages.Babel.Language


-- | Beamer is a LaTeX package for the creation of slides.
--   
--   Each frame is contained within the <a>frame</a> function. Here is an
--   example:
--   
--   <pre>
--   {-# LANGUAGE OverloadedStrings #-}
--   
--   import Text.LaTeX
--   import Text.LaTeX.Packages.Beamer
--   
--   mySlides :: Monad m =&gt; LaTeXT m ()
--   mySlides = do
--     frame $ do
--       frametitle "First frame"
--       "Content of the first frame."
--     frame $ do
--       frametitle "Second frame"
--       "Content of the second frame." 
--       pause
--       " And actually a little more."
--   </pre>
--   
--   The <a>pause</a> command in the second frame makes the second part of
--   the text to appear one screen later.
module Text.LaTeX.Packages.Beamer

-- | The <a>beamer</a> document class. Importing a package is not required.
--   Example:
--   
--   <pre>
--   documentclass [] beamer
--   </pre>
beamer :: ClassName

-- | A presentation is composed of a sequence of frames. Each frame is
--   created with this function.
frame :: LaTeXC l => l -> l

-- | Set the title of the current frame. Use it within a <a>frame</a>.
frametitle :: LaTeXC l => l -> l

-- | Set the subtitle of the current frame. Use it within a <a>frame</a>.
framesubtitle :: LaTeXC l => l -> l

-- | Highlight in red a piece of text. With the <a>OverlaySpec</a>s, you
--   can specify the slides where the text will be highlighted.
alert :: LaTeXC l => [OverlaySpec] -> l -> l

-- | Introduces a pause in a slide.
pause :: LaTeXC l => l

-- | A <a>block</a> will be displayed surrounding a text.
block :: LaTeXC l => l -> l -> l

-- | Specifications for beamer functions.
data OverlaySpec
OneSlide :: Int -> OverlaySpec
FromSlide :: Int -> OverlaySpec
ToSlide :: Int -> OverlaySpec
FromToSlide :: Int -> Int -> OverlaySpec

-- | <a>beameritem</a> works like <tt>item</tt>, but allows you to specify
--   the slides where the item will be displayed.
beameritem :: LaTeXC l => [OverlaySpec] -> l

-- | With <a>uncover</a>, show a piece of text only in the slides you want.
--   On other slides, the text still occupies space and it is still
--   typeset, but it is not shown or only shown as if transparent.
uncover :: LaTeXC l => [OverlaySpec] -> l -> l

-- | With <a>only</a> the text is inserted only into the specified slides.
--   For other slides, the text is simply thrown away (it occupies no
--   space).
only :: LaTeXC l => [OverlaySpec] -> l -> l

-- | The behavior of the <a>onslide</a> command depends on whether the
--   optional argument <tt>text</tt> is given or not. If a <tt>text</tt>
--   argument is present, <a>onslide</a> (without a ⟨modifier⟩) is mapped
--   to <a>uncover</a>.
onslide :: LaTeXC l => [OverlaySpec] -> l -> l

-- | The <a>visible</a> command does almost the same as <a>uncover</a>. The
--   only difference is that if the text is not shown, it is never shown in
--   a transparent way, but rather it is not shown at all. Thus for this
--   command the transparency settings have no effect.
visible :: LaTeXC l => [OverlaySpec] -> l -> l

-- | The <a>invisible</a> is the opposite of <a>visible</a>.
invisible :: LaTeXC l => [OverlaySpec] -> l -> l

-- | <a>beamercolor</a> works like <tt>color</tt>, but allows you to
--   specify the slides where the text will be bold.
beamercolor :: LaTeXC l => [OverlaySpec] -> l

-- | Inside the <a>overprint</a> environment, use <a>onslide</a> commands
--   to specify different things that should be shown for this environment
--   on different slides. Everything within the environment will be placed
--   in a rectangular area of the specified width. The height and depth of
--   the area are chosen large enough to acoommodate the largest contents
--   of this area.
overprint :: LaTeXC l => l -> l

-- | Options for covering text
data CoverOption

-- | Causes covered text to completely disappear
Invisible :: CoverOption

-- | Causes covered text to be typset in a transparent way
Transparent :: (Maybe Float) -> CoverOption

-- | Makes all covered text quite transparent, but in a dynamic way. The
--   longer it will take till the text is uncovered, the stronger the
--   transparency.
Dynamic :: CoverOption

-- | Has the same effect as dynamic, but the effect is stronger. |
--   StillCovered [Opaqueness] -- ^ Specifies how to render covered items
--   -- that have not yet been uncovered. | AgainCovered [Opaqueness] -- ^
--   Specifies how to render covered items -- that have once more been
--   covered, that -- is, that had been shown before but are -- now covered
--   again.
HighlyDynamic :: CoverOption

-- | Percentage of opaqueness for the specified overlays. In 'Opaqueness
--   overlaySpecification percentageOfOpaqueness' the
--   <tt>overlaySpecification</tt> specifies on which slides covered text
--   should have which <tt>percentageOfOpaqueness</tt>. Unlike other
--   overlay specifications, this <tt>overlaySpecification</tt> is a
--   relative overlay specification.
data Opaqueness
Opaqueness :: [OverlaySpec] -> Float -> Opaqueness

-- | The command <a>setbeamercovered</a> allows you to specify in a quite
--   general way how a covered item should be rendered.
setbeamercovered :: LaTeXC l => [CoverOption] -> l

-- | Set the <a>Theme</a> employed in your presentation (in the preamble).
usetheme :: LaTeXC l => Theme -> l

-- | A <a>Theme</a> of a presentation. See <a>usetheme</a>. A preview of
--   each one is given below.
data Theme

AnnArbor :: Theme

Antibes :: Theme

Bergen :: Theme

Berkeley :: Theme

Berlin :: Theme

Boadilla :: Theme

CambridgeUS :: Theme

Copenhagen :: Theme

Darmstadt :: Theme

Dresden :: Theme

Frankfurt :: Theme

Goettingen :: Theme

Hannover :: Theme

Ilmenau :: Theme

JuanLesPins :: Theme

Luebeck :: Theme

Madrid :: Theme

Malmoe :: Theme

Marburg :: Theme

Montpellier :: Theme

PaloAlto :: Theme

Pittsburgh :: Theme

Rochester :: Theme

Singapore :: Theme

Szeged :: Theme

Warsaw :: Theme
Boxes :: Theme
Default :: Theme
CustomTheme :: String -> Theme
instance GHC.Show.Show Text.LaTeX.Packages.Beamer.Theme
instance GHC.Classes.Eq Text.LaTeX.Packages.Beamer.Theme
instance GHC.Show.Show Text.LaTeX.Packages.Beamer.Opaqueness
instance GHC.Show.Show Text.LaTeX.Packages.Beamer.CoverOption
instance GHC.Show.Show Text.LaTeX.Packages.Beamer.OverlaySpec
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Beamer.Theme
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Beamer.CoverOption
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Beamer.OverlaySpec


-- | <a>BibLaTeX</a> is a reference-citation package using <tt>.bib</tt>
--   files (BibTeX) but no extra style-files.
module Text.LaTeX.Packages.BibLaTeX

-- | BibLaTeX package. Use it to import it like this:
--   
--   <pre>
--   usepackage [] biblatex
--   </pre>
biblatex :: PackageName

-- | Use a bibliography file as resource for reference information.
addbibresource :: LaTeXC l => FilePath -> l
cite :: LaTeXC l => l -> l
printbibliography :: LaTeXC l => l


-- | An extension to the standard LaTeX tabular environment that creates
--   struts which (slightly) stretch the table row in which they sit.
module Text.LaTeX.Packages.Bigstrut

-- | bigstrut package. Use it to import it like this:
--   
--   <pre>
--   usepackage [] bigstrut
--   </pre>
bigstrutp :: PackageName

-- | <a>bigstrutTop</a>, <a>bigstrutBottom</a> and <a>bigstrut</a> produce
--   a strut (a rule with width 0) which is <tt>bigstrutjot</tt> (2pt by
--   default) higher, lower, or both than the standard array/tabular strut.
--   Use them in table entries that are adjacent to <tt>hlines</tt> to
--   leave an extra bit of space
bigstrut :: LaTeXC l => l
bigstrutTop :: LaTeXC l => l
bigstrutBottom :: LaTeXC l => l


-- | Make your documents colorful using this module.
--   
--   Different functionalities are provided, like changing the color of the
--   text and the paper, or creating colorful boxes.
module Text.LaTeX.Packages.Color

-- | The <a>pcolor</a> package.
--   
--   <pre>
--   usepackage [] pcolor
--   </pre>
pcolor :: PackageName

-- | To convert all colour commands to black and white, for previewers that
--   cannot handle colour.
monochrome :: LaTeXC l => l
dvipsnames :: LaTeXC l => l
nodvipsnames :: LaTeXC l => l
usenames :: LaTeXC l => l

-- | Basic colors.
data Color
Red :: Color
Green :: Color
Blue :: Color
Yellow :: Color
Cyan :: Color
Magenta :: Color
Black :: Color
White :: Color

-- | Other predefined colors.
data ColorName
Apricot :: ColorName
Aquamarine :: ColorName
Bittersweet :: ColorName
BlueGreen :: ColorName
BlueViolet :: ColorName
BrickRed :: ColorName
Brown :: ColorName
BurntOrange :: ColorName
CadetBlue :: ColorName
CarnationPink :: ColorName
Cerulean :: ColorName
CornflowerBlue :: ColorName
Dandelion :: ColorName
DarkOrchid :: ColorName
Emerald :: ColorName
ForestGreen :: ColorName
Fuchsia :: ColorName
Goldenrod :: ColorName
Gray :: ColorName
GreenYellow :: ColorName
JungleGreen :: ColorName
Lavender :: ColorName
LimeGreen :: ColorName
Mahogany :: ColorName
Maroon :: ColorName
Melon :: ColorName
MidnightBlue :: ColorName
Mulberry :: ColorName
NavyBlue :: ColorName
OliveGreen :: ColorName
Orange :: ColorName
OrangeRed :: ColorName
Orchid :: ColorName
Peach :: ColorName
Periwinkle :: ColorName
PineGreen :: ColorName
Plum :: ColorName
ProcessBlue :: ColorName
Purple :: ColorName
RawSienna :: ColorName
RedOrange :: ColorName
RedViolet :: ColorName
Rhodamine :: ColorName
RoyalBlue :: ColorName
RubineRed :: ColorName
Salmon :: ColorName
SeaGreen :: ColorName
Sepia :: ColorName
SkyBlue :: ColorName
SpringGreen :: ColorName
Tan :: ColorName
TealBlue :: ColorName
Thistle :: ColorName
Turquoise :: ColorName
Violet :: ColorName
VioletRed :: ColorName
WildStrawberry :: ColorName
YellowGreen :: ColorName
YellowOrange :: ColorName

-- | Specify your own color using one of the different color models.
data ColorModel

-- | Each parameter determines the proportion of red, green and blue, with
--   a value within the [0,1] interval.
RGB :: Float -> Float -> Float -> ColorModel
RGB255 :: Word8 -> Word8 -> Word8 -> ColorModel

-- | Grayscale, from 0 (black) to 1 (white).
GrayM :: Float -> ColorModel
HTML :: String -> ColorModel
CMYK :: Float -> Float -> Float -> Float -> ColorModel

-- | Color specification.
data ColSpec
DefColor :: Color -> ColSpec
ModColor :: ColorModel -> ColSpec
DvipsColor :: ColorName -> ColSpec

-- | 8-bit unsigned integer type
data Word8

-- | Set the background color for the current and following pages.
pagecolor :: LaTeXC l => ColSpec -> l

-- | Switch to a new text color.
color :: LaTeXC l => ColSpec -> l

-- | Set the text of its argument in the given colour.
textcolor :: LaTeXC l => ColSpec -> l -> l

-- | Put its argument in a box with the given colour as background.
colorbox :: LaTeXC l => ColSpec -> l -> l

-- | Application of <tt>fcolorbox cs1 cs2 l</tt> put <tt>l</tt> in a framed
--   box with <tt>cs1</tt> as frame color and <tt>cs2</tt> as background
--   color.
fcolorbox :: LaTeXC l => ColSpec -> ColSpec -> l -> l

-- | Switch to the colour that was active at the end of the preamble. Thus,
--   placing a <a>color</a> command in the preamble can change the standard
--   colour of the whole document.
normalcolor :: LaTeXC l => l
instance GHC.Show.Show Text.LaTeX.Packages.Color.ColSpec
instance GHC.Show.Show Text.LaTeX.Packages.Color.ColorName
instance GHC.Show.Show Text.LaTeX.Packages.Color.ColorModel
instance GHC.Show.Show Text.LaTeX.Packages.Color.Color
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Color.ColSpec
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Color.ColorName
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Color.ColorModel
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Color.Color


-- | This package provides extensive control of page headers and footers.
--   
--   CTAN page for fancyhdr: <a>http://www.ctan.org/pkg/fancyhdr</a>.
module Text.LaTeX.Packages.Fancyhdr

-- | The fancyhdr package. Please, consider to use <a>applyHdrSettings</a>
--   instead of importing the package manually. If you really want to do it
--   manually, use the functions from the <i>raw interface</i> exposed
--   below.
fancyhdr :: PackageName

-- | Header and footer settings of a LaTeX document. Use
--   <a>applyHdrSettings</a> to apply these settings in your document. A
--   default value is provided by <a>defaultHdrSettings</a>, which you can
--   modify using record syntax.
--   
--   <pre>
--   mySettings :: HdrSettings
--   mySettings = defaultHdrSettings
--       { centerHeader = "Amazing header"
--       , headRuleWidth = Pt 2
--         }
--   </pre>
data HdrSettings
HdrSettings :: LaTeX -> LaTeX -> LaTeX -> LaTeX -> LaTeX -> LaTeX -> Measure -> Measure -> HdrSettings
[leftHeader] :: HdrSettings -> LaTeX
[centerHeader] :: HdrSettings -> LaTeX
[rightHeader] :: HdrSettings -> LaTeX
[leftFooter] :: HdrSettings -> LaTeX
[centerFooter] :: HdrSettings -> LaTeX
[rightFooter] :: HdrSettings -> LaTeX
[headRuleWidth] :: HdrSettings -> Measure
[footRuleWidth] :: HdrSettings -> Measure

-- | Default header and footer settings.
--   
--   It leaves everything empty but the <a>centerFooter</a> field, which is
--   filled with <a>thePage</a>.
--   
--   Also, it sets to 0.4 points the <a>headRuleWidth</a> field.
defaultHdrSettings :: HdrSettings

-- | Apply custom header and footer settings to a LaTeX document. It takes
--   care of package importing and page style settings, so using this
--   function is enough to get the settings applied. Do <i>not</i> import
--   the <a>fancyhdr</a> package again. To be used in the <i>preamble</i>.
applyHdrSettings :: LaTeXC l => HdrSettings -> l

-- | Page style of the <a>fancyhdr</a> package.
fancy :: PageStyle

-- | Set the left header.
lhead :: LaTeXC l => l -> l

-- | Set the center header.
chead :: LaTeXC l => l -> l

-- | Set the right header.
rhead :: LaTeXC l => l -> l

-- | Set the left footer.
lfoot :: LaTeXC l => l -> l

-- | Set the center footer.
cfoot :: LaTeXC l => l -> l

-- | Set the right footer.
rfoot :: LaTeXC l => l -> l

-- | Set the <tt>headrulewidth</tt> attribute.
renewheadrulewidth :: LaTeXC l => Measure -> l

-- | Set the <tt>footrulewidth</tt> attribute.
renewfootrulewidth :: LaTeXC l => Measure -> l
instance GHC.Show.Show Text.LaTeX.Packages.Fancyhdr.HdrSettings
instance GHC.Classes.Eq Text.LaTeX.Packages.Fancyhdr.HdrSettings


-- | Select new font encodings using the <tt>fontenc</tt> package.
module Text.LaTeX.Packages.Fontenc

-- | The <tt>fontenc</tt> package. It is recommended to use the
--   <a>useencoding</a> function to import it.
fontenc :: PackageName

-- | Font encodings.
data FontEnc
T1 :: FontEnc
OT1 :: FontEnc

-- | In the preamble, select encodings to use in your document. The last
--   one will be the default encoding. Example:
--   
--   <pre>
--   useencoding [T1]
--   </pre>
--   
--   It imports the <tt>fontenc</tt> package. In fact:
--   
--   <pre>
--   useencoding xs = usepackage (fmap texy xs) fontenc
--   </pre>
useencoding :: LaTeXC l => [FontEnc] -> l
instance GHC.Show.Show Text.LaTeX.Packages.Fontenc.FontEnc
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Fontenc.FontEnc
instance Text.LaTeX.Base.Texy.Texy Text.LaTeX.Packages.Fontenc.FontEnc


-- | The geometry package provides an easy interface to page dimensions.
--   
--   CTAN page for geometry: <a>http://www.ctan.org/pkg/geometry</a>.
module Text.LaTeX.Packages.Geometry

-- | Geometry package. Use it to import it like this:
--   
--   <pre>
--   usepackage [] geometry
--   </pre>
--   
--   In most cases, it is recommended to use <a>importGeometry</a> instead.
geometry :: PackageName

-- | Import the geometry package with additional options.
importGeometry :: LaTeXC l => [GeometryOption] -> l

-- | Options of the geometry package.
data GeometryOption
GHeight :: Measure -> GeometryOption
GWidth :: Measure -> GeometryOption
GPaper :: PaperType -> GeometryOption
GCentered :: GeometryOption
GPaperHeight :: Measure -> GeometryOption
GPaperWidth :: Measure -> GeometryOption
GLandscape :: Bool -> GeometryOption

-- | Apply the given geometry options to the document.
applyGeometry :: LaTeXC l => [GeometryOption] -> l
instance GHC.Show.Show Text.LaTeX.Packages.Geometry.GeometryOption
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Geometry.GeometryOption


-- | This module allows you to use the LaTeX <i>graphicx</i> library in
--   order to insert graphics in a document and perform some
--   transformations.
--   
--   CTAN page for graphicx: <a>http://ctan.org/pkg/graphicx</a>.
module Text.LaTeX.Packages.Graphicx

-- | The <a>graphicx</a> package.
--   
--   <pre>
--   usepackage [] graphicx
--   </pre>
graphicx :: PackageName

-- | Package option of the <a>graphicx</a> package.
dvips :: LaTeXC l => l

-- | Package option of the <a>graphicx</a> package.
dvipdfm :: LaTeXC l => l

-- | Package option of the <a>graphicx</a> package.
pdftex :: LaTeXC l => l

-- | Include Graphics Option. These options can be passed as arguments to
--   the <a>includegraphics</a> function.
data IGOption

-- | Specify the preferred width of the imported image.
IGWidth :: Measure -> IGOption

-- | Specify the preferred height of the imported image.
IGHeight :: Measure -> IGOption

-- | When <a>True</a>, it will scale the image according to both
--   <a>IGWidth</a> and <a>IGHeight</a> , but will not distort the image,
--   so that neither <a>IGWidth</a> nor <a>IGHeight</a> are exceeded.
KeepAspectRatio :: Bool -> IGOption

-- | Scales the image by the desired scale factor.
IGScale :: Float -> IGOption

-- | Rotate the image by given degrees.
IGAngle :: Int -> IGOption

-- | This option will crop the imported image. Arguments are from-left ,
--   from-bottom, from-right and from-top respectively.
IGTrim :: Measure -> Measure -> Measure -> Measure -> IGOption

-- | For the <a>IGTrim</a> option to work, you must set <a>IGClip</a> to
--   <a>True</a>.
IGClip :: Bool -> IGOption

-- | If the image file is a pdf file with multiple pages, this parameter
--   allows you to use a different page than the first.
IGPage :: Int -> IGOption

-- | Include an image in the document.
includegraphics :: LaTeXC l => [IGOption] -> FilePath -> l

-- | Rotate the content by the given angle in degrees.
rotatebox :: LaTeXC l => Float -> l -> l

-- | Scale the content by the given factor. If only the horizontal scale is
--   supplied, the vertical scaling will be the same.
scalebox :: LaTeXC l => Float -> Maybe Float -> l -> l

-- | Reflect horizontally the content.
reflectbox :: LaTeXC l => l -> l

-- | Resize the content to match the given dimensions.
resizebox :: LaTeXC l => Measure -> Measure -> l -> l
instance GHC.Show.Show Text.LaTeX.Packages.Graphicx.IGOption
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Graphicx.IGOption

module Text.LaTeX.Packages.Hyperref

-- | The <a>hyperref</a> package.
--   
--   <pre>
--   usepackage [] hyperref
--   </pre>
hyperref :: PackageName
data HRefOption
PDFRemoteStartView :: HRefOption
PDFNewWindow :: HRefOption
HRefPage :: Int -> HRefOption
data URL
createURL :: String -> URL

-- | Reference to an <a>URL</a>.
href :: LaTeXC l => [HRefOption] -> URL -> l -> l

-- | Write an <a>URL</a> hyperlinked.
url :: LaTeXC l => URL -> l

-- | Write an <a>URL</a> without creating a hyperlink.
nolinkurl :: LaTeXC l => URL -> l

-- | Establish a base <a>URL</a>.
hyperbaseurl :: LaTeXC l => URL -> l

-- | <tt>hyperimage imgURL t</tt>: The link to the image referenced by the
--   <tt>imgURL</tt> is inserted, using <tt>t</tt> as the anchor.
hyperimage :: LaTeXC l => URL -> l -> l

-- | This is a replacement for the usual <a>ref</a> command that places a
--   contextual label in front of the reference.
autoref :: LaTeXC l => Label -> l

-- | Similar to <a>autoref</a>, but inserts text corresponding to the
--   section name. Note that this command comes from the <i>nameref</i>
--   package, but it's automatically included when importing
--   <a>hyperref</a>.
nameref :: LaTeXC l => Label -> l

-- | This package option selects the pdfTeX backend for the Hyperref
--   package.
pdftex :: LaTeXC l => l

-- | This package option sets the document information Title field.
pdftitle :: LaTeXC l => l -> l

-- | This package option sets the document information Author field.
pdfauthor :: LaTeXC l => l -> l

-- | This package option sets the document information Subject field.
pdfsubject :: LaTeXC l => l -> l

-- | This package option sets the document information Creator field.
pdfcreator :: LaTeXC l => l -> l

-- | This package option sets the document information Producer field.
pdfproducer :: LaTeXC l => l -> l

-- | This package option sets the document information Keywords field.
pdfkeywords :: LaTeXC l => l -> l

-- | This package option sets the document information Trapped entry. An
--   <a>Nothing</a> value means, the entry is not set.
pdftrapped :: LaTeXC l => Maybe Bool -> l

-- | This package option determines on which page the PDF file is opened.
pdfstartpage :: LaTeXC l => l -> l

-- | This package option sets the layout of PDF pages.
pdfpagelayout :: LaTeXC l => PdfPageLayout -> l

-- | Specification for how pages of a PDF should be displayed.
data PdfPageLayout

-- | Displays a single page; advancing flips the page.
SinglePage :: PdfPageLayout

-- | Displays a single page; advancing flips the page.
OneColumn :: PdfPageLayout

-- | Displays the document in two columns, odd-numbered pages to the left.
TwoColumnLeft :: PdfPageLayout

-- | Displays the document in two columns, odd-numbered pages to the right.
TwoColumnRight :: PdfPageLayout

-- | Displays two pages, odd-numbered pages to the left (since PDF 1.5).
TwoPageLeft :: PdfPageLayout

-- | Displays two pages, odd-numbered pages to the right (since PDF 1.5).
TwoPageRight :: PdfPageLayout
instance GHC.Show.Show Text.LaTeX.Packages.Hyperref.PdfPageLayout
instance GHC.Read.Read Text.LaTeX.Packages.Hyperref.PdfPageLayout
instance GHC.Classes.Ord Text.LaTeX.Packages.Hyperref.PdfPageLayout
instance GHC.Classes.Eq Text.LaTeX.Packages.Hyperref.PdfPageLayout
instance GHC.Show.Show Text.LaTeX.Packages.Hyperref.URL
instance GHC.Show.Show Text.LaTeX.Packages.Hyperref.HRefOption
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Hyperref.URL
instance Data.String.IsString Text.LaTeX.Packages.Hyperref.URL
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Hyperref.HRefOption


-- | This package is of vital importance if you use non-ASCII characters in
--   your document. For example, if you type the word <i>Ángela</i>, the
--   <i>Á</i> character will not appear correctly in the output. To solve
--   this problem, use:
--   
--   <pre>
--   usepackage [utf8] inputenc
--   </pre>
--   
--   And make sure that your Haskell source is encoded in UTF-8.
module Text.LaTeX.Packages.Inputenc

-- | Inputenc package. Example:
--   
--   <pre>
--   usepackage [utf8] inputenc
--   </pre>
inputenc :: PackageName

-- | UTF-8 encoding.
utf8 :: LaTeXC l => l

-- | Latin-1 encoding.
latin1 :: LaTeXC l => l

module Text.LaTeX.Packages.LongTable

-- | longtable package. Use it to import it like this:
--   
--   <pre>
--   usepackage [] longtable
--   </pre>
longtablep :: PackageName

-- | The <a>longtable</a> environment can be used to typeset multi-page
--   tables.
longtable :: LaTeXC l => Maybe Pos -> [TableSpec] -> l -> l

-- | End the first head.
--   
--   Everything above this command will appear at the beginning of the
--   table, in the first page.
endfirsthead :: LaTeXC l => l

-- | End the head.
--   
--   Whatever you put before this command and below endfirsthead will be
--   displayed at the top of the table in every page except the first one.
endhead :: LaTeXC l => l

-- | End the foot.
--   
--   Similar to endhead, what you put after endhead and before this command
--   will appear at the bottom of the table in every page except the last
--   one.
endfoot :: LaTeXC l => l

-- | End the last foot.
--   
--   Similar to endfisthead. The elements after endfoot and before this
--   command will be displayed at the bottom of the table but only in the
--   last page where the table appears.
endlastfoot :: LaTeXC l => l

module Text.LaTeX.Packages.Lscape

-- | lscape package. Use it to import it like this:
--   
--   <pre>
--   usepackage [] lscape
--   </pre>
lscape :: PackageName

-- | All text within the <a>landscape</a> environment is rotated through 90
--   degrees. The environment may span several pages. It works well with,
--   and was originally created for, use with <tt>longtable</tt> to produce
--   long wide tables.
landscape :: LaTeXC l => l -> l

-- | This package option makes <a>lscape</a> rotate the PDF paper – not
--   just the text on the page – when given the <a>pdftex</a> option.
--   (Naturally, this works only with pdfLaTeX.) The result is that the
--   text is viewable online without the reader having to rotate his/her
--   head 90 degrees. The document still prints normally.
pdftex :: LaTeXC l => l


-- | An extension to the standard LaTeX tabular environment which provides
--   a construction for table cells that span more than one row of the
--   table.
module Text.LaTeX.Packages.Multirow

-- | multirow package. Use it to import it like this:
--   
--   <pre>
--   usepackage [] multirow
--   </pre>
multirowp :: PackageName

-- | Type of bigstruts count. It is mainly used if you’ve used the bigstrut
--   package. It is the total number of uses of bigstruts within rows being
--   spanned in a multirow.
data BigStrutsCount

-- | Normal bigstruts
BigStruts :: Int -> BigStrutsCount

-- | Bigstruts in the top row
BigStrutsTop :: Int -> BigStrutsCount

-- | Bigstruts in the bottom row
BigStrutsBottom :: Int -> BigStrutsCount

-- | Bigstruts in the top and bottom rows
BigStrutsTopBottom :: Int -> BigStrutsCount

-- | <a>multirow</a> sets a piece of text in a tabular or similar
--   environment, spanning multiple rows.
multirow :: LaTeXC l => Maybe Pos -> Double -> Maybe BigStrutsCount -> Measure -> Maybe Measure -> l -> l
instance GHC.Show.Show Text.LaTeX.Packages.Multirow.BigStrutsCount
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.Multirow.BigStrutsCount

module Text.LaTeX.Packages.QRCode

-- | qrcode package. Use it to import it like this:
--   
--   <pre>
--   usepackage [] qrcode
--   </pre>
qrcode :: PackageName

-- | The degree of error-correction redundancy to include in the generated
--   code.
data ErrorLevel

-- | Error recovery up to 7%.
Low :: ErrorLevel

-- | Error recovery up to 15%.
Medium :: ErrorLevel

-- | Error recovery up to 25%.
Quality :: ErrorLevel

-- | Error recovery up to 30%.
High :: ErrorLevel

-- | Options to use when generating a QR code.
data CodeOptions
CodeOptions :: Bool -> Bool -> ErrorLevel -> CodeOptions

-- | Whether to include 4 modules of whitespace around the code. False is
--   the default.
[includePadding] :: CodeOptions -> Bool

-- | Whether, if the code encodes a link, it should be hyperlinked in the
--   PDF document. The default is true. Links will only be generated when
--   the document uses the hyperref package.
[link] :: CodeOptions -> Bool

-- | The desired degree of error-correction redundancy to include in the
--   code. The default is <a>Medium</a>.
[errorLevel] :: CodeOptions -> ErrorLevel

-- | The default QR code generation options.
defaultOptions :: CodeOptions

-- | Generates a QR code with specified options and content.
--   
--   This uses the qrcode command from the package, but the identifier
--   <a>qrcode</a> is already in use as the <a>PackageName</a>.
qr :: LaTeXC l => CodeOptions -> Text -> l

-- | This package option sets the qrcode package to generate draft-quality
--   placeholders for QR codes.
draft :: LaTeXC l => l

-- | This package option (which is the default) sets the qrcode package to
--   generate print-quality QR codes.
final :: LaTeXC l => l
instance GHC.Show.Show Text.LaTeX.Packages.QRCode.CodeOptions
instance GHC.Classes.Eq Text.LaTeX.Packages.QRCode.CodeOptions
instance GHC.Show.Show Text.LaTeX.Packages.QRCode.ErrorLevel
instance GHC.Read.Read Text.LaTeX.Packages.QRCode.ErrorLevel
instance GHC.Classes.Ord Text.LaTeX.Packages.QRCode.ErrorLevel
instance GHC.Classes.Eq Text.LaTeX.Packages.QRCode.ErrorLevel


-- | The <tt>relsize</tt> package is used to set the font size relative to
--   the current size.
--   
--   CTAN page for relsize: <a>http://ctan.org/pkg/relsize</a>.
module Text.LaTeX.Packages.Relsize

-- | The <a>prelsize</a> package. Example:
--   
--   <pre>
--   usepackage [] prelsize
--   </pre>
prelsize :: ClassName

-- | Change font size by <tt>i</tt> steps. A step is a number of
--   '\magsteps' to change size; from this are defined commands '\larger',
--   '\smaller', '\textlarger', etc.
relsize :: LaTeXC l => Int -> l

-- | Increase font size by (optional) <tt>i</tt> steps (default 1).
larger :: LaTeXC l => Maybe Int -> l

-- | Reduce font size by <tt>i</tt> steps (default 1).
smaller :: LaTeXC l => Maybe Int -> l

-- | Change font size by scale factor <tt>f</tt>.
relscale :: LaTeXC l => Float -> l

-- | Text size enlarged by (optional) <tt>i</tt> steps.
textlarger :: LaTeXC l => Maybe Int -> l -> l

-- | Text size reduced by (optional) <tt>i</tt> steps.
textsmaller :: LaTeXC l => Maybe Int -> l -> l

-- | Text size scaled by factor <tt>f</tt>.
textscale :: LaTeXC l => Float -> l -> l

module Text.LaTeX.Packages.TabularX

-- | tabularx package. Use it to import it like this:
--   
--   <pre>
--   usepackage [] tabularxp
--   </pre>
tabularxp :: PackageName

-- | The <a>tabularx</a> environment takes the same arguments as tabular*,
--   but modifies the widths of certain columns, rather than the inter
--   column space, to set a table with the requested total width. The
--   columns that may stretch are marked with the new token X in the
--   preamble argument.
tabularx :: LaTeXC l => Measure -> Maybe Pos -> [TableSpec] -> l -> l

module Text.LaTeX.Packages.LTableX

-- | ltablex package. Use it to import it like this:
--   
--   <pre>
--   usepackage [] ltablex
--   </pre>
ltablex :: PackageName
keepXColumns :: LaTeXC l => l

-- | Treet the specified width as the maximum allowed, not the exact width
--   of the table.
--   
--   ltablex has added a feature that treats the X columns like ‘l’ columns
--   if the table contents would allow that to happen without exceeding the
--   specified width of the table. In other words, the specified width is
--   treated as the maximum allowed and not the exact width of the table.
--   This feature is the default but can be disabled (or enabled) with
--   keepXColumns (or convertXColumns).
convertXColumns :: LaTeXC l => l

-- | The <a>tabularx</a> environment takes the same arguments as tabular*,
--   but modifies the widths of certain columns, rather than the inter
--   column space, to set a table with the requested total width. The
--   columns that may stretch are marked with the new token X in the
--   preamble argument.
tabularx :: LaTeXC l => Measure -> Maybe Pos -> [TableSpec] -> l -> l

-- | End the first head.
--   
--   Everything above this command will appear at the beginning of the
--   table, in the first page.
endfirsthead :: LaTeXC l => l

-- | End the head.
--   
--   Whatever you put before this command and below endfirsthead will be
--   displayed at the top of the table in every page except the first one.
endhead :: LaTeXC l => l

-- | End the foot.
--   
--   Similar to endhead, what you put after endhead and before this command
--   will appear at the bottom of the table in every page except the last
--   one.
endfoot :: LaTeXC l => l

-- | End the last foot.
--   
--   Similar to endfisthead. The elements after endfoot and before this
--   command will be displayed at the bottom of the table but only in the
--   last page where the table appears.
endlastfoot :: LaTeXC l => l


-- | This module defines the syntax of a Ti<i>k</i>Z script.
--   
--   To generate a Ti<i>k</i>Z script, first create a <a>TPath</a> using
--   data constructors, or alternatively, use a <tt>PathBuilder</tt> from
--   the <a>Text.LaTeX.Packages.TikZ.PathBuilder</a> module.
--   
--   Once a <a>TPath</a> is created, use <a>path</a> to render a picture
--   from it. Use <a>scope</a> to apply some parameters to your picture,
--   such line width or color.
module Text.LaTeX.Packages.TikZ.Syntax

-- | A point in Ti<i>k</i>Z.
data TPoint

-- | Point using <a>Measure</a>s for coordinantes.
pointAt :: Measure -> Measure -> TPoint

-- | Point using numbers as coordinates.
pointAtXY :: Double -> Double -> TPoint

-- | Three-dimensional point.
pointAtXYZ :: Double -> Double -> Double -> TPoint

-- | Makes a point relative to the previous.
relPoint :: TPoint -> TPoint
relPoint_ :: TPoint -> TPoint

-- | Type for TikZ paths. Every <a>TPath</a> has two fundamental points:
--   the <i>starting point</i> and the <i>last point</i>. The starting
--   point is set using the <a>Start</a> constructor. The last point then
--   is modified by the other constructors. Below a explanation of each one
--   of them. Note that both starting point and last point may coincide.
--   You can use the functions <a>startingPoint</a> and <a>lastPoint</a> to
--   calculate them. After creating a <a>TPath</a>, use <a>path</a> to do
--   something useful with it.
data TPath

-- | Let <tt>y = Start p</tt>.
--   
--   <i>Operation:</i> Set the starting point of a path.
--   
--   <i>Last point:</i> The last point of <tt>y</tt> is <tt>p</tt>.
Start :: TPoint -> TPath

-- | Let <tt>y = Cycle x</tt>.
--   
--   <i>Operation:</i> Close a path with a line from the last point of
--   <tt>x</tt> to the starting point of <tt>x</tt>.
--   
--   <i>Last point:</i> The last point of <tt>y</tt> is the starting point
--   of <tt>x</tt>.
Cycle :: TPath -> TPath

-- | Let <tt>y = Line x p</tt>.
--   
--   <i>Operation:</i> Extend the current path from the last point of
--   <tt>x</tt> in a straight line to <tt>p</tt>.
--   
--   <i>Last point:</i> The last point of <tt>y</tt> is <tt>p</tt>.
Line :: TPath -> TPoint -> TPath

-- | Let <tt>y = Rectangle x p</tt>.
--   
--   <i>Operation:</i> Define a rectangle using the last point of
--   <tt>x</tt> as one corner and <tt>p</tt> as the another corner.
--   
--   <i>Last point:</i> The last point of <tt>y</tt> is <tt>p</tt>.
Rectangle :: TPath -> TPoint -> TPath

-- | Let <tt>y = Circle x r</tt>.
--   
--   <i>Operation:</i> Define a circle with center at the last point of x
--   and radius <tt>r</tt>.
--   
--   <i>Last point:</i> The last point of <tt>y</tt> is the same as the
--   last point of <tt>x</tt>.
Circle :: TPath -> Double -> TPath

-- | Let <tt>y = Ellipse x r1 r2</tt>.
--   
--   <i>Operation:</i> Define a ellipse with center at the last point of
--   <tt>x</tt>, width the double of <tt>r1</tt> and height the double of
--   <tt>r2</tt>.
--   
--   <i>Last point:</i> The last point of <tt>y</tt> is the same as the
--   last point of <tt>x</tt>.
Ellipse :: TPath -> Double -> Double -> TPath
Grid :: TPath -> [GridOption] -> TPoint -> TPath

-- | Let <tt>y = Node x l</tt>.
--   
--   <i>Operation:</i> Set a text centered at the last point of <tt>x</tt>.
--   
--   <i>Last point:</i> The last point of <tt>y</tt> is the same as the
--   last point of <tt>x</tt>.
Node :: TPath -> LaTeX -> TPath
data GridOption
GridStep :: Step -> GridOption
data Step
DimStep :: Measure -> Step
XYStep :: Double -> Step
PointStep :: TPoint -> Step

-- | Calculate the starting point of a <a>TPath</a>.
startingPoint :: TPath -> TPoint

-- | Calculate the last point of a <a>TPath</a>.
lastPoint :: TPath -> TPoint

-- | Alias of <a>Line</a>.
(->-) :: TPath -> TPoint -> TPath

-- | Parameters to use in a <a>scope</a> to change how things are rendered
--   within that scope.
data Parameter
TWidth :: Measure -> Parameter
TColor :: TikZColor -> Parameter
TScale :: Double -> Parameter

-- | Angle is in degrees.
TRotate :: Double -> Parameter

-- | Color models accepted by Ti<i>k</i>Z.
data TikZColor
BasicColor :: Color -> TikZColor
RGBColor :: Word8 -> Word8 -> Word8 -> TikZColor

-- | Basic colors.
data Color
Red :: Color
Green :: Color
Blue :: Color
Yellow :: Color
Cyan :: Color
Magenta :: Color
Black :: Color
White :: Color

-- | 8-bit unsigned integer type
data Word8

-- | A Ti<i>k</i>Z script.
data TikZ

-- | Just an empty script.
emptytikz :: TikZ

-- | A path can be used in different ways.
--   
--   <ul>
--   <li><a>Draw</a>: Just draw the path.</li>
--   <li><a>Fill</a>: Fill the area inside the path.</li>
--   <li><a>Clip</a>: Clean everything outside the path.</li>
--   <li><a>Shade</a>: Shade the area inside the path.</li>
--   </ul>
--   
--   It is possible to stack different effects in the list.
--   
--   Example of usage:
--   
--   <pre>
--   path [Draw] $ Start (pointAtXY 0 0) -&gt;- pointAtXY 1 1
--   </pre>
--   
--   Most common usages are exported as functions. See <a>draw</a>,
--   <a>fill</a>, <a>clip</a>, <a>shade</a>, <a>filldraw</a> and
--   <a>shadedraw</a>.
path :: [ActionType] -> TPath -> TikZ

-- | Applies a scope to a Ti<i>k</i>Z script.
scope :: [Parameter] -> TikZ -> TikZ

-- | Different types of actions that can be performed with a <a>TPath</a>.
--   See <a>path</a> for more information.
data ActionType
Draw :: ActionType
Fill :: ActionType
Clip :: ActionType
Shade :: ActionType

-- | Sequence two Ti<i>k</i>Z scripts.
(->>) :: TikZ -> TikZ -> TikZ

-- | Equivalent to <tt>path [Draw]</tt>.
draw :: TPath -> TikZ

-- | Equivalent to <tt>path [Fill]</tt>.
fill :: TPath -> TikZ

-- | Equivalent to <tt>path [Clip]</tt>.
clip :: TPath -> TikZ

-- | Equivalent to <tt>path [Shade]</tt>.
shade :: TPath -> TikZ

-- | Equivalent to <tt>path [Fill,Draw]</tt>.
filldraw :: TPath -> TikZ

-- | Equivalent to <tt>path [Shade,Draw]</tt>.
shadedraw :: TPath -> TikZ
instance GHC.Show.Show Text.LaTeX.Packages.TikZ.Syntax.TikZ
instance GHC.Show.Show Text.LaTeX.Packages.TikZ.Syntax.ActionType
instance GHC.Show.Show Text.LaTeX.Packages.TikZ.Syntax.Parameter
instance GHC.Show.Show Text.LaTeX.Packages.TikZ.Syntax.TikZColor
instance GHC.Show.Show Text.LaTeX.Packages.TikZ.Syntax.TPath
instance GHC.Show.Show Text.LaTeX.Packages.TikZ.Syntax.GridOption
instance GHC.Show.Show Text.LaTeX.Packages.TikZ.Syntax.Step
instance GHC.Show.Show Text.LaTeX.Packages.TikZ.Syntax.TPoint
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.TikZ.Syntax.TikZ
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.TikZ.Syntax.ActionType
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.TikZ.Syntax.Parameter
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.TikZ.Syntax.TikZColor
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.TikZ.Syntax.TPath
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.TikZ.Syntax.GridOption
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.TikZ.Syntax.Step
instance Text.LaTeX.Base.Render.Render Text.LaTeX.Packages.TikZ.Syntax.TPoint


-- | This module provides a monadic interface to build <a>TPath</a> values.
--   It does so using <a>PathBuilder</a>s. The construction of a
--   <a>PathBuilder</a> is equivalent to the construction of a <a>TPath</a>
--   by hand, but with a sometimes more convenient syntax.
--   
--   For example, this path corresponds to a triangle:
--   
--   <pre>
--   trianglePath :: TPath
--   trianglePath = bpath (pointAtXY (-1) 0) $ do
--      line $ pointAtXY 1 0
--      line $ pointAtXY 0 1
--      pcycle
--   </pre>
--   
--   The equivalent syntax created by hand would be:
--   
--   <pre>
--   trianglePath :: TPath
--   trianglePath = Cycle $ Start (pointAtXY (-1) 0) -&gt;- pointAtXY 1 0 -&gt;- pointAtXY 0 1
--   </pre>
--   
--   The <a>Cycle</a> constructor at the beginning may seem unintuitive,
--   since we are building the path from left to right. In the
--   <a>PathBuilder</a> monad, the instructions are always written in
--   order.
module Text.LaTeX.Packages.TikZ.PathBuilder

-- | Use a <i>path builder</i> to construct a value of type <a>TPath</a>.
--   Use <a>bpath</a> for this purpose.
data PathBuilder a

-- | Build a path using a <i>starting point</i> and a <a>PathBuilder</a>.
bpath :: TPoint -> PathBuilder a -> TPath

-- | Line from the current point to the given one.
line :: TPoint -> PathBuilder ()
pcycle :: PathBuilder ()

-- | Rectangle with the current point as one cornder and the given point as
--   the opposite corner.
rectangle :: TPoint -> PathBuilder ()

-- | Circle with the given radius centered at the current point.
circle :: Double -> PathBuilder ()

-- | Ellipse with width and height described by the arguments and centered
--   at the current point.
ellipse :: Double -> Double -> PathBuilder ()

-- | Text centered at the current point.
node :: LaTeX -> PathBuilder ()
grid :: [GridOption] -> TPoint -> PathBuilder ()
instance GHC.Base.Functor Text.LaTeX.Packages.TikZ.PathBuilder.PathBuilder
instance GHC.Base.Applicative Text.LaTeX.Packages.TikZ.PathBuilder.PathBuilder
instance GHC.Base.Monad Text.LaTeX.Packages.TikZ.PathBuilder.PathBuilder


-- | Ti<i>k</i>Z ist <i>kein</i> Zeichenprogramm.
--   
--   Ti<i>k</i>Z is a frontend for PGF (Portable Graphics Format), a
--   package for creating graphics using scripts embedded in a LaTeX
--   document.
--   
--   Using this library you will be able to generate Ti<i>k</i>Z scripts
--   using Haskell functions.
--   
--   The interface given here is pretty close to the original Ti<i>k</i>Z
--   interface. Another layer of abstraction is given in
--   <a>Text.LaTeX.Packages.TikZ.Simple</a>, module built from the entities
--   exported here. Usually, one chooses one of the interfaces and work
--   with it. However, if you want to use both of them, you will have to
--   use qualified imports or you will get name clashes.
--   
--   Also, the module exported here,
--   <a>Text.LaTeX.Packages.TikZ.PathBuilder</a>, provides an interface to
--   create paths (see <a>TPath</a>) using monads.
--   
--   Once you have generated a Ti<i>k</i>Z script, use <a>tikzpicture</a>
--   to include it in a LaTeX document.
module Text.LaTeX.Packages.TikZ

-- | Import the <a>tikz</a> package to use the functions exported by this
--   module. For example, adding this line to your document preamble:
--   
--   <pre>
--   usepackage [] tikz
--   </pre>
tikz :: PackageName

-- | Transform a Ti<i>k</i>Z script to a <a>LaTeX</a> block.
tikzpicture :: LaTeXC l => TikZ -> l


-- | A simple interface to create Ti<i>k</i>Z graphics. Just build pictures
--   using the <a>Figure</a> data constructors, and get the Ti<i>k</i>Z
--   script using the function <a>figuretikz</a>. Use the function
--   <a>tikzpicture</a> to insert the Ti<i>k</i>Z script in the LaTeX
--   document. And do not forget to import the <a>tikz</a> package in the
--   preamble.
--   
--   Please, note that this module is not intended to be imported in the
--   same module than Text.LaTeX.Packages.TikZ. This module is itself a
--   self-contained <i>alternative</i> of that module. If you still want to
--   use both modules, please, use qualified imports to avoid name clashes.
--   
--   In the <i>Examples</i> directory of the source distribution, the file
--   <tt>tikzsimple.hs</tt> contains a complete example of usage of this
--   module with several pictures. Below you can see a picture along with
--   the code it came from.
--   
--   
--   <pre>
--   myFigure :: Figure
--   myFigure = Scale 2 $ Figures
--     [ RectangleFilled (0,0) 1 1
--     , Colored (BasicColor Green) $ RectangleFilled (-1,1) 1 1
--     , Colored (BasicColor Red)   $ RectangleFilled ( 0,2) 1 1
--     , Colored (BasicColor Blue)  $ RectangleFilled ( 1,1) 1 1
--       ]
--   </pre>
module Text.LaTeX.Packages.TikZ.Simple

-- | Import the <a>tikz</a> package to use the functions exported by this
--   module. For example, adding this line to your document preamble:
--   
--   <pre>
--   usepackage [] tikz
--   </pre>
tikz :: PackageName

-- | A figure in the plane.
data Figure

-- | Line along a list of points.
Line :: [Point] -> Figure

-- | Line along a list of points, but the last point will be joined with
--   the first one.
Polygon :: [Point] -> Figure

-- | Same as <a>Polygon</a>, but the inner side will be filled with color.
PolygonFilled :: [Point] -> Figure

-- | Rectangle with top-right corner at the given point and width and
--   height given by the other parameters.
Rectangle :: Point -> Double -> Double -> Figure

-- | Same as <a>Rectangle</a>, but filled with color.
RectangleFilled :: Point -> Double -> Double -> Figure

-- | Circle centered at the given point with the given radius.
Circle :: Point -> Double -> Figure

-- | As in <a>Circle</a>, but it will be filled with some color.
CircleFilled :: Point -> Double -> Figure

-- | Ellipse centered at the given point with width and height given by the
--   other parameters.
Ellipse :: Point -> Double -> Double -> Figure

-- | Same as <a>Ellipse</a>, but filled with some color.
EllipseFilled :: Point -> Double -> Double -> Figure

-- | Insert some <a>LaTeX</a> code, centered at the given <a>Point</a>. The
--   text should not be very complex to fit nicely in the picture.
Text :: Point -> LaTeX -> Figure

-- | Color for the given <a>Figure</a>.
Colored :: TikZColor -> Figure -> Figure

-- | Line width for the given <a>Figure</a>.
LineWidth :: Measure -> Figure -> Figure

-- | Scaling of the given <a>Figure</a> by a factor.
Scale :: Double -> Figure -> Figure

-- | Rotate a <a>Figure</a> by a given angle (in radians).
Rotate :: Double -> Figure -> Figure

-- | A figure composed by a list of figures.
Figures :: [Figure] -> Figure

-- | A point in the plane.
type Point = (Double, Double)

-- | Color models accepted by Ti<i>k</i>Z.
data TikZColor
BasicColor :: Color -> TikZColor
RGBColor :: Word8 -> Word8 -> Word8 -> TikZColor

-- | Basic colors.
data Color
Red :: Color
Green :: Color
Blue :: Color
Yellow :: Color
Cyan :: Color
Magenta :: Color
Black :: Color
White :: Color

-- | 8-bit unsigned integer type
data Word8

-- | The figure of a <i>path</i>. A <i>path</i> (in this context) means a
--   function from an interval to the plane. The image of such a function
--   is what this function returns as a <a>Figure</a>. An additional
--   argument is needed to set the precision of the curve.
--   
--   The actual implementation builds a spline of degree one joining
--   different points of the image. Given that the interval is <i>(a,b)</i>
--   and the precision argument is ε, the points in the spline will be
--   <i>f(a)</i>, <i>f(a+</i>ε<i>)</i>, <i>f(a+2</i>ε<i>)</i>, and so on,
--   until reaching <i>f(b)</i>. The smaller is ε, the closer is the figure
--   to the original image.
--   
--   Here is an example with a logarithmic spiral.
--   
--   
--   <pre>
--   spiral :: Figure
--   spiral = LineWidth (Pt 2) $
--       pathImage 0.01 (0,4) $
--         \t -&gt; ( a * exp t * cos (b*t)
--               , a * exp t * sin (b*t)
--                 )
--     where
--       a = 0.1 ; b = 4
--   </pre>
pathImage :: Double -> (Double, Double) -> (Double -> Point) -> Figure

-- | Translate a <a>Figure</a> to a <a>TikZ</a> script.
figuretikz :: Figure -> TikZ

-- | Sequence two Ti<i>k</i>Z scripts.
(->>) :: TikZ -> TikZ -> TikZ

-- | Transform a Ti<i>k</i>Z script to a <a>LaTeX</a> block.
tikzpicture :: LaTeXC l => TikZ -> l


-- | Tree definition with some class instances.
module Text.LaTeX.Packages.Trees

-- | Tree datatype.
data Tree a

-- | Leafs are non-empty.
Leaf :: a -> Tree a

-- | Node values are optional.
Node :: (Maybe a) -> [Tree a] -> Tree a
instance GHC.Base.Functor Text.LaTeX.Packages.Trees.Tree
instance Data.Foldable.Foldable Text.LaTeX.Packages.Trees.Tree
instance Data.Traversable.Traversable Text.LaTeX.Packages.Trees.Tree


-- | Tree interface using the <tt>qtree</tt> package. An example of usage
--   is provided in the <i>examples</i> directory of the source
--   distribution.
module Text.LaTeX.Packages.Trees.Qtree

-- | The <a>qtree</a> package.
qtree :: PackageName

-- | Given a function to <tt>LaTeX</tt> values, you can create a
--   <tt>LaTeX</tt> tree from a Haskell tree. The function specifies how to
--   render the node values.
tree :: LaTeXC l => (a -> l) -> Tree a -> l

-- | This function works as <a>tree</a>, but use <a>render</a> as rendering
--   function.
rendertree :: (Render a, LaTeXC l) => Tree a -> l
instance Text.LaTeX.Base.Texy.Texy a => Text.LaTeX.Base.Texy.Texy (Text.LaTeX.Packages.Trees.Tree a)
