-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | The Haskell LaTeX library. -- -- As it is said: "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. Download -- the HaTeX User's Guide from -- https://github.com/downloads/Daniel-Diaz/HaTeX-Guide/HaTeX-Guide.pdf. @package HaTeX @version 3.3 -- | 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 -- | 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 :: LaTeX -> LaTeX -- | Newline character. TeXNewLine :: 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 TeXArg instance Show TeXArg instance Eq LaTeX instance Show LaTeX instance IsString LaTeX instance Monoid LaTeX module Text.LaTeX.Base.Class 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: -- --
mappend mempty x = x
mappend x mempty = x
mappend x (mappend y z) = mappend (mappend x y) z
mconcat = foldr mappend mempty
-- comm0 str = fromLaTeX $ TeXComm str [] --comm0 :: LaTeXC l => String -> l commS :: LaTeXC l => String -> l braces :: LaTeXC l => l -> l instance LaTeXC LaTeX -- | This is the LaTeX parser module. module Text.LaTeX.Base.Parser -- | Parse a LaTeX expression written in Text, to a LaTeX -- AST. It returns a ParseError in case of parsing error. parseLaTeX :: Text -> Either ParseError LaTeX -- | The abstract data type ParseError represents parse errors. It -- provides the source position (SourcePos) of the error and a -- list of error messages (Message). A ParseError can be -- returned by the function parse. ParseError is an -- instance of the Show class. data ParseError :: * -- | 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 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. 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 -- | 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 createLabel :: String -> Label labelName :: Label -> String -- | A vertical position. data Pos Bottom :: Pos Center :: Pos Top :: Pos 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 data Measure -- | A point is 1/72.27 inch, that means about 0.0138 inch or 0.3515 mm. Pt :: Int -> Measure -- | Millimeter. Mm :: Float -> Measure -- | Centimeter. Cm :: Float -> Measure -- | Inch. In :: Float -> Measure -- | The height of an "x" in the current font. Ex :: Float -> Measure -- | The width of an "M" in the current font. Em :: Float -> Measure -- | You can introduce a LaTeX expression as a measure. CustomMeasure :: LaTeX -> Measure instance Eq Label instance Show Label instance Show Pos instance Show TableSpec instance Show Measure instance Render Measure instance Render TableSpec 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 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 :: LaTeX -> LaTeX 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 -- | Print the HaTeX-meta logo. hatex_meta :: 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 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 :: LaTeX -> LaTeX 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 module Text.LaTeX.Packages.AMSMath -- | AMSMath package. Example: -- --
-- usepackage [] amsmath --amsmath :: PackageName -- | Inline mathematical expressions. math :: LaTeXC l => 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 -- | Exponential function symbol. texp :: LaTeXC l => l -- | Logarithm function symbol. tlog :: LaTeXC l => l -- | Natural logarithm symbol. ln :: LaTeXC l => l (=:, /=:) :: LaTeXC l => l -> l -> l -- | Greater. (>:) :: LaTeXC l => l -> l -> l -- | Greater or equal. (>=:) :: LaTeXC l => l -> l -> l -- | Lesser. (<:) :: LaTeXC l => l -> l -> l -- | Lesser or equal. (<=:) :: LaTeXC l => l -> l -> l in_ :: LaTeXC l => l -> l -> l ni :: LaTeXC l => l -> l -> l notin :: LaTeXC l => l -> l -> l alpha :: LaTeXC l => l beta :: LaTeXC l => l gamma :: LaTeXC l => l gammau :: LaTeXC l => l delta :: LaTeXC l => l deltau :: LaTeXC l => l epsilon :: LaTeXC l => l varepsilon :: LaTeXC l => l zeta :: LaTeXC l => l eta :: LaTeXC l => l theta :: LaTeXC l => l thetau :: LaTeXC l => l iota :: LaTeXC l => l kappa :: LaTeXC l => l lambda :: LaTeXC l => l lambdau :: LaTeXC l => l mu :: LaTeXC l => l nu :: LaTeXC l => l xi :: LaTeXC l => l xiu :: LaTeXC l => l pi_ :: LaTeXC l => l varpi :: LaTeXC l => l piu :: LaTeXC l => l rho :: LaTeXC l => l varrho :: LaTeXC l => l sigma :: LaTeXC l => l varsigma :: LaTeXC l => l sigmau :: LaTeXC l => l tau :: LaTeXC l => l upsilon :: LaTeXC l => l upsilonu :: LaTeXC l => l phi :: LaTeXC l => l varphi :: LaTeXC l => l phiu :: LaTeXC l => l chi :: LaTeXC l => l psi :: LaTeXC l => l psiu :: LaTeXC l => l omega :: LaTeXC l => l omegau :: LaTeXC l => l -- | A right-arrow. to :: LaTeXC l => l -- | For all symbol. forall :: LaTeXC l => l -- | Dagger symbol. dagger :: LaTeXC l => l -- | Double dagger symbol. ddagger :: LaTeXC l => l mathbf :: LaTeXC l => l -> l mathrm :: LaTeXC l => l -> l mathcal :: LaTeXC l => l -> l mathsf :: LaTeXC l => l -> l mathtt :: LaTeXC l => l -> l mathit :: LaTeXC l => l -> l -- | 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 :: Monad m => LaTeXT m () -- 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 :: LaTeXT m a -> m (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 a -> LaTeXT m a) 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 instance Functor m => Functor (LaTeXT m) instance Applicative m => Applicative (LaTeXT m) instance Monad m => Monad (LaTeXT m) instance MonadIO m => MonadIO (LaTeXT m) instance Monad m => Monoid (LaTeXT m a) instance Monad m => IsString (LaTeXT m a) instance Monad m => LaTeXC (LaTeXT m a) instance MonadTrans LaTeXT 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 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 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 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, pdftex, dvipdfm :: 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 -- | Re-export of all packages. module Text.LaTeX.Packages -- | This module exports those minimal things you need to work with HaTeX. -- Those things are: -- --