HaTeX 3.17.0.2 → 3.17.1.0
raw patch · 7 files changed
+68/−18 lines, 7 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Text.LaTeX.Base.Writer: mapLaTeXT :: (m (a, LaTeX) -> m (a, LaTeX)) -> LaTeXT m a -> LaTeXT m a
+ Text.LaTeX.Packages.AMSMath: medspace :: LaTeXC l => l
+ Text.LaTeX.Packages.AMSMath: negspace :: LaTeXC l => l
+ Text.LaTeX.Packages.AMSMath: space :: LaTeXC l => l
+ Text.LaTeX.Packages.AMSMath: thickspace :: LaTeXC l => l
+ Text.LaTeX.Packages.AMSMath: thinspace :: LaTeXC l => l
- Text.LaTeX.Base: mappend :: a -> a -> a
+ Text.LaTeX.Base: mappend :: Monoid a => a -> a -> a
- Text.LaTeX.Base: mconcat :: [a] -> a
+ Text.LaTeX.Base: mconcat :: Monoid a => [a] -> a
- Text.LaTeX.Base: mempty :: a
+ Text.LaTeX.Base: mempty :: Monoid a => a
- Text.LaTeX.Base.Class: mappend :: a -> a -> a
+ Text.LaTeX.Base.Class: mappend :: Monoid a => a -> a -> a
- Text.LaTeX.Base.Class: mconcat :: [a] -> a
+ Text.LaTeX.Base.Class: mconcat :: Monoid a => [a] -> a
- Text.LaTeX.Base.Class: mempty :: a
+ Text.LaTeX.Base.Class: mempty :: Monoid a => a
Files
- CHANGELOG.md +6/−0
- Examples/mathSpaces.hs +23/−0
- HaTeX.cabal +1/−1
- README.md +4/−3
- Text/LaTeX/Base/Writer.hs +12/−0
- Text/LaTeX/Packages/AMSMath.hs +18/−9
- Text/LaTeX/Packages/QRCode.hs +4/−5
CHANGELOG.md view
@@ -9,6 +9,12 @@ # Changelog by versions +## From 3.17.0.0 to 3.17.1.0++* New math space commands (romildo).+* New function: mapLaTeXT (ddssff).+* Some fixes for qrcode package (L3n41c).+ ## From 3.16.2.0 to 3.17.0.0 * New 'array' command (NorfairKing).
+ Examples/mathSpaces.hs view
@@ -0,0 +1,23 @@+{-# LANGUAGE OverloadedStrings #-}++module Main where++import Text.LaTeX+import Text.LaTeX.Packages.AMSMath++main :: IO ()+main = execLaTeXT mathSpaces >>= renderFile "mathSpaces.tex"++mathSpaces :: Monad m => LaTeXT_ m+mathSpaces = do+ documentclass [] article+ usepackage [] amsmath+ document $+ tabular Nothing [RightColumn, LeftColumn] $ do+ texttt "quad" & math ("H" >> quad >> "H") ; lnbk+ texttt "qquad" & math ("H" >> qquad >> "H") ; lnbk+ texttt "thinspace" & math ("H" >> thinspace >> "H") ; lnbk+ texttt "medspace" & math ("H" >> medspace >> "H") ; lnbk+ texttt "thickspace" & math ("H" >> thickspace >> "H") ; lnbk+ texttt "negspace" & math ("H" >> negspace >> "H") ; lnbk+ texttt "space" & math ("H" >> space >> "H")
HaTeX.cabal view
@@ -1,5 +1,5 @@ Name: HaTeX -Version: 3.17.0.2 +Version: 3.17.1.0 Author: Daniel Díaz Category: LaTeX Build-type: Simple
README.md view
@@ -55,12 +55,11 @@ There are many ways to get involved in the HaTeX project. Use the most comfortable way for you. -* Fork the [GitHub repository](https://github.com/Daniel-Diaz/HaTeX).+* Fork the [GitHub repository](https://github.com/Daniel-Diaz/HaTeX) and make your own contributions. * Report bugs or make suggestions opening a ticket in the [Issue Tracker](https://github.com/Daniel-Diaz/HaTeX/issues). * Help us to improve and extend our [hatex-guide](https://github.com/Daniel-Diaz/hatex-guide). * Join the [Mailing List](http://projects.haskell.org/cgi-bin/mailman/listinfo/hatex) for help or announcements of the latest developments.-* Drop by the IRC channel at `#hatex`. ## TODO list @@ -73,7 +72,9 @@ * [haskintex](http://daniel-diaz.github.io/projects/haskintex): Tool to use Haskell (and, additionaly, the HaTeX library) 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 (_no longer maintained?_).+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
Text/LaTeX/Base/Writer.hs view
@@ -48,6 +48,7 @@ , rendertexM , liftFun , liftOp+ , mapLaTeXT -- * Re-exports , lift , liftIO@@ -189,6 +190,17 @@ (p,l') <- lift $ runWriterT c' tell $ l `op` l' return p++-- | A helper function for building monad transformers, e.g.+-- @@+-- instance MonadReader r m => MonadReader r (LaTeXT m) where+-- ask = lift ask+-- local = mapLaTeXT . local+-- @@+-- This declaration could be included here, but it would add a+-- dependency on mtl.+mapLaTeXT :: (m (a, LaTeX) -> m (a, LaTeX)) -> LaTeXT m a -> LaTeXT m a+mapLaTeXT f = LaTeXT . mapWriterT f . unwrapLaTeXT -- | Just like 'rendertex', but with 'LaTeXT' output. --
Text/LaTeX/Packages/AMSMath.hs view
@@ -119,6 +119,7 @@ , v2matrix -- * Math spacing , quad, qquad+ , thinspace, medspace, thickspace, negspace, space ) where import Text.LaTeX.Base@@ -1055,14 +1056,22 @@ qquad :: LaTeXC l => l qquad = comm0 "qquad" -{-- The following commands are pending. Someone needs to find suitable- names for them.+-- | \, space equal to 3/18 of \quad (= 3 mu)+thinspace :: LaTeXC l => l+thinspace = comm0 "," - \, 3/18 of \quad (= 3 mu)- \: 4/18 of \quad (= 4 mu)- \; 5/18 of \quad (= 5 mu)- \! -3/18 of \quad (= -3 mu)- \ (space after backslash!) equivalent of space in normal text+-- | \: space equal to 4/18 of \quad (= 4 mu)+medspace :: LaTeXC l => l+medspace = comm0 ":" --}+-- | \: space equal to 5/18 of \quad (= 5 mu)+thickspace :: LaTeXC l => l+thickspace = comm0 ";"++-- | \! space equal to -3/18 of \quad (= -3 mu)+negspace :: LaTeXC l => l+negspace = comm0 "!"++-- | \ (space after backslash) equivalent of space in normal text+space :: LaTeXC l => l+space = comm0 " "
Text/LaTeX/Packages/QRCode.hs view
@@ -21,7 +21,6 @@ import Text.LaTeX.Base.Types import Text.LaTeX.Base.Texy import qualified Data.Text as T-import Data.Char (toLower) -- | qrcode package. Use it to import it like this: --@@ -57,7 +56,7 @@ -- | This package option (which is the default) sets the qrcode package to generate print-quality QR codes. final :: LaTeXC l => l-final = "draft"+final = "final" -- | Generates a QR code with specified options and content. --@@ -66,9 +65,9 @@ qr :: LaTeXC l => CodeOptions -> Text -> l qr opt payload = fromLaTeX $ TeXComm "qrcode" [opts, FixArg . raw . escape $ payload] where- opts = MOptArg [ if includePadding opt then "padding" else "tight" - , if link opt then "link" else "nolink" - , texy . ("level=" <>) . T.singleton . toLower . head . show . errorLevel $ opt + opts = MOptArg [ if includePadding opt then "padding" else "tight"+ , if link opt then "link" else "nolink"+ , texy . ("level=" <>) . T.singleton . head . show . errorLevel $ opt ] -- Helper functions for escaping code contents.