-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | The Haskell LaTeX library. -- -- The LaTeX project site states: "LaTeX is a high-quality typesetting -- system". This library provides a bridge between that system and -- Haskell (i.e. it is a LaTeX DSL). -- -- Write LaTeX documents with all the advantages you already have in -- Haskell (recursion, type system, high order functions, ...), create a -- LaTeX backend for your own program, make analysis of LaTeX code -- through its Abstract Syntax Tree (AST), find another way to -- pretty-printing values, ... -- -- See the examples directory in the source distribution to look -- some simple examples. It would be good to get you started. HaTeX -- User's Guide is available at -- https://github.com/Daniel-Diaz/HaTeX-Guide. @package HaTeX @version 3.5 -- | 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 Traversable Tree instance Foldable Tree instance Functor Tree -- | LaTeX syntax description in the definition of the LaTeX -- datatype. If you want to add new commands or environments not defined -- in the library, import this module and use LaTeX data -- constructors. module Text.LaTeX.Base.Syntax -- | Measure units defined in LaTeX. Use CustomMeasure to use -- commands like textwidth. For instance: -- --
--   rule Nothing (CustomMeasure linewidth) (Pt 2)
--   
-- -- This will create a black box (see rule) 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 :: Int -> 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 LaTeX expression as a measure. CustomMeasure :: LaTeX -> Measure -- | Different types of syntax for mathematical expressions. data MathType Parentheses :: MathType Square :: MathType Dollar :: MathType -- | Type of LaTeX 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. 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 -- | Operators. TeXOp :: String -> LaTeX -> LaTeX -> LaTeX -- | A expression between braces. TeXBraces :: LaTeX -> LaTeX -- | Comments. TeXComment :: Text -> LaTeX -- | Sequencing of LaTeX expressions. Use <> -- preferably. TeXSeq :: LaTeX -> LaTeX -> LaTeX -- | An empty block. Neutral element of <>. TeXEmpty :: LaTeX -- | An argument for a LaTeX command or environment. data TeXArg -- | Optional argument. OptArg :: LaTeX -> TeXArg -- | Fixed argument. FixArg :: LaTeX -> TeXArg -- | Multiple optional argument. MOptArg :: [LaTeX] -> TeXArg -- | An argument enclosed between < and >. SymArg :: LaTeX -> TeXArg -- | Version of SymArg with multiple options. MSymArg :: [LaTeX] -> TeXArg -- | An infix synonym for mappend. (<>) :: Monoid m => m -> m -> m -- | Escape LaTeX reserved characters in a String. protectString :: String -> String -- | Escape LaTeX reserved characters in a Text. protectText :: Text -> Text instance Eq MathType instance Show MathType instance Ord MathType instance Eq TeXArg instance Show TeXArg instance Eq LaTeX instance Show LaTeX instance Eq Measure instance Show Measure instance IsString LaTeX instance Monoid LaTeX -- | Definition of the LaTeXC class, used to combine the classic -- applicative and the latter monadic interfaces of HaTeX 3. The -- user can define new instances as well, adding flexibility to the way -- HaTeX is used. module Text.LaTeX.Base.Class -- | This is the class of LaTeX code generators. It has -- Monoid and IsString as superclasses. class (Monoid l, IsString l) => LaTeXC l 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: -- -- -- -- The method names refer to the monoid of lists under concatenation, but -- there are many other instances. -- -- Minimal complete definition: mempty and mappend. -- -- 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 -- newtypes and make those instances of Monoid, e.g. -- Sum and Product. class Monoid a mempty :: Monoid a => a mappend :: Monoid a => a -> a -> a mconcat :: Monoid a => [a] -> a -- | Map a LaTeX value to its equivalent in any LaTeXC -- instance. fromLaTeX :: LaTeXC l => LaTeX -> l -- | Lift a inner function of LaTeX values into any LaTeXC -- instance. liftL :: LaTeXC l => (LaTeX -> LaTeX) -> l -> l -- | Variant of liftL with a two arguments function. liftL2 :: LaTeXC l => (LaTeX -> LaTeX -> LaTeX) -> l -> l -> l -- | Variant of liftL 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. -- --
--   comm0 str = fromLaTeX $ TeXComm str []
--   
comm0 :: LaTeXC l => String -> l -- | Like comm0 but using commS. -- --
--   commS = fromLaTeX . TeXCommS
--   
commS :: LaTeXC l => String -> l -- | A lifted version of the TeXBraces constructor. -- --
--   braces = liftL TeXBraces
--   
braces :: LaTeXC l => l -> l instance LaTeXC LaTeX -- | LaTeX Parser based on Attoparsec module Text.LaTeX.Base.Parser -- | The incremental LaTeX Parser latexParser :: Parser LaTeX -- | Incremental Parser for single blocks of LaTeX latexBlockParser :: Parser LaTeX -- | Parses a Text sequence at once; may fail or conclude. latexAtOnce :: Text -> Either String LaTeX -- | Incremental Parser that terminates after the document -- envionment latexDocParser :: Parser LaTeX -- | Test if a LaTeX block is a document environment. isMainDoc :: LaTeX -> Bool -- | This module provides functionality for check a LaTeX value for -- possibly undesired things (like the call to an undefined label), -- returning Warnings. These are called Warnings because -- they never terminates 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 documentclass. NoClassSelected :: Warning -- | No document inserted. NoDocumentInserted :: Warning -- | Custom warning for custom checkings. Use it as you want. CustomWarning :: Text -> Warning -- | A TeXCheck is a function that checks possible warnings from a -- LaTeX value. Use the Monoid instance to combine check -- functions. data TeXCheck -- | Apply a checking. check :: TeXCheck -> LaTeX -> [Warning] -- | Build a TeXCheck 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 -- documentclass). checkClass :: TeXCheck -- | Check if the document environment is called in a -- LaTeX. checkDoc :: TeXCheck -- | Check with checkLabels, checkClass and checkDoc. checkAll :: TeXCheck instance Eq Warning instance Show Warning instance Monoid TeXCheck -- | The final purpose of this module is to render a Text value from a -- LaTeX value. The interface is abstracted via a typeclass so you -- can cast to Text other types as well. Also, some other handy -- Text-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 Text. You mainly -- will use this to obtain the Text output of a LaTeX -- value. If you are going to write the result in a file, consider to use -- renderFile. -- -- Consider also to use rendertex to get Renderable values -- into LaTeX blocks. -- -- If you want to make a type instance of Render and you already -- have a Show instance, you can use the default instance. -- --
--   render = fromString . show
--   
class Show a => Render a where render = fromString . show 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 Char. 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 LaTeX (or another one in the -- Render class) value directly in a file. renderFile :: Render a => FilePath -> a -> IO () -- | If you can transform a value to Text, you can insert that -- Text in your LaTeX code. That is what this function -- does. -- -- Warning: rendertex does not escape LaTeX reserved -- characters. Use protectText to escape them. rendertex :: (Render a, LaTeXC l) => a -> l -- | If you are going to insert the content of a file in your LaTeX -- data, use this function to ensure your encoding is correct. readFileTex :: FilePath -> IO Text instance Render Double instance Render Float instance Render Integer instance Render Int instance Render TeXArg instance Render LaTeX instance Render Measure instance Render Text -- | Some types shared along the library. module Text.LaTeX.Base.Types -- | Class names are represented by a String. type ClassName = String -- | Package names are represented by a String. type PackageName = String 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 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 -- array package. ParColumnMid :: LaTeX -> TableSpec -- | Paragraph column with text vertically aligned at the bottom. Requires -- array package. ParColumnBot :: LaTeX -> TableSpec -- | Vertical line between two columns. VerticalLine :: TableSpec -- | Double vertical line between two columns. DVerticalLine :: TableSpec -- | Measure units defined in LaTeX. Use CustomMeasure to use -- commands like textwidth. For instance: -- --
--   rule Nothing (CustomMeasure linewidth) (Pt 2)
--   
-- -- This will create a black box (see rule) 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 :: Int -> 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 LaTeX expression as a measure. CustomMeasure :: LaTeX -> Measure instance Eq Label instance Show Label instance Show Pos instance Show HPos instance Show TableSpec instance Render TableSpec instance Render HPos instance Render Pos instance IsString Label instance Render Label module Text.LaTeX.Packages.Inputenc -- | Inputenc package. Example: -- --
--   usepackage [utf8] inputenc
--   
inputenc :: PackageName -- | UTF-8 encoding. utf8 :: LaTeXC l => l -- | Latin-1 encoding. latin1 :: LaTeXC l => l -- | Module for the package amsfonts. module Text.LaTeX.Packages.AMSFonts -- | AMSFonts package. Example: -- --
--   usepackage [] amsfonts
--   
amsfonts :: ClassName -- | This font is useful for representing sets like R (real numbers) or Z -- (integers). For instance: -- --
--   "The set of real numbers are represented by " <> mathbb "R" <> "."
--   
-- -- Or in monadic form: -- --
--   "The set of real numbers are represented by " >> mathbb "R" >> "."
--   
-- -- Note the use of overloaded strings. mathbb :: LaTeXC l => l -> l -- | LaTeX standard commands and environments. module Text.LaTeX.Base.Commands -- | Insert a raw piece of Text. This functions doesn't care about -- LaTeX reserved characters, it insert the text just as it is -- received. raw :: LaTeXC l => Text -> l -- | Calling between c l1 l2 puts c between -- l1 and l2 and appends them. 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: -- --
--   textbf "I'm just an example." % "Insert a few words here."
--   
-- -- 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. (%) :: 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. 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 documentclass 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 => l -> l thispagestyle :: LaTeXC l => l -> l plain :: LaTeXC l => l headings :: LaTeXC l => l empty :: LaTeXC l => l myheadings :: LaTeXC l => l -- | Used in conjunction with myheadings for setting both the left -- and the right heading. markboth :: LaTeXC l => l -> l -> l -- | Used in conjunction with myheadings for setting the right -- heading. markright :: LaTeXC l => l -> l document :: LaTeXC l => l -> l -- | Generate the title. It normally contains the title name of your -- document, the author(s) and date. maketitle :: LaTeXC l => l -- | Create the table of contents, automatically generated from your -- sections, subsections, and other related stuff. tableofcontents :: LaTeXC l => l abstract :: LaTeXC l => l -> l appendix :: LaTeXC l => l part :: LaTeXC l => l -> l chapter :: LaTeXC l => l -> l -- | Start a new section with a given title. section :: LaTeXC l => l -> l subsection :: LaTeXC l => l -> l subsubsection :: LaTeXC l => l -> l paragraph :: LaTeXC l => l -> l subparagraph :: LaTeXC l => l -> l today :: LaTeXC l => l tex :: LaTeXC l => l -- | The LaTeX logo. latex :: LaTeXC l => l 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. newline :: LaTeXC l => l -- | Start a new line. In a tabular, it starts a new row, so use -- newline instead. lnbk :: LaTeXC l => l lnbk_ :: LaTeXC l => l newpage :: LaTeXC l => l cleardoublepage :: LaTeXC l => l clearpage :: LaTeXC l => l linebreak :: LaTeXC l => l -> l 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 vspace :: LaTeXC l => Measure -> l -- | Fill out all available horizontal space. hfill :: LaTeXC l => l -- | Fill out all available vertical space. vfill :: LaTeXC l => l stretch :: LaTeXC l => Int -> l smallskip :: LaTeXC l => l bigskip :: LaTeXC l => l indent :: LaTeXC l => l noindent :: LaTeXC l => l textwidth :: LaTeXC l => l linewidth :: LaTeXC l => l verbatim :: LaTeXC l => l -> 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 equation :: LaTeXC l => l -> l equation_ :: LaTeXC l => l -> l enumerate :: LaTeXC l => l -> l itemize :: LaTeXC l => l -> l item :: LaTeXC l => Maybe l -> l flushleft :: LaTeXC l => l -> l flushright :: LaTeXC l => l -> l 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. figure :: 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 Pos -> l -> l makebox :: LaTeXC l => Maybe Measure -> Maybe Pos -> 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 tabular environment can be used to typeset tables with -- optional horizontal and vertical lines. tabular :: LaTeXC l => Maybe Pos -> [TableSpec] -> l -> l -- | Column separator. (&) :: LaTeXC l => l -> l -> l -- | Horizontal line. hline :: LaTeXC l => l -- | cline i j writes a partial horizontal line beginning in -- column i and ending in column j. cline :: LaTeXC l => Int -> Int -> 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 instance Show PaperType instance Show ClassOption instance Render PaperType instance IsString ClassOption instance Render ClassOption -- | The writer monad applied to LaTeX values. Useful to compose -- LaTeX values using the do notation: -- --
--   anExample :: Monad m => 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 "(<>)" ; " operator and a lot of "
--       "parentheses. With the cost of a monad."
--   
-- -- Since LaTeXT is a monad transformer, you can do also: -- --
--   anotherExample :: LaTeXT IO ()
--   anotherExample = lift (readFile "foo") >>= verbatim . fromString
--   
-- -- 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 LaTeX type. module Text.LaTeX.Base.Writer data LaTeXT m a type LaTeXT_ m = LaTeXT m () runLaTeXT :: Monad m => LaTeXT m a -> m (Either String a, LaTeX) -- | This is the usual way to run the LaTeXT monad and obtain a -- LaTeX value. execLaTeXT :: Monad m => LaTeXT m a -> m LaTeX -- | Version of execLaTeXT with possible warning messages. This -- function applies checkAll to the LaTeX output. execLaTeXTWarn :: Monad m => LaTeXT m a -> m (LaTeX, [Warning]) -- | This function run a LaTeXT computation, lifting the result -- again in the monad. extractLaTeX :: Monad m => LaTeXT m a -> LaTeXT m (a, LaTeX) extractLaTeX_ :: Monad m => LaTeXT m a -> LaTeXT m LaTeX -- | With textell you can append LaTeX values to the state of -- the LaTeXT monad. textell :: Monad m => LaTeX -> LaTeXT m () -- | Just like rendertex, but with LaTeXT output. -- --
--   rendertexM = textell . rendertex
--   
rendertexM :: (Render a, Monad m) => a -> LaTeXT m () -- | Lift a function over LaTeX values to a function acting over the -- state of a LaTeXT computation. liftFun :: Monad m => (LaTeX -> LaTeX) -> (LaTeXT m a -> LaTeXT m a) -- | Lift an operator over LaTeX values to an operator acting over -- the state of two LaTeXT computations. -- -- Note: The returned value is the one returned by the second -- argument of the lifted operator. liftOp :: Monad m => (LaTeX -> LaTeX -> LaTeX) -> (LaTeXT m a -> LaTeXT m b -> LaTeXT m b) throwError :: Monad m => String -> LaTeXT m a -- | Function merror casts a value contained in a monad m -- to the bottom value of another type. If you try to evaluate this -- value, you will get an error message with the String passed as -- argument to merror. merror :: Monad m => String -> LaTeXT m a -> LaTeXT m b -- | Lift a computation from the argument monad to the constructed monad. lift :: MonadTrans t => forall (m :: * -> *) a. Monad m => m a -> t m a -- | Lift a computation from the IO monad. liftIO :: MonadIO m => forall a. IO a -> m a instance Monad m => Monoid (LaTeXT m a) instance Monad m => IsString (LaTeXT m a) instance Monad m => LaTeXC (LaTeXT m a) instance MonadIO m => MonadIO (LaTeXT m) instance Monad m => Monad (LaTeXT m) instance MonadTrans LaTeXT instance Applicative f => Applicative (LaTeXT f) instance Functor f => Functor (LaTeXT f) module Text.LaTeX.Packages.Hyperref -- | The hyperref package. -- --
--   usepackage [] hyperref
--   
hyperref :: PackageName data HRefOption PDFRemoteStartView :: HRefOption PDFNewWindow :: HRefOption HRefPage :: Int -> HRefOption data URL createURL :: String -> URL -- | Reference to an URL. href :: LaTeXC l => [HRefOption] -> URL -> l -> l -- | Write an URL hyperlinked. url :: LaTeXC l => URL -> l -- | Write an URL without creating a hyperlink. nolinkurl :: LaTeXC l => URL -> l -- | Establish a base URL. hyperbaseurl :: LaTeXC l => URL -> l -- | hyperimage imgURL t: The link to the image referenced by the -- imgURL is inserted, using t as the anchor. hyperimage :: LaTeXC l => URL -> l -> l -- | This is a replacement for the usual ref command that places a -- contextual label in front of the reference. autoref :: LaTeXC l => Label -> l instance Show HRefOption instance Show URL instance Render URL instance Render HRefOption -- | Beamer is a LaTeX package for the creation of slides. module Text.LaTeX.Packages.Beamer -- | The beamer document class. Importing a package is not required. -- Example: -- --
--   documentclass [] beamer
--   
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 frame. frametitle :: LaTeXC l => l -> l -- | Set the subtitle of the current frame. Use it within a frame. framesubtitle :: LaTeXC l => l -> l -- | Highlight in red a piece of text. With the OverlaySpecs, 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 block 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 -- | beameritem works like item, but allows you to specify -- the slides where the item will be displayed. beameritem :: LaTeXC l => [OverlaySpec] -> l -- | With uncover, show a piece of text only in the slides you want. uncover :: LaTeXC l => [OverlaySpec] -> l -> l -- | Similar to uncover. only :: LaTeXC l => [OverlaySpec] -> l -> l -- | A Theme of a presentation. See usetheme. data Theme AnnArbor :: Theme Antibes :: Theme Bergen :: Theme Berkeley :: Theme Berlin :: Theme Boadilla :: Theme Boxes :: Theme CambridgeUS :: Theme Copenhagen :: Theme Darmstadt :: Theme Default :: 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 CustomTheme :: String -> Theme -- | Set the Theme employed in your presentation (in the preamble). usetheme :: LaTeXC l => Theme -> l instance Show OverlaySpec instance Show Theme instance Render Theme instance Render OverlaySpec -- | Package for theorem environments. module Text.LaTeX.Packages.AMSThm -- | AMSThm package. Example: -- --
--   usepackage [] amsthm
--   
amsthm :: PackageName -- | Create a new theorem environment type. Arguments are -- environment name (this will be the argument when using the -- theorem function) and the displayed title. -- -- For example: -- --
--   newtheorem "prop" "Proposition"
--   
-- --
--   theorem "prop" "This is it."
--   
newtheorem :: LaTeXC l => String -> l -> l theorem :: LaTeXC l => String -> l -> l -- | The proof environment. The first optional argument is used to -- put a custom title to the proof. proof :: LaTeXC l => Maybe l -> l -> l -- | Insert the QED symbol. qedhere :: LaTeXC l => l 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 Show TheoremStyle instance Render TheoremStyle module Text.LaTeX.Packages.Color -- | The pcolor package. -- --
--   usepackage [] pcolor
--   
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 data Color Red :: Color Green :: Color Blue :: Color Yellow :: Color Cyan :: Color Magenta :: Color Black :: Color White :: Color 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 data ColorModel RGB :: Float -> Float -> Float -> ColorModel RGB255 :: Int -> Int -> Int -> ColorModel GrayM :: Float -> ColorModel HTML :: String -> ColorModel CMYK :: Float -> Float -> Float -> Float -> ColorModel data ColSpec DefColor :: Color -> ColSpec ModColor :: ColorModel -> ColSpec DvipsColor :: ColorName -> ColSpec -- | 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 fcolorbox cs1 cs2 l put l in a framed -- box with cs1 as frame color and cs2 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 color command in the preamble can change the standard -- colour of the whole document. normalcolor :: LaTeXC l => l instance Show Color instance Show ColorModel instance Show ColorName instance Show ColSpec instance Render ColSpec instance Render ColorName instance Render ColorModel instance Render Color -- | This module allows you to use the LaTeX graphicx library in order to -- insert graphics in a document. module Text.LaTeX.Packages.Graphicx -- | The graphicx package. -- --
--   usepackage [] graphicx
--   
graphicx :: PackageName dvips :: LaTeXC l => l dvipdfm :: LaTeXC l => l pdftex :: LaTeXC l => l -- | Include Graphics Option. These options can be passed as arguments to -- the includegraphics 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 True, it will scale the image according to both -- IGWidth and IGHeight , but will not distort the image, -- so that neither IGWidth nor IGHeight 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 IGTrim option to work, you must set IGClip to -- True. 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 rotatebox :: LaTeXC l => Float -> l -> l scalebox :: LaTeXC l => Float -> Maybe Float -> l -> l reflectbox :: LaTeXC l => l -> l resizebox :: LaTeXC l => Measure -> Measure -> l -> l instance Show IGOption instance Render IGOption -- | This module exports those minimal things you need to work with HaTeX. -- Those things are: -- -- module Text.LaTeX.Base -- | Type of LaTeX blocks. data LaTeX -- | Escape LaTeX reserved characters in a String. protectString :: String -> String -- | Escape LaTeX reserved characters in a Text. protectText :: Text -> Text -- | AMSMath support. Also numeric instances (Num, Fractional -- and Floating) for LaTeX and LaTeXT. module Text.LaTeX.Packages.AMSMath -- | AMSMath package. Example: -- --
--   usepackage [] amsmath
--   
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 -- | Surround a LaTeX math expression by parentheses whose height -- automatically matches the expression's. Translates to -- \left(...\right). autoParens :: LaTeXC l => l -> l -- | Like autoParens, but with square brackets. Equivalent to -- autoBrackets"[""]". autoSquareBrackets :: LaTeXC l => l -> l -- | Like autoParens, but with curly brackets. autoBraces :: LaTeXC l => l -> l -- | Like autoParens, but with angle brackets 〈 ... 〉. Equivalent to -- autoBrackets langle rangle. autoAngleBrackets :: LaTeXC l => l -> l -- | Use custom LaTeX expressions as auto-scaled delimiters to surround -- math. Suitable delimiters include |...| (absolute value), ‖...‖ (norm, -- dblPipe), ⌊...⌋ (round-off Gauss brackets, lfloor / -- rfloor) 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 -- | 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 tsqrt (Just n) x for the nth root -- of x. When Nothing is supplied, the function will -- output a square root. tsqrt :: LaTeXC l => Maybe l -> l -> l -- | Plus-or-minus operator (±). pm :: LaTeXC l => l -> l -> l -- | Minus-or-plus operator (∓). mp :: LaTeXC l => l -> l -> l -- | 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 -- | Asterisk operator (*). -- --
--   infixl 7 *:
--   
(*:) :: LaTeXC l => l -> l -> l -- | 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. -- --
--   infixr 4 =:
--   
(=:) :: LaTeXC l => l -> l -> l -- | Not equal (≠). -- --
--   infixr 4 /=:
--   
(/=:) :: LaTeXC l => l -> l -> l -- | 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 -- | 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 -- | α symbol. alpha :: LaTeXC l => l -- | β symbol. beta :: LaTeXC l => l -- | γ symbol. gamma :: LaTeXC l => l -- | Γ symbol. gammau :: LaTeXC l => l -- | δ symbol. delta :: LaTeXC l => l -- | Δ symbol. deltau :: LaTeXC l => l -- | ϵ symbol. epsilon :: LaTeXC l => l -- | ε symbol. varepsilon :: LaTeXC l => l -- | ζ symbol. zeta :: LaTeXC l => l -- | η symbol. eta :: LaTeXC l => l -- | θ symbol. theta :: LaTeXC l => l -- | ϑ symbol. vartheta :: LaTeXC l => l -- | Θ symbol. thetau :: LaTeXC l => l -- | ι symbol. iota :: LaTeXC l => l -- | κ symbol. kappa :: LaTeXC l => l -- | λ symbol. lambda :: LaTeXC l => l -- | Λ symbol. lambdau :: LaTeXC l => l -- | μ symbol. mu :: LaTeXC l => l -- | ν symbol. nu :: LaTeXC l => l -- | ξ symbol. xi :: LaTeXC l => l -- | Ξ symbol. xiu :: LaTeXC l => l -- | π symbol. pi_ :: LaTeXC l => l -- | ϖ symbol. varpi :: LaTeXC l => l -- | Π symbol. piu :: LaTeXC l => l -- | ρ symbol. rho :: LaTeXC l => l -- | ϱ symbol. varrho :: LaTeXC l => l -- | σ symbol. sigma :: LaTeXC l => l -- | ς symbol. varsigma :: LaTeXC l => l -- | Σ symbol. sigmau :: LaTeXC l => l -- | τ symbol. tau :: LaTeXC l => l -- | υ symbol. upsilon :: LaTeXC l => l -- | Υ symbol. upsilonu :: LaTeXC l => l -- | ϕ symbol. phi :: LaTeXC l => l -- | φ symbol. varphi :: LaTeXC l => l -- | Φ symbol. phiu :: LaTeXC l => l -- | χ symbol. chi :: LaTeXC l => l -- | ψ symbol. psi :: LaTeXC l => l -- | Ψ symbol. psiu :: LaTeXC l => l -- | ω symbol. omega :: LaTeXC l => l -- | Ω symbol. omegau :: LaTeXC l => l -- | A right-arrow, →. to :: LaTeXC l => l -- | A right-arrow for function definitions, ↦. mapsto :: LaTeXC l => l -- | For all symbol, ∀. forall :: LaTeXC l => l -- | Exists symbol, ∃. exists :: LaTeXC l => l -- | Dagger symbol, †. dagger :: LaTeXC l => l -- | Double dagger symbol, ‡. ddagger :: 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 -- | 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 mathdefault, 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 pmatrix.Optional argument -- sets the alignment of the cells. Default (providing Nothing) is -- centered. -- --
--   ( M )
--   
pmatrix :: (Render a, LaTeXC l) => Maybe HPos -> Matrix a -> l -- | LaTeX rendering of a matrix using bmatrix. Optional argument -- sets the alignment of the cells. Default (providing Nothing) is -- centered. -- --
--   [ M ]
--   
bmatrix :: (Render a, LaTeXC l) => Maybe HPos -> Matrix a -> l -- | LaTeX rendering of a matrix using Bmatrix. Optional argument -- sets the alignment of the cells. Default (providing Nothing) is -- centered. -- --
--   { M }
--   
b2matrix :: (Render a, LaTeXC l) => Maybe HPos -> Matrix a -> l -- | LaTeX rendering of a matrix using vmatrix. Optional argument -- sets the alignment of the cells. Default (providing Nothing) is -- centered. -- --
--   | M |
--   
vmatrix :: (Render a, LaTeXC l) => Maybe HPos -> Matrix a -> l -- | LaTeX rendering of a matrix using Vmatrix. Optional argument -- sets the alignment of the cells. Default (providing Nothing) is -- centered. -- --
--   || M ||
--   
v2matrix :: (Render a, LaTeXC l) => Maybe HPos -> Matrix a -> l instance Monad m => Floating (LaTeXT m a) instance Monad m => Fractional (LaTeXT m a) instance Monad m => Num (LaTeXT m a) instance Monad m => Show (LaTeXT m a) instance Monad m => Eq (LaTeXT m a) instance Floating LaTeX instance Fractional LaTeX instance Num LaTeX -- | Re-export of all packages. module Text.LaTeX.Packages -- | Tree interface using the qtree package. An example is of -- usage is provided in the examples directory of the source -- distribution. module Text.LaTeX.Packages.Trees.Qtree -- | The qtree package. qtree :: PackageName -- | Given a function to LaTeX values, you can create a -- LaTeX 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 tree, but use render as rendering -- function. rendertree :: (Render a, LaTeXC l) => Tree a -> l -- | This module is a re-export of the Base module. You may find it shorter -- to import. -- -- 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. module Text.LaTeX