diff --git a/HaTeX-qq.cabal b/HaTeX-qq.cabal
--- a/HaTeX-qq.cabal
+++ b/HaTeX-qq.cabal
@@ -1,5 +1,5 @@
 name:                HaTeX-qq
-version:             0.0.0.0
+version:             0.0.1.0
 synopsis:            Quasiquoters for HaTeX
 description:         Quasiquoters for HaTeX
 license:             BSD3
@@ -17,7 +17,7 @@
   location: git://github.com/konn/HaTeX-qq.git
 
 library
-  exposed-modules:     Text.LaTeX.QQ
+  exposed-modules:     Text.LaTeX.QQ Text.LaTeX.Utils
   other-modules:       Text.LaTeX.QQ.Orphans
   other-extensions:    TemplateHaskell OverloadedStrings
   build-depends:       base             >= 4 && <5,
diff --git a/src/Text/LaTeX/Utils.hs b/src/Text/LaTeX/Utils.hs
new file mode 100644
--- /dev/null
+++ b/src/Text/LaTeX/Utils.hs
@@ -0,0 +1,42 @@
+-- | Since 0.0.1.0
+module Text.LaTeX.Utils (stripTeX, stripTeXR, stripTeXL) where
+import           Data.Monoid            ((<>))
+import qualified Data.Text              as T
+import           Text.LaTeX.Base.Syntax (LaTeX (..))
+
+-- | Strip whitespaces on both sides of LaTeX.
+--
+-- Since 0.0.1.0
+stripTeX :: LaTeX -> LaTeX
+stripTeX = stripTeXL . stripTeXR
+
+-- | Strip whitespaces on the left side of LaTeX.
+--
+-- Since 0.0.1.0
+stripTeXL :: LaTeX -> LaTeX
+stripTeXL (TeXRaw str) =
+  let str' = T.stripStart str
+  in if T.null str'
+     then TeXEmpty
+     else TeXRaw str'
+stripTeXL (TeXSeq l r) =
+  case stripTeXL l of
+    TeXEmpty -> stripTeXL r
+    l' -> l' <> r
+stripTeXL l = l
+
+-- | Strip whitespaces on the right side of LaTeX.
+--
+-- Since 0.0.1.0
+stripTeXR :: LaTeX -> LaTeX
+stripTeXR (TeXRaw str) =
+  let str' = T.stripEnd str
+  in if T.null str'
+     then TeXEmpty
+     else TeXRaw str'
+stripTeXR (TeXSeq l r) =
+  case stripTeXR r of
+    TeXEmpty -> stripTeXR l
+    r' -> l <> r'
+stripTeXR l = l
+
