HaTeX-3.0.0: LaTeX code writer.

Text.LaTeX.Base.Render

Contents

Synopsis

Re-exports

data Text

A space efficient, packed, unboxed Unicode text type.

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.

Methods

render :: a -> TextSource

renderAppend :: Render a => [a] -> TextSource

Render every element of a list and append results.

renderCommas :: Render a => [a] -> TextSource

Render every element of a list and append results, separated by commas.

renderFile :: Render a => FilePath -> a -> IO ()Source

Use this function to render a LaTeX (or another one in the Render class) value directly in a file.

rendertex :: Render a => a -> LaTeXSource

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 reserver characters.

Reading files

readFileTex :: FilePath -> IO TextSource

If you are going to insert the content of a file in your LaTeX data, use this function to ensure your encoding is correct.