HaTeX 2.0.1 → 2.1.0
raw patch · 6 files changed
+55/−15 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Text.LaTeX.Arguments: type Height m = LaTeX m
+ Text.LaTeX.Commands: date :: (Monad m) => Date m -> LaTeX m
+ Text.LaTeX.Commands: rule :: (Monad m) => [Lift m] -> Width m -> Height m -> LaTeX m
+ Text.LaTeX.Packages: fancy :: (Monad m) => Style m
+ Text.LaTeX.Packages: fancyhdr :: (Monad m) => Package m
Files
- HaTeX.cabal +16/−2
- Text/LaTeX.hs +3/−3
- Text/LaTeX/Arguments.hs +3/−1
- Text/LaTeX/Commands.hs +22/−8
- Text/LaTeX/Packages.hs +10/−0
- Text/LaTeX/Result.hs +1/−1
HaTeX.cabal view
@@ -1,5 +1,5 @@ Name: HaTeX -Version: 2.0.1 +Version: 2.1.0 Author: Daniel Diaz Homepage: http://ddiaz.asofilak.es/packages/HaTeX License: BSD3 @@ -19,7 +19,21 @@ . Changes from last version: . - * Fixed an error displaying HaTeX incorrect version. + * Fixed an error displaying LaTeX and LaTeX2e writings. + . + * Added @date@ command. + . + * Fixed some documentation notes. + . + * Added new documentation. + . + * Added @Heigth@ type synonym. + . + * Added @rule@ command. + . + * Hidden @genlx@ and @ungenlx@ functions from the Text.LaTeX module. + . + * Added @fancyhdr@ package with its @fancy@ page style. Extensions: OverloadedStrings , FlexibleInstances , TypeSynonymInstances Build-type: Simple Build-depends: base == 4.*
Text/LaTeX.hs view
@@ -37,7 +37,7 @@ , module Text.LaTeX.Macro ) where -import Text.LaTeX.Monad +import Text.LaTeX.Monad hiding (genlx,ungenlx) import Text.LaTeX.Commands import Text.LaTeX.Arguments import Text.LaTeX.Define @@ -51,13 +51,13 @@ -- | HaTeX nice word. hatex :: Monad m => LaTeX m hatex = makebox [] [] $ do "H" - raisebox (ex (-0.55)) [] [] $ + raisebox (ex (-0.51)) [] [] $ makebox [0.5 >> width] [] "A" tex -- | Your HaTeX version. hatexVersion :: Monad m => LaTeX m -hatexVersion = do textbf "2" ; ".0.1" +hatexVersion = do textbf "2" ; ".1.0" -- | Render 'LaTeX' to 'String'. render :: Monad m => LaTeX m -> m String
Text/LaTeX/Arguments.hs view
@@ -50,7 +50,7 @@ , empty -- * Meters -- ** Width and Height - , Width, Lift, Extend + , Width, Lift, Extend, Height , width, height, depth , totalheight -- $measures @@ -198,6 +198,8 @@ type Lift m = LaTeX m type Extend m = LaTeX m + +type Height m = LaTeX m width :: Monad m => LaTeX m width = comm0_ "width"
Text/LaTeX/Commands.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} --- | Here, principal LaTeX m /commands/ and /environments/. +-- | Here, principal LaTeX /commands/ and /environments/. module Text.LaTeX.Commands ( -- * Document's Properties documentclass @@ -10,6 +10,7 @@ , thispagestyle , author , title + , date -- * Document Environment , document -- * Text Layout @@ -100,6 +101,7 @@ , makebox , framebox , raisebox + , rule -- * Tabular , Tabular , cjustified @@ -185,6 +187,7 @@ -- Document environment +-- | After the preamble, insert document's content with 'document'. document :: Monad m => LaTeX m -> LaTeX m document = env "document" @@ -258,13 +261,13 @@ tex :: Monad m => LaTeX m tex = comm0 "TeX" --- | LaTeX m nice word. +-- | LaTeX nice word. latex :: Monad m => LaTeX m -latex = comm0 "LaTeX m" +latex = comm0 "LaTeX" --- | LaTeX m2e nice word. +-- | LaTeX2e nice word. latexe :: Monad m => LaTeX m -latexe = comm0 "LaTeX me" +latexe = comm0 "LaTeXe" -- Sections (Article) @@ -391,9 +394,11 @@ itemize :: Monad m => LaTeX m -> LaTeX m itemize = env "itemize" +-- | Environment for create enumerated lists. See 'item'. enumerate :: Monad m => LaTeX m -> LaTeX m enumerate = env "enumerate" +-- | Environment for create description lists. See 'item'. description :: Monad m => LaTeX m -> LaTeX m description = env "description" @@ -401,7 +406,7 @@ -- -- Example: -- --- > item [\"-\"] \"Item content.\" +-- > do item ["-"] ; "Item content." -- item :: Monad m => [ItemOption m] -> LaTeX m item = comm3 "item" @@ -445,11 +450,11 @@ sep :: Monad m => LaTeX m -> LaTeX m sep = between "|" "|" --- | An inline version of 'verbatim'. +-- | An inline version of 'verbatim'. Argument must be a single line. verb :: Monad m => LaTeX m -> LaTeX m verb = (comm0_ "verb" >>) . sep --- | An inline version of 'verbatim_'. +-- | An inline version of 'verbatim_'. Argument must be a single line. verb_ :: Monad m => LaTeX m -> LaTeX m verb_ = (comm0_ "verb*" >>) . sep @@ -586,6 +591,7 @@ -- Spacing +-- | In preamble, it sets the inter-line spacing. Default line spread factor: 1. linespread :: Monad m => Float -> LaTeX m linespread = comm1 "linespread" . lxany @@ -606,6 +612,8 @@ vspace_ :: Monad m => LaTeX m -> LaTeX m vspace_ = comm1 "vspace*" +-- | Create a space filling the remaining space of the line. +-- If there are multiple occurences, stretch factor determines the proportion of each space. stretch :: Monad m => Int -> LaTeX m stretch = comm1 "stretch" . lxany @@ -622,9 +630,11 @@ -- Boxes +-- | @mbox@ creates a box containing its argument. mbox :: Monad m => LaTeX m -> LaTeX m mbox = comm1 "mbox" +-- | Create an empty box. mbox_ :: Monad m => LaTeX m mbox_ = mbox "" @@ -645,6 +655,10 @@ raisebox :: Monad m => Lift m -> [Extend m] -> [Extend m] -> LaTeX m -> LaTeX m raisebox = comm11 "raisebox" + +-- | It produces a simple black box. +rule :: Monad m => [Lift m] -> Width m -> Height m -> LaTeX m +rule = comm9 "rule" -- Others
Text/LaTeX/Packages.hs view
@@ -63,6 +63,9 @@ , pagecolor , color , normalcolor + -- ** @fancyhdr@ + , fancyhdr + , fancy -- * AMS-LaTeX , MathTerm -- ** @amsmath@ @@ -287,6 +290,12 @@ normalcolor :: Monad m => LaTeX m normalcolor = comm0 "normalcolor" +fancyhdr :: Monad m => Package m +fancyhdr = "fancyhdr" + +fancy :: Monad m => Style m +fancy = "fancy" + ---------------------------------- ---------- AMS-LaTeX m ------------- @@ -378,6 +387,7 @@ smash :: Monad m => LaTeX m -> LaTeX m smash = comm1 "smash" +-- | Insert normal text in a mathematical expression. text :: Monad m => LaTeX m -> LaTeX m text = comm1 "text"
Text/LaTeX/Result.hs view
@@ -43,6 +43,6 @@ , ('{',"\\{") , ('}',"\\}") , ('~',"\\~{}") - , ('\\',"\\textbackslash") ] + , ('\\',"\\textbackslash{}") ]