drasil-printers-0.1.10.0: A framework for code and document generation for scientific software - Printers SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.TeX.Helpers

Description

Defines helper functions used in printing LaTeX documents.

Synopsis

LaTeX Commands

Infrastructre for defining commands, environments, etc. Calls to TP should only occur in this section.

br :: D -> D Source #

Curly braces.

Helper for adding fencing symbols.

sq :: D -> D Source #

Square brackets.

Helper for adding fencing symbols.

parens :: D -> D Source #

Parenthesis.

Helper for adding fencing symbols.

quote :: D -> D Source #

Quotes.

Helper for adding fencing symbols.

lbrace :: D Source #

Helper for opening curly brace.

rbrace :: D Source #

Helper for closing curly brace.

command0 :: String -> D Source #

0-argument command.

command :: String -> String -> D Source #

Make 1-argument command.

commandD :: String -> D -> D Source #

Similar to command, but uses br for braces.

command1o :: String -> Maybe String -> String -> D Source #

1-argument command, with optional argument.

command1oD :: String -> Maybe D -> D -> D Source #

Similar to command1o, but uses sq and br for brackets.

command1p :: String -> String -> String -> D Source #

1-argument command with parameter in square brackets.

command1pD :: String -> D -> D -> D Source #

Similar to command1p, but uses sq and br for brackets.

texSym :: String -> D Source #

Make LaTeX symbol.

command2 :: String -> String -> String -> D Source #

2-argument command.

command2D :: String -> D -> D -> D Source #

Similar to command2, but uses br for brackets.

command3 :: String -> String -> String -> String -> D Source #

3-argument command.

mkEnv :: String -> (D -> D -> D) -> D -> D Source #

Encapsulate environments.

mkEnvArgBr :: String -> String -> D -> D Source #

Encapsulate environments with argument with braces.

mkEnvArgSq :: String -> String -> D -> D Source #

Encapsulate environments with argument with brackets.

mkMinipage :: D -> D Source #

Makes minipage environment.

comm :: String -> String -> Maybe String -> D Source #

For defining (LaTeX) macros.

renewcomm :: String -> String -> D Source #

Renews given command.

empty :: D Source #

Useful to have an empty case.

genSec :: Int -> D Source #

For sections.

ref :: String -> D -> D Source #

For references.

sref :: String -> D -> D Source #

For references.

hyperref :: String -> D -> D Source #

For references.

externalref :: String -> D -> D Source #

For references.

snref :: String -> D -> D Source #

For references.

href :: String -> String -> D Source #

For references.

cite :: String -> Maybe D -> D Source #

For citations.

Define Common LaTeX Commands

count :: String -> D Source #

Newcounter command.

mathbb :: String -> D Source #

Mathbb command.

usepackage :: String -> D Source #

Usepackage command.

includegraphics :: MaxWidthPercent -> String -> D Source #

Include graphics with a given max width percentage.

author :: D -> D Source #

Preamble for a LaTeX document.

caption :: D -> D Source #

Preamble for a LaTeX document.

item :: D -> D Source #

Preamble for a LaTeX document.

label :: D -> D Source #

Preamble for a LaTeX document.

title :: D -> D Source #

Preamble for a LaTeX document.

bold :: D -> D Source #

Preamble for a LaTeX document.

item' :: D -> D -> D Source #

Command for "item".

maketitle :: D Source #

Formatting options for a LaTeX document.

maketoc :: D Source #

Formatting options for a LaTeX document.

newpage :: D Source #

Formatting options for a LaTeX document.

centering :: D Source #

Formatting options for a LaTeX document.

code :: D -> D Source #

Common commands and formatting options for a LaTeX document.

itemize :: D -> D Source #

Common commands and formatting options for a LaTeX document.

enumerate :: D -> D Source #

Common commands and formatting options for a LaTeX document.

description :: D -> D Source #

Common commands and formatting options for a LaTeX document.

description' :: D -> D Source #

Common commands and formatting options for a LaTeX document.

figure :: D -> D Source #

Common commands and formatting options for a LaTeX document.

center :: D -> D Source #

Common commands and formatting options for a LaTeX document.

document :: D -> D Source #

Common commands and formatting options for a LaTeX document.

equation :: D -> D Source #

Common commands and formatting options for a LaTeX document.

symbDescription :: D -> D Source #

Common commands and formatting options for a LaTeX document.

docclass :: String -> String -> D Source #

Command for the document class.

sec :: Int -> D -> D Source #

General section function.

subscript :: D -> D -> D Source #

Makes second argument a subscript of the first argument.

superscript :: D -> D -> D Source #

Makes second argument a superscript of the first argument.

bullet :: D Source #

Macro/Command definitions.

counter :: D Source #

Macro/Command definitions.

ddefnum :: D Source #

Macro/Command definitions.

ddref :: D Source #

Macro/Command definitions.

colAw :: D Source #

Macro/Command definitions.

colBw :: D Source #

Macro/Command definitions.

arrayS :: D Source #

Macro/Command definitions.

modcounter :: D Source #

Macro/Command definitions.

modnum :: D Source #

Macro/Command definitions.

newline :: D -> D Source #

Add newline.

fraction :: D -> D -> D Source #

Create a fraction.

hyperConfig :: D Source #

Configuration settings.

useTikz :: D Source #

Uses luatex85 tex packages.

Helpers

toEqn :: D -> D Source #

toEqn is special; it switches to Math, but inserts an equation environment. Uses resizeExpression macro (defined in Preamble.hs) to prevent page overflow.

paren :: String -> String Source #

Wrap with parenthesis.

Helper(s) for String-Printing in TeX where it varies from HTML/Plaintext.

sqbrac :: String -> String Source #

Wrap with square brackets.

Helper(s) for String-Printing in TeX where it varies from HTML/Plaintext.