-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | The Haskell LaTeX library. -- @package HaTeX @version 3.14.0.0 -- | 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 :: Double -> Measure -- | Millimeter. Mm :: Double -> Measure -- | Centimeter. Cm :: Double -> Measure -- | Inch. In :: Double -> Measure -- | The height of an "x" in the current font. Ex :: Double -> Measure -- | The width of an "M" in the current font. Em :: Double -> Measure -- | You can introduce a 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. When rendering, no space -- or {} will be added at the end. TeXCommS :: String -> LaTeX -- | Constructor for environments. First argument is the name of the -- environment. Second, its arguments. Third, its content. TeXEnv :: String -> [TeXArg] -> LaTeX -> LaTeX -- | Mathematical expressions. TeXMath :: MathType -> LaTeX -> LaTeX -- | Line break command. TeXLineBreak :: (Maybe Measure) -> Bool -> LaTeX -- | A expression between braces. TeXBraces :: LaTeX -> LaTeX -- | Comments. TeXComment :: Text -> LaTeX -- | Sequencing of 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 -- | Fixed argument. FixArg :: LaTeX -> TeXArg -- | Optional argument. OptArg :: 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 argument enclosed between ( and ). ParArg :: LaTeX -> TeXArg -- | Version of ParArg with multiple options. MParArg :: [LaTeX] -> TeXArg -- | An infix synonym for mappend. -- -- Since: 4.5.0.0 (<>) :: 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 -- | Traverse a LaTeX syntax tree and returns the commands (see -- TeXComm and TeXCommS) that matches the condition and -- their arguments in each call. matchCommand :: (String -> Bool) -> LaTeX -> [(String, [TeXArg])] -- | Look into a LaTeX syntax tree to find any call to the command -- with the given name. It returns a list of arguments with which this -- command is called. -- --
--   lookForCommand = (fmap snd .) . matchCommand . (==)
--   
-- -- If the returned list is empty, the command was not found. However, if -- the list contains empty lists, those are callings to the command with -- no arguments. -- -- For example -- --
--   lookForCommand "author" l
--   
-- -- would look for the argument passed to the \author command in -- l. lookForCommand :: String -> LaTeX -> [[TeXArg]] -- | Traverse a LaTeX syntax tree and returns the environments (see -- TeXEnv) that matches the condition, their arguments and their -- content in each call. matchEnv :: (String -> Bool) -> LaTeX -> [(String, [TeXArg], LaTeX)] -- | Similar to lookForCommand, but applied to environments. It -- returns a list with arguments passed and content of the environment in -- each call. -- --
--   lookForEnv = (fmap (\(_,as,l) -> (as,l)) .) . matchEnv . (==)
--   
lookForEnv :: String -> LaTeX -> [([TeXArg], LaTeX)] -- | The function texmap looks for subexpressions that match a given -- condition and applies a function to them. -- --
--   texmap c f = runIdentity . texmapM c (pure . f)
--   
texmap :: (LaTeX -> Bool) -> (LaTeX -> LaTeX) -> LaTeX -> LaTeX -- | Version of texmap where the function returns values in a -- Monad. texmapM :: (Applicative m, Monad m) => (LaTeX -> Bool) -> (LaTeX -> m LaTeX) -> LaTeX -> m LaTeX -- | Extract the content of the document environment, if present. getBody :: LaTeX -> Maybe LaTeX -- | Extract the preamble of a LaTeX document (everything before the -- document environment). It could be empty. getPreamble :: LaTeX -> LaTeX instance Typeable LaTeX instance Eq MathType instance Show MathType instance Eq TeXArg instance Show TeXArg instance Eq LaTeX instance Show LaTeX instance Eq Measure instance Show Measure instance Arbitrary TeXArg instance Arbitrary LaTeX instance Arbitrary 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 -- | A one parameter command generator using the name of the command. The -- parameter will be rendered as a fixed argument. -- --
--   comm1 str = liftL $ \l -> TeXComm str [FixArg l]
--   
comm1 :: LaTeXC l => String -> l -> l -- | Like comm0 but using TeXCommS, 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 -- | 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 terminate the program execution. module Text.LaTeX.Base.Warnings -- | List of possible warnings. data Warning -- | There is an unused label. Argument is its name. UnusedLabel :: Text -> Warning -- | There is a reference to an undefined label. Arguments is the name. UndefinedLabel :: Text -> Warning -- | No class selected with 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 -- | Show a signed floating number using standard decimal notation using 5 -- decimals. showFloat :: RealFloat a => a -> String instance Render a => Render [a] instance Render Bool instance Render Word8 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 -- | Page styles are represented by a String. type PageStyle = String -- | Type of labels. data Label -- | Create a label from its name. createLabel :: String -> Label -- | Get the name of a label. labelName :: Label -> String -- | Vertical position. data Pos Bottom :: Pos Center :: Pos Top :: Pos -- | Horizontal position. data HPos HLeft :: HPos HCenter :: HPos HRight :: HPos -- | Type of table specifications. data TableSpec -- | Left-justified column. LeftColumn :: TableSpec -- | Centered column. CenterColumn :: TableSpec -- | Right-justified column. RightColumn :: TableSpec -- | Paragraph column with text vertically aligned at the top. ParColumnTop :: LaTeX -> TableSpec -- | Paragraph column with text vertically aligned at the middle. Requires -- 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 :: Double -> Measure -- | Millimeter. Mm :: Double -> Measure -- | Centimeter. Cm :: Double -> Measure -- | Inch. In :: Double -> Measure -- | The height of an "x" in the current font. Ex :: Double -> Measure -- | The width of an "M" in the current font. Em :: Double -> Measure -- | You can introduce a 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 you type the word Ángela, the -- Á character will not appear correctly in the output. 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 -- | 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. module Text.LaTeX.Base.Writer -- | WriterT monad transformer applied to LaTeX values. data LaTeXT m a -- | Running a LaTeXT computation returns the final LaTeX -- value. runLaTeXT :: Monad m => LaTeXT m a -> m (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 -- | Type synonym for empty LaTeXT computations. type LaTeXT_ m = LaTeXT m () -- | The LaTeXT monad transformed applied to Identity. type LaTeXM = LaTeXT Identity -- | A particular case of runLaTeXT. -- --
--   runLaTeXM = runIdentity . runLaTeXT
--   
runLaTeXM :: LaTeXM a -> (a, LaTeX) -- | A particular case of execLaTeXT. -- --
--   execLaTeXM = runIdentity . execLaTeXT
--   
execLaTeXM :: LaTeXM a -> 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) -- | 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, a ~ ()) => Monoid (LaTeXT m a) instance (Monad m, a ~ ()) => IsString (LaTeXT m a) instance (Monad m, a ~ ()) => 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 Measure 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 -- | This module is the Prelude of LaTeX functions. It includes -- commands, environments, and some other useful abstractions, that don't -- require you to import additional LaTeX packages. module Text.LaTeX.Base.Commands -- | Insert a raw piece of Text. This functions doesn't escape -- LaTeX reserved characters, it insert the text just as it is -- received. -- -- Warning: This function is unsafe, in the sense that it -- does not check that the input text is a valid LaTeX block. Make -- sure any braces, commands or environments are properly closed. raw :: LaTeXC l => Text -> l -- | Calling between c l1 l2 puts c between -- l1 and l2 and appends them. -- --
--   between c l1 l2 = l1 <> c <> l2
--   
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."
--   
-- -- The implementation is -- --
--   (%:) l = (l <>) . comment
--   
-- -- Since you are writing in Haskell, you may not need to output comments -- as you can add them in the Haskell source. I added this feature for -- completeness. It may be useful for debugging the output as well. (%:) :: LaTeXC l => l -> Text -> l -- | Set the title of your document. title :: LaTeXC l => l -> l -- | Set the author(s) of the document. author :: LaTeXC l => l -> l -- | Set a date for your document. date :: LaTeXC l => l -> l -- | Set either an institute or an organization for the document. It does -- not work for a document of the article class. institute :: LaTeXC l => Maybe l -> l -> l thanks :: LaTeXC l => l -> l -- | Set the document class. Needed in all documents. documentclass :: LaTeXC l => [ClassOption] -> ClassName -> l -- | Import a package. First argument is a list of options for the package -- named in the second argument. usepackage :: LaTeXC l => [l] -> PackageName -> l linespread :: LaTeXC l => Float -> l article :: ClassName proc :: ClassName report :: ClassName minimal :: ClassName book :: ClassName slides :: ClassName -- | A class option to be passed to the 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 => PageStyle -> l thispagestyle :: LaTeXC l => PageStyle -> l plain :: PageStyle headings :: PageStyle empty :: PageStyle myheadings :: PageStyle -- | 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 -- | The document environment contains the body of the document. 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 related functions. tableofcontents :: LaTeXC l => l -- | Abstract section. abstract :: LaTeXC l => l -> l appendix :: LaTeXC l => l part :: LaTeXC l => l -> l -- | Start a new chapter with the given title. chapter :: LaTeXC l => l -> l -- | Start a new section with a given title. section :: LaTeXC l => l -> l -- | Start a new subsection. subsection :: LaTeXC l => l -> l -- | Start a new subsubsection. subsubsection :: LaTeXC l => l -> l -- | Start a paragraph. paragraph :: LaTeXC l => l -> l -- | Start a subparagraph (minimal level of sectioning). subparagraph :: LaTeXC l => l -> l -- | Render the date at compilation time. today :: LaTeXC l => l -- | Render the current page. thePage :: LaTeXC l => l -- | TeX logo. tex :: LaTeXC l => l -- | The LaTeX logo. latex :: LaTeXC l => l -- | LaTeX logo. laTeX2 :: LaTeXC l => l laTeXe :: LaTeXC l => l -- | Horizontal dots. ldots :: LaTeXC l => l -- | Vertical dots. vdots :: LaTeXC l => l -- | Diagonal dots. ddots :: LaTeXC l => l -- | Print the HaTeX logo. hatex :: LaTeXC l => l -- | Print the HaTeX 3 logo. hatex3 :: LaTeXC l => l version :: Version -- | Print the HaTeX logo, beside the complete version number. hatex_version :: LaTeXC l => l -- | Start a new paragraph par :: LaTeXC l => l -- | Start a new line. 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 -- | Environment of ordered lists. Use item to start each list item. enumerate :: LaTeXC l => l -> l -- | Environment of unordered lists. Use item to start each list -- item. itemize :: LaTeXC l => l -> l -- | An item of a list (see enumerate or itemize). The -- optional argument sets the design of the item. item :: LaTeXC l => Maybe l -> l -- | Left-justify the argument. flushleft :: LaTeXC l => l -> l -- | Right-justify the argument. flushright :: LaTeXC l => l -> l -- | Center-justify the argument. center :: LaTeXC l => l -> l quote :: LaTeXC l => l -> l verse :: LaTeXC l => l -> l cite :: LaTeXC l => l -> l description :: LaTeXC l => l -> l -- | Minipage environment. minipage :: LaTeXC l => Maybe Pos -> l -> l -> l -- | Figure environment. 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 -- | If you are able to arrange some data in matrix form, you might want to -- use this function to quickly generate a tabular with your data. Each -- element of the matrix is rendered using the Texy instance of -- its type. If you want a custom instance for an already instantiated -- type, wrap that type using newtype, and then create your own -- instance. Since every element of a matrix must be of the same type, -- for mixed tables you might want to create an union type. For example, -- if your data matrix contains Ints and Doubles: -- --
--   data Number = R Double | I Int
--   
--   instance Texy Number where
--     texy (R x) = texy x
--     texy (I x) = texy x
--   
-- -- Now you can have a matrix of type Matrix Number and use it to -- render your mixed data in a LaTeX table. -- -- The function matrixTabular does not give you many options, so -- it is not as flexible as generating the table by yourself, but it uses -- a reasonable standard style. -- -- A very simple example: -- --
--   matrixTabular (fmap textbf ["x","y","z"]) $
--     fromList 3 3 [ (1 :: Int)..]
--   
-- -- This code generates the following table: -- -- -- For more examples see the file Examples/tables.hs, included -- in the source distribution. -- -- For more info about how to generate and manipulate matrices, see -- Data.Matrix. matrixTabular :: (LaTeXC l, Texy a) => [l] -> Matrix a -> l footnote :: LaTeXC l => l -> l protect :: LaTeXC l => l -> l hyphenation :: LaTeXC l => l -> l hyp :: LaTeXC l => l -- | Quotation marks. qts :: LaTeXC l => l -> l -- | Import an external file and insert its content as it is. input :: LaTeXC l => FilePath -> l -- | Similar to input, but forces a page break. -- -- Note: the file you are including cannot include other files. include :: LaTeXC l => FilePath -> l instance Show PaperType instance Show ClassOption instance Render PaperType instance IsString ClassOption instance Render ClassOption -- | This package provides extensive control of page headers and footers. -- -- CTAN page for fancyhdr: http://www.ctan.org/pkg/fancyhdr. module Text.LaTeX.Packages.Fancyhdr -- | The fancyhdr package. Please, consider to use applyHdrSettings -- instead of importing the package manually. If you really want to do it -- manually, use the functions from the raw interface exposed -- below. fancyhdr :: PackageName -- | Header and footer settings of a LaTeX document. Use -- applyHdrSettings to apply these settings in your document. A -- default value is provided by defaultHdrSettings, which you can -- modify using record syntax. -- --
--   mySettings :: HdrSettings
--   mySettings = defaultHdrSettings
--       { centerHeader = "Amazing header"
--       , headRuleWidth = Pt 2
--         }
--   
data HdrSettings HdrSettings :: LaTeX -> LaTeX -> LaTeX -> LaTeX -> LaTeX -> LaTeX -> Measure -> Measure -> HdrSettings leftHeader :: HdrSettings -> LaTeX centerHeader :: HdrSettings -> LaTeX rightHeader :: HdrSettings -> LaTeX leftFooter :: HdrSettings -> LaTeX centerFooter :: HdrSettings -> LaTeX rightFooter :: HdrSettings -> LaTeX headRuleWidth :: HdrSettings -> Measure footRuleWidth :: HdrSettings -> Measure -- | Default header and footer settings. -- -- It leaves everything empty but the centerFooter field, which is -- filled with thePage. -- -- Also, it sets to 0.4 points the headRuleWidth field. defaultHdrSettings :: HdrSettings -- | Apply custom header and footer settings to a LaTeX document. It takes -- care of package importing and page style settings, so using this -- function is enough to get the settings applied. Do not import -- the fancyhdr package again. To be used in the preamble. applyHdrSettings :: LaTeXC l => HdrSettings -> l -- | Page style of the fancyhdr package. fancy :: PageStyle -- | Set the left header. lhead :: LaTeXC l => l -> l -- | Set the center header. chead :: LaTeXC l => l -> l -- | Set the right header. rhead :: LaTeXC l => l -> l -- | Set the left footer. lfoot :: LaTeXC l => l -> l -- | Set the center footer. cfoot :: LaTeXC l => l -> l -- | Set the right footer. rfoot :: LaTeXC l => l -> l -- | Set the headrulewidth attribute. renewheadrulewidth :: LaTeXC l => Measure -> l -- | Set the footrulewidth attribute. renewfootrulewidth :: LaTeXC l => Measure -> l instance Eq HdrSettings instance Show HdrSettings -- | The LaTeX parser. -- -- Use parseLaTeX to parse a Text containing LaTeX -- code. If the Text is in a file, you may want to use -- parseLaTeXFile. Use this module together with -- Text.LaTeX.Base.Syntax to perform analysis and transformations -- of LaTeX code. The parser (parseLaTeX) is related with -- the renderer (render) by the following property: -- -- If t :: Text is a syntactically valid LaTeX block, -- then: -- --
--   fmap render (parseLaTeX t) == Right t
--   
-- -- This property says two things: -- -- -- -- In other words, parseLaTeX is a partial function defined over -- the set of valid LaTeX files, and render is its left -- inverse. module Text.LaTeX.Base.Parser -- | Parse a Text sequence as a LaTeX block. If it fails, it -- returns an error string. parseLaTeX :: Text -> Either ParseError LaTeX -- | Read a file and parse it as LaTeX. parseLaTeXFile :: FilePath -> IO (Either ParseError LaTeX) -- | The LaTeX parser. latexParser :: Parser LaTeX -- | Parser of a single LaTeX constructor, no appending blocks. latexBlockParser :: Parser 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 :: * -- | Extracts the source position from the parse error errorPos :: ParseError -> SourcePos -- | Extracts the list of error messages from the parse error errorMessages :: ParseError -> [Message] -- | This abstract data type represents parse error messages. There are -- four kinds of messages: -- --
--   data Message = SysUnExpect String
--                | UnExpect String
--                | Expect String
--                | Message String
--   
-- -- The fine distinction between different kinds of parse errors allows -- the system to generate quite good error messages for the user. It also -- allows error messages that are formatted in different languages. Each -- kind of message is generated by different combinators: -- -- data Message :: * SysUnExpect :: SrictNotUnpackedString -> Message UnExpect :: SrictNotUnpackedString -> Message Expect :: SrictNotUnpackedString -> Message Message :: SrictNotUnpackedString -> Message -- | Extract the message string from an error message messageString :: Message -> String -- | The abstract data type SourcePos represents source positions. -- It contains the name of the source (i.e. file name), a line number and -- a column number. SourcePos is an instance of the Show, -- Eq and Ord class. data SourcePos :: * -- | Extracts the line number from a source position. sourceLine :: SourcePos -> Line -- | Extracts the column number from a source position. sourceColumn :: SourcePos -> Column -- | Extracts the name of the source from a source position. sourceName :: SourcePos -> SourceName -- | LaTeX values pretty printer. -- -- Still experimental. Give it a try and send us your feedback! :) module Text.LaTeX.Base.Pretty -- | Pretty print a LaTeX value. It produces a more human-friendly -- output than render. -- -- This function should be used only for debugging purposes since it may -- change the semantics of the input in order to create a prettier -- output. In other words, running a LaTeX compiler in the output file of -- renderFile fp l may produce a different document than running -- it in the output of writeFile fp (prettyLaTeX l). You should -- use renderFile unless you really need to read the LaTeX file. prettyLaTeX :: LaTeX -> String -- | This function transforms a value of type LaTeX to a Doc. -- You can then choose how to print this Doc value using the -- function from the Text.PrettyPrint.Free module. docLaTeX :: LaTeX -> Doc () -- | 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. -- -- Each frame is contained within the frame function. Here is an -- example: -- --
--   {-# LANGUAGE OverloadedStrings #-}
--   
--   import Text.LaTeX
--   import Text.LaTeX.Packages.Beamer
--   
--   mySlides :: Monad m => LaTeXT m ()
--   mySlides = do
--     frame $ do
--       frametitle "First frame"
--       "Content of the first frame."
--     frame $ do
--       frametitle "Second frame"
--       "Content of the second frame." 
--       pause
--       " And actually a little more."
--   
-- -- The pause command in the second frame makes the second part of -- the text to appear one screen later. 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 -- | Set the Theme employed in your presentation (in the preamble). usetheme :: LaTeXC l => Theme -> l -- | A Theme of a presentation. See usetheme. A preview of -- each one is given below. data Theme AnnArbor :: Theme Antibes :: Theme Bergen :: Theme Berkeley :: Theme Berlin :: Theme Boadilla :: Theme CambridgeUS :: Theme Copenhagen :: Theme Darmstadt :: Theme Dresden :: Theme Frankfurt :: Theme Goettingen :: Theme Hannover :: Theme Ilmenau :: Theme JuanLesPins :: Theme Luebeck :: Theme Madrid :: Theme Malmoe :: Theme Marburg :: Theme Montpellier :: Theme PaloAlto :: Theme Pittsburgh :: Theme Rochester :: Theme Singapore :: Theme Szeged :: Theme Warsaw :: Theme Boxes :: Theme Default :: Theme CustomTheme :: String -> Theme instance Show OverlaySpec instance Eq Theme 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 -- | Each parameter determines the proportion of red, green and blue, with -- a value within the [0,1] interval. RGB :: Float -> Float -> Float -> ColorModel RGB255 :: Word8 -> Word8 -> Word8 -> ColorModel -- | Grayscale, from 0 (black) to 1 (white). GrayM :: Float -> ColorModel HTML :: String -> ColorModel CMYK :: Float -> Float -> Float -> Float -> ColorModel -- | Color specification. data ColSpec DefColor :: Color -> ColSpec ModColor :: ColorModel -> ColSpec DvipsColor :: ColorName -> ColSpec -- | 8-bit unsigned integer type data Word8 :: * -- | Set the background color for the current and following pages. pagecolor :: LaTeXC l => ColSpec -> l -- | Switch to a new text color. color :: LaTeXC l => ColSpec -> l -- | Set the text of its argument in the given colour. textcolor :: LaTeXC l => ColSpec -> l -> l -- | Put its argument in a box with the given colour as background. colorbox :: LaTeXC l => ColSpec -> l -> l -- | Application of 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 and perform some -- transformations. -- -- CTAN page for graphicx: http://ctan.org/pkg/graphicx. module Text.LaTeX.Packages.Graphicx -- | The graphicx package. -- --
--   usepackage [] graphicx
--   
graphicx :: PackageName -- | Package option of the graphicx package. dvips :: LaTeXC l => l -- | Package option of the graphicx package. dvipdfm :: LaTeXC l => l -- | Package option of the graphicx package. 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 -- | Rotate the content by the given angle in degrees. rotatebox :: LaTeXC l => Float -> l -> l -- | Scale the content by the given factor. If only the horizontal scale is -- supplied, the vertical scaling will be the same. scalebox :: LaTeXC l => Float -> Maybe Float -> l -> l -- | Reflect horizontally the content. reflectbox :: LaTeXC l => l -> l -- | Resize the content to match the given dimensions. resizebox :: LaTeXC l => Measure -> Measure -> l -> l instance 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 IsString 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 -- | Point using Measures for coordinantes. pointAt :: Measure -> Measure -> TPoint -- | Point using numbers as coordinates. pointAtXY :: Double -> Double -> TPoint -- | Three-dimensional point. pointAtXYZ :: Double -> Double -> Double -> TPoint -- | Makes a point relative to the previous. relPoint :: TPoint -> TPoint relPoint_ :: TPoint -> TPoint -- | Type for TikZ paths. Every 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 -- | Let y = Node x l. -- -- Operation: Set a text centered at the last point of x. -- -- Last point: The last point of y is the same as the -- last point of x. Node :: TPath -> LaTeX -> TPath data GridOption GridStep :: Step -> GridOption data Step DimStep :: Measure -> Step XYStep :: Double -> Step PointStep :: TPoint -> Step -- | Calculate the starting point of a 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 :: TikZColor -> Parameter TScale :: Double -> Parameter -- | Angle is in degrees. TRotate :: Double -> Parameter -- | Color models accepted by TikZ. data TikZColor BasicColor :: Color -> TikZColor RGBColor :: Word8 -> Word8 -> Word8 -> TikZColor -- | Basic colors. data Color Red :: Color Green :: Color Blue :: Color Yellow :: Color Cyan :: Color Magenta :: Color Black :: Color White :: Color -- | 8-bit unsigned integer type data Word8 :: * -- | A 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 TikZColor instance Show Parameter instance Show ActionType instance Show TikZ instance Render ActionType instance Render TikZ instance Render Parameter instance Render TikZColor 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 () -- | Text centered at the current point. node :: LaTeX -> 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 you 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 with several pictures. 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 (BasicColor Green) $ RectangleFilled (-1,1) 1 1
--     , Colored (BasicColor Red)   $ RectangleFilled ( 0,2) 1 1
--     , Colored (BasicColor 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 -- | Insert some LaTeX code, centered at the given Point. The -- text should not be very complex to fit nicely in the picture. Text :: Point -> LaTeX -> Figure -- | Color for the given Figure. Colored :: TikZColor -> Figure -> Figure -- | Line width for the given Figure. LineWidth :: Measure -> Figure -> Figure -- | Scaling of the given Figure by a factor. Scale :: Double -> Figure -> Figure -- | Rotate a Figure by a given angle (in radians). Rotate :: Double -> Figure -> Figure -- | A figure composed by a list of figures. Figures :: [Figure] -> Figure -- | A point in the plane. type Point = (Double, Double) -- | Color models accepted by TikZ. data TikZColor BasicColor :: Color -> TikZColor RGBColor :: Word8 -> Word8 -> Word8 -> TikZColor -- | Basic colors. data Color Red :: Color Green :: Color Blue :: Color Yellow :: Color Cyan :: Color Magenta :: Color Black :: Color White :: Color -- | 8-bit unsigned integer type data Word8 :: * -- | The figure of a path. A path (in this context) means a -- function from an interval to the plane. The image of such a function -- is what this function returns as a Figure. An additional -- argument is needed to set the precision of the curve. -- -- The actual implementation builds a spline of degree one joining -- different points of the image. Given that the interval is (a,b) -- and the precision argument is ε, the points in the spline will be -- f(a), f(a+ε), f(a+2ε), and so on, -- until reaching f(b). The smaller is ε, the closer is the figure -- to the original image. -- -- Here is an example with a logarithmic spiral. -- -- --
--   spiral :: Figure
--   spiral = LineWidth (Pt 2) $
--       pathImage 0.01 (0,4) $
--         \t -> ( a * exp t * cos (b*t)
--               , a * exp t * sin (b*t)
--                 )
--     where
--       a = 0.1 ; b = 4
--   
pathImage :: Double -> (Double, Double) -> (Double -> Point) -> Figure -- | Translate a Figure to a TikZ script. figuretikz :: Figure -> TikZ -- | Sequence two TikZ scripts. (->>) :: TikZ -> TikZ -> 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 -- | 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 -- | An infix synonym for mappend. -- -- Since: 4.5.0.0 (<>) :: Monoid m => m -> m -> m -- | 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 -- | Sigma sumation symbol. Use sumFromTo instead if you want to -- specify the limits of the sum. tsum :: LaTeXC l => l -- | Sigma sumation symbol with limits. sumFromTo :: LaTeXC l => l -> l -> l -- | Pi product symbol. Use prodFromTo if you want to specify the -- limits of the product. prod :: LaTeXC l => l -- | Pi product symbol with limits. prodFromTo :: LaTeXC l => l -> l -> l -- | Integral symbol. Use integralFromTo if you want to specify the -- limits of the integral. integral :: LaTeXC l => l -- | Integral symbol with limits of integration. integralFromTo :: LaTeXC l => l -> l -> l -- | 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 -- | Infinity symbol. infty :: 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, a ~ ()) => Floating (LaTeXT m a) instance (Monad m, a ~ ()) => Fractional (LaTeXT m a) instance (Monad m, a ~ ()) => Num (LaTeXT m a) instance Show (LaTeXT m a) instance 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. Below you can also find a short overview of HaTeX. -- -- Historically, this module also exported the Packages module. But, -- since it's more common to import the Base module and, then, only the -- packages you need (instead of all of them), this module has been -- upgraded supporting it. -- -- For this reason, the module Text.LaTeX.Packages no longer -- exists. module Text.LaTeX -- | The geometry package provides an easy interface to page dimensions. -- -- CTAN page for geometry: http://www.ctan.org/pkg/geometry. module Text.LaTeX.Packages.Geometry -- | Geometry package. Use it to import it like this: -- --
--   usepackage [] geometry
--   
-- -- In most cases, it is recommended to use importGeometry instead. geometry :: PackageName -- | Import the geometry package with additional options. importGeometry :: LaTeXC l => [GeometryOption] -> l -- | Options of the geometry package. data GeometryOption GHeight :: Measure -> GeometryOption GWidth :: Measure -> GeometryOption GPaper :: PaperType -> GeometryOption GCentered :: GeometryOption GPaperHeight :: Measure -> GeometryOption GPaperWidth :: Measure -> GeometryOption GLandscape :: Bool -> GeometryOption -- | Apply the given geometry options to the document. applyGeometry :: LaTeXC l => [GeometryOption] -> l instance Show GeometryOption instance Render GeometryOption