| Safe Haskell | None |
|---|
Text.LaTeX.Base.Render
Contents
- data Text
- module Data.String
- class Show a => Render a where
- renderAppend :: Render a => [a] -> Text
- renderChars :: Render a => Char -> [a] -> Text
- renderCommas :: Render a => [a] -> Text
- renderFile :: Render a => FilePath -> a -> IO ()
- rendertex :: (Render a, LaTeXC l) => a -> l
- readFileTex :: FilePath -> IO Text
Re-exports
data Text
A space efficient, packed, unboxed Unicode text type.
module Data.String
Render class
class Show a => Render a whereSource
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.
Instances
renderAppend :: Render a => [a] -> TextSource
Render every element of a list and append results.
renderChars :: Render a => Char -> [a] -> TextSource
Render every element of a list and append results,
separated by the given Char.
renderCommas :: Render a => [a] -> TextSource
Render every element of a list and append results, separated by commas.
rendertex :: (Render a, LaTeXC l) => a -> lSource
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.