diff --git a/authoring.cabal b/authoring.cabal
--- a/authoring.cabal
+++ b/authoring.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                authoring
-version:             0.3.3.1
+version:             0.3.4
 synopsis:            A library for writing papers
 description:         This package is a combinator library for writing papers.
 homepage:            http://github.com/nushio3/authoring
@@ -48,7 +48,7 @@
     , mtl
     , parsers
     , safe
-    , template-haskell
+    , template-haskell >= 2.9
     , text
     , trifecta
     , transformers
diff --git a/src/Text/Authoring/Bibliography.hs b/src/Text/Authoring/Bibliography.hs
--- a/src/Text/Authoring/Bibliography.hs
+++ b/src/Text/Authoring/Bibliography.hs
@@ -1,4 +1,4 @@
-module Text.Authoring.Bibliography (bibliographyContent, withDatabaseFile) where
+module Text.Authoring.Bibliography (bibliographyContent, toBibliographyContent, withDatabaseFile) where
 
 import           Control.Lens (use)
 import           Control.Monad
@@ -10,7 +10,9 @@
 
 import Text.Authoring.State
 
--- | generate the content for the bibliography file.
+-- | generate the content of the LaTeX bibliography @.bib@ file.
+--   We need 'MonadIO' capability in order to access online 
+--   literature information.
 
 bibliographyContent :: (MonadState s m, HasAuthorState s, HasDatabase s, MonadIO m) => m Text.Text
 bibliographyContent = do
@@ -18,3 +20,12 @@
   items <- mapM toBibTeXItem $ Set.toList urls
   return $ Text.unlines $ items
     
+    
+
+-- | generate the @.bib@ file outside the authoring monad.
+toBibliographyContent :: (HasAuthorState s, HasDatabase s, MonadIO m) => 
+                         s -> m Text.Text
+toBibliographyContent s0 = flip evalStateT s0 $ do
+  urls <- use citedUrlSet
+  items <- mapM toBibTeXItem $ Set.toList urls
+  return $ Text.unlines $ items
diff --git a/src/Text/Authoring/TH.hs b/src/Text/Authoring/TH.hs
--- a/src/Text/Authoring/TH.hs
+++ b/src/Text/Authoring/TH.hs
@@ -25,7 +25,7 @@
 
 -}
 
-module Text.Authoring.TH (rawQ, escQ, declareLabels) where
+module Text.Authoring.TH (rawQ, escQ, inputQ, declareLabels) where
 
 
 import Control.Applicative
@@ -52,6 +52,7 @@
 -- | Quote with LaTeX special characters escaped. 
 escQ = rawQ {quoteExp =  parseE (QQConfig { escaper = appE (varE 'esc)})}
 
+
 -- | Quote without escaping any special characters.                                                           
 rawQ :: QuasiQuoter
 rawQ = QuasiQuoter { 
@@ -61,6 +62,11 @@
   quoteDec  = error "Authoring QuasiQuotes are only for expression context" 
   }
 
+-- | Quote a filename, without escaping any special characters.                                                
+inputQ :: QuasiQuoter                                                
+inputQ = quoteFile rawQ                                                
+                                                
+                                                
 data QQConfig = QQConfig 
   { escaper :: ExpQ -> ExpQ }
 
