Commit graph

481 commits

Author SHA1 Message Date
John MacFarlane
8e71b5b279 Updated markdown-citations test for new citeproc changes. 2010-11-21 09:30:32 -08:00
John MacFarlane
f3bb3c1ff1 Markdown citation parser improvements and test updates.
Now we handle a suffix after a bare locator, e.g.
@item1 [p. 30, suffix]
The suffix now includes any punctuation that introduces it.
A few tests fail because of problems with citeproc (extra space
before the suffix, missing space after comma separating multiple
page ranges in the locator).
2010-11-18 13:22:20 -08:00
John MacFarlane
aaf7de0dda Markdown reader: Revised parser for new citation syntax.
Suffixes and prefixes are now [Inline].  The locator is separated
from the citation key by a blank space.  The locator consists of
one introductory word and any number of words containing at
least one digit.  The suffix, if any, is separated from the locator
by a comma, and continues til the end of the citation.
2010-11-18 12:38:45 -08:00
John MacFarlane
7aecddd0f7 Replaced --biblio-file with --bibliography, removed --biblio-format.
Bibliography format is guessed from the file extension of the
bibliography.

Also, the bibliography entries are now read during option parsing.
2010-11-13 08:42:09 -08:00
John MacFarlane
1fa2973da6 Repairs to citation parser + citation test suite. 2010-11-12 19:30:59 -08:00
John MacFarlane
bf4d919989 Improvements to test suite for citations. 2010-11-12 18:46:34 -08:00
John MacFarlane
f272b81f85 Set LANG in test runner. 2010-11-12 18:40:16 -08:00
John MacFarlane
c44ff4c555 Added material for citation tests.
Currently they fail with a multibyte error from citeproc-hs
when it tries to read locale.
2010-11-12 00:38:31 -08:00
John MacFarlane
ca51bbbf16 HTML reader: don't parse raw HTML inside <code> tag.
Previously '<code><a>x</a></code>' would be parsed as
Code "<a>x</a>", which is not what you want.
2010-11-11 20:02:37 -08:00
John MacFarlane
21556e37f4 Allow HTML comments as inline elements in markdown.
So,
aaa <!-- comment --> bbb
can be a single paragraph.
2010-11-09 22:51:02 -08:00
John MacFarlane
905d194db5 Added test for macros. 2010-10-26 20:03:02 -07:00
John MacFarlane
7e9e959548 LaTeX & ConTeXt writers: escape [ and ] as {[} and {]}.
This avoids unwanted interpretation as optional arguments
in some contexts, which caused the brackets to silently
disappear!
2010-10-24 19:38:16 -07:00
John MacFarlane
6f75034bb9 Updated s5 tests. 2010-07-22 23:24:22 -07:00
John MacFarlane
da52412455 Extended --offline to s5.
S5 default is now to include links, rather than a full copy
of scripts and stylesheets.
2010-07-22 22:23:43 -07:00
John MacFarlane
fb9866c70f Added amssymb to default latex template.
Resolves github Issue 1.
2010-07-20 21:06:32 -07:00
John MacFarlane
feb70b6e93 Made spacing at end of output more consistent.
Previously some of the writers added spurious whitespace.
This has been removed, resolving Issue #232.

NOTE: If your application combines pandoc's output with other
text, for example in a template, you may need to add spacing.
For example, a pandoc-generated markdown file will not have
a blank line after the final block element.  If you are inserting
it into another markdown file, you will need to make sure there
is a blank line between it and the next block element.
2010-07-20 12:42:12 -07:00
John MacFarlane
85f8c51b64 Use default highlighting CSS rather than embedding CSS in templates. 2010-07-16 00:23:13 -07:00
John MacFarlane
3adacdb04e Updated pandoc to use css for highlighting-kate 0.2.7.
Note: Update any custom CSS or templates accordingly.
2010-07-15 23:02:29 -07:00
John MacFarlane
9be9bccfcf Added --section-divs option.
+ Header identifiers now get attached to the headers, unless
  --section-divs is specified, in which case they are added to
  enclosing divs. By default, the divs are not added.
+ Resolves Issue #230, #239.
2010-07-15 22:26:45 -07:00
John MacFarlane
57a91f3b6a Added --webtex option for HTML math.
+ Added --webtex command-line option, with optional parameter.
  (Defaults to using google charts API.)
+ Added WebTeX HTMLMathMethod.
+ Removed MimeTeX HTMLMathMethod.  (WebTeX is generic and subsumes it.)
+ Modified --mimetex option to use WebTeX.
+ Thanks to lpeterse for the idea and some of the code.
2010-07-15 19:01:00 -07:00
John MacFarlane
8757da76b0 Improved handling of code in man writer.
+ Inline code is now in monoscpace, not bold.
+ Code blocks now use .nf (no fill) and .IP (indented paragraph).
+ Resolves Issue #247.
2010-07-14 10:58:34 -07:00
John MacFarlane
a59a141906 Put insert-before text before the title h1 in HTML.
+ This is the documented behavior; the insert-before text
  comes after the <body> tag.
+ Resolves Issue #241.
2010-07-13 19:30:10 -07:00
John MacFarlane
be58768522 Added tests for example lists. 2010-07-12 23:07:00 -07:00
John MacFarlane
7d687684aa Allow language-neutral table captions.
+ Captions may now begin simply with ':', instead of 'Table:'
+ Captions may now appear either above or below the table.
+ Resolves Issue #227.
2010-07-06 21:02:26 -07:00
John MacFarlane
ee51124412 Use unicode for smart punctuation in plain, markdown, rst formats. 2010-06-30 18:53:35 -07:00
John MacFarlane
d073b16892 Added Textile writer module. 2010-05-17 21:52:45 -07:00
John MacFarlane
d6dd5fff7b No longer need to set LANG in RunTests. 2010-05-06 22:30:32 -07:00
John MacFarlane
4aaa1991fd Man writer: convert math to unicode when possible.
(As in other writers.)
2010-04-26 23:04:29 -07:00
John MacFarlane
c243e5b67b Use texmath's parser in TexMath module.
* This replaces a lot of custom parser code, and expands
  the tex -> unicode conversion.
* The behavior has also changed: if the whole formula can't
  be converted, the whole formula is left in raw TeX.
  Previously, pandoc converted parts of the formula to unicode
  and left other parts in raw TeX.
* Added (but not yet exported) readTeXMath', which returns a Maybe.
* Updated tests
2010-04-25 20:30:27 -07:00
John MacFarlane
b3669e139c RunTests: use UTF8 no matter what the locale. 2010-04-25 20:19:39 -07:00
Max Bolingbroke
e365c5950b Give LaTeX images a maximum width using the prelude only 2010-04-10 12:01:35 +08:00
John MacFarlane
c3384bb3f1 Added multilingual URL tests for markdown reader. 2010-03-23 15:07:17 -07:00
fiddlosopher
56217f1004 Added --mathml option; removed Text.Pandoc.LaTeXMathML.
* Added data/MathMLinHTML.js, which is included when no URL is provided
  for --mathml.  This allows MathML to be displayed in better browsers,
  as text/html.
* The module was no longer necessary; its functionality (two lines)
  was incorporated into pandoc.hs.
* Consolidated the two LaTeXMathML.js files into one.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1909 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 06:45:56 +00:00
fiddlosopher
695961155a Added plain writer.
Text.Pandoc.Writers.Markdown now exports a writePlain,
which writes plain text without links, pictures, or
special formatting (not even markdown conventions).

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1907 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 06:45:43 +00:00
fiddlosopher
ff68dd3883 MediaWiki writer: make links to relative URLs wikilinks.
The new rule:  If the link target is an absolute URL, an external
link is created. Otherwise, a wikilink is created.

Examples:

1. [label](/foo/bar)                => [[foo/bar|label]]
2. [label](foo)                     => [[foo|label]]
3. [label](http://gitit.net/foo)    => [http://gitit.net/foo label]

Note on 1: We strip the leading / here, since otherwise we get a
link to Help:Links/foo/bar.  would it be better for 1 to become
[http://{SERVERNAME}}/foo/bar label]?  Perhaps, since this would
guarantee the same link destination as you'd get if you used the
HTML writer directly.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1904 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 06:45:23 +00:00
fiddlosopher
312d098d35 Texinfo writer: Handle images in figures.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1901 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 02:39:13 +00:00
fiddlosopher
a9b0d876d9 HTML writer: Use a p rather than a div for image caption.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1900 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 02:39:06 +00:00
fiddlosopher
874b574038 RST writer: handle images in figures.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1899 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 02:38:58 +00:00
fiddlosopher
97bff3f9dc MediaWiki writer: Support images in figures.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1898 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-17 06:53:48 +00:00
fiddlosopher
16e5b15cae Docbook writer: support images as figures.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1897 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-17 06:53:43 +00:00
fiddlosopher
1a09a9d40f Revert "LaTeX writer: Add unique labels to figures."
This reverts commit be34432122.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1896 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-17 06:53:38 +00:00
fiddlosopher
be34432122 LaTeX writer: Add unique labels to figures.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1895 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-16 06:45:57 +00:00
fiddlosopher
9562390d68 ConTeXt writer: support images in figures.
Also, DON'T put image in figure (as was done previously)
when it's an inline image.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1893 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-16 06:45:47 +00:00
fiddlosopher
da117c9d68 LaTeX writer: support figures with captions.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1892 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-16 04:06:33 +00:00
fiddlosopher
cb31c89eab HTML writer: implemented image-with-caption feature.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1891 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-16 04:06:25 +00:00
fiddlosopher
139b2ed6d1 LaTeX reader: Ignore alt title in section headers.
Partially resolves Issue #202.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1886 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-14 23:23:07 +00:00
fiddlosopher
3b9be92492 Use template variables for include-before/after.
* These options now imply -s; previously they worked also
  in fragment mode.
* Users can now adjust position of include-before and
  include-after text in the templates.
* Default position of include-before moved back (as it
  originally was) before table of contents.
* Resolves Issue #217.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1883 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-13 04:11:24 +00:00
fiddlosopher
a35af5db29 OpenDocument writer: handle tables with no headers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1882 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-13 03:19:19 +00:00
fiddlosopher
533dd14f98 Man writer: properly handle headerless tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1881 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-13 03:19:13 +00:00
fiddlosopher
bc31d9fe28 Texinfo writer: fixed headerless tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1880 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-13 03:19:03 +00:00
fiddlosopher
a34afa91ef RST writer: Fixed headerless tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1879 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-11 03:01:27 +00:00
fiddlosopher
ea67219449 MediaWiki writer: fixed headerless tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1878 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-11 03:01:18 +00:00
fiddlosopher
df9d79cb81 RTF writer: fixed headerless tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1877 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-11 03:01:09 +00:00
fiddlosopher
3b9e7f36eb Markdown writer: proper support for headerless tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1876 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-10 07:34:10 +00:00
fiddlosopher
8382de28de HTML writer: Use tbody, thead, and cols in tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1875 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-10 06:19:53 +00:00
fiddlosopher
0cf4652ad6 Docbook writer: handle headerless tables.
In addition, use cols, thead, and tbody.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1874 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-09 04:34:07 +00:00
fiddlosopher
1bc5fc0117 Updated context tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1869 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-07 19:35:47 +00:00
fiddlosopher
9eebaac7cf Updated latex and html table tests for new test case.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1866 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-07 19:35:27 +00:00
fiddlosopher
53ffd82542 Added test case for multiline table wo column headers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1865 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-07 19:35:21 +00:00
fiddlosopher
e9de86de2d Fixed docbook writer for headerless tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1863 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-07 19:35:06 +00:00
fiddlosopher
44bbe5c7de Added test for headerless table.
Updated test cases for latex and html.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1862 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-07 19:34:57 +00:00
fiddlosopher
76e6c071d0 Disallow blank lines in inline code span.
Also added additional test cases for markdown code spans.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1860 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-06 02:42:15 +00:00
fiddlosopher
f5e00c50b8 Markdown reader: Allow footnotes to be indented < 4 spaces.
This fixes a regression.  A test case has been added in testsuite.txt.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1859 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-01 22:37:06 +00:00
fiddlosopher
50583e9e3f LaTeX template: redefine labelwidth when using enumerate package.
Otherwise the list labels (numbers) often extend past the left
margin, which looks bad.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1858 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-01 22:24:19 +00:00
fiddlosopher
77ba3429e2 Allow multi-line titles and authors in meta block.
Based on a patch by Justin Bogner.

Titles may span multiple lines, provided continuation lines
begin with a space character.

Separate authors may be put on multiple lines, provided
each line after the first begins with a space character.
Each author must fit on one line. Multiple authors on
a single line may still be separated by a semicolon.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1854 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-28 11:21:19 +00:00
fiddlosopher
36675bd206 Added accessors (docTitle, docAuthors, docDate) to Meta type.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1853 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-28 08:13:48 +00:00
fiddlosopher
76ab88807e RST reader: Improved grid tables.
+ Table cells can now contain multiple block elements, such
  as lists or paragraphs.
+ Table parser is now forgiving of spaces at ends of lines.
+ Added test cases.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1852 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-27 20:39:21 +00:00
fiddlosopher
f2552cf382 Mediawiki writer: Don't print a "== Notes ==" header before references.
This is too English-centric. Writers can provide their own
header at the end of the document.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1850 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-27 03:57:24 +00:00
fiddlosopher
9089e54880 Promoted mediawiki headers.
= head = is now level 1, == head == level 2, etc.
This seems to be correct; it's only by convention that
wikipedia articles have level 2 headers at most.

Patch due to Eric Kow.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1849 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-27 03:57:11 +00:00
fiddlosopher
432b7b2390 Reformatting and comments in RunTests.hs. (Eric Kow)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1848 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-27 03:57:03 +00:00
fiddlosopher
07ae5bc264 Markdown reader: properly escape URIs.
+ Resolves Issue #220.
+ Added escapeURI function to Markdown reader. This escapes
  links in a way that makes sense for markdown.  If they've
  used URI escapes like %20 in their link, these will be preserved.
  But if they've used a special character or space without escaping
  it, it will be escaped. This should make sense in most cases.
+ Previously pandoc collapsed adjacent spaces and replaced these
  sequences of spaces with + characters.  That isn't correct for
  a URI path (+ is to be used only in the query part).  We've also
  removed the space-collapsing behavior.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1847 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-27 03:06:39 +00:00
fiddlosopher
e3ea078b26 Set LANG to a UTF-8 locale in RunTests.hs.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1844 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-21 16:47:33 +00:00
fiddlosopher
b165e4c50c No longer need to set 'HOME' in RunTests.hs.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1843 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-21 16:47:28 +00:00
fiddlosopher
f9c690849e Added tests/tables-rst-subset.native, part of RST tables patch.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1841 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-21 16:39:08 +00:00
fiddlosopher
c6b34574bf Incomplete support for RST tables (simple and grid).
Thanks to Eric Kow.
Note TODO for future improvement in RST reader code comments.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1840 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-20 08:30:34 +00:00
fiddlosopher
d0879bcc13 Fixed RunTests so it doesn't require data files to have been installed.
The trick:  use 'pandoc --data-dir ..'

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1810 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-14 05:54:44 +00:00
fiddlosopher
b4925d08c6 LaTeX template: always include hyperref package.
It is used not just for links but for toc, section heading bookmarks,
footnotes, etc.

Also added unicode=true on hyperref options.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1795 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-05 08:35:55 +00:00
fiddlosopher
a5110bec7b Latex template: only show \author if there are some...
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1789 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-02 21:05:10 +00:00
fiddlosopher
68f06c91c3 Removed entities from opendocument writer test.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1772 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-01 04:12:16 +00:00
fiddlosopher
b526dfb438 Removed entities from mediawiki writer test.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1771 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-01 04:12:11 +00:00
fiddlosopher
c7149d317f Docbook writer: use unicode instead of entities.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1769 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-01 04:12:00 +00:00
fiddlosopher
87c66d4623 Finished converting HTML writer to use unicode instead of entities.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1767 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-01 04:11:48 +00:00
fiddlosopher
bdd448ea2c LaTeX writer: Only require listings package if needed.
That is, if literate Haskell code is used.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1759 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 21:18:36 +00:00
fiddlosopher
9c48ee2ad2 Removed unneeded import from RunTests.hs
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1752 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 16:48:45 +00:00
fiddlosopher
709de16223 Use UTF8 instead of entities in HTML.
Resolves Issue #163.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1744 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 02:06:52 +00:00
fiddlosopher
e620eab478 HTML footnotes: put anchor inside sup, instead of other way.
Resolves Issue #191.  Thanks to infinity0x for suggesting.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1743 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:47:08 +00:00
fiddlosopher
6bab230357 Updated lhs tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1741 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:18:35 +00:00
fiddlosopher
f9408319d9 Updated latex writer tests to conform to recent changes.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1740 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:18:27 +00:00
fiddlosopher
b867109830 Modified mediawiki writer to use new templates.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1736 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:17:55 +00:00
fiddlosopher
3f53d6f270 Updated texinfo writer to use new templates.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1735 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:17:45 +00:00
fiddlosopher
cc6294c4f2 Modified RTF writer to use new templates.
Also changed treatment of multiple authors: they now occupy
multiple paragraphs rather than using a line break.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1734 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:17:36 +00:00
fiddlosopher
87537c3ff8 Revised man writer to use new templates.
Note that now the "--after-body" will come after the "AUTHORS"
section, whereas before it would come before it.  This is a
slight break from backwards compatibility.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1733 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:17:27 +00:00
fiddlosopher
e0ab935353 Opendocument writer: support new templates.
Also, don't generate unneeded style declarations.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1731 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:17:12 +00:00
fiddlosopher
7dc43d3684 Updated docbook writer to use new templates.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1728 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:16:44 +00:00
fiddlosopher
54dda0ff9e Markdown reader: use ; as separator between authors.
This allows you to use ',' within author names:
e.g. "John Jones, Jr."

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1726 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:16:27 +00:00
fiddlosopher
312d9337b9 Improved RST writer.
Updated test suite.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1725 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:16:19 +00:00
fiddlosopher
16f0604bec Use separate title, author, date variables in markdown template.
This allows us to simplify the writer code and gives the
user more control.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1719 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:15:24 +00:00
fiddlosopher
d35f34fb44 Fixed RST writer to use new templates.
Use stHasMath instead of stIncludes.

This gives the user more control over how the math
directive is defined.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1715 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:14:57 +00:00
fiddlosopher
22dcf7afdd Tweaked templates and tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1711 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:14:27 +00:00
fiddlosopher
3d8cccc7e3 Fixed spacing in latex, context templates.
Minor fixes in latex, context tests.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1707 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:13:56 +00:00
fiddlosopher
43d5e3d279 HTML writer changes for templates.
Note:  now a single meta tag is used for multiple authors.
Previously one tag per author was used.

Fixed title in HTML template to avoid excess blank space.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1703 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:13:26 +00:00
fiddlosopher
3ec8772daf Changed Meta author and date types to Inline lists instead of Strings.
Meta [Inline] [[Inline]] [Inline] rather than
Meta [Inline] [String] String.

This is a breaking change for libraries that use pandoc and
manipulate the metadata.

Changed .native files in test suite for new Meta format.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1699 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:12:44 +00:00
fiddlosopher
4b0e39fd02 Add legacy-header to LaTeX template.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1680 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:09:43 +00:00
fiddlosopher
2033da8e47 Revised LaTeX writer to use templates.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1675 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:08:56 +00:00
fiddlosopher
d86c01795f Changed RunTests.hs to use the Diff library.
Previously a copy of Diff.hs was included.  But it is better
to use the compiled, installed version, since speed can be
a problem in some cases.

This change means that 'cabal test' presupposes that the Diff
library is installed.

Removed tests/Diff.hs from cabal file.

Changed RunTests to use local environment.
We need at least HOME, so pandoc can find its data directory.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1672 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:08:30 +00:00
fiddlosopher
0543698895 Don't print raw HTML in man output.
Resolves Issue #183.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1657 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-07 23:34:54 +00:00
fiddlosopher
5082b5411b Improved syntax for markdown definition lists.
Definition lists are now more compatible with PHP Markdown Extra.
Resolves Issue #24.

+ You can have multiple definitions for a term (but still not
  multiple terms).
+ Multi-block definitions no longer need a
  column before each block (indeed, this will now cause
  multiple definitions).
+ The marker no longer needs to be flush with the left margin,
  but can be indented at or two spaces.  Also, ~ as well as :
  can be used as the marker (this suggestion due to David
  Wheeler.)
+ There can now be a blank line between the term and
  the definitions.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1656 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-07 08:26:53 +00:00
fiddlosopher
de38adc7f3 Docbook writer: add ids to sections. Use link for internal links.
See Issue #60.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1651 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-05 18:26:29 +00:00
fiddlosopher
8671bc5a1b Markdown reader: Treat a backslash followed by a newline as hard linebreak.
Resolves Issue #154.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1646 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-05 05:33:24 +00:00
fiddlosopher
93d202cbd1 Markdown reader: Use + rather than %20 for spaces in URLs.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1633 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-29 19:31:50 +00:00
fiddlosopher
98ff6b2fd0 Better looking simple tables. Resolves Issue #180.
* Markdown reader: simple tables are now given column widths of 0.

* Column width of 0 is interpreted as meaning: use default column width.

* Writers now include explicit column width information only
  for multiline tables.  (Exception:  RTF writer, which requires
  column widths.  In this case, columns are given equal widths,
  adding up to the text width.)

* Simple tables should now look better in most output formats.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1631 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-28 03:22:33 +00:00
fiddlosopher
39f6af5de4 Modified html+lhs output to use 'haskell' highlighter.
The bird tracks are added in the highlighting module.
This makes sense, because the kate's haskell highlighter
is much better than the literateHaskell highlighter.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1620 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-21 04:40:59 +00:00
fiddlosopher
9d20eeb019 Support for "..code-block" directive in RST reader.
Not core RST, but used in Sphinx for code blocks annotated with
syntax information.  Thanks to Luke Plant for the patch.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1619 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-17 03:36:04 +00:00
fiddlosopher
fce48c392a Specially mark code blocks that were "literate" in the input.
They can then be treated differently in the writers.  This allows
authors to distinguish bits of the literate program they are writing
from source code examples, even if the examples are marked as
Haskell for highlighting.

Resolves Issue #174.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1618 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-03 06:50:17 +00:00
fiddlosopher
683b8e10b5 Set utf-8 encoding in texinfo headers.
Resolves Issue #153.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1617 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-01 02:48:20 +00:00
fiddlosopher
eb2e560d86 Properly handle commented-out list items in markdown.
Example:
- a
<!--
- b
-->
- c

Resolves Issue #142.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1615 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-01 02:38:15 +00:00
fiddlosopher
7163a044a4 Fix inline math parser so that \$ is allowed in math.
Resolves Issue #169.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1609 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-10-12 03:40:47 +00:00
fiddlosopher
f9ec6797bd Changed escapes in markdown writer.
- >, not <, is escapable in standard markdown.!
- also # is now escaped
- Partiall resolves Issue #96.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1600 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-07-18 19:15:42 +00:00
fiddlosopher
7e8ea0ae74 Fixed lhs test cases.
+ Changed Setup.hs in accord with change in '--version'
  output.
+ Changed lhs test cases in accord with change in
  the way HTML headers are written (they are now put
  in divs, and the id is put on the div rather than the
  header itself).

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1588 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-07-03 03:05:29 +00:00
fiddlosopher
32f357c110 RST reader: Allow # to continue list...
...even if the list was started with an explicit
marker.  For example:

    A.  my list
    #.  continued

Resolves Issue #140.  Test case also added.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1584 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-06-28 01:38:40 +00:00
fiddlosopher
313405f59a Allow continuation lines in line blocks.
Also added test cases for line blocks for RST reader.
Resolves Issue #149.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1583 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-06-25 02:01:41 +00:00
fiddlosopher
a0da2816bd Man writer: break lines at end of each sentence.
groff expects this and treats . and ? differently when
followed by line ending as opposed to ordinary space.

Also, don't escape periods.  Instead, use zero-width character
\& to avoid unwanted interpretation of periods at start of line.

Resolves Issue #148.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1580 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-06-06 21:27:46 +00:00
fiddlosopher
ab100f7c5e Markdown reader: improved efficiency of abbreviation parsing.
Instead of a separate abbrev parser, we just check for abbreviations
each time we parse a string.  This gives a huge performance boost
with -S.  Resolves Issue #141.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1570 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-30 04:39:45 +00:00
fiddlosopher
df5244fd48 HTML writer: wrap sections in divs. Resolves Issue #70.
+ hierarchicalize has been rationalized; it builds a hierarchical
  representation of the document from the headers, and simultaneously
  gives each section a unique identifier based on the heading title.
+ Identifiers are now attached to the divs rather than
  to the headers themselves.
+ Table of content backlinks go to the beginning of the table, rather
  than to the section reference that was clicked.  This seems better.
+ Code for constructing identifiers has been moved to Text.Pandoc.Shared
  from the HTML writer, since it is now consumed only by
  hierarchicalize.
+ In --strict mode, pandoc just prints bare headings, as before
  (unless --toc has been specified).
+ In s5 output, it does not wrap sections in divs, as that seems to
  confuse the s5 javascript.
+ Test suite updated accordingly.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1562 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-25 00:29:58 +00:00
fiddlosopher
a39865af03 Check to see if highlighting supported and run lhs tests if it is.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1542 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-14 16:25:39 +00:00
fiddlosopher
1a15c46eef Only run lhs tests if 'lhs' argument passed to RunTests.hs.
Reason:  these tests assume highlighting support has been
compiled in.  So, to avoid unexpected failures, we shouldn't
run them by default.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1541 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-14 16:10:19 +00:00
fiddlosopher
6033ea729c Updated test suites: regular paragraph before block quote.
Note:  rst writer doesn't handle block quote after code block
properly.  Ideally it would insert an empty comment to reset
indentation.  But this is not desirable in general before
code blocks.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1540 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-14 04:08:18 +00:00
fiddlosopher
0d2439949e Added lhs reader tests. (One case fails.)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1539 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-14 04:08:06 +00:00
fiddlosopher
7955c44cb3 Added tests for lhs writers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1537 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-07 19:20:49 +00:00
fiddlosopher
9b27f59fc2 Gobble space after Plain blocks containing only raw html inline.
Otherwise following header blocks are not parsed correctly,
since the parser sees blank space before them.  Resolves
Issue #124.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1534 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-31 18:30:44 +00:00
fiddlosopher
ed58846497 Fixed bug in mediawiki writer: improper closing tags in tables.
<th> instead of </th>, <td> instead of </td>.
Thanks to Benct Philip Jonsson for reporting the bug.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1524 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24 19:59:00 +00:00
fiddlosopher
751aa15abc Fixed problems in RST and markdown output due to bug in pretty-1.0.1.0
+ Added hang' function to Text.Pandoc.Shared; this will be used instead
  of hang, which doesn't work properly in pretty-1.0.1.0.  When pretty
  is upgraded, we can go back to hang.
  See  http://article.gmane.org/gmane.comp.lang.haskell.general/16687
+ Use hang' (and some different techniques) in RST and markdown writers.
  Some output is now a bit different.
+ Modify test suites accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1515 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-12-17 15:34:25 +00:00
fiddlosopher
9ff729fc1e Added new listings include to LaTeX writer test.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1514 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-12-17 15:34:11 +00:00
fiddlosopher
22549e19c6 Fixed parsing of RST comment blocks.
Modified 'unknown directive' in RST reader.
Added RST reader tests for comment blocks.
Resolves Issue #86 and Debian Bug#500662.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1484 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-11-06 16:49:45 +00:00
fiddlosopher
412315b530 Markdown reader: Allow blank space at end of horizontal rules.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1480 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-11-01 22:58:44 +00:00
fiddlosopher
a24d107e6f Support horizontal rules in OpenDocument and ODT writers.
Added style for Horizontal_20_Rule to odt-styles/styles.xml.
Add support for horizontal rules in OpenDocument writer.
Resolves Issue #95.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1479 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-11-01 22:44:53 +00:00
fiddlosopher
0e4eb83749 Markdown reader: cleaner handling of spaces in URLs.
Consecutive spaces are now collapsed into one %20, and
final spaces are removed.  Also, a test case has been added.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1477 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-11-01 21:05:33 +00:00
fiddlosopher
5b422262d3 Include classes on tr elements in HTML output: "header", "odd", "even".
This allows tables to be styled with lines in alternating colors.
Resolves Issue #91.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1467 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-10-18 23:14:59 +00:00
fiddlosopher
caadac70cd Adjusted s5.fancy.html in tests/ to conform to new LaTeXMathML policy
(span class="LaTeX").


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1455 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-16 01:39:13 +00:00
fiddlosopher
b422711451 LaTeX reader: minor improvements.
+ parse '{}', if present, after \textless, \textgreater,
  \textbar, \textbackslash, \ldots.
+ Parse unescaped special characters verbatim rather than
  changing them to spaces.  This way arguments of unknown
  commands will appear in braces.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1424 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06 20:45:53 +00:00
fiddlosopher
2127b7d513 Changed Float to Double in definition of Table element.
(Double is more efficient in GHC.)
Truncate width in opendocument output to 2 decimal places.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1418 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06 02:51:44 +00:00
fiddlosopher
a23f8ba5bd Bugs fixed in RunTests.hs:
+ 'r' -> '\r'
+ use a strict version of readFile to make sure file is closed
  and can be removed


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1413 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-23 18:55:08 +00:00
fiddlosopher
2323278576 Modified RunTests.hs to strip out '\r' so it will work on Windows.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1412 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-14 19:54:52 +00:00
fiddlosopher
f53fb554fe Support for display math; changed ASCIIMathML -> LaTeXMathML:
Resolves Issue #47.

+ Added a DisplayMath/InlineMath selector to Math inlines.
+ Markdown parser yields DisplayMath for $$...$$.
+ LaTeX parser yields DisplayMath when appropriate.  Removed
  mathBlock parsers, since the same effect is achieved by the math
  inline parsers, now that they handle display math.
+ Writers handle DisplayMath as appropriate for the format.
+ Changed -m option to use LaTeXMathML rather than ASCIIMathML.
  LaTeXMathML is closer to LaTeX in its display of math, and
  supports many non-math LaTeX environments.
+ Modified HTML writer to print raw TeX when LaTeXMathML is
  being used instead of suppressing it.
+ Removed ASCIIMathML files from data/ and added LaTeXMathML.
+ Replaced ASCIIMathML with LaTeXMathML in source files.
+ Modified README and pandoc man page source.
+ Modified web page.
+ Added --latexmathml option (kept --asciimathml as a synonym
  for backwards compatibility)
+ Modified tests accordingly; added new tests for display math.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1409 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-13 03:02:42 +00:00
fiddlosopher
c8a56a2864 Parse raw ConTeXt environments as TeX in markdown reader.
Resolves Issue #73.

Also made some structural changes to parsing of raw LaTeX environments.
Previously there was a special block parser for LaTeX environments.
It returned a Para element containing the raw TeX inline. This has
been removed, and the raw LaTeX environment parser is now used in the
rawLaTeXInline parser. The effect is exactly the same, except that we
can now handle consecutive LaTeX and ConTeXt environments not separated
by spaces.  This new flexibility is required by the example in
Issue #73:

    \placeformula \startformula
         L_{1} = L_{2}
    \stopformula

API change: The LaTeX reader now exports rawLaTeXEnvironment' (which
returns a string) rather than rawLaTeXEnvironment (which returns a block
element). This is more likely to be useful in other applications.

Added test cases for raw ConTeXt environments to markdown-reader-more.txt.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1405 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-11 07:04:36 +00:00
fiddlosopher
dd2b77d590 Allow newline before URL in markdown link references. Resolves Issue #81.
Added tests for this issue in new "markdown-reader-more" tests.
Changed RunTests.hs to run these tests.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1401 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10 23:26:32 +00:00
fiddlosopher
2fd7da07d4 Man writer: don't escape " as \".
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1399 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10 22:24:57 +00:00
fiddlosopher
5d3d2d79b3 Rewrote test suite so it doesn't depend on perl or unix tools.
+ Replaced old runtests.pl with a Haskell script RunTests.hs.
+ Added Diff.hs module to be used by RunTests.hs instead of unix 'diff'.
+ Added test hook to Setup.hs, so tests may be run from cabal.
+ Changed Makefile's 'test' target to run tests via cabal.
+ Removed old generate.sh.
+ Since we no longer have 'sed' to filter out raw HTML sections
  from the docbook writer test, or raw LaTeX sections from the
  context writer test, we now just include these sections.
  They can be taken out if it is necessary to process the files.
+ Updated latex and context writer tests to remove extra spaces
  after '\\item'
+ Added a markdown table reader test.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1385 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-09 16:51:08 +00:00
fiddlosopher
de0ab263e7 Added opendocument writer tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1377 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-05 22:50:25 +00:00
fiddlosopher
57df7f5eb6 HTML writer: override Text.XHtml's stringToHtml function,
so that characters below 0xff are not converted to numerical entity
references. Also convert '\160' to "&nbsp;". This should aid readability
and editability of the HTML source. It does presuppose that the HTML
will be served as UTF-8.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1338 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-27 03:54:07 +00:00
fiddlosopher
ddaec05d8f Added MediaWiki writer.
+ Added Text/Pandoc/Writers/MediaWiki.hs
+ Added to pandoc.cabal
+ Added to Main.hs and Text/Pandoc.hs exports.
+ Added tests for mediawiki writer & table writer.
+ Added information on MediaWiki writer to README.
+ Added mediawiki markup to list of formats in pandoc(1) man page.
+ Updated debian/control with mediawiki output format.
+ Added mediawiki markup to description in macports portfile.
+ Updated freebsd package description to include mediawiki format.
+ Mention MediaWiki output format in web page index.
+ Added mediawiki demo to website.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1337 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-27 03:25:51 +00:00
fiddlosopher
4725e7b1a7 HTML writer test: use UTF-8 characters rather than entities.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1333 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-23 23:09:47 +00:00
fiddlosopher
7c35c0bc25 Fixed bug in Markdown parser: regular $s triggering math mode.
For example:  "shoes ($20) and socks ($5)."

The fix consists in two new restrictions:
+ the $ that ends a math span may not be directly followed by a digit.
+ no blank lines may be included within a math span.

Thanks to Joseph Reagle for noticing the bug.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1326 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-15 20:41:27 +00:00
fiddlosopher
7447ecc255 Escape '\160' as "&#160;", not "&nbsp;" in XML.
"nbsp" isn't a predefined XML entity.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1303 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-13 16:31:34 +00:00
fiddlosopher
a85dfb83bb Print unicode \160 literally in markdown writer, rather than as &nbsp;.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1299 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-11 02:15:10 +00:00
fiddlosopher
824bb2d22e In smart mode, use nonbreaking spaces after abbreviations in markdown parser.
Thus, for example, "Mr. Brown" comes out as "Mr.~Brown" in LaTeX, and does
not produce a sentence-separating space.  Resolves Issue #75.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1298 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-11 02:14:57 +00:00
fiddlosopher
8ed710bc9d Treat '\ ' in (extended) markdown as nonbreaking space.
Print nonbreaking space appropriately in each writer (e.g. ~ in LaTeX).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1297 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-11 01:24:15 +00:00
fiddlosopher
0fc174ac78 In HTML tests, use decimal entities for everything above 127.
This is how xhtml-3000.2.0.0 works.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1292 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-06-19 19:05:58 +00:00
fiddlosopher
3337b46e30 Use \textsubscr instead of \textsubscript for LaTeX subscript macro.
\textsubscript conflicts with a definition in the memoir class.
Resolves Issue #65.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1280 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-06-08 03:29:09 +00:00
fiddlosopher
cd38d4ae79 Markdown smart typography: Em dashes no longer eat surrounding whitespace.
Resolves Issue #69.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1279 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-06-08 03:20:15 +00:00
fiddlosopher
447efa0f9f Fixed bug in RTF writer:
Extra spaces were being printed after emphasized, boldface, and
other inline elements.  Resolves Issue #64.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1274 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-03-26 21:46:12 +00:00
fiddlosopher
213d30fdf6 Added amsmath package to default LaTeX header. Resolves Issue #48.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1249 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-03-09 03:05:54 +00:00
fiddlosopher
839f77d81e Use style attributes rather than css classes for strikethrough and ordered list styles.
This works better when fragments, rather than standalone documents, are generated.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1245 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-24 18:15:36 +00:00
fiddlosopher
858269dd20 Changes to Texinfo writer:
+ No space between paragraph and following @verbatim (provides more
  pleasing appearance in text formats)
+ Blank line consistently after list environments.
+ Removed deVerb.
+ Use @code instead of @verb for inline code (this solves the character
  escaping problem for texi2dvi and texi2pdf).
+ Modified test suite accordingly.
+ Added Peter Wang to copyright statement (for Texinfo.hs).
+ Added news of Texinfo writer to README.
+ Added Texinfo to list of formats in man page, and removed extra 'groff'.
+ Updated macports with Texinfo format.
+ Updated FreeBSD pkg-descr with Texinfo format.
+ Updated web page with Texinfo writer.
+ Added demos for Texinfo writer.
+ Added Texinfo to package description in debian/control.
+ Added texi & texinfo extensions to Main.hs, and fixed bug in determining
  default output extension.
+ Changed from texinfo to texi extension in web demo.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1244 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-24 05:48:59 +00:00
fiddlosopher
49e0e507b7 Committed novalazy's initial patch for texinfo output,
including tests for texinfo writer.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1243 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-24 05:48:41 +00:00
fiddlosopher
446a964a19 Incorporated templates phase into Setup.hs and improved templates.
+ Removed templates/Makefile and fillTemplates.pl.
+ Removed 'templates' Makefile target.
+ Added postConf hook to Setup.hs that fills the templates.
+ Use compressed javascripts for S5 and ASCIIMathML templates.
+ Revised test suite.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1216 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:20:42 +00:00
fiddlosopher
db0d658e9c Updated test suite to new baseline (but no tests yet for new code block syntax).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1210 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:54 +00:00
fiddlosopher
fa0ab8617a Modified tests for new argument in CodeBlock.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1201 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:18:38 +00:00
fiddlosopher
d3a179cdfc Added \setupitemize[autointro] to ConTeXt header, to prevent orphaned
list introduction lines.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1195 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-23 02:17:59 +00:00
fiddlosopher
0921704d92 Use an interpreted text role to render math in restructuredText.
See http://www.american.edu/econ/itex2mml/mathhack.rst for the
strategy.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1168 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-04 18:59:00 +00:00
fiddlosopher
6c1f9c8e39 Made LaTeX reader properly recognize --parse-raw in rawLaTeXInline.
Updated LaTeX reader test to use --parse-raw.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1160 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-30 02:07:55 +00:00
fiddlosopher
5e65598b9e Use wrappers around Doc elements to ensure proper spacing in ConTeXt writer.
Each block element is wrapped with either Pad or Reg.  Pad'ed elements are
guaranteed to have a blank line in between.  Updated ConTeXt tests.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1158 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-29 09:31:45 +00:00
fiddlosopher
aea6f6802b Removed support for "box-style" block quotes in markdown.
This adds unneeded complexity and makes pandoc diverge further
than necessary from other markdown extensions.
Brought documentation, tests, and debian/changelog up to date.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1141 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-08 19:32:18 +00:00
fiddlosopher
6cfe6c250a Adjusted test suite for footnote changes in LaTeX and ConTeXt writers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1138 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-04 04:14:27 +00:00
fiddlosopher
f8a257589b Updated test suite -- no italics for digits.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1133 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 08:35:24 +00:00
fiddlosopher
c15dfb2cf9 Updated HTML and S5 writer tests for new span tags in math.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1131 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 02:58:07 +00:00
fiddlosopher
d1832da9e1 Added Text.Pandoc.Readers.TeXMath and changed default handling of math.
+ Text.Pandoc.Readers.TeXMath exports readTeXMath, which reads raw TeX
  math and outputs a string of pandoc inlines that tries to render it
  as far as possible, lapsing into literal TeX when needed.
+ Added Text.Pandoc.Readers.TeXMath to pandoc.cabal + ghc66 version.
+ Modified writers so that readTeXMath is used for default HTMl output
  in HTML, S5, RTF, Docbook.
+ Updated README with information about how math is rendered in all formats.
+ Updated test suite.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1129 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 00:36:32 +00:00
fiddlosopher
ac133dcba0 Updated tests with new way of displaying math in HTML (with no enclosing $'s).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1126 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-01 03:11:59 +00:00
fiddlosopher
7ddd01eb3a Modified s5 fancy test to include new ASCIIMathML.js.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1122 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-01 03:11:38 +00:00
fiddlosopher
b008e5d347 Modified writer tests for new Math and TeX output.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1119 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29 08:09:37 +00:00
fiddlosopher
132186e6b0 Revised s5.native test with Math block.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1117 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29 08:09:23 +00:00
fiddlosopher
55b31b708e Fixed small error in testsuite.native.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1116 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29 08:09:20 +00:00
fiddlosopher
dc42600081 Changed tests to use new Math block element.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1111 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29 08:09:04 +00:00
fiddlosopher
f957c6ef32 Changes to testsuite for new \useURL in context writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1088 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-22 18:16:39 +00:00
fiddlosopher
f4a1fa4b8d More improvements to ConTeXt writer:
+ writer options are now in state, so they don't have to be passed as
  a parameter
+ state also keeps track of ordered list level, so the right default
  numbering scheme can be used
+ extra blank line after \stopitemize
+ removed definitions of ltxenum and ltxitem from the preamble
+ both kinds of lists are now generated using \start-stopitemize, with
  appropriate options
+ in the case of bulleted lists, no options need be specified, because
  defaults are given in the preamble
+ test suite updated accordingly


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1084 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-18 01:24:43 +00:00
fiddlosopher
5fa78695bc ConTeXt writer:
+ Don't use \(sub)+subject if header level > 5.
+ Modified tests to conform to new treatment of level 4 and 5 headers.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1083 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-17 23:34:16 +00:00
fiddlosopher
09b57fcf9c Adjusted formatting of LaTeX and ConTeXt footnotes:
- in ConTeXt, % is not needed at end of line before note, since
  space is gobbled.
- beginning of footnote indented four spaces.
- this required an additional parameter in wrappedTeX and
  wrapTeXIfNeeded, in Text.Pandoc.Shared.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1080 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-17 18:42:11 +00:00
fiddlosopher
a487bbb5a9 Updated tests for changes in LaTeX and ConTeXt writers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1073 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-15 03:21:10 +00:00
fiddlosopher
fe684764e6 Reverted back to state as of r1062. The template haskell changes
are more trouble than they're worth.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1064 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-03 23:27:58 +00:00
fiddlosopher
4a841bfc54 Use template haskell to avoid the need for templates:
+ Added library Text.Pandoc.Include, with a template haskell
  function $(includeStrFrom fname) to include a file as a string
  constant at compile time.
+ This removes the need for the 'templates' directory or Makefile
  target.  These have been removed.
+ The base source directory has been changed from src to .
+ A new 'data' directory has been added, containing the ASCIIMathML.js
  script, writer headers, and S5 files.
+ The src/wrappers directory has been moved to 'wrappers'.
+ The Text.Pandoc.ASCIIMathML library is no longer needed, since
  Text.Pandoc.Writers.HTML can use includeStrFrom to include the
  ASCIIMathML.js code directly.  It has been removed.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1063 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-03 22:14:03 +00:00
fiddlosopher
40fa01765b Cleaned up LaTeX footnotes:
+ Footnotes start on a separate line.  A comment % is used
  at the end of the previous line to prevent unwanted spaces.
  This makes footnotes easier to see, delete, and move around.
+ The final } now only appears on a separate line if it needs to
  (i.e. if the note ends with a Verbatim environment).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1061 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-01 17:32:59 +00:00
fiddlosopher
8144c54f82 Improvements to RST reader:
+ Allow field lists to be indented.
+ Parse the contents of field lists instead of treating them as
  raw strings.
+ Represent field lists as definition lists rather than blockquotes.
+ Fixed bug in which metadata would be overridden if the document
  contained more than one field list.
+ Parse fields associated with ..image: blocks, and use the 'alt'
  field, if present, for image alt text and title.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1050 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-13 21:39:17 +00:00
fiddlosopher
ad9603231f Fixed bug in RST reader: previously, code blocks had to be
indented a full tabstop, but RST allows any amount of indentation.
Resolves Issue #27.

+ removed 'variable' parameter from indentedBlock function in
  RST reader, as it is no longer needed
+ updated test suite
+ updated changelog


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1046 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-11 05:50:28 +00:00
fiddlosopher
f8eac5b377 Markdown writer: Don't print title attribute if title is empty.
(This differs from the behavior of Markdown.pl, and agrees with PHP
Markdown.  But John Gruber has indicated that he prefers this behavior.)
Adjusted test suite accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1026 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-18 01:35:50 +00:00
fiddlosopher
9cadf53621 + Fixed bug in RST writer's handling of ordered lists. Previously,
list items with multiple lines would not always line up with single-line
  list items.  Now, list items are nested the length of the list marker + 1.
  This looks better and ensures that list items all line up.  (Note that
  list markers are padded to the length of the longest list marker in the
  series.)
+ Use 3-space indent for unordered lists.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1013 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-10 23:44:21 +00:00
fiddlosopher
2ea3e94957 Added xmlns attribute to html element in html writer tests.
This attribute is added by more recent versions of the
xhtml library, including the one that comes with GHC 6.6.1.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1003 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-03 03:02:01 +00:00
fiddlosopher
f6043ef7bf Added separate latex reader and native reader tests;
removed round-trip tests.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@986 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-01 20:54:39 +00:00
fiddlosopher
7ff2706838 Removed extra blank lines at end of LaTeX writer tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@966 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30 22:49:41 +00:00
fiddlosopher
18f150c020 Modified latex writer tests for new latex writer using prettyprinter.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@963 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30 20:34:24 +00:00
fiddlosopher
902d6c7115 Fixed bug in LaTeX writer: autolinks would not cause
'\usepackage{url}' to be put in the document header.
Also, changes to state in enumerated list items would be
overwritten.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@947 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 00:03:45 +00:00
fiddlosopher
f609755cb6 Fixed bug in LaTeX writer. When a footnote ends with a Verbatim
environment, the close } of the footnote needs to occur on the same
line or an error occurs.  Fixed by adding a newline before the close }
in every footnote.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@897 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-25 18:17:01 +00:00
fiddlosopher
3de1f19b43 Removed incorrect "{}" around style information in
HTML tables.  Adjusted test suite accordingly.  Column
widths now work properly in HTML.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@882 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-23 23:20:54 +00:00
fiddlosopher
f11360f50e Added new rule for enhanced markdown ordered lists: if the list marker
is a capital letter followed by a period (including a single-letter
capital roman numeral), then it must be followed by at least two spaces.
The point of this is to avoid accidentally treating people's initials as
list markers: a paragraph may begin:

    B. Russell was an English philosopher.

and this shouldn't be treated as a list.

Modified Markdown reader and README documentation.
Added a test case.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@880 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-23 04:25:09 +00:00
fiddlosopher
e48f046aa0 + Fixed bug in markdown ordered list parsing. The problem was
that anyOrderedListStart did not check for a space following the
  ordered list marker. So, 'A.B. 2007' would be parsed as a list item,
  then fail because of the lack of space after 'A.' (required by
  orderedListStart). Resolves Issue #22.
+ Fixed a similar problem in RST reader.
+ Added regression test.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@861 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-18 15:26:29 +00:00
fiddlosopher
e814a3f6d2 Major change in the way ordered lists are handled:
+ The changes are documented in README, under Lists.
+ The OrderedList block element now stores information
  about list number style, list number delimiter, and
  starting number.
+ The readers parse this information, when possible.
+ The writers use this information to style ordered
  lists.
+ Test suites have been changed accordingly.

Motivation:  It's often useful to start lists with
numbers other than 1, and to have control over the
style of the list.

Added to Text.Pandoc.Shared:
+ camelCaseToHyphenated
+ toRomanNumeral
+ anyOrderedListMarker
+ orderedListMarker
+ orderedListMarkers

Added to Text.Pandoc.ParserCombinators:
+ charsInBalanced'
+ withHorizDisplacement
+ romanNumeral

RST writer:
+ Force blank line before lists, so that sublists will be handled
  correctly.

LaTeX reader:
+ Fixed bug in parsing of footnotes containing multiple paragraphs,
  introduced by use of charsInBalanced.  Fix: use charsInBalanced'
  instead.

LaTeX header:
+ use mathletters option in ucs package, so that basic unicode Greek
  letters will work properly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@834 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-08 02:43:15 +00:00
fiddlosopher
271c3f987e Use \url{} for autolinks in LaTeX writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@832 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-03 22:14:32 +00:00
fiddlosopher
de72aea6b4 Brought test suite up to date.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@828 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 19:15:30 +00:00
fiddlosopher
0928f650b1 Updated testsuite.native - autolinks should have the
URL in Code, not Str.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@812 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 02:42:14 +00:00
fiddlosopher
06208f4e25 LaTeX writer tests updated,
+ for new handling of verbatim environments
+ for change from textwidth to columnwidth in table output
  (so that tables look right in columnar output)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@811 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 02:32:28 +00:00
fiddlosopher
4283ce3662 Use ` as default character for \verb in LaTeX output.
If ` is in the content to be escaped, another symbol
will be used as before.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@806 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-27 22:52:11 +00:00
fiddlosopher
453dc53457 Fixes in LaTeX writer:
+ put \VerbatimFootnotes right before \title block, to avoid
  bad interactions.
+ added deVerb in description list.
+ removed \texttt{} from deVerb, because it cannot go in description
  lists.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@802 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-26 03:15:35 +00:00
fiddlosopher
831fe2c6cf Modified fancy s5 test in light of asciiMathML changes.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@798 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-26 02:17:30 +00:00
fiddlosopher
6a6b1a5842 Added support for definition lists to RST reader.
Added a relevant test to the test suite.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@782 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 01:35:03 +00:00
fiddlosopher
f69d9efc83 Added definition list support to HTML reader.
Added a test for definition lists to the html-reader test suite.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@781 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 01:21:21 +00:00
fiddlosopher
c1c30a7664 Updated RST reader test.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@778 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 21:32:26 +00:00
fiddlosopher
c9e89e1793 Updated test suite for writers, adding tests for
strikeout, superscript, subscript.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@766 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 18:49:23 +00:00
fiddlosopher
437ad4089e Updated latex writer test because of new system for
writing the preamble.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@761 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 16:30:29 +00:00
fiddlosopher
e80e2ee077 Fixed newline issue at end of man page writer test.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@760 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 16:27:52 +00:00
fiddlosopher
808ff29d19 Changed /hfil/break to /crlf in ConTeXt writer test suite.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@759 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 16:19:59 +00:00
fiddlosopher
9f38f9d039 Man writer:
+ Make sure to include "" if no section is specified
  in a man page TH line.
+ Updated man writer tests.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@758 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 16:17:20 +00:00
fiddlosopher
c14082cab2 Modified the test of a link containing an underscore in
both the label and the URL.  The underscore must be
backslash-escaped.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@730 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15 23:54:02 +00:00
fiddlosopher
ad0d4bf41e Changes to ConTeXt test suite.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@726 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15 17:04:37 +00:00
fiddlosopher
465b2d791e Merged branches/context: addition of a ConTeXt writer
<http://www.pragma-ade.nl/>.
+ Text.Pandoc.Writers.ConTeXt added.
+ Text.Pandoc modified to export the basic ConTeXt writer.
+ Main.hs modified to recognize 'context' as a writer.
+ ConTeXtHeader added to headers
+ DefaultHeaders.hs template modified to include ConTeXt header
+ Tests added (writer.context, tables.context), and runtests.pl
  modified to run them
+ pandoc.cabal updated to include Text.Pandoc.Writers.ConTeXt. 


git-svn-id: https://pandoc.googlecode.com/svn/trunk@716 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15 02:56:34 +00:00
fiddlosopher
a786f43e8c Change to footnotes in HTML writer: Instead of putting the footnote
backlink on a line by itself, after the content of the note,
we now put it at the end of the last paragraph of the footnote.
This saves space and looks better.  More specifically:
+ If the last block of the note is a Para or Plain block, the
  backlink is put at the end of that block's contents.
+ Otherwise, the backlink is put in a separate Plain block by
  itself, after the footnote's contents. 


git-svn-id: https://pandoc.googlecode.com/svn/trunk@697 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-14 03:37:41 +00:00
fiddlosopher
17caba2ffc Added a test case with an inline link containing bracketed text.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@667 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 06:59:13 +00:00
fiddlosopher
5b2868add9 Minor cosmetic changes to runtests.pl ("passed" in
lowercase, to distinguish more clearly from "FAILED").


git-svn-id: https://pandoc.googlecode.com/svn/trunk@666 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 06:58:41 +00:00
fiddlosopher
8bbd11bf21 + Cleaned up runtests.pl. Incorporated table tests in loop with
main writer tests.
+ Renamed tables.tex to tables.latex, tables.db to tables.docbook,
  for consistency with the writer tests.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@661 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 02:19:15 +00:00
fiddlosopher
69072efc00 Text.Pandoc.Blocks:
+ Fixed a bug in hPad, which previously padded the rightmost
  cell.  This is fixed by introducing a case for a singleton
  list.
+ Fixed Markdown writer so that the space after a table is not
  nested two spaces.
+ Adjusted Markdown table tests accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@660 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 01:36:53 +00:00
fiddlosopher
0ceb538ecd Markdown writer:
Fixed a small problem with lengths of dashed lines in tables.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@659 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 01:24:49 +00:00
fiddlosopher
2d4a22d0be Regularized the scheme for unique header identifiers in HTML writer:
- punctuation is now all removed (except -)
 - spaces are turned into -
 - all lowercase
This scheme should be fairly predictable.
Updated tests accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@655 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 17:33:03 +00:00
fiddlosopher
497a1b7815 Changes to tests to accommodate r653.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@654 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 17:09:37 +00:00
fiddlosopher
e58a55eb41 LaTeX writer:
+ Leave extra blank line after \maketitle
+ Insert \tableofcontents if --toc option was selected

Test suite:
+ extra blank line after \maketitle in writer.latex


git-svn-id: https://pandoc.googlecode.com/svn/trunk@649 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:48:07 +00:00
fiddlosopher
5b68993a3e Added tests for man writer to runtests.pl.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@647 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:39:24 +00:00
fiddlosopher
4e81ef28ed Added version of test suite for man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@645 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:38:14 +00:00
fiddlosopher
3f3c29f9a4 Added test suites for RST, markdown, and man tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@642 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:11:26 +00:00
fiddlosopher
766dbb9899 Updated tests to account for changes in HTML writer (identifiers).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@641 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:09:26 +00:00
fiddlosopher
8e1f484353 Added table tests for all writers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@639 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 22:50:12 +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
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
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
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
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
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
402016df28 Fixed bug in noscript part of email obfuscation:
& instead of &amp;


git-svn-id: https://pandoc.googlecode.com/svn/trunk@557 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-04 07:40:22 +00:00
fiddlosopher
463a0e5c3e Changes to test suite for new XHTML output.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@550 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-02-27 07:05:11 +00:00
fiddlosopher
8e0ad5a006 Cleaned up handling of embedded quotes in link titles.
Now these are stored as a '"' character, not as '&quot;'.
The function escapeLinkTitle in the Markdown writer is
unnecessary and was removed.  Tests modified accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@517 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-27 22:45:14 +00:00
fiddlosopher
141affdb51 More changes in entity handling: Instead of using entities for characters
above 128 in HTML and Docbook output, we now just use unicode.  After all,
we're declaring UTF-8 content in the header.  This makes the HTML and
docbook files produced by pandoc much more readable and editable.

Changes to Entities.hs:
+ Removed specialCharToEntity
+ Added escapeSGMLChar (which just escapes the basic four, <>&")
+ Modified encodeEntities and stringToSGML to use escapeSGMLChar
+ Removed encodeEntitiesNumerical
+ Rewrote encodeEntities for better performance
+ Rewrote stringToSGML for better performance 



git-svn-id: https://pandoc.googlecode.com/svn/trunk@516 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-27 22:13:11 +00:00
fiddlosopher
d06417125d Changes in entity handling:
+ Entities are parsed (and unicode characters returned) in both
  Markdown and HTML readers.
+ Parsers characterEntity, namedEntity, decimalEntity, hexEntity added
  to Entities.hs; these parse a string and return a unicode character.
+ Changed 'entity' parser in HTML reader to use the 'characterEntity'
  parser from Entities.hs.  
+ Added new 'entity' parser to Markdown reader, and added '&' as a 
  special character.  Adjusted test suite accordingly since now we 
  get 'Str "AT",Str "&",Str "T"' instead of 'Str "AT&T"..
+ stringToSGML moved to Entities.hs.  escapeSGML removed as redundant,
  given encodeEntities.
+ stringToSGML, encodeEntities, and specialCharToEntity are given a
  boolean parameter that causes only numerical entities to be used.
  This is used in the docbook writer.  The HTML writer uses named
  entities where possible, but not all docbook-consumers know about
  the named entities without special instructions, so it seems safer
  to use numerical entities there.
+ decodeEntities is rewritten in a way that avoids Text.Regex, using
  the new parsers.
+ charToEntity and charToNumericalEntity added to Entities.hs.
+ Moved specialCharToEntity from Shared.hs to Entities.hs.
+ Removed unneeded 'decodeEntities' from 'str' parser in HTML and
  Markdown readers.
+ Removed sgmlHexEntity, sgmlDecimalEntity, sgmlNamedEntity, and
  sgmlCharacterEntity from Shared.hs.
+ Modified Docbook writer so that it doesn't rely on Text.Regex for
  detecting "mailto" links.



git-svn-id: https://pandoc.googlecode.com/svn/trunk@515 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-27 03:04:40 +00:00
fiddlosopher
ca6cb23f23 Modified Markdown writer to use autolinks when possible.
So, instead of [site.com](site.com) we get <site.com>.
Changed test suite accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@508 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-24 19:06:30 +00:00
fiddlosopher
96919a6ac5 More smart quote bug fixes:
+ LaTeX writer now handles consecutive quotes properly:
  for example, ``\,`hello'\,''
+ LaTeX reader now parses '\,' as empty Str
+ normalizeSpaces function in Shared now removes empty Str elements
+ Modified tests accordingly


git-svn-id: https://pandoc.googlecode.com/svn/trunk@506 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-24 08:14:43 +00:00