HaTeX-3.3: The Haskell LaTeX library.

Safe HaskellNone

Text.LaTeX.Base.Commands

Contents

Description

LaTeX standard commands and environments.

Synopsis

Basic functions

raw :: LaTeXC l => Text -> lSource

Insert a raw piece of Text. This functions doesn't care about LaTeX reserved characters, it insert the text just as it is received.

between :: Monoid m => m -> m -> m -> mSource

Calling between c l1 l2 puts c between l1 and l2 and appends them.

comment :: LaTeXC l => Text -> lSource

Create a comment.

(%) :: LaTeXC l => l -> Text -> lSource

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.

Preamble commands

title :: LaTeXC l => l -> lSource

Set the title of your document.

author :: LaTeXC l => l -> lSource

Set the author(s) of the document.

date :: LaTeXC l => l -> lSource

Set a date for your document.

institute :: LaTeXC l => Maybe l -> l -> lSource

Set either an institute or an organization for the document.

thanks :: LaTeXC l => l -> lSource

documentclassSource

Arguments

:: LaTeXC l 
=> [ClassOption]

Class options

-> ClassName

Class name

-> l 

Set the document class. Needed in all documents.

usepackage :: LaTeXC l => [l] -> PackageName -> lSource

Import a package. First argument is a list of options for the package named in the second argument.

Classes

Document classes

Class options

landscape :: ClassOptionSource

Changes the layout of the document to print in landscape mode

openright :: ClassOptionSource

Makes chapters begin either only on right hand pages

openany :: ClassOptionSource

Makes chapters begin on the next page available.

fleqn :: ClassOptionSource

Typesets displayed formulae left-aligned instead of centred.

leqno :: ClassOptionSource

Places the numbering of formulae on the left hand side instead of the right.

Paper sizes

data PaperType Source

LaTeX available paper types.

Constructors

A0 
A1 
A2 
A3 
A4 
A5 
A6 
B0 
B1 
B2 
B3 
B4 
B5 
B6 
Letter 
Executive 
Legal 

Page styles

pagestyle :: LaTeXC l => l -> lSource

markboth :: LaTeXC l => l -> l -> lSource

Used in conjunction with myheadings for setting both the left and the right heading.

markright :: LaTeXC l => l -> lSource

Used in conjunction with myheadings for setting the right heading.

Body commands

document :: LaTeXC l => l -> lSource

maketitle :: LaTeXC l => lSource

Generate the title. It normally contains the title name of your document, the author(s) and date.

Document structure

tableofcontents :: LaTeXC l => lSource

Create the table of contents, automatically generated from your sections, subsections, and other related stuff.

abstract :: LaTeXC l => l -> lSource

Sections

part :: LaTeXC l => l -> lSource

chapter :: LaTeXC l => l -> lSource

section :: LaTeXC l => l -> lSource

Start a new section with a given title.

subsection :: LaTeXC l => l -> lSource

paragraph :: LaTeXC l => l -> lSource

subparagraph :: LaTeXC l => l -> lSource

Logos & symbols

tex :: LaTeXC l => lSource

latex :: LaTeXC l => lSource

The LaTeX logo.

ldots :: LaTeXC l => lSource

Horizontal dots.

vdots :: LaTeXC l => lSource

Vertical dots.

ddots :: LaTeXC l => lSource

Diagonal dots.

HaTeX specific

hatex :: LaTeXC l => lSource

Print the HaTeX logo.

hatex3 :: LaTeXC l => lSource

Print the HaTeX 3 logo.

hatex_meta :: LaTeXC l => lSource

Print the HaTeX-meta logo.

hatex_version :: LaTeXC l => lSource

Print the HaTeX logo, beside the complete version number.

Document layout

par :: LaTeXC l => lSource

Start a new paragraph

newline :: LaTeXC l => lSource

Start a new line.

lnbk :: LaTeXC l => lSource

Start a new line. In a tabular, it starts a new row, so use newline instead.

linebreak :: LaTeXC l => l -> lSource

nolinebreak :: LaTeXC l => l -> lSource

pagebreak :: LaTeXC l => l -> lSource

nopagebreak :: LaTeXC l => l -> lSource

stretch :: LaTeXC l => Int -> lSource

Document measures

Formatting text

verbatim :: LaTeXC l => l -> lSource

Fonts

textbf :: LaTeXC l => l -> lSource

Set the given argument to bold font face.

textit :: LaTeXC l => l -> lSource

texttt :: LaTeXC l => l -> lSource

Set the given argument to monospaced font.

textrm :: LaTeXC l => l -> lSource

textsf :: LaTeXC l => l -> lSource

textmd :: LaTeXC l => l -> lSource

textup :: LaTeXC l => l -> lSource

textsl :: LaTeXC l => l -> lSource

textsc :: LaTeXC l => l -> lSource

Set the given argument to small caps format.

textnormal :: LaTeXC l => l -> lSource

underline :: LaTeXC l => l -> lSource

emph :: LaTeXC l => l -> lSource

Sizes

Sizes are sorted from smallest to biggest.

tiny :: LaTeXC l => l -> lSource

scriptsize :: LaTeXC l => l -> lSource

footnotesize :: LaTeXC l => l -> lSource

small :: LaTeXC l => l -> lSource

normalsize :: LaTeXC l => l -> lSource

large :: LaTeXC l => l -> lSource

large2 :: LaTeXC l => l -> lSource

large3 :: LaTeXC l => l -> lSource

huge :: LaTeXC l => l -> lSource

huge2 :: LaTeXC l => l -> lSource

Environments

equation :: LaTeXC l => l -> lSource

equation_ :: LaTeXC l => l -> lSource

enumerate :: LaTeXC l => l -> lSource

itemize :: LaTeXC l => l -> lSource

item :: LaTeXC l => Maybe l -> lSource

flushleft :: LaTeXC l => l -> lSource

flushright :: LaTeXC l => l -> lSource

center :: LaTeXC l => l -> lSource

quote :: LaTeXC l => l -> lSource

verse :: LaTeXC l => l -> lSource

description :: LaTeXC l => l -> lSource

minipageSource

Arguments

:: LaTeXC l 
=> Maybe Pos

Optional position

-> l

Width

-> l

Minipage content

-> l 

Minipage environment.

figureSource

Arguments

:: LaTeXC l 
=> Maybe Pos

Optional position

-> l

Figure content

-> l 

Figure environment.

Page numbering

arabic :: LaTeXC l => lSource

Arabic numerals.

roman :: LaTeXC l => lSource

Lowercase roman numerals.

roman_ :: LaTeXC l => lSource

Uppercase roman numerals.

alph :: LaTeXC l => lSource

Lowercase letters.

alph_ :: LaTeXC l => lSource

Uppercase letters.

Boxes

mbox :: LaTeXC l => l -> lSource

fbox :: LaTeXC l => l -> lSource

parbox :: LaTeXC l => Maybe Pos -> Measure -> l -> lSource

makebox :: LaTeXC l => Maybe Measure -> Maybe Pos -> l -> lSource

ruleSource

Arguments

:: LaTeXC l 
=> Maybe Measure

Optional lifting.

-> Measure

Width.

-> Measure

Height.

-> l 

Produce a simple black box.

Cross references

caption :: LaTeXC l => l -> lSource

label :: LaTeXC l => l -> lSource

ref :: LaTeXC l => l -> lSource

pageref :: LaTeXC l => l -> lSource

Tables

tabularSource

Arguments

:: LaTeXC l 
=> Maybe Pos

This optional parameter can be used to specify the vertical position of the table. Defaulted to Center.

-> [TableSpec]

Table specification of columns and vertical lines.

-> l

Table content. See &, lnbk, hline and cline.

-> l

Resulting table syntax.

The tabular environment can be used to typeset tables with optional horizontal and vertical lines.

(&) :: LaTeXC l => l -> l -> lSource

Column separator.

hline :: LaTeXC l => lSource

Horizontal line.

cline :: LaTeXC l => Int -> Int -> lSource

cline i j writes a partial horizontal line beginning in column i and ending in column j.

Others

footnote :: LaTeXC l => l -> lSource

protect :: LaTeXC l => l -> lSource

hyphenation :: LaTeXC l => l -> lSource

hyp :: LaTeXC l => lSource

qts :: LaTeXC l => l -> lSource

Quotation marks.