HaTeX 3.6.1.0 → 3.7.0.0
raw patch · 22 files changed
+243/−50 lines, 22 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Text.LaTeX.Base.Class: comm1 :: LaTeXC l => String -> l -> l
+ Text.LaTeX.Base.Commands: thePage :: LaTeXC l => l
+ Text.LaTeX.Base.Texy: instance Texy Measure
+ Text.LaTeX.Base.Types: type PageStyle = String
+ Text.LaTeX.Packages.Fancyhdr: HdrSettings :: LaTeX -> LaTeX -> LaTeX -> LaTeX -> LaTeX -> LaTeX -> Measure -> Measure -> HdrSettings
+ Text.LaTeX.Packages.Fancyhdr: applyHdrSettings :: LaTeXC l => HdrSettings -> l
+ Text.LaTeX.Packages.Fancyhdr: centerFooter :: HdrSettings -> LaTeX
+ Text.LaTeX.Packages.Fancyhdr: centerHeader :: HdrSettings -> LaTeX
+ Text.LaTeX.Packages.Fancyhdr: cfoot :: LaTeXC l => l -> l
+ Text.LaTeX.Packages.Fancyhdr: chead :: LaTeXC l => l -> l
+ Text.LaTeX.Packages.Fancyhdr: data HdrSettings
+ Text.LaTeX.Packages.Fancyhdr: defaultHdrSettings :: HdrSettings
+ Text.LaTeX.Packages.Fancyhdr: fancy :: PageStyle
+ Text.LaTeX.Packages.Fancyhdr: fancyhdr :: PackageName
+ Text.LaTeX.Packages.Fancyhdr: footRuleWidth :: HdrSettings -> Measure
+ Text.LaTeX.Packages.Fancyhdr: headRuleWidth :: HdrSettings -> Measure
+ Text.LaTeX.Packages.Fancyhdr: instance Eq HdrSettings
+ Text.LaTeX.Packages.Fancyhdr: instance Show HdrSettings
+ Text.LaTeX.Packages.Fancyhdr: leftFooter :: HdrSettings -> LaTeX
+ Text.LaTeX.Packages.Fancyhdr: leftHeader :: HdrSettings -> LaTeX
+ Text.LaTeX.Packages.Fancyhdr: lfoot :: LaTeXC l => l -> l
+ Text.LaTeX.Packages.Fancyhdr: lhead :: LaTeXC l => l -> l
+ Text.LaTeX.Packages.Fancyhdr: renewfootrulewidth :: LaTeXC l => Measure -> l
+ Text.LaTeX.Packages.Fancyhdr: renewheadrulewidth :: LaTeXC l => Measure -> l
+ Text.LaTeX.Packages.Fancyhdr: rfoot :: LaTeXC l => l -> l
+ Text.LaTeX.Packages.Fancyhdr: rhead :: LaTeXC l => l -> l
+ Text.LaTeX.Packages.Fancyhdr: rightFooter :: HdrSettings -> LaTeX
+ Text.LaTeX.Packages.Fancyhdr: rightHeader :: HdrSettings -> LaTeX
+ Text.LaTeX.Packages.Hyperref: instance IsString URL
- Text.LaTeX.Base.Commands: empty :: LaTeXC l => l
+ Text.LaTeX.Base.Commands: empty :: PageStyle
- Text.LaTeX.Base.Commands: headings :: LaTeXC l => l
+ Text.LaTeX.Base.Commands: headings :: PageStyle
- Text.LaTeX.Base.Commands: myheadings :: LaTeXC l => l
+ Text.LaTeX.Base.Commands: myheadings :: PageStyle
- Text.LaTeX.Base.Commands: pagestyle :: LaTeXC l => l -> l
+ Text.LaTeX.Base.Commands: pagestyle :: LaTeXC l => PageStyle -> l
- Text.LaTeX.Base.Commands: plain :: LaTeXC l => l
+ Text.LaTeX.Base.Commands: plain :: PageStyle
- Text.LaTeX.Base.Commands: thispagestyle :: LaTeXC l => l -> l
+ Text.LaTeX.Base.Commands: thispagestyle :: LaTeXC l => PageStyle -> l
- Text.LaTeX.Base.Syntax: Pt :: Int -> Measure
+ Text.LaTeX.Base.Syntax: Pt :: Double -> Measure
- Text.LaTeX.Base.Types: Pt :: Int -> Measure
+ Text.LaTeX.Base.Types: Pt :: Double -> Measure
Files
- Examples/fancyhdr.hs +21/−0
- HaTeX.cabal +5/−2
- README.md +0/−1
- Text/LaTeX/Base.hs +7/−1
- Text/LaTeX/Base/Class.hs +11/−1
- Text/LaTeX/Base/Commands.hs +20/−14
- Text/LaTeX/Base/Parser.hs +7/−2
- Text/LaTeX/Base/Render.hs +0/−2
- Text/LaTeX/Base/Syntax.hs +2/−2
- Text/LaTeX/Base/Texy.hs +3/−1
- Text/LaTeX/Base/Types.hs +4/−0
- Text/LaTeX/Base/Warnings.hs +5/−4
- Text/LaTeX/Base/Writer.hs +1/−2
- Text/LaTeX/Packages/AMSMath.hs +4/−7
- Text/LaTeX/Packages/AMSThm.hs +1/−1
- Text/LaTeX/Packages/Beamer.hs +0/−1
- Text/LaTeX/Packages/Color.hs +0/−1
- Text/LaTeX/Packages/Fancyhdr.hs +142/−0
- Text/LaTeX/Packages/Hyperref.hs +4/−0
- Text/LaTeX/Packages/Inputenc.hs +2/−3
- Text/LaTeX/Packages/TikZ/Simple.hs +4/−4
- Text/LaTeX/Packages/Trees/Qtree.hs +0/−1
+ Examples/fancyhdr.hs view
@@ -0,0 +1,21 @@++import Text.LaTeX+import Text.LaTeX.Packages.Fancyhdr++main :: IO ()+main = renderFile "fancyhdr.tex" hdrexample++hdrexample :: LaTeX+hdrexample = thePreamble <> document theBody++thePreamble :: LaTeX+thePreamble = documentclass [] article <> applyHdrSettings mySettings++mySettings :: HdrSettings+mySettings = defaultHdrSettings+ { centerHeader = textbf "Amazing header"+ }++theBody :: LaTeX+theBody = "This page use " <> texttt "fancyhdr" <> " to customize both "+ <> "header and footer."
HaTeX.cabal view
@@ -1,5 +1,5 @@ Name: HaTeX -Version: 3.6.1.0 +Version: 3.7.0.0 Author: Daniel Díaz Category: Text, LaTeX Build-type: Simple @@ -35,6 +35,7 @@ Examples/texy.hs Examples/tikz.hs Examples/tikzsimple.hs + Examples/fancyhdr.hs Source-repository head type: git @@ -61,13 +62,14 @@ Text.LaTeX.Base.Types Text.LaTeX.Base.Writer Text.LaTeX.Base.Warnings - -- Packages + -- Packages Text.LaTeX.Packages.AMSFonts Text.LaTeX.Packages.AMSMath Text.LaTeX.Packages.AMSThm Text.LaTeX.Packages.Babel Text.LaTeX.Packages.Beamer Text.LaTeX.Packages.Color + Text.LaTeX.Packages.Fancyhdr Text.LaTeX.Packages.Fontenc Text.LaTeX.Packages.Graphicx Text.LaTeX.Packages.Hyperref @@ -83,3 +85,4 @@ Other-modules: Paths_HaTeX Extensions: OverloadedStrings , CPP + ghc-options: -Wall -fno-warn-orphans
README.md view
@@ -50,7 +50,6 @@ ## Packages to be implemented -* fancyhdr * geometry ## Related projects
Text/LaTeX/Base.hs view
@@ -45,7 +45,13 @@ ) where -- Internal modules -import Text.LaTeX.Base.Syntax (LaTeX,(<>),protectString,protectText) +import Text.LaTeX.Base.Syntax + ( LaTeX +#if __GLASGOW_HASKELL__ < 704 + , (<>) +#endif + , protectString + , protectText) import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types import Text.LaTeX.Base.Commands
Text/LaTeX/Base/Class.hs view
@@ -1,4 +1,6 @@ +{-# OPTIONS_GHC -fno-warn-name-shadowing #-} + -- | Definition of the 'LaTeXC' class, used to combine the classic applicative and -- the latter monadic interfaces of /HaTeX 3/. The user can define new instances -- as well, adding flexibility to the way /HaTeX/ is used. @@ -19,12 +21,12 @@ , liftL3 -- ** Others , comm0 + , comm1 , commS , braces ) where import Text.LaTeX.Base.Syntax -import Data.Text (Text) import Data.Monoid import Data.String @@ -65,6 +67,14 @@ -- comm0 :: LaTeXC l => String -> l comm0 str = fromLaTeX $ TeXComm str [] + +-- | A one parameter command generator using the name of the command. +-- The parameter will be rendered as a fixed argument. +-- +-- > comm1 str = liftL $ \l -> TeXComm str [FixArg l] +-- +comm1 :: LaTeXC l => String -> l -> l +comm1 str = liftL $ \l -> TeXComm str [FixArg l] -- | Like 'comm0' but using 'TeXCommS', i.e. no \"{}\" will be inserted to protect -- the command's end.
Text/LaTeX/Base/Commands.hs view
@@ -81,6 +81,7 @@ , subparagraph -- ** Logos & symbols , today+ , thePage , tex , latex , laTeX2@@ -265,7 +266,7 @@ -- | Import a package. First argument is a list of options for -- the package named in the second argument. usepackage :: LaTeXC l => [l] -> PackageName -> l-usepackage ls pn = liftListL (\ls -> TeXComm "usepackage" [MOptArg ls ,FixArg $ fromString pn]) ls+usepackage ls pn = liftListL (\ls_ -> TeXComm "usepackage" [MOptArg ls_ ,FixArg $ fromString pn]) ls -- | The @LaTeX@ logo. latex :: LaTeXC l => l@@ -311,7 +312,7 @@ item :: LaTeXC l => Maybe l -> l item Nothing = commS "item "-item (Just opt) = liftL (\opt -> TeXComm "item" [OptArg opt]) opt+item (Just opt) = liftL (\opt_ -> TeXComm "item" [OptArg opt_]) opt enumerate :: LaTeXC l => l -> l enumerate = liftL $ TeXEnv "enumerate" []@@ -545,24 +546,26 @@ alph_ :: LaTeXC l => l alph_ = fromLaTeX "Alph" -pagestyle :: LaTeXC l => l -> l-pagestyle = liftL $ \l -> TeXComm "pagestyle" [FixArg l]+-- Page styles -thispagestyle :: LaTeXC l => l -> l-thispagestyle = liftL $ \l -> TeXComm "thispagestyle" [FixArg l]+pagestyle :: LaTeXC l => PageStyle -> l+pagestyle ps = fromLaTeX $ TeXComm "pagestyle" [FixArg $ fromString ps] -plain :: LaTeXC l => l-plain = fromLaTeX "plain"+thispagestyle :: LaTeXC l => PageStyle -> l+thispagestyle ps = fromLaTeX $ TeXComm "thispagestyle" [FixArg $ fromString ps] -headings :: LaTeXC l => l-headings = fromLaTeX "headings"+plain :: PageStyle+plain = "plain" -empty :: LaTeXC l => l-empty = fromLaTeX "empty"+headings :: PageStyle+headings = "headings" -myheadings :: LaTeXC l => l-myheadings = fromLaTeX "myheadings"+empty :: PageStyle+empty = "empty" +myheadings :: PageStyle+myheadings = "myheadings"+ -- | Used in conjunction with 'myheadings' for setting both the left and the right heading. markboth :: LaTeXC l => l -> l -> l markboth = liftL2 $ \l1 l2 -> TeXComm "markboth" [FixArg l1 , FixArg l2]@@ -613,6 +616,9 @@ today :: LaTeXC l => l today = comm0 "today"++thePage :: LaTeXC l => l+thePage = comm0 "thepage" tex :: LaTeXC l => l tex = comm0 "TeX"
Text/LaTeX/Base/Parser.hs view
@@ -173,7 +173,12 @@ cmdArg :: Parser TeXArg cmdArg = do - whitespace + -- A space after the command name indicates the end of the command. + -- I comment this line to prevent buggy parsings like "\cap [j_n, \omega)" + -- being interpreted as if "[" were the beginning of an argument, when the + -- space after "\cap" clearly indicates the opposite. + -- + -- whitespace c <- char '[' <|> char '{' let e = case c of '[' -> "]" @@ -234,7 +239,7 @@ u1 <- anyChar u2 <- anyChar case map toLower [u1, u2] of - "pt" -> return $ Pt (truncate f) + "pt" -> return $ Pt f "mm" -> return $ Mm f "cm" -> return $ Cm f "in" -> return $ In f
Text/LaTeX/Base/Render.hs view
@@ -24,8 +24,6 @@ import Text.LaTeX.Base.Syntax import Text.LaTeX.Base.Class import Data.String -import Data.Monoid (Monoid (..)) -import qualified Data.Text.IO as T import Data.Text.Encoding import Data.List (intersperse) import qualified Data.ByteString as B
Text/LaTeX/Base/Syntax.hs view
@@ -28,7 +28,7 @@ -- This will create a black box (see 'rule') as wide as the text and two points tall. -- data Measure = - Pt Int -- ^ A point is 1/72.27 inch, that means about 0.0138 inch or 0.3515 mm. + Pt Double -- ^ A point is 1/72.27 inch, that means about 0.0138 inch or 0.3515 mm. | Mm Double -- ^ Millimeter. | Cm Double -- ^ Centimeter. | In Double -- ^ Inch. @@ -112,4 +112,4 @@ protectChar '~' = "\\~{}" protectChar '\\' = "\\textbackslash{}" protectChar '_' = "\\_{}" -protectChar x = [x]+protectChar x = [x]
Text/LaTeX/Base/Texy.hs view
@@ -12,7 +12,6 @@ -- import Numeric import Data.Fixed-import Data.List (intersperse) -- | Class of types that can be pretty-printed as 'LaTeX' values. class Texy t where@@ -46,3 +45,6 @@ instance Texy Bool where texy = fromString . show++instance Texy Measure where+ texy = rendertex
Text/LaTeX/Base/Types.hs view
@@ -5,6 +5,7 @@ module Text.LaTeX.Base.Types ( ClassName , PackageName + , PageStyle , Label , createLabel , labelName , Pos (..) , HPos (..) @@ -20,6 +21,9 @@ -- | Package names are represented by a 'String'. type PackageName = String + +-- | Page styles are represented by a 'String'. +type PageStyle = String -- | Type of labels. newtype Label = Label String deriving (Eq, Show)
Text/LaTeX/Base/Warnings.hs view
@@ -107,6 +107,7 @@ "label" -> newlab n "ref" -> newref n "pageref" -> newref n + _ -> return () labcheck (TeXEnv _ _ l) = labcheck l labcheck (TeXMath _ l) = labcheck l labcheck (TeXOp _ l1 l2) = labcheck l1 >> labcheck l2 @@ -115,7 +116,7 @@ labcheck _ = return () newlab :: Text -> LabSt () -newlab n = do +newlab t = do st <- get let addLab :: Text -> [LabWarn] -> [LabWarn] addLab n [] = [LabelNoRef n] @@ -127,10 +128,10 @@ else ys LabelRef m -> if n == m then l else ys - put $ addLab n st + put $ addLab t st newref :: Text -> LabSt () -newref n = do +newref t = do st <- get let addRef :: Text -> [LabWarn] -> [LabWarn] addRef n [] = [RefNoLabel n] @@ -142,5 +143,5 @@ else ys LabelRef m -> if n == m then l else ys - put $ addRef n st + put $ addRef t st
Text/LaTeX/Base/Writer.hs view
@@ -53,7 +53,6 @@ ) where import Control.Monad.Trans.Writer -import Control.Monad.Trans.State import Control.Monad.IO.Class import Control.Monad.Trans.Class import Control.Applicative @@ -73,7 +72,7 @@ LaTeXT { unwrapLaTeXT :: WriterT LaTeX m (a,Maybe String) } instance Functor f => Functor (LaTeXT f) where - fmap f (LaTeXT c) = LaTeXT $ fmap (first f) c + fmap f = LaTeXT . fmap (first f) . unwrapLaTeXT -- | Pair a value with 'Nothing'. pairNoth :: a -> (a,Maybe b)
Text/LaTeX/Packages/AMSMath.hs view
@@ -105,10 +105,7 @@ import Text.LaTeX.Base import Text.LaTeX.Base.Syntax -import Text.LaTeX.Base.Render(render) import Text.LaTeX.Base.Class -import Text.LaTeX.Base.Commands (raw,between,label,lnbk,(&)) -import Text.LaTeX.Base.Types -- External imports import Data.List @@ -385,7 +382,7 @@ -- When 'Nothing' is supplied, the function will output a square root. tsqrt :: LaTeXC l => Maybe l -> l -> l tsqrt Nothing = liftL $ \x -> TeXComm "sqrt" [FixArg x] -tsqrt (Just n) = liftL2 (\n x -> TeXComm "sqrt" [OptArg n, FixArg x]) n +tsqrt (Just n) = liftL2 (\m x -> TeXComm "sqrt" [OptArg m, FixArg x]) n ---- Sum/Integral symbols @@ -398,7 +395,7 @@ => l -- ^ Expression below the sigma. -> l -- ^ Expression above the sigma. -> l -sumFromTo from to = tsum !: from ^: to +sumFromTo x y = tsum !: x ^: y -- | Pi product symbol. prod :: LaTeXC l => l @@ -409,7 +406,7 @@ => l -- ^ Expression below the pi. -> l -- ^ Expression above the pi. -> l -prodFromTo from to = prod !: from ^: to +prodFromTo x y = prod !: x ^: y -- | Integral symbol. integral :: LaTeXC l => l @@ -420,7 +417,7 @@ => l -- ^ Lower limit of integration. -> l -- ^ Upper limit of integration. -> l -integralFromTo from to = integral !: from ^: to +integralFromTo x y = integral !: x ^: y ---- Operator symbols
Text/LaTeX/Packages/AMSThm.hs view
@@ -46,7 +46,7 @@ -- is used to put a custom title to the proof. proof :: LaTeXC l => Maybe l -> l -> l proof Nothing = liftL $ TeXEnv "proof" [] -proof (Just n) = liftL2 (\n -> TeXEnv "proof" [ OptArg n ]) n +proof (Just n) = liftL2 (\m -> TeXEnv "proof" [OptArg m]) n -- | Insert the /QED/ symbol. qedhere :: LaTeXC l => l
Text/LaTeX/Packages/Beamer.hs view
@@ -25,7 +25,6 @@ import Text.LaTeX.Base.Class import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types -import Data.String -- | The 'beamer' document class. Importing a package is not required. Example: --
Text/LaTeX/Packages/Color.hs view
@@ -31,7 +31,6 @@ import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types -- -import Data.Monoid import Data.Text (toLower) -- | The 'pcolor' package.
+ Text/LaTeX/Packages/Fancyhdr.hs view
@@ -0,0 +1,142 @@++-- | This package provides extensive control of page headers and footers.+--+-- CTAN page for fancyhdr: <http://www.ctan.org/pkg/fancyhdr>.+module Text.LaTeX.Packages.Fancyhdr (+ -- * fancyhdr package+ fancyhdr+ -- * Simple interface+ , HdrSettings (..)+ , defaultHdrSettings+ , applyHdrSettings+ -- * Raw interface+ , fancy+ , lhead, chead, rhead+ , lfoot, cfoot, rfoot+ , renewheadrulewidth+ , renewfootrulewidth+ ) where++import Text.LaTeX.Base.Syntax+import Text.LaTeX.Base.Class+import Text.LaTeX.Base.Types+import Text.LaTeX.Base.Commands+import Text.LaTeX.Base.Texy++-- | The fancyhdr package.+-- Please, consider to use 'applyHdrSettings'+-- instead of importing the package manually.+-- If you really want to do it manually, use+-- the functions from the /raw interface/+-- exposed below.+fancyhdr :: PackageName+fancyhdr = "fancyhdr"++-- Header and footer settings++-- | Header and footer settings of a LaTeX document.+-- Use 'applyHdrSettings' to apply these settings+-- in your document. A default value is provided+-- by 'defaultHdrSettings', which you can modify+-- using record syntax.+--+-- > mySettings :: HdrSettings+-- > mySettings = defaultHdrSettings+-- > { centerHeader = "Amazing header"+-- > , headRuleWidth = Pt 2+-- > }+--+data HdrSettings = HdrSettings+ { leftHeader :: LaTeX+ , centerHeader :: LaTeX+ , rightHeader :: LaTeX+ , leftFooter :: LaTeX+ , centerFooter :: LaTeX+ , rightFooter :: LaTeX+ , headRuleWidth :: Measure+ , footRuleWidth :: Measure+ } deriving (Eq,Show)++-- | Default header and footer settings.+--+-- It leaves everything empty but the+-- 'centerFooter' field, which is filled+-- with 'thePage'.+--+-- Also, it sets to 0.4 points+-- the 'headRuleWidth' field.+defaultHdrSettings :: HdrSettings+defaultHdrSettings =+ HdrSettings+ { leftHeader = mempty+ , centerHeader = mempty+ , rightHeader = mempty+ , leftFooter = mempty+ , centerFooter = thePage+ , rightFooter = mempty+ , headRuleWidth = Pt 0.4+ , footRuleWidth = Pt 0+ }++-- | Apply custom header and footer settings to a+-- LaTeX document. It takes care of package importing+-- and page style settings, so using this function+-- is enough to get the settings applied.+-- Do /not/ import the 'fancyhdr' package again.+-- To be used in the /preamble/.+applyHdrSettings :: LaTeXC l => HdrSettings -> l+applyHdrSettings hs =+ usepackage [] fancyhdr+ <> pagestyle fancy+ <> fromLaTeX (lhead $ leftHeader hs)+ <> fromLaTeX (chead $ centerHeader hs)+ <> fromLaTeX (rhead $ rightHeader hs)+ <> fromLaTeX (lfoot $ leftFooter hs)+ <> fromLaTeX (cfoot $ centerFooter hs)+ <> fromLaTeX (rfoot $ rightFooter hs)+ <> renewheadrulewidth (headRuleWidth hs)+ <> renewfootrulewidth (footRuleWidth hs)++-- Raw interface++-- | Page style of the 'fancyhdr' package.+fancy :: PageStyle+fancy = "fancy"++-- | Set the left header.+lhead :: LaTeXC l => l -> l+lhead = comm1 "lhead"++-- | Set the center header.+chead :: LaTeXC l => l -> l+chead = comm1 "chead"++-- | Set the right header.+rhead :: LaTeXC l => l -> l+rhead = comm1 "rhead"++-- | Set the left footer.+lfoot :: LaTeXC l => l -> l+lfoot = comm1 "lfoot"++-- | Set the center footer.+cfoot :: LaTeXC l => l -> l+cfoot = comm1 "cfoot"++-- | Set the right footer.+rfoot :: LaTeXC l => l -> l+rfoot = comm1 "rfoot"++-- | Set the @headrulewidth@ attribute.+renewheadrulewidth :: LaTeXC l => Measure -> l+renewheadrulewidth m = fromLaTeX $+ TeXComm "renewcommand" [ FixArg $ TeXCommS "headrulewidth"+ , FixArg $ texy m+ ]++-- | Set the @footrulewidth@ attribute.+renewfootrulewidth :: LaTeXC l => Measure -> l+renewfootrulewidth m = fromLaTeX $+ TeXComm "renewcommand" [ FixArg $ TeXCommS "footrulewidth"+ , FixArg $ texy m+ ]
Text/LaTeX/Packages/Hyperref.hs view
@@ -46,6 +46,10 @@ createURL :: String -> URL createURL = URL +-- | 'fromString' = 'createURL'. +instance IsString URL where + fromString = createURL + -- | Reference to an 'URL'. href :: LaTeXC l => [HRefOption] -> URL -> l -> l href options u = liftL $ \t -> TeXComm "href" [ MOptArg $ fmap rendertex options
Text/LaTeX/Packages/Inputenc.hs view
@@ -2,8 +2,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | This package is of vital importance if you use non-ASCII characters in your document. --- For example, if the name of the author is /Ángela/, the /Á/ character will not appear correctly in the --- output when I call 'maketitle'. To solve this problem, use: +-- For example, if you type the word /Ángela/, the /Á/ character will not appear correctly in the +-- output. To solve this problem, use: -- -- > usepackage [utf8] inputenc -- @@ -16,7 +16,6 @@ , latin1 ) where -import Text.LaTeX.Base.Syntax import Text.LaTeX.Base.Class import Text.LaTeX.Base.Types
Text/LaTeX/Packages/TikZ/Simple.hs view
@@ -123,8 +123,8 @@ -> (Double,Double) -- ^ Interval, /(a,b)/. -> (Double -> Point) -- ^ Path function, /f/. -> Figure -- ^ Output figure.-pathImage eps (a,b) f = Line $ fmap f $ listFrom a+pathImage eps (a,b) f = Line $ listFrom a where- listFrom a =- if a >= b then [b]- else a : listFrom (a+eps)+ listFrom x =+ if x >= b then [f b]+ else f x : listFrom (x+eps)
Text/LaTeX/Packages/Trees/Qtree.hs view
@@ -18,7 +18,6 @@ import Text.LaTeX.Base.Class import Text.LaTeX.Packages.Trees -- -import Data.Monoid import Data.List (intersperse) -- | The 'qtree' package.