@@ -48,17 +48,17 @@ bracketedText openB closeB = try (do
4848 char closeB
4949 return ([openB] ++ (concat result) ++ [closeB]))
5050
51−-- | Returns an option or argument of a LaTeX command
51+-- | Returns an option or argument of a LaTeX command.
5252optOrArg = choice [ (bracketedText '{' '}'), (bracketedText '[' ']') ]
5353
54−-- | True if the string begins with '{'
54+-- | True if the string begins with '{'.
5555isArg ('{':rest) = True
5656isArg other = False
5757
58−-- | Returns list of options and arguments of a LaTeX command
58+-- | Returns list of options and arguments of a LaTeX command.
5959commandArgs = many optOrArg
6060
61−-- | Parses LaTeX command, returns (name, star, list of options/arguments).
61+-- | Parses LaTeX command, returns (name, star, list of options or arguments).
6262command = try (do
6363 char '\\'
6464 name <- many1 alphaNum
@@ -102,7 +102,7 @@ anyEnvironment = try (do
102102-- parsing documents
103103--
104104
105−-- | Process LaTeX preamble, extracting metadata
105+-- | Process LaTeX preamble, extracting metadata.
106106processLaTeXPreamble = do
107107 manyTill (choice [bibliographic, comment, unknownCommand, nullBlock]) (try (string "\\begin{document}"))
108108 spaces
@@ -303,7 +303,7 @@ specialEnvironment = do -- these are always parsed as raw
303303 "picture", "table", "verse", "theorem"]))
304304 rawLaTeXEnvironment
305305
306−-- | Parse any LaTeX environment and return a Para block containing
306+-- | Parse any LaTeX environment and return a Para block containing
307307-- the whole literal environment as raw TeX.
308308rawLaTeXEnvironment :: GenParser Char st Block
309309rawLaTeXEnvironment = try (do