Commit graph

573 commits

Author SHA1 Message Date
fiddlosopher
681ce02983 Documented man output in pandoc.1.md man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@615 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 03:40:46 +00:00
fiddlosopher
bd5f3876a4 Man writer: don't change - to \- (minus sign).
Leave them as hyphens.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@614 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:38:14 +00:00
fiddlosopher
2cb22a1f8a Man writer: better output for line break:
.PD 0     # set interparagraph space to 0
.P        # new paragraph
.PD       # reset interparagraph space to default.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@613 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:31:36 +00:00
fiddlosopher
f5a3d44494 Minor changes in Man writer:
- escape ' as \[aq], because ' can trigger groff commands.
- remove unneeded line breaks.
- use CR font in code blocks.
- use .P 0 for line breaks.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@612 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:23:05 +00:00
fiddlosopher
6d6fafde16 Don't use -S option in processing man pages,
since the '--' in options will be read as an
En-dash.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@611 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:19:43 +00:00
fiddlosopher
b412492725 Minor changes in man page sources.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@610 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:16:58 +00:00
fiddlosopher
5fbe057d27 Man pages are now generated from markdown templates,
using pandoc's man page writer.  Removed man pages
from repository, added (.md) templates.  Modified
Makefile to generate man pages as part of the build
process.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@609 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-01 23:26:20 +00:00
fiddlosopher
e6f67fcc57 Modified escaping in Man writer. Also changed
format of footnote references and authors list.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@608 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-01 23:23:36 +00:00
fiddlosopher
a669f641b5 Modified Main.hs and Pandoc.cabal to add man page
writer.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@607 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-06-30 22:43:14 +00:00
fiddlosopher
c726e83ce9 Added groff man writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@606 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-06-30 22:42:32 +00:00
fiddlosopher
3c46f8a600 Makefile changes:
+ Include files built from templates in the distribution tarball,
  so it can be built using Cabal and included in Hackage.
+ Remove unnecessary 'cabalize' step.  We no longer build
  Pandoc.cabal from a template.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@605 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-06-17 16:20:50 +00:00
fiddlosopher
c841becc84 Include Pandoc.cabal in repository; do not generate it from
Pandoc.cabal.in using cabalize.  Removed cabalize and
Pandoc.cabal.in, which are no longer needed.
Reason:  We want Pandoc to be buildable using Cabal
without preprocessing, so it can go into the Hackage
repository of Haskell libraries.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@604 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-06-17 16:16:57 +00:00
fiddlosopher
28a99707fd Changed documentation to indicate that GHC 6.6 is required.
We will no longer support GHC 6.4.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@603 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-06-17 16:13:36 +00:00
fiddlosopher
4bf464ce4c Minor documentation changes to ASCIIMathML.hs template.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@602 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-06-17 16:12:23 +00:00
roktas
cfd9ff7381 Adjust Debian package dependencies:
+ add libghc6-mtl-dev
+ remove version condition from libghc6-xhtml-dev


git-svn-id: https://pandoc.googlecode.com/svn/trunk@601 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-26 11:45:15 +00:00
fiddlosopher
aedc2095f5 Added RTF table writer tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@600 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-11 17:13:42 +00:00
fiddlosopher
61024d93ed Require blankspace (but not multiple lines) between URL and
title in links and reference keys.  (Markdown reader.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@599 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-10 22:06:13 +00:00
fiddlosopher
f2c1777598 Fixed bug with indented blocks occurring in definition lists.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@598 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-10 22:05:25 +00:00
fiddlosopher
5660e6ba11 Updated test suite with new tests for definition lists.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@597 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-10 22:04:36 +00:00
fiddlosopher
f9731108e8 Improved prettyprinting of definition lists.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@596 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-10 18:50:12 +00:00
fiddlosopher
5454c841a9 Added support for definition lists in Docbook writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@595 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-09 00:47:29 +00:00
fiddlosopher
71cf0a11b3 + Use new alignment parameter in title/author/date,
instead of hardcoded \qc.
+ Adjusted test suite to account for changes in RTF writer.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@594 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-09 00:44:56 +00:00
fiddlosopher
c6323b2c78 Changes to RTF writer:
+ Added support for definition lists.
+ Removed extra '\cell' in table output, which caused
  a blank column to the left.
+ Added support for captions in tables.
+ Added an 'alignment' parameter to RTF block writers.
+ Added support for column alignments in tables.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@593 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-03 14:46:37 +00:00
fiddlosopher
09fa7e6f63 Added support for definition lists to RST writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@592 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-03 14:44:28 +00:00
fiddlosopher
292d2bd38d Added support for definition lists to markdown
writer.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@591 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-03 14:44:04 +00:00
fiddlosopher
23841bdf77 Add -asxhtml flag to tidy in html2markdown. This will
perhaps help the parser.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@590 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-03 14:43:16 +00:00
fiddlosopher
cf081435ff Changed definition list syntax in markdown reader and simplified
the parsing code. A colon is now required before every block in a
definition. This fixes a problem with the old syntax, in which the last
block in the following was ambiguous between a regular paragraph in the
definition and a code block following the definition list:

term
:   definition

    is this code or more definition?



git-svn-id: https://pandoc.googlecode.com/svn/trunk@589 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-03 14:42:40 +00:00
fiddlosopher
485fa81559 Resolved issue #10: instead of adding "\n\n" to the
end of strings in Main, do it in readMarkdown and readRST.
(Note: the point of this is to ensure that a block at the
end of the file gets treated as if it has blank space after
it, which is generally what is wanted.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@588 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-22 04:38:05 +00:00
fiddlosopher
726685af1b Fixed bug in anyLine parser. Previously anyLine would parse an
empty string "".  But it should fail on an empty string, or we get an
error from its use inside "many" combinators.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@587 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-22 04:19:34 +00:00
fiddlosopher
7742301c09 Support for definition lists in LaTeX writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@586 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-21 21:38:19 +00:00
fiddlosopher
ffd7248af8 Fixed export declarations; removed unneeded import of
Pandoc.Shared.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@585 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-15 16:22:29 +00:00
fiddlosopher
e15fd3bf86 Moved escape and nullBlock parsers from ParserCombinators/Pandoc
to Pandoc/Shared.  Reason:  ParserCombinators/Pandoc is for
general-purpose parsers that don't require Pandoc.Definition.
Also removed some unnecessary imports from Pandoc/Shared.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@584 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-15 16:20:07 +00:00
fiddlosopher
24ee5f1f49 Updated test suite to reflect new prettyprinted native
Table format.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@583 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-13 22:18:47 +00:00
fiddlosopher
944740ce5c Added Table to prettyBlock in Shared.hs.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@582 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-13 01:33:10 +00:00
fiddlosopher
92845a9834 Added Text.Pandoc module that exports basic readers, writers,
definitions, and utility functions.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@581 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-11 22:57:45 +00:00
fiddlosopher
23df0ed176 Extensive changes stemming from a rethinking of the Pandoc data
structure. Key and Note blocks have been removed. Link and image URLs
are now stored directly in Link and Image inlines, and note blocks
are stored in Note inlines. This requires changes in both parsers
and writers. Markdown and RST parsers need to extract data from key
and note blocks and insert them into the relevant inline elements.
Other parsers can be simplified, since there is no longer any need to
construct separate key and note blocks. Markdown, RST, and HTML writers
need to construct lists of notes; Markdown and RST writers need to
construct lists of link references (when the --reference-links option
is specified); and the RST writer needs to construct a list of image
substitution references. All writers have been rewritten to use the
State monad when state is required.  This rewrite yields a small speed
boost and considerably cleaner code. 

* Text/Pandoc/Definition.hs:
  + blocks:  removed Key and Note
  + inlines:  removed NoteRef, added Note
  + modified Target:  there is no longer a 'Ref' target; all targets
    are explicit URL, title pairs

* Text/Pandoc/Shared.hs:

  + Added 'Reference', 'isNoteBlock', 'isKeyBlock', 'isLineClump',
    used in some of the readers.
  + Removed 'generateReference', 'keyTable', 'replaceReferenceLinks',
    'replaceRefLinksBlockList', along with some auxiliary functions
    used only by them.  These are no longer needed, since
    reference links are resolved in the Markdown and RST readers.
  + Moved 'inTags', 'selfClosingTag', 'inTagsSimple', and 'inTagsIndented'
    to the Docbook writer, since that is now the only module that uses
    them.
  + Changed name of 'escapeSGMLString' to 'escapeStringForXML'
  + Added KeyTable and NoteTable types
  + Removed fields from ParserState;  'stateKeyBlocks', 'stateKeysUsed',
    'stateNoteBlocks', 'stateNoteIdentifiers', 'stateInlineLinks'. 
    Added 'stateKeys' and 'stateNotes'.
  + Added clause for Note to 'prettyBlock'.
  + Added 'writerNotes', 'writerReferenceLinks' fields to WriterOptions.

* Text/Pandoc/Entities.hs: Renamed 'escapeSGMLChar' and
  'escapeSGMLString' to 'escapeCharForXML' and 'escapeStringForXML'

* Text/ParserCombinators/Pandoc.hs: Added lineClump parser: parses a raw
  line block up to and including following blank lines.

* Main.hs:  Replaced --inline-links with --reference-links.

* README: 
  + Documented --reference-links and removed description of --inline-links.
  + Added note that footnotes may occur anywhere in the document, but must
    be at the outer level, not embedded in block elements.
  
* man/man1/pandoc.1, man/man1/html2markdown.1: Removed --inline-links
  option, added --reference-links option

* Markdown and RST readers:
  + Rewrote to fit new Pandoc definition.  Since there are no longer
    Note or Key blocks, all note and key blocks are parsed on a first pass
    through the document.  Once tables of notes and keys have been constructed,
    the remaining parts of the document are reassembled and parsed.
  + Refactored link parsers.

* LaTeX and HTML readers: Rewrote to fit new Pandoc definition. Since
  there are no longer Note or Key blocks, notes and references can be
  parsed in a single pass through the document.

* RST, Markdown, and HTML writers: Rewrote using state monad new Pandoc
  and definition. State is used to hold lists of references footnotes to
  and be printed at the end of the document.

* RTF and LaTeX writers: Rewrote using new Pandoc definition. (Because
  of the different treatment of footnotes, the "notes" parameter is no
  longer needed in the block and inline conversion functions.)

* Docbook writer:
  + Moved the functions 'attributeList', 'inTags', 'selfClosingTag',
    'inTagsSimple', 'inTagsIndented' from Text/Pandoc/Shared, since
    they are now used only by the Docbook writer.
  + Rewrote using new Pandoc definition.  (Because of the different
    treatment of footnotes, the "notes" parameter is no longer needed
    in the block and inline conversion functions.)

* Updated test suite

* Throughout:  old haskell98 module names replaced by hierarchical module
  names, e.g. List by Data.List.

* debian/control: Include libghc6-xhtml-dev instead of libghc6-html-dev
  in "Build-Depends."

* cabalize: 
  + Remove haskell98 from BASE_DEPENDS (since now the new hierarchical
    module names are being used throughout)
  + Added mtl to BASE_DEPENDS (needed for state monad)
  + Removed html from GHC66_DEPENDS (not needed since xhtml is now used)



git-svn-id: https://pandoc.googlecode.com/svn/trunk@580 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-10 01:56:50 +00:00
fiddlosopher
74e7497226 Fixed bug in email obfuscation (issue #15). If the text to be obfuscated
contains an entity, this needs to be decoded before obfuscation.
Thanks to thsutton for the patch.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@579 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-08 21:04:47 +00:00
fiddlosopher
571c3b4173 Removed Blank block element as unnecessary.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@578 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-17 20:23:47 +00:00
fiddlosopher
9b3d5d88c2 Consolidated 'text', 'special', and 'inline' into 'inline'.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@577 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-17 17:25:28 +00:00
fiddlosopher
cdf7c78b5f Added trys to two list start routines. Reason:
<|> only parses second parser when first hasn't consumed
input.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@576 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-16 06:05:43 +00:00
fiddlosopher
0d2e5eab79 Added clauses for DefinitionList and Table to replaceReferenceLinks in
Text/Pandoc/Shared.hs. This ensures that reference-style links inside
tables and definition lists will be handled properly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@575 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-12 00:36:41 +00:00
fiddlosopher
d55346ca9a Simplified keyTable, using assumption that key blocks are not
inside other block elements (an assumption that the Markdown
reader uses in making its initial pass anyway).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@574 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-12 00:23:39 +00:00
fiddlosopher
7bf7aba7e7 Changes to Markdown reader relating to definition lists:
+ fixed bug in indentSpaces (which didn't properly handle
  cases with mixed spaces and tabs)
+ rewrote definition list code to conform to new syntax
+ include definition lists in list block
+ failIfStrict on definition lists


git-svn-id: https://pandoc.googlecode.com/svn/trunk@572 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-11 07:56:29 +00:00
fiddlosopher
aca046702e Added support for DefinitionList blocks to HTML writer.
Cleaned up bullet and ordered list code by using
ordList and unordList instead of raw olist and ulist.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@571 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-11 07:54:47 +00:00
fiddlosopher
44cec96e61 New syntax documentation for definition lists. Now we
require a ':' at the beginning of the definition; otherwise,
too many false positives for definition lists. 


git-svn-id: https://pandoc.googlecode.com/svn/trunk@570 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-11 07:53:21 +00:00
fiddlosopher
2e794fdf37 Fixed bug in HTML email obfuscation using --strict mode.
The problem is that the "href" function escapes &, so
(href "&#108;") is 'href="&amp;#108;"'.  Fixed by using
primHtml for the whole link.  Resolves issue 9.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@569 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-11 00:19:15 +00:00
fiddlosopher
115cad8882 Changed syntax of definition lists in Markdown parser:
+ definition blocks must be indented throughout (not
    just in first line)
  + compact lists can be formed by leaving no blank line
    between a definition and the next term


git-svn-id: https://pandoc.googlecode.com/svn/trunk@568 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-10 20:45:19 +00:00
fiddlosopher
d277baebe4 Added documentation for definition lists.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@567 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-10 20:43:59 +00:00
fiddlosopher
5ec31cc727 Added parser for definition lists, derived from reStructuredText
syntax:

term 1
    Definition 1

    Paragraph 2 of definition 1.

term 2
    There must be whitespace between entries.
    Any kind of block may serve as a definition,
    but the first line of each block must be indented.

terms can contain any *inline* elements
    If you want to be lazy, you can just
indent the first line of the definition block.



git-svn-id: https://pandoc.googlecode.com/svn/trunk@566 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-10 17:48:16 +00:00
fiddlosopher
0ce965f34c Modified prettyPandoc to handle DefinitionList elements.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@565 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-10 17:45:00 +00:00