Commits

John Lenz committed be0aa7c

Add template for readme

Comments (0)

Files changed (2)

doc/build-docs.hs

 -- | Extract the option comments from the given text
 extract :: TL.Text -> [TL.Text]
 extract t = nosuffix
-  where comments  = filter isComment $ TL.lines t
-        raw       = map (TL.drop 3 . TL.strip) comments
-        noprefix  = drop 1 $ dropWhile (not . TL.isPrefixOf "OPTIONS START") raw
-        nosuffix  = takeWhile (not . TL.isPrefixOf "OPTIONS END") noprefix
+  where comments = filter isComment $ TL.lines t
+        raw      = map (TL.drop 3 . TL.strip) comments
+        noprefix = drop 1 $ dropWhile (not . TL.isPrefixOf "OPTIONS START") raw
+        nosuffix = takeWhile (not . TL.isPrefixOf "OPTIONS END") noprefix
 
 -- | Group lines togeter into a single option
 groupOpts :: [TL.Text] -> [[TL.Text]]

doc/readme-template

+# Overview
+
+The TeX engine does not provide good error messages or warnings; the messages
+are mixed in with lots of superfluous output, some errors don't have file and
+line numbers, there is no consist formatting for messages, syntax errors can
+lead to very confusing messages, errors in code using packages like tikz are
+non-intuitive.  This package implements a LaTeX checker that uses parsec for
+great error messages while parsing while also implementing many lint style
+checks.  The ambitious goal is to check the majority of TeX errors so that
+these errors can be discovered in a common format and loaded into editors like
+Vim.  Also, provide much better error messages which are understandable by the
+user.
+
+# Usage
+
+The checker can be used in one of two ways: through a command line program
+*lacandle* and through a [haskell library](http://hackage.haskell.org/package/latex-candle).
+Basic usage of *lacandle* is
+
+    lacandle [options] [filenames]
+
+The options are described in detail below and are mostly options to enable or
+disable certian warnings and lint checks.  Any errors, warnings, or lint found
+by the checker is written to standard output.  The format for messages is the
+following.
+
+    file:line:col: message
+    file:line:col-col: a message spanning multiple columns
+    file:line:col:+ first message line
+          second message line
+          another message line
+    file:line:col-col:+ a multiple column message
+          second message line
+
+## Vim Integration
+
+The plan is to integrate with [syntastic](https://github.com/scrooloose/syntastic),
+although this still needs to be written.
+
+# See Also
+
+Similar packages include lacheck
+(<http://www.ctan.org/tex-archive/support/lacheck>) and chktex
+(<http://baruch.ev-en.org/proj/chktex/>), but neither of these programs are
+actively developed anymore.
+
+# Option Details
+
+INPUT_OPTIONS_HERE
+
+