Hello community, here is the log from the commit of package ghc-HaTeX for openSUSE:Factory checked in at 2017-08-31 20:49:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-HaTeX (Old) and /work/SRC/openSUSE:Factory/.ghc-HaTeX.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-HaTeX" Thu Aug 31 20:49:59 2017 rev:4 rq:513188 version:3.17.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-HaTeX/ghc-HaTeX.changes 2017-06-04 01:51:23.339744489 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-HaTeX.new/ghc-HaTeX.changes 2017-08-31 20:49:59.889900495 +0200 @@ -1,0 +2,5 @@ +Thu Jul 27 14:08:05 UTC 2017 - [email protected] + +- Update to version 3.17.3.0. + +------------------------------------------------------------------- Old: ---- HaTeX-3.17.2.0.tar.gz New: ---- HaTeX-3.17.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-HaTeX.spec ++++++ --- /var/tmp/diff_new_pack.rlF6tZ/_old 2017-08-31 20:50:00.825769128 +0200 +++ /var/tmp/diff_new_pack.rlF6tZ/_new 2017-08-31 20:50:00.829768566 +0200 @@ -19,7 +19,7 @@ %global pkg_name HaTeX %bcond_with tests Name: ghc-%{pkg_name} -Version: 3.17.2.0 +Version: 3.17.3.0 Release: 0 Summary: The Haskell LaTeX library License: BSD-3-Clause @@ -30,6 +30,7 @@ BuildRequires: ghc-QuickCheck-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-containers-devel +BuildRequires: ghc-hashable-devel BuildRequires: ghc-matrix-devel BuildRequires: ghc-parsec-devel BuildRequires: ghc-rpm-macros ++++++ HaTeX-3.17.2.0.tar.gz -> HaTeX-3.17.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Examples/accents.hs new/HaTeX-3.17.3.0/Examples/accents.hs --- old/HaTeX-3.17.2.0/Examples/accents.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/HaTeX-3.17.3.0/Examples/accents.hs 2017-06-27 12:21:34.000000000 +0200 @@ -0,0 +1,27 @@ + +{-# LANGUAGE OverloadedStrings #-} + +import Text.LaTeX +import Text.LaTeX.Packages.Inputenc + +main :: IO () +main = renderFile "accents.tex" $ execLaTeXM accents + +accents :: LaTeXM () +accents = thePreamble >> document theBody + +thePreamble :: LaTeXM () +thePreamble = do + documentclass [] article + usepackage [utf8] inputenc + author "Daniel Díaz" + title "HaTeX and accents" + +theBody :: LaTeXM () +theBody = do + maketitle + flushleft "ÁáÉéÍíÓóÚú" + flushleft "ÀàÈèÌìÒòÙù" + flushleft "ÄäËëÏïÖöÜü" + flushleft "ÂâÊêÎîÔôÛû" + flushleft "ß" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/HaTeX.cabal new/HaTeX-3.17.3.0/HaTeX.cabal --- old/HaTeX-3.17.2.0/HaTeX.cabal 2017-04-30 13:59:35.000000000 +0200 +++ new/HaTeX-3.17.3.0/HaTeX.cabal 2017-07-16 18:18:10.000000000 +0200 @@ -1,5 +1,5 @@ Name: HaTeX -Version: 3.17.2.0 +Version: 3.17.3.0 Author: Daniel Díaz Category: LaTeX Build-type: Simple @@ -64,6 +64,7 @@ , text >= 0.11.2.3 && < 2 , transformers >= 0.2.2 && < 0.6 , containers >= 0.4.2.1 && < 0.6 + , hashable >= 1.2 && < 1.3 , matrix -- Testing , QuickCheck @@ -71,6 +72,8 @@ , parsec >= 3.1.6 -- Pretty-printing , wl-pprint-extras >= 3.5 + if impl(ghc < 7.6) + build-depends: ghc-prim Exposed-modules: Text.LaTeX -- Base (Core of the library) @@ -98,9 +101,12 @@ Text.LaTeX.Packages.Geometry Text.LaTeX.Packages.Graphicx Text.LaTeX.Packages.Hyperref + Text.LaTeX.Packages.LongTable + Text.LaTeX.Packages.LTableX Text.LaTeX.Packages.Inputenc Text.LaTeX.Packages.QRCode Text.LaTeX.Packages.Relsize + Text.LaTeX.Packages.TabularX -- Trees Text.LaTeX.Packages.Trees Text.LaTeX.Packages.Trees.Qtree diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/README.md new/HaTeX-3.17.3.0/README.md --- old/HaTeX-3.17.2.0/README.md 2016-06-10 18:05:15.000000000 +0200 +++ new/HaTeX-3.17.3.0/README.md 2017-07-07 18:34:13.000000000 +0200 @@ -73,8 +73,6 @@ within a LaTeX file. * [TeX-my-math](https://github.com/leftaroundabout/Symbolic-math-HaTeX): Experimental library to ease the production of mathematical expressions using HaTeX. -* [blatex](http://hackage.haskell.org/package/blatex): Static site generator for blogs where posts are written -in LaTeX. ## Travis automatic build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Base/Class.hs new/HaTeX-3.17.3.0/Text/LaTeX/Base/Class.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Base/Class.hs 2015-03-29 09:22:53.000000000 +0200 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Base/Class.hs 2017-07-02 14:32:40.000000000 +0200 @@ -23,6 +23,8 @@ -- ** Others , comm0 , comm1 + , comm2 + , comm3 , commS , braces ) where @@ -79,6 +81,22 @@ comm1 :: LaTeXC l => String -> l -> l comm1 str = liftL $ \l -> TeXComm str [FixArg l] +-- | A two parameter command generator using the name of the command. +-- The parameters will be rendered as fixed arguments. +-- +-- > comm2 str = liftL2 $ \l1 l2 -> TeXComm str [FixArg l1, FixArg l2] +-- +comm2 :: LaTeXC l => String -> l -> l -> l +comm2 str = liftL2 $ \l1 l2 -> TeXComm str [FixArg l1, FixArg l2] + +-- | A three parameter command generator using the name of the command. +-- The parameters will be rendered as fixed arguments. +-- +-- > comm3 str = liftL2 $ \l1 l2 -> TeXComm str [FixArg l1, FixArg l2] +-- +comm3 :: LaTeXC l => String -> l -> l -> l -> l +comm3 str = liftL3 $ \l1 l2 l3 -> TeXComm str [FixArg l1, FixArg l2, FixArg l3] + -- | Like 'comm0' but using 'TeXCommS', i.e. no \"{}\" will be inserted to protect -- the command's end. -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Base/Commands.hs new/HaTeX-3.17.3.0/Text/LaTeX/Base/Commands.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Base/Commands.hs 2016-05-13 06:03:29.000000000 +0200 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Base/Commands.hs 2017-07-02 14:32:40.000000000 +0200 @@ -191,6 +191,9 @@ , pageref -- ** Tables , tabular + , tabularnewline + , tabularnewlineSpc + , arraybackslash , array , (&) , hline @@ -199,6 +202,9 @@ -- *** Special tables , matrixTabular -- ** Others + , centering + , raggedleft + , raggedright , footnote , protect , hyphenation @@ -689,6 +695,15 @@ qts :: LaTeXC l => l -> l qts l = between l (raw "``") (raw "''") +centering :: LaTeXC l => l +centering = comm0 "centering" + +raggedleft :: LaTeXC l => l +raggedleft = comm0 "raggedleft" + +raggedright :: LaTeXC l => l +raggedright = comm0 "raggedright" + footnote :: LaTeXC l => l -> l footnote = liftL $ \l -> TeXComm "footnote" [FixArg l] @@ -883,6 +898,21 @@ hline :: LaTeXC l => l hline = commS "hline " +-- | 'tabularnewline' ends a row in array or tabular environments. The +-- '\' command has different meanings in different contexts. It can +-- end a line in normal text, or it can end an array or tabular +-- line. It may be preferrable to use 'newline' and in the first case, +-- and 'tabularnewline' in the second. +tabularnewline :: LaTeXC l => l +tabularnewline = commS "tabularnewline " + +tabularnewlineSpc :: LaTeXC l => Measure -> l +tabularnewlineSpc m = fromLaTeX $ TeXComm "tabularnewline" [OptArg $ rendertex m] + +-- | 'arraybackslash' resets the definition of '\' to 'tabularnewline'. +arraybackslash :: LaTeXC l => l +arraybackslash = commS "arraybackslash " + -- | Cell taking multiple columns. multicolumn :: LaTeXC l => Int -> [TableSpec] -> l -> l multicolumn n c = liftL $ \l -> TeXComm "multicolumn" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Base/Parser.hs new/HaTeX-3.17.3.0/Text/LaTeX/Base/Parser.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Base/Parser.hs 2016-05-14 16:55:18.000000000 +0200 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Base/Parser.hs 2017-07-02 15:38:04.000000000 +0200 @@ -303,8 +303,13 @@ dolMath :: Parser LaTeX dolMath = do _ <- char '$' - b <- mconcat <$> latexBlockParser `manyTill` char '$' - return $ TeXMath Dollar b + choice + [ do _ <- char '$' + b <- mconcat <$> latexBlockParser `manyTill` try (string "$$") + return $ TeXMath DoubleDollar b + , do b <- mconcat <$> latexBlockParser `manyTill` char '$' + return $ TeXMath Dollar b + ] math :: MathType -> String -> Parser LaTeX math t eMath = do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Base/Pretty.hs new/HaTeX-3.17.3.0/Text/LaTeX/Base/Pretty.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Base/Pretty.hs 2015-03-29 09:21:34.000000000 +0200 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Base/Pretty.hs 2017-07-02 14:35:00.000000000 +0200 @@ -48,6 +48,7 @@ Parentheses -> ("\\(","\\)") Square -> ("\\[","\\]") Dollar -> ("$","$") + DoubleDollar -> ("$$","$$") in text l <> docLaTeX b <> text r docLaTeX (TeXLineBreak m b) = text "\\\\" <> maybe mempty (brackets . text . unpack . render) m <> ( if b then text "*" else mempty ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Base/Render.hs new/HaTeX-3.17.3.0/Text/LaTeX/Base/Render.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Base/Render.hs 2015-03-18 22:54:27.000000000 +0100 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Base/Render.hs 2017-07-02 14:34:23.000000000 +0200 @@ -124,6 +124,7 @@ <> "}" render (TeXMath Dollar l) = "$" <> render l <> "$" + render (TeXMath DoubleDollar l) = "$$" <> render l <> "$$" render (TeXMath Square l) = "\\[" <> render l <> "\\]" render (TeXMath Parentheses l) = "\\(" <> render l <> "\\)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Base/Syntax.hs new/HaTeX-3.17.3.0/Text/LaTeX/Base/Syntax.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Base/Syntax.hs 2017-04-30 13:54:08.000000000 +0200 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Base/Syntax.hs 2017-07-16 18:11:08.000000000 +0200 @@ -38,8 +38,9 @@ import Data.Functor.Identity (runIdentity) import Data.Data (Data) import Data.Typeable -import GHC.Generics (Generic) import Test.QuickCheck +import Data.Hashable +import GHC.Generics (Generic) -- | Measure units defined in LaTeX. Use 'CustomMeasure' to use commands like 'textwidth'. -- For instance: @@ -59,7 +60,7 @@ deriving (Data, Eq, Generic, Show, Typeable) -- | Different types of syntax for mathematical expressions. -data MathType = Parentheses | Square | Dollar +data MathType = Parentheses | Square | Dollar | DoubleDollar deriving (Data, Eq, Generic, Show, Typeable) -- | Type of @LaTeX@ blocks. @@ -277,7 +278,7 @@ arbitraryChar = elements $ ['A'..'Z'] ++ ['a'..'z'] - ++ "\n-+*/!\"$%&(){}^_.,:;'#@<>?\\ " + ++ "\n-+*/!\"().,:;'@<>? " -- | Utility for the instance of 'LaTeX' to 'Arbitrary'. -- We generate a short sequence of characters and @@ -301,26 +302,31 @@ f <$> arbitrary instance Arbitrary LaTeX where - arbitrary = do - -- We give more chances to 'TeXRaw'. - -- This results in arbitrary 'LaTeX' values - -- not getting too large. - n <- choose (0,16 :: Int) - case n of - 0 -> pure TeXEmpty - 1 -> do m <- choose (0,5) - TeXComm <$> arbitraryName <*> vectorOf m arbitrary - 2 -> TeXCommS <$> arbitraryName - 3 -> do m <- choose (0,5) - TeXEnv <$> arbitraryName <*> vectorOf m arbitrary <*> arbitrary - 4 -> do m <- choose (0,2) - let t = [Parentheses,Square,Dollar] !! m - TeXMath <$> pure t <*> arbitrary - 5 -> TeXLineBreak <$> arbitrary <*> arbitrary - 6 -> TeXBraces <$> arbitrary - 7 -> TeXComment <$> arbitraryRaw - 8 -> TeXSeq <$> arbitrary <*> arbitrary - _ -> TeXRaw <$> arbitraryRaw + arbitrary = arbitraryLaTeX False + +arbitraryLaTeX :: Bool -> Gen LaTeX +arbitraryLaTeX inDollar = do + -- We give more chances to 'TeXRaw'. + -- This results in arbitrary 'LaTeX' values + -- not getting too large. + n <- choose (0,16 :: Int) + case n of + 0 -> if inDollar then arbitraryLaTeX True else pure TeXEmpty + 1 -> do m <- choose (0,5) + TeXComm <$> arbitraryName <*> vectorOf m arbitrary + 2 -> TeXCommS <$> arbitraryName + 3 -> do m <- choose (0,5) + TeXEnv <$> arbitraryName <*> vectorOf m arbitrary <*> arbitrary + 4 -> if inDollar + then arbitraryLaTeX True + else do do m <- choose (0,3) + let t = [Parentheses,Square,Dollar,DoubleDollar] !! m + TeXMath <$> pure t <*> arbitraryLaTeX (t == Dollar || t == DoubleDollar) + 5 -> TeXLineBreak <$> arbitrary <*> arbitrary + 6 -> TeXBraces <$> arbitrary + 7 -> TeXComment <$> arbitraryRaw + 8 -> TeXSeq <$> (if inDollar then arbitraryLaTeX True else arbitrary) <*> arbitrary + _ -> TeXRaw <$> arbitraryRaw instance Arbitrary TeXArg where arbitrary = do @@ -336,3 +342,9 @@ 5 -> do m <- choose (1,5) MParArg <$> vectorOf m arbitrary _ -> FixArg <$> arbitrary + + +instance Hashable Measure +instance Hashable MathType +instance Hashable TeXArg +instance Hashable LaTeX diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Base/Types.hs new/HaTeX-3.17.3.0/Text/LaTeX/Base/Types.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Base/Types.hs 2015-03-18 22:54:27.000000000 +0100 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Base/Types.hs 2017-07-02 14:32:40.000000000 +0200 @@ -66,6 +66,9 @@ | ParColumnTop LaTeX -- ^ Paragraph column with text vertically aligned at the top. | ParColumnMid LaTeX -- ^ Paragraph column with text vertically aligned at the middle. Requires 'array' package. | ParColumnBot LaTeX -- ^ Paragraph column with text vertically aligned at the bottom. Requires 'array' package. + | NameColumn String -- ^ User defined column. Requires 'array' package. + | BeforeColumn LaTeX -- ^ Can be used before a 'LeftColumn', 'CenterColumn', 'RightColumn', 'ParColumnTop', 'ParColumnMid' or a 'ParColumnBot' specification. Inserts the code directly in front of the entry of the column. Requires 'array' package. + | AfterColumn LaTeX -- ^ Can be used after a 'LeftColumn', 'CenterColumn', 'RightColumn', 'ParColumnTop', 'ParColumnMid' or a 'ParColumnBot' specification. Inserts the code directly in front of the entry of the column. Requires 'array' package. | VerticalLine -- ^ Vertical line between two columns. | DVerticalLine -- ^ Double vertical line between two columns. | Separator LaTeX -- ^ Column separator. Requires 'array' package. @@ -78,6 +81,9 @@ render (ParColumnTop l) = "p" <> render (FixArg l) render (ParColumnMid l) = "m" <> render (FixArg l) render (ParColumnBot l) = "b" <> render (FixArg l) + render (NameColumn n) = fromString n + render (BeforeColumn l) = ">{" <> render l <> "}" + render (AfterColumn l) = "<{" <> render l <> "}" render VerticalLine = "|" render DVerticalLine = "||" render (Separator l) = "@" <> render (FixArg l) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Packages/AMSMath.hs new/HaTeX-3.17.3.0/Text/LaTeX/Packages/AMSMath.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Packages/AMSMath.hs 2016-11-08 06:03:40.000000000 +0100 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Packages/AMSMath.hs 2017-07-02 15:23:40.000000000 +0200 @@ -1,5 +1,10 @@ {-# LANGUAGE CPP, OverloadedStrings, TypeFamilies #-} +#if __GLASGOW_HASKELL__ >= 801 +{-# OPTIONS_GHC -Wno-orphans #-} +#else +{-# OPTIONS_GHC -fno-warn-orphans #-} +#endif -- | \AMSMath\ support. Also numeric instances ('Num', 'Fractional' and 'Floating') for 'LaTeX' and 'LaTeXT'. module Text.LaTeX.Packages.AMSMath diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Packages/LTableX.hs new/HaTeX-3.17.3.0/Text/LaTeX/Packages/LTableX.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Packages/LTableX.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Packages/LTableX.hs 2017-07-02 14:32:40.000000000 +0200 @@ -0,0 +1,39 @@ + +{-# LANGUAGE OverloadedStrings #-} + +module Text.LaTeX.Packages.LTableX + ( -- * ltablex package + ltablex + -- * ltablex commands + , keepXColumns + , convertXColumns + , module Text.LaTeX.Packages.TabularX + , module Text.LaTeX.Packages.LongTable + ) where + +import Text.LaTeX.Base.Syntax (LaTeX(TeXComm)) +import Text.LaTeX.Base.Class (LaTeXC, fromLaTeX) +import Text.LaTeX.Base.Types (PackageName) +import Text.LaTeX.Packages.TabularX (tabularx) +import Text.LaTeX.Packages.LongTable (endfirsthead, endhead, endfoot, endlastfoot) + +-- | ltablex package. Use it to import it like this: +-- +-- > usepackage [] ltablex +ltablex :: PackageName +ltablex = "ltablex" + +keepXColumns :: LaTeXC l => l +keepXColumns = fromLaTeX $ TeXComm "keepXColumns" [] + +-- | Treet the specified width as the maximum allowed, not the exact width of the table. +-- +-- ltablex has added a feature that treats the X columns like ‘l’ +-- columns if the table contents would allow that to happen without +-- exceeding the specified width of the table. In other words, the +-- specified width is treated as the maximum allowed and not the exact +-- width of the table. This feature is the default but can be disabled +-- (or enabled) with \keepXColumns (or \convertXColumns). + +convertXColumns :: LaTeXC l => l +convertXColumns = fromLaTeX $ TeXComm "convertXColumns" [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Packages/LongTable.hs new/HaTeX-3.17.3.0/Text/LaTeX/Packages/LongTable.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Packages/LongTable.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Packages/LongTable.hs 2017-07-02 14:32:40.000000000 +0200 @@ -0,0 +1,67 @@ + +{-# LANGUAGE OverloadedStrings #-} + +module Text.LaTeX.Packages.LongTable + ( -- * longtable package + longtablep + -- * longtable commands + , longtable + , endfirsthead + , endhead + , endfoot + , endlastfoot + -- * Package Options + ) where + +import Text.LaTeX.Base.Syntax (LaTeX(TeXEnv, TeXRaw, TeXComm), TeXArg(FixArg, OptArg)) +import Text.LaTeX.Base.Class (LaTeXC, fromLaTeX, liftL) +import Text.LaTeX.Base.Render (render, renderAppend) +import Text.LaTeX.Base.Types (PackageName, Pos, TableSpec) + +-- | longtable package. Use it to import it like this: +-- +-- > usepackage [] longtable +longtablep :: PackageName +longtablep = "longtable" + + +-- | The 'longtable' environment can be used to typeset multi-page tables. +longtable :: 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. +longtable Nothing ts = liftL $ TeXEnv "longtable" [ FixArg $ TeXRaw $ renderAppend ts ] +longtable (Just p) ts = liftL $ TeXEnv "longtable" [ OptArg $ TeXRaw $ render p , FixArg $ TeXRaw $ renderAppend ts ] + +-- | End the first head. +-- +-- Everything above this command will appear at the beginning of the +-- table, in the first page. +endfirsthead :: LaTeXC l => l +endfirsthead = fromLaTeX $ TeXComm "endfirsthead" [] + +-- | End the head. +-- +-- Whatever you put before this command and below \endfirsthead will +-- be displayed at the top of the table in every page except the first +-- one. +endhead :: LaTeXC l => l +endhead = fromLaTeX $ TeXComm "endhead" [] + +-- | End the foot. +-- +-- Similar to \endhead, what you put after \endhead and before this +-- command will appear at the bottom of the table in every page except +-- the last one. +endfoot :: LaTeXC l => l +endfoot = fromLaTeX $ TeXComm "endfoot" [] + +-- | End the last foot. +-- +-- Similar to \endfisthead. The elements after \endfoot and before +-- this command will be displayed at the bottom of the table but only +-- in the last page where the table appears. +endlastfoot :: LaTeXC l => l +endlastfoot = fromLaTeX $ TeXComm "endlastfoot" [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Packages/TabularX.hs new/HaTeX-3.17.3.0/Text/LaTeX/Packages/TabularX.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Packages/TabularX.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Packages/TabularX.hs 2017-07-02 14:32:40.000000000 +0200 @@ -0,0 +1,44 @@ + +{-# LANGUAGE OverloadedStrings #-} + +module Text.LaTeX.Packages.TabularX + ( -- * tabularx package + tabularxp + -- * tabularx commands + , tabularx + ) where + +import Text.LaTeX.Base.Syntax (LaTeX(TeXEnv, TeXRaw), TeXArg(FixArg, OptArg)) +import Text.LaTeX.Base.Class (LaTeXC, liftL) +import Text.LaTeX.Base.Render (render, renderAppend) +import Text.LaTeX.Base.Types (PackageName, Pos, TableSpec, Measure) + +-- | tabularx package. Use it to import it like this: +-- +-- > usepackage [] tabularxp +tabularxp :: PackageName +tabularxp = "tabularx" + +-- | The 'tabularx' environment takes the same arguments as tabular*, +-- but modifies the widths of certain columns, rather than the inter +-- column space, to set a table with the requested total width. The +-- columns that may stretch are marked with the new token X in the +-- preamble argument. +-- +tabularx :: LaTeXC l => + Measure -- ^ Width of the whole tabular. + -> 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. +tabularx width maybePos ts = + liftL $ TeXEnv "tabularx" args + where + width' = FixArg $ TeXRaw $ render width + ts' = FixArg $ TeXRaw $ renderAppend ts + args = case maybePos of + Nothing -> [width', ts'] + Just p -> [width', p', ts'] + where + p' = OptArg $ TeXRaw $ render p diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HaTeX-3.17.2.0/Text/LaTeX/Packages/Trees/Qtree.hs new/HaTeX-3.17.3.0/Text/LaTeX/Packages/Trees/Qtree.hs --- old/HaTeX-3.17.2.0/Text/LaTeX/Packages/Trees/Qtree.hs 2015-03-18 22:54:27.000000000 +0100 +++ new/HaTeX-3.17.3.0/Text/LaTeX/Packages/Trees/Qtree.hs 2017-07-02 15:23:34.000000000 +0200 @@ -1,5 +1,10 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings, CPP #-} +#if __GLASGOW_HASKELL__ >= 801 +{-# OPTIONS_GHC -Wno-orphans #-} +#else +{-# OPTIONS_GHC -fno-warn-orphans #-} +#endif -- | Tree interface using the @qtree@ package. -- An example of usage is provided in the /examples/ directory of
