-- 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.6 -- | 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, i.e. no "{}" will be -- inserted to protect the command's end. -- --
--   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 a => Render [a] 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 -- | 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 -- 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 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 -- | This package is of vital importance if you use non-ASCII characters in -- your document. For example, if the name of the author is -- Ángela, the Á character will not appear correctly in the -- output when I call maketitle. To solve this problem, use: -- --
--   usepackage [utf8] inputenc
--   
-- -- And make sure that your Haskell source is encoded in UTF-8. 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 -- | 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 -- | The point of verbatim is to include text that will not -- 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 verbatim, which LaTeX implements as an ordinary -- environment, its command verb 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 -- \verb 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 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 -- | Cell taking multiple columns. multicolumn :: LaTeXC l => Int -> [TableSpec] -> 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 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 (readFileTex "foo") >>= verbatim
--   
-- -- 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. -- -- Another thing you should know about the LaTeX Writer Monad. Don't try -- to get values from computations with no results (like raw -- foo). module Text.LaTeX.Base.Writer -- | WriterT monad transformer applied to LaTeX values. data LaTeXT m a -- | Type synonym for empty LaTeXT computations. type LaTeXT_ m = LaTeXT m () -- | Running a LaTeXT computation returns the final LaTeX -- value and either a String if the computation didn't contain any -- value or the value itself otherwise. 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 = liftM snd . runLaTeXT
--   
-- -- If anExample is defined as above (at the top of this module -- documentation), use the following to get the LaTeX value generated -- out. -- --
--   myLaTeX :: Monad m => m LaTeX
--   myLaTeX = execLaTeXT anExample
--   
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) -- | Executes a LaTeXT computation, embedding it again in the -- LaTeXT monad. -- --
--   extractLaTeX_ = liftM snd . extractLaTeX
--   
-- -- This function was heavily used in the past by HaTeX-meta to generate -- those .Monad modules. The current purpose is to implement the -- LaTeXC instance of LaTeXT, which is closely related. 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) -- | The fail method of the LaTeXT monad. 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) -- | Texy class, as proposed in -- http://deltadiaz.blogspot.com.es/2013/04/hatex-36-proposal-texy-class.html. module Text.LaTeX.Base.Texy -- | Class of types that can be pretty-printed as LaTeX values. class Texy t texy :: (Texy t, LaTeXC l) => t -> l instance Texy Bool instance HasResolution a => Texy (Fixed a) instance Texy Char instance Texy Double instance Texy Float instance Texy Integer instance Texy Int instance Texy Text instance Texy LaTeX -- | 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 -- | Use a environment created by newtheorem. 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 -- | Different styles for theorems. 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 -- | 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 -- | 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 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 -- | 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 RGB :: Float -> Float -> Float -> ColorModel RGB255 :: Int -> Int -> Int -> ColorModel 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 -- | 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 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 -- | This module defines the syntax of a TikZ script. -- -- To generate a TikZ script, first create a TPath using -- data constructors, or alternatively, use a PathBuilder from -- the Text.LaTeX.Packages.TikZ.PathBuilder module. -- -- Once a TPath is created, use path to render a picture -- from it. Use scope to apply some parameters to your picture, -- such line width or color. module Text.LaTeX.Packages.TikZ.Syntax -- | A point in TikZ. data TPoint pointAt :: Measure -> Measure -> TPoint pointAtXY :: Double -> Double -> TPoint pointAtXYZ :: Double -> Double -> Double -> TPoint -- | Makes a point relative to the previous one. relPoint :: TPoint -> TPoint relPoint_ :: TPoint -> TPoint -- | Type for TikZ paths. Every TPath has two fundamental points: -- the starting point and the last point. The starting -- point is set using the Start 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 startingPoint and lastPoint to -- calculate them. After creating a TPath, use path to do -- something useful with it. data TPath -- | Let y = Start p. -- -- Operation: Set the starting point of a path. -- -- Last point: The last point of y is p. Start :: TPoint -> TPath -- | Let y = Cycle x. -- -- Operation: Close a path with a line from the last point of -- x to the starting point of x. -- -- Last point: The last point of y is the starting point -- of x. Cycle :: TPath -> TPath -- | Let y = Line x p. -- -- Operation: Extend the current path from the last point of -- x in a straight line to p. -- -- Last point: The last point of y is p. Line :: TPath -> TPoint -> TPath -- | Let y = Rectangle x p. -- -- Operation: Define a rectangle using the last point of -- x as one corner and p as the another corner. -- -- Last point: The last point of y is p. Rectangle :: TPath -> TPoint -> TPath -- | Let y = Circle x r. -- -- Operation: Define a circle with center at the last point of x -- and radius r. -- -- Last point: The last point of y is the same as the -- last point of x. Circle :: TPath -> Double -> TPath -- | Let y = Ellipse x r1 r2. -- -- Operation: Define a ellipse with center at the last point of -- x, width the double of r1 and height the double of -- r2. -- -- Last point: The last point of y is the same as the -- last point of x. Ellipse :: TPath -> Double -> Double -> TPath Grid :: TPath -> [GridOption] -> TPoint -> TPath data GridOption GridStep :: Step -> GridOption data Step DimStep :: Measure -> Step XYStep :: Double -> Step PointStep :: TPoint -> Step -- | Calculate the starting point of a TPath. startingPoint :: TPath -> TPoint -- | Calculate the last point of a TPath. lastPoint :: TPath -> TPoint -- | Alias of Line. (->-) :: TPath -> TPoint -> TPath -- | Parameters to use in a scope to change how things are rendered -- within that scope. data Parameter TWidth :: Measure -> Parameter TColor :: Color -> Parameter TScale :: Double -> Parameter -- | Basic colors. data Color Red :: Color Green :: Color Blue :: Color Yellow :: Color Cyan :: Color Magenta :: Color Black :: Color White :: Color -- | A TikZ script. data TikZ -- | Just an empty script. emptytikz :: TikZ -- | A path can be used in different ways. -- -- -- -- It is possible to stack different effects in the list. -- -- Example of usage: -- --
--   path [Draw] $ Start (pointAtXY 0 0) ->- pointAtXY 1 1
--   
-- -- Most common usages are exported as functions. See draw, -- fill, clip, shade, filldraw and -- shadedraw. path :: [ActionType] -> TPath -> TikZ -- | Applies a scope to a TikZ script. scope :: [Parameter] -> TikZ -> TikZ -- | Different types of actions that can be performed with a TPath. -- See path for more information. data ActionType Draw :: ActionType Fill :: ActionType Clip :: ActionType Shade :: ActionType -- | Sequence two TikZ scripts. (->>) :: TikZ -> TikZ -> TikZ -- | Equivalent to path [Draw]. draw :: TPath -> TikZ -- | Equivalent to path [Fill]. fill :: TPath -> TikZ -- | Equivalent to path [Clip]. clip :: TPath -> TikZ -- | Equivalent to path [Shade]. shade :: TPath -> TikZ -- | Equivalent to path [Fill,Draw]. filldraw :: TPath -> TikZ -- | Equivalent to path [Shade,Draw]. shadedraw :: TPath -> TikZ instance Show TPoint instance Show Step instance Show GridOption instance Show TPath instance Show Parameter instance Show ActionType instance Show TikZ instance Render ActionType instance Render TikZ instance Render Parameter instance Render Step instance Render GridOption instance Render TPath instance Render TPoint -- | This module provides a monadic interface to build TPath values. -- It does so using PathBuilders. The construction of a -- PathBuilder is equivalent to the construction of a TPath -- by hand, but with a sometimes more convenient syntax. -- -- For example, this path corresponds to a triangle: -- --
--   trianglePath :: TPath
--   trianglePath = bpath (pointAtXY (-1) 0) $ do
--      line $ pointAtXY 1 0
--      line $ pointAtXY 0 1
--      pcycle
--   
-- -- The equivalent syntax created by hand would be: -- --
--   trianglePath :: TPath
--   trianglePath = Cycle $ Start (pointAtXY (-1) 0) ->- pointAtXY 1 0 ->- pointAtXY 0 1
--   
-- -- The Cycle constructor at the beginning may seem unintuitive, -- since we are building the path from left to right. In the -- PathBuilder monad, the instructions are always written in -- order. module Text.LaTeX.Packages.TikZ.PathBuilder -- | Use a path builder to construct a value of type TPath. -- Use bpath for this purpose. data PathBuilder a -- | Build a path using a starting point and a PathBuilder. 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 () grid :: [GridOption] -> TPoint -> PathBuilder () instance Monad PathBuilder instance Applicative PathBuilder instance Functor PathBuilder -- | TikZ ist kein Zeichenprogramm. -- -- TikZ 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 TikZ scripts -- using Haskell functions. -- -- The interface given here is pretty close to the original TikZ -- interface. Another layer of abstraction is given in -- Text.LaTeX.Packages.TikZ.Simple, 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, -- Text.LaTeX.Packages.TikZ.PathBuilder, provides an interface to -- create paths (see TPath) using monads. -- -- Once you have generated a TikZ script, use tikzpicture -- to include it in a LaTeX document. module Text.LaTeX.Packages.TikZ -- | Import the tikz package to use the functions exported by this -- module. For example, adding this line to your document preamble: -- --
--   usepackage [] tikz
--   
tikz :: PackageName -- | Transform a TikZ script to a LaTeX block. tikzpicture :: LaTeXC l => TikZ -> l -- | A simple interface to create TikZ graphics. Just build pictures -- using the Figure data constructors, and get the TikZ -- script using the function figuretikz. Use the function -- tikzpicture to insert the TikZ script in the LaTeX -- document. And do not forget to import the tikz 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 alternative of that module. If still want to use -- both modules, please, use qualified imports to avoid name clashes. -- -- In the Examples directory of the source distribution, the file -- tikzsimple.hs contains a complete example of usage of this -- module. Below you can see a picture along with the code it came from. -- -- --
--   myFigure :: Figure
--   myFigure = Scale 2 $ Figures
--     [ RectangleFilled (0,0) 1 1
--     , Colored Green $ RectangleFilled (-1,1) 1 1
--     , Colored Red   $ RectangleFilled ( 0,2) 1 1
--     , Colored Blue  $ RectangleFilled ( 1,1) 1 1
--       ]
--   
module Text.LaTeX.Packages.TikZ.Simple -- | Import the tikz package to use the functions exported by this -- module. For example, adding this line to your document preamble: -- --
--   usepackage [] tikz
--   
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 Polygon, 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 Rectangle, 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 Circle, 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 Ellipse, but filled with some color. EllipseFilled :: Point -> Double -> Double -> Figure -- | Color for the given Figure. Colored :: Color -> Figure -> Figure -- | Line width for the given Figure. LineWidth :: Measure -> Figure -> Figure -- | Scaling of the given Figure by a factor. Scale :: Double -> Figure -> Figure -- | A figure composed by a list of figures. Figures :: [Figure] -> Figure -- | A point in the plane. type Point = (Double, Double) -- | Basic colors. data Color Red :: Color Green :: Color Blue :: Color Yellow :: Color Cyan :: Color Magenta :: Color Black :: Color White :: Color -- | Translate a Figure to a TikZ script. figuretikz :: Figure -> TikZ -- | Transform a TikZ script to a LaTeX block. tikzpicture :: LaTeXC l => TikZ -> l -- | 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 -- | A numbered mathematical equation (or otherwise math expression). equation :: LaTeXC l => l -> l -- | The unnumbered variant of equation. equation_ :: LaTeXC l => l -> l -- | An array of aligned equations. Use & to specify the points -- that should horizontally match. Each equation is numbered, unless -- prevented by nonumber. align :: LaTeXC l => [l] -> l -- | The unnumbered variant of align. align_ :: LaTeXC l => [l] -> l -- | A reference to a numbered equation. Use with a label 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 -- \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 and a custom -- function to render cells. Optional argument sets the alignment of the -- cells. Default (providing Nothing) is centered. -- --
--   ( M )
--   
pmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l -- | LaTeX rendering of a matrix using bmatrix and a custom -- function to render cells. Optional argument sets the alignment of the -- cells. Default (providing Nothing) is centered. -- --
--   [ M ]
--   
bmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l -- | LaTeX rendering of a matrix using Bmatrix and a custom -- function to render cells. Optional argument sets the alignment of the -- cells. Default (providing Nothing) is centered. -- --
--   { M }
--   
b2matrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l -- | LaTeX rendering of a matrix using vmatrix and a custom -- function to render cells. Optional argument sets the alignment of the -- cells. Default (providing Nothing) is centered. -- --
--   | M |
--   
vmatrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l -- | LaTeX rendering of a matrix using Vmatrix and a custom -- function to render cells. Optional argument sets the alignment of the -- cells. Default (providing Nothing) is centered. -- --
--   || M ||
--   
v2matrix :: (Texy a, LaTeXC l) => Maybe HPos -> Matrix a -> l instance Texy a => Texy [a] instance Texy a => Texy (Matrix a) instance (Texy a, Texy b, Texy c, Texy d) => Texy (a, b, c, d) instance (Texy a, Texy b, Texy c) => Texy (a, b, c) instance (Texy a, Texy b) => Texy (a, b) instance (Integral a, Texy a) => Texy (Ratio a) 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 -- | The babel package is used to write documents in languages -- other than US English. -- -- CTAN page for babel: http://ctan.org/pkg/babel. module Text.LaTeX.Packages.Babel -- | Babel package. When writing in a single language, the simplest way of -- using it is with uselanguage. -- -- In the preamble, use the following (if your language of choice is -- Spanish): -- --
--   uselanguage Spanish
--   
-- -- To see a list of available languages, check the Language 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 babel package using a given Language. -- --
--   uselanguage l = usepackage [texy l] babel
--   
-- -- If you are using more than one language, consider to use -- uselanguageconf. uselanguage :: LaTeXC l => Language -> l -- | Language configuration. You may use one with uselanguageconf. data LangConf LangConf :: Language -> [Language] -> LangConf mainLang :: LangConf -> Language otherLangs :: LangConf -> [Language] -- | Import the label package using a given language configuration, -- featuring a main language and some others. For example: -- --
--   uselanguageconf $ LangConf English [German]
--   
-- -- This will use English as main language, and German as secondary. uselanguageconf :: LaTeXC l => LangConf -> l -- | Switch to a given Language. selectlanguage :: LaTeXC l => Language -> l -- | Use a Language locally. otherlanguage :: LaTeXC l => Language -> l -> l -- | The function foreignlanguage 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 Show Language instance Show LangConf instance Texy Language instance Render Language -- | Select new font encodings using the fontenc package. module Text.LaTeX.Packages.Fontenc -- | The fontenc package. It is recommended to use the -- useencoding 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: -- --
--   useencoding [T1]
--   
-- -- It imports the fontenc package. In fact: -- --
--   useencoding xs = usepackage (fmap texy xs) fontenc
--   
useencoding :: LaTeXC l => [FontEnc] -> l instance Show FontEnc instance Texy FontEnc instance Render FontEnc -- | Tree interface using the qtree package. An example 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 instance Texy a => Texy (Tree a) -- | 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. -- -- For this reason, the module Text.LaTeX.Packages no longer -- exists. module Text.LaTeX