@@ -162,6 +162,7 @@ data Opt = Opt
162162 , optAscii :: Bool -- ^ Use ascii characters only in html
163163 , optTeXLigatures :: Bool -- ^ Use TeX ligatures for quotes/dashes
164164 , optDefaultImageExtension :: String -- ^ Default image extension
165+ , optTrace :: Bool -- ^ Print debug information
165166 }
166167
167168-- | Defaults for command-line options.
@@ -217,6 +218,7 @@ defaultOpts = Opt
217218 , optAscii = False
218219 , optTeXLigatures = True
219220 , optDefaultImageExtension = ""
221+ , optTrace = False
220222 }
221223
222224-- | A list of functions, each transforming the options data structure
@@ -758,6 +760,11 @@ options =
758760 (\opt -> return opt { optHTMLMathMethod = GladTeX }))
759761 "" -- "Use gladtex for HTML math"
760762
763+ , Option "" ["trace"]
764+ (NoArg
765+ (\opt -> return opt { optTrace = True }))
766+ "" -- "Turn on diagnostic tracing in readers."
767+
761768 , Option "" ["dump-args"]
762769 (NoArg
763770 (\opt -> return opt { optDumpArgs = True }))
@@ -952,6 +959,7 @@ main = do
952959 , optAscii = ascii
953960 , optTeXLigatures = texLigatures
954961 , optDefaultImageExtension = defaultImageExtension
962+ , optTrace = trace
955963 } = opts
956964
957965 when dumpArgs $
@@ -1074,6 +1082,7 @@ main = do
10741082 , readerIndentedCodeClasses = codeBlockClasses
10751083 , readerApplyMacros = not laTeXOutput
10761084 , readerDefaultImageExtension = defaultImageExtension
1085+ , readerTrace = trace
10771086 }
10781087
10791088 let writerOptions = def { writerStandalone = standalone',