Commit graph

816 commits

Author SHA1 Message Date
John MacFarlane
2894df7b76 Added test for one column table in LaTeX. 2012-03-19 08:29:19 -07:00
John MacFarlane
60fb915351 Use {} around ctable caption. Closes #445. 2012-03-12 11:06:49 -07:00
John MacFarlane
95b0f28831 Updated tests for euro-related template changes. 2012-03-07 13:29:03 -08:00
John MacFarlane
210d186f9c Updated tests for context template changes. 2012-03-03 08:38:40 -08:00
John MacFarlane
8a218dc0d5 Fixed LaTeX writer tests for last patch. 2012-03-03 06:34:38 -08:00
François Gannaz
661c6c12e9 Added tests for markdown-extra tables
A few simple tests for the tables as php-markdown defines them.
Only tables whose lines begin with a "|" are tested.
2012-02-21 21:59:09 +01:00
John MacFarlane
f59e33dd1a LaTeX reader: Add ", " to suffix...
if it doesn't start w space or punctuation.  Otherwise we
get no space between the year and the suffix in author-date styles.
2012-02-10 21:48:42 -08:00
John MacFarlane
df3f3ddb6e LaTeX reader: use raw latex as fallback for Cites.
This way you can still get the raw latex back, even if you don't
process with citeproc.  Previously, cites were not visible at all
unless you specified --biblio on the command line and converted
them using citeproc, or used --natbib or --biblatex.
2012-02-06 12:42:12 -08:00
John MacFarlane
be8bddcaf3 Improvements to LaTeX reader:
* Handle \ps
* Ignore ignorable commands in a uniform way.
* Handle \P
* handleIncludes skips \verb commands.
2012-02-04 22:28:16 -08:00
John MacFarlane
75485c2f11 Complete rewrite of LaTeX reader.
* The new reader is more robust, accurate, and extensible.
  It is still quite incomplete, but it should be easier
  now to add features.

* Text.Pandoc.Parsing: Added withRaw combinator.

* Markdown reader: do escapedChar before raw latex inline.
  Otherwise we capture commands like \{.

* Fixed latex citation tests for new citeproc.

* Handle \include{} commands in latex.
  This is done in pandoc.hs, not the (pure) latex reader.
  But the reader exports the needed function, handleIncludes.

* Moved err and warn from pandoc.hs to Shared.

* Fixed tests - raw tex should sometimes have trailing space.

* Updated lhs-test for highlighting-kate changes.
2012-02-04 09:56:43 -08:00
John MacFarlane
d4c2f02e08 Updated citation tests with en-dashes. 2012-01-30 10:03:01 -08:00
John MacFarlane
3a0b3df007 Put date in YYYY-MM-DD format if possible for HTML, docx metadata.
Added normalizeDate to Text.Pandoc.Shared.
2012-01-28 15:54:34 -08:00
John MacFarlane
663cfc2fbd Docbook writer: Use sect1, sect2, etc. instead of section. 2012-01-27 11:32:02 -08:00
John MacFarlane
3a8afc119a Depend on highlighting-kate 0.5.
This uses styleToCss instead of styleToHtml.
2012-01-25 11:29:42 -08:00
John MacFarlane
ba81cda7f1 Added Docx writer.
* New module `Text.Pandoc.Docx`.
* New output format `docx`.
* Added reference.docx.
* New option `--reference-docx`.

The writer includes support for highlighted code blocks
and math (which is converted from TeX to OMML using
texmath's new OMML module).
2012-01-19 12:10:49 -08:00
John MacFarlane
83bb1de3f5 Improved citation tests. 2012-01-13 00:02:38 -08:00
John MacFarlane
5b7c209373 Markdown reader: Fix parsing of consecutive lists.
Pandoc previously behaved like Markdown.pl for consecutive
lists of different styles. Thus, the following would be parsed
as a single ordered list, rather than an ordered list followed
by an unordered list:

    1. one
    2. two

    - one
    - two

This patch makes pandoc behave more sensibly, parsing this as
two lists.  Any change in list type (ordered/unordered) or in
list number style will trigger a new list. Thus, the following
will also be parsed as two lists:

    1. one
    2. two

    a. one
    b. two

Since we regard this as a bug in Markdown.pl, and not something
anyone would ever rely on, we do not preserve the old behavior
even when `--strict` is selected.
2012-01-02 17:04:59 -08:00
John MacFarlane
da8425598a New treatment of dashes in --smart mode.
* `---` is always em-dash, `--` is always en-dash.
* pandoc no longer tries to guess when `-` should be en-dash.
* A new option, `--old-dashes`, is provided for legacy documents.

Rationale: The rules for en-dash are too complex and
language-dependent for a guesser to work reliably.  This
change gives users greater control.  The alternative of
using unicode isn't very good, since unicode em- and en-
dashes are barely distinguishable in a monospace font.
2012-01-01 13:48:28 -08:00
John MacFarlane
3cf60c7306 Support for math in RST reader and writer.
Inline math uses the :math:`...` construct.

Display math uses

  .. math:: ...

or if multilin

  .. math::

     ...

These seem to be supported now by rst2latex.py.
2011-12-31 11:40:47 -08:00
John MacFarlane
661d0646d0 Updated context tests. 2011-12-30 18:22:09 -08:00
John MacFarlane
3f981022a6 Updated latex tests. 2011-12-30 16:28:33 -08:00
John MacFarlane
83680430b3 Updated ConTeXt tests. 2011-12-30 13:05:04 -08:00
John MacFarlane
a4f719abcf Unicode reference ID in biblio test. 2011-12-29 23:11:25 -08:00
John MacFarlane
6c7bffb544 Updated tests for changes to HTML note back references. 2011-12-29 22:11:14 -08:00
John MacFarlane
ea39a607ed Added 'beamer' as an output format.
Beamer output uses the default LaTeX template, with some
customizations via variables.

Added `writerBeamer` to `WriterOptions`.

Added `--beamer` option to `markdown2pdf`.
2011-12-29 13:26:04 -08:00
John MacFarlane
012405e8c3 Preserve attributes in highlighted HTML.
The container element will have the classes, id, and
key-value attributes you specified in the delimited code
block.

Previously these were stripped off.
2011-12-28 22:04:38 -08:00
John MacFarlane
3122959064 Highlighting: Add language as class name.
This restores behavior of 1.8.2.1. Adjusted tests.
2011-12-27 22:24:31 -08:00
John MacFarlane
70b4ec95e4 Updated tests. 2011-12-27 18:08:06 -08:00
John MacFarlane
a579e2c892 Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings. 2011-12-27 15:45:34 -08:00
John MacFarlane
fca95bf43c Removed highlighting flag. Highlighting support is now standard. 2011-12-22 13:24:43 -08:00
John MacFarlane
1cefff6319 Updated s5 tests. 2011-12-20 11:37:32 -08:00
John MacFarlane
bfa5ca01bc HTML writer: Use <del> for strikeout. 2011-12-18 11:08:04 -08:00
John MacFarlane
8306f6e9c6 Added blank comment after directives in rst template.
Closes #321.
2011-12-04 22:54:47 -08:00
John MacFarlane
bdec07bac9 Shared: Removed unescapeURI, modified escapeURI.
escapeURI now only escapes space characters, leaving unicode characters
as they are, instead of converting them to octets and URL-encoding them,
as before.  This gives more readable URIs.  User agents now do the
percent-encoding themselves.

URIs are no longer unescaped at all on conversion to markdown, asciidoc,
rst, org.

Closes #349.
2011-12-02 19:39:30 -08:00
John MacFarlane
c6456ef8a4 Fixed test for style type meta in highlighted html+lhs. 2011-12-02 19:10:31 -08:00
John MacFarlane
c8333b5d1b Made author/date more consistent in HTML templates.
Authors are now h2, date h3. (Instead of h3/h4, as in the past.)
2011-12-01 18:57:41 -08:00
John MacFarlane
4d5ddbce8b Mardkown writer tests: Use setext headers for levels 1-2. 2011-11-24 11:14:45 -08:00
John MacFarlane
1b6d0f2e1d Changed paths in s5 tests. 2011-11-24 11:13:14 -08:00
John MacFarlane
bea0fdf6e6 AsciiDoc: Don't use Roman numerals in ordered lists.
AsiiDoc doesn't support them.
2011-11-18 21:26:25 -08:00
John MacFarlane
1561d51cc5 Renamed to AsciiDoc. Fixed display math and escapes.
AsciiDoc does not seem to have consistent escaping rules.
2011-11-18 21:09:49 -08:00
John MacFarlane
c552aa24cf Merge branch 'asciidoc' 2011-11-18 19:53:56 -08:00
John MacFarlane
679e94e53d Updated tests for correct col width. 2011-11-18 19:50:45 -08:00
John MacFarlane
4c122be58a Updated asciidoc test.
The test output still contains some mistakes.
2011-11-18 19:46:12 -08:00
John MacFarlane
43c6c1d845 Updated ieee.csl and mhra.csl in test directory. 2011-11-18 13:41:40 -08:00
John MacFarlane
5ba1e92440 Updated chicago-author-date.csl.
The old version did not work properly for edited volumes
with no author.
2011-11-18 13:36:27 -08:00
John MacFarlane
f6a0e75389 Supported tables in asciidoc, added table tests. 2011-11-18 13:19:22 -08:00
John MacFarlane
fc1c17b174 Added an asciidoc writer (partial).
Still TODO:

- documentation in README
- add default.asciidoc to templates/
- lists
- tables
- proper escaping
- footnotes with blank lines - print separately at end?
  currently they are just ignored.
- fix header (date gives weird result on pandoc README)
2011-11-16 19:14:55 -08:00
John MacFarlane
1da1d4ec24 Updated writer tests for new version of texmath. 2011-11-12 13:25:02 -08:00
John MacFarlane
d74e8d14a5 Markdown citations: don't strip off initial space in locator.
Previously `[@item1 and nowhere else]` yielded the locator ", and nowhere
else", or, with the new citeproc-hs, "and nowhere else".
Now it yields " and nowhere else".
2011-11-09 13:18:01 -08:00
John MacFarlane
6a51897f33 Fixed markdown-citations.ieee.txt to use em-dashes for citation ranges.
This is a new feature in citeproc-hs.
2011-11-09 12:57:47 -08:00
John MacFarlane
821286a6f3 Update templates to use Content-Style-Type meta tag.
Closes #337.
2011-11-08 11:54:10 -08:00
John MacFarlane
c335b6cbd8 HTML slides: only add id to div/section if --section-divs selected. 2011-10-02 23:19:03 -07:00
John MacFarlane
072df3f5dd Simplified slide creation in HTML writer.
A horizontal rule now gets transformed into an empty H1 header
before 'hierarchicalize' is called.

If the document that does not begin with an H1 header, an
empty one is provided.

This avoids the need for kludgy raw HTML.

Also, the 'titleslide' class is added to any section containing
just a title:

----

----
2011-10-02 11:49:56 -07:00
John MacFarlane
2c15a876d8 Updated to use revised context template. 2011-08-25 09:39:20 -07:00
John MacFarlane
24095e0615 ConTeXt writer: Changed 'descr' to 'description', fixed alignment. 2011-08-20 15:30:57 -07:00
John MacFarlane
55b3d0f7c3 Fixed ConTeXt writer tests. 2011-08-18 19:29:22 -07:00
John MacFarlane
15eb713e5d Fixed opendocument writer test. 2011-08-18 12:15:55 -07:00
John MacFarlane
cbd0314b1b Changes to tests for new latex templates. 2011-07-30 17:02:49 -07:00
John MacFarlane
44e2dc68ac Updated lhs tests with CDATA. 2011-07-29 20:14:11 -07:00
John MacFarlane
a3327835be Docbook writer: Use programlisting for code blocks.
Instead of screen, as before.
2011-07-24 23:36:30 -07:00
John MacFarlane
07c7cd1945 Docbook writer: Use CALS tables (instead of XHTML tables).
Reason:  Some older docbook software does not work with XHTML
tables.

Closes #77.
2011-07-24 23:24:03 -07:00
John MacFarlane
3162adbd9b HTML writer: Removed English title on footnote back links.
This is incongruous in non-English documents.
2011-07-24 16:24:27 -07:00
John MacFarlane
cb6123a2db Updated s5 tests. 2011-07-24 09:17:06 -07:00
John MacFarlane
12110f3282 HTML writer: Display author and date after title. 2011-07-23 11:26:11 -07:00
John MacFarlane
856f1d2b42 Use different hyperref options for xetex.
This fixes problems with unicode bookmarks on xetex.
Thanks to CircleCode.
2011-07-23 09:54:42 -07:00
John MacFarlane
0defa07c27 LaTeX writer: New template. 2011-07-23 09:44:36 -07:00
John MacFarlane
d611568237 Updated tests for new latex templates. 2011-07-22 13:56:04 -07:00
John MacFarlane
0cf2a631e8 LaTeX writer: Use \texttt and escapes instead of \verb!..!.
\verb is simply too fragile; it doesn't work inside command
arguments.
2011-07-22 12:19:34 -07:00
John MacFarlane
6c029621ed LaTeX reader & writer: Use \and to separate authors.
Closes #279.
2011-07-21 10:09:51 -07:00
John MacFarlane
71736869bb ConTeXt writer: Made \start/stoptyping flush with margin.
This prevents extra blank lines.
2011-07-19 16:29:33 -07:00
John MacFarlane
8fd3d0bdbb LaTeX writer: make verbatim environments flush to avoid extra space.
The indented `\end{verbatim}` was causing an extra blank line in
the output.

Closes #277.
2011-07-19 16:25:01 -07:00
John MacFarlane
b5da7adfb8 Un-URI-escape image filenames in LaTeX, ConTeXt, RTF, Texinfo.
Also do this when copying image files into EPUBs and ODTs.

Closes #263.
2011-07-16 14:19:45 -07:00
John MacFarlane
dd59cd2341 HTML reader: treat Plain as Para when needed.
For example, in

    Just a few glitches remaining.
    <ul><li> In this situation, one loses the list.
    </ul>
    And in this, the preformatting.
   <pre>Preformatted text not starting with its own blank line.
   </pre>

Thansk to Dirk Laurie for noticing the issue.
2011-07-16 09:42:16 -07:00
John MacFarlane
b30afc2009 Merge pull request #273 from qerub/master
Textile reader: Make it possible to have colons after links.
2011-07-11 08:31:29 -07:00
John MacFarlane
b5411c06aa Improved LaTeX tables.
* Use ctable package, which allows footnotes and
  provides additional options.
* Made cell alignments work in multiline tables.
* Closes #272.
2011-07-10 12:33:45 -07:00
Christoffer Sawicki
8fa4e8bff1 Textile reader: Make it possible to have colons after links. 2011-07-10 16:30:14 +02:00
John MacFarlane
cfaa9acd18 Fixed Slidy/S5 output to allow --section-divs.
This is also a cleaner way of inserting the slide divs.
Resolves Issue #296.
2011-04-16 12:16:24 -07:00
John MacFarlane
6beba76f61 Changed uri parser so it doesn't include trailing punctuation.
So, in RST, 'http://google.com.' should be parsed as a link
to 'http://google.com' followed by a period.

The parser is smart enough to recognize balanced parentheses,
as often occur in wikipedia links: 'http://foo.bar/baz_(bam)'.

Also added ()s to RST specialChars, so '(http://google.com)'
will be parsed as a link in parens.

Added test cases.

Resolves Issue #291.
2011-03-18 11:30:20 -07:00
John MacFarlane
d1304e8356 OpenDocument writer: Use "First paragraph" style after most non-para blocks.
(Not just headers, as in the last patch.)
Patch from Andrea Rossato, slightly modified by JM.
2011-03-16 12:35:32 -07:00
John MacFarlane
e24ce1c11d OpenDocument: Use special style for 1st para after heading.
"First paragraph" as opposed to "Text body."  This allows
users to specify e.g. that only paragraphs after the first
paragraph of a section are to be indented.

Thanks to Andrea Rossato for the patch.
Closes github Issue #20.
2011-03-12 13:38:04 -08:00
John MacFarlane
21bd73ddaf Fixed lhs-test.nohl tests.
A previous commit accidentally overwrote them with highlighted tests.
2011-03-04 11:11:01 -08:00
John MacFarlane
84bf846503 LaTeX writer: Changed figure defaults to htbp.
This prevents "too many unprocessed floats."  Resolves
Issue #285.
2011-02-11 19:03:46 -08:00
John MacFarlane
bdf23d3a5d Improved HTML table output (line breaks). 2011-02-04 23:35:10 -08:00
John MacFarlane
bb89fd9959 Updated tests. 2011-02-04 23:09:51 -08:00
John MacFarlane
ce4f9a3787 HTML writer: Spacing adjustments for Plain and RawHtml blocks. 2011-02-04 21:05:48 -08:00
John MacFarlane
90647a56f6 Updated tests for new HTML format.
Verified against old tests using tidy and diff.
2011-02-04 20:38:08 -08:00
John MacFarlane
9f28acba9d Fixed highlighting for inline code.
highlightHtml in Highlighting now has a boolean argument that
selects between inline and block content.

Revised tests for new highlighting-kate.
2011-01-29 16:04:07 -08:00
John MacFarlane
570d8ff08c Moved tests to src. 2011-01-29 11:24:16 -08:00
John MacFarlane
0833daff4a Added Tests.Shared with normalize round-trip tests. 2011-01-29 10:03:24 -08:00
John MacFarlane
18089a44f5 Tests.Arbitrary: don't allow empty list items. 2011-01-29 10:02:12 -08:00
John MacFarlane
e9899b9ab8 Removed intentionally failing test in ConTeXt writer tests. 2011-01-29 09:04:05 -08:00
John MacFarlane
d8c9b0c6f7 Added biblatex citation tests to Tests.Readers.LaTeX.
Removed old biblatex-citations.latex.
2011-01-29 09:01:30 -08:00
John MacFarlane
7961208aaf Added natbib citation tests to Tests.Readers.LaTeX.
Removed old tests/natbib-citations.latex.
2011-01-29 08:47:00 -08:00
John MacFarlane
382564ed9e RTF writer: Embed images when possible.
* Resolves Issue #275.
* PNG and JPEG supported.
* Export rtfEmbedImage.
2011-01-28 08:42:04 -08:00
John MacFarlane
0acf774011 Added Tests.Readers.Markdown. 2011-01-26 22:09:09 -08:00
John MacFarlane
f8dca6ccbc Add support for attributes in inline Code.
Additional related changes:

* URLs in Code in autolinks now use class "url".
* Require highlighting-kate 0.2.8.2, which omits the final <br/> tag,
  essential for inline code.
2011-01-26 20:44:25 -08:00
John MacFarlane
703c421c9e RST reader: Improved field lists.
Field lists now work properly with block content.
(Thanks to Lachlan Musicman for pointing out the bug.)

In addition, definition list items are now always Para instead
of Plain -- which matches behavior of rst2xml.py.

Finally, in image blocks, the alt attribute is parsed properly
and used for the alt, not also the title.
2011-01-26 17:23:57 -08:00
John MacFarlane
066cbbad76 Added RST reader tests. 2011-01-26 17:23:56 -08:00
John MacFarlane
c5384a33c0 Updates for compiling with ghc 7.
We now use a CPP trick to have compatible quasiquotes that
work in both GHC 6.12 and 7.
2011-01-26 17:23:56 -08:00
John MacFarlane
932fc12840 Updated tests. 2011-01-26 17:23:56 -08:00
John MacFarlane
eb26fa6f54 Distinguish latex & context environments; blank line after in writers. 2011-01-26 17:23:56 -08:00
John MacFarlane
bd43c0f4c9 Bumped version to 1.8; depend on pandoc-types 1.8.
The old TeX, HtmlInline and RawHtml elements have been removed
and replaced by generic RawInline and RawBlock elements.

All modules updated to use the new raw elements.
2011-01-26 17:22:53 -08:00
John MacFarlane
5bee388914 Updated textile tests. 2011-01-23 10:18:53 -08:00
John MacFarlane
65a015e74b Added needed space after .bc and .bq.
Otherwise these can trap a </dd>, for example.

Better solution to try next: rewrite using Pretty.
2011-01-23 10:08:11 -08:00
John MacFarlane
16d4366431 Textile writer: Don't escape code in bc. block. 2011-01-23 09:44:28 -08:00
John MacFarlane
38013de857 Textile writer: Don't HTML-escape between @'s. 2011-01-23 09:12:50 -08:00
John MacFarlane
628a1ef815 Textile reader: Fixed bug (swallowed p at beginning of paragraph).
The problem was a missing 'try' in the maybeExplicitBlock parser.
Test case, a paragraph beginning with 'p', has been added.
2011-01-23 08:59:35 -08:00
John MacFarlane
7234a79104 Textile writer: Use <pre> instead of bc.. for code with blank lines.
This has fewer interaction effects.
2011-01-23 08:49:55 -08:00
John MacFarlane
1d683be414 Textile reader: Support <tt> for inline code. 2011-01-23 00:25:05 -08:00
John MacFarlane
50d08ec2c3 Textile reader: Added code blocks with bc. 2011-01-23 00:05:35 -08:00
John MacFarlane
b9356fcc7e Removed deliberate error in LaTeX reader tests. 2011-01-22 16:01:14 -08:00
John MacFarlane
2bea4e3729 Reorganized tests.
The native writer test needs to run before others that depend on it.
2011-01-22 15:54:24 -08:00
John MacFarlane
87aaa7e719 Use ANSI color to point to diffs in test output.
ConTeXt writer bullet list test set to break as an example.
2011-01-22 14:58:32 -08:00
John MacFarlane
91cc03b131 Tests.Helpers: Added file quasiquoter.
This allows you to take expected test output from a file.
2011-01-22 13:54:12 -08:00
John MacFarlane
1fd5e3bcff Tests.Arbitrary: Let strings include any character. 2011-01-22 13:40:29 -08:00
John MacFarlane
5a1abbe7ac Fixed -Wall error in imports. 2011-01-22 13:40:18 -08:00
John MacFarlane
c801f4f621 Put dashed lines around diff results in Old test. 2011-01-22 13:39:59 -08:00
John MacFarlane
373d05601a Added native writer tests. 2011-01-22 12:37:19 -08:00
John MacFarlane
209b300d6a Added 'property' in Tests.Helpers & some quickcheck tests. 2011-01-22 12:18:59 -08:00
John MacFarlane
d86d9260df Tests.Arbitrary: Added instances for Inlines, Blocks. 2011-01-22 12:18:23 -08:00
John MacFarlane
8dcc67a993 ConTeXt writer: Don't add cr at end of inline footnote. 2011-01-22 12:17:39 -08:00
John MacFarlane
15250859c3 Improved test framework.
Now there is a uniform interface for reader and writer tests.
Also added a quasiquoter, for multiline strings.
2011-01-22 10:50:15 -08:00
John MacFarlane
b3c1a89cdf Merge branch 'master' of github.com:jgm/pandoc 2011-01-21 19:55:24 -08:00
John MacFarlane
654c39a7d2 latex template: move special treatment of \sout.
It needs to be inside the if(strikeout) condition, after
the ulem package is imported; otherwise we try to renewcommand{\sout} when
\sout isn't yet defined.
2011-01-21 19:24:00 -08:00
John MacFarlane
d43dbc83f2 More informative output on writer test failure. 2011-01-21 11:02:59 -08:00
John MacFarlane
d0726920db Added Tests.Writers.ConTeXt and helpers for writer tests. 2011-01-21 10:23:41 -08:00
John MacFarlane
5c35be1362 Make sure native output ends in newline with --standalone. 2011-01-21 09:58:23 -08:00
John MacFarlane
e5e2b0f9ab Fixed the two test cases that were intentionally set to fail. 2011-01-20 22:38:16 -08:00
John MacFarlane
52b6e38425 Updated tests for new native format. 2011-01-20 22:36:40 -08:00
John MacFarlane
9a739e30bf Fixed problem with strikout in LaTeX headers with hyperref.
Added a command to the latex template to disable \sout inside
pdf strings.  Thanks to Joost Kremers for the fix.
2011-01-19 11:43:30 -08:00
John MacFarlane
933cdaf4c8 Show Haskell-readable version of input string in test failure. 2011-01-19 09:44:53 -08:00
John MacFarlane
831889bebc Unit tests: On failure, print the input string. 2011-01-19 09:38:14 -08:00
John MacFarlane
608d5bc753 Added normalize in latex reader tests. 2011-01-18 23:37:54 -08:00
John MacFarlane
0502c0fd28 Revamped tests with new =: and =?> operators + builder.
Left in a couple failing tests for demonstration purposes.
2011-01-18 23:34:34 -08:00
John MacFarlane
0cfafdec64 Replaced --no-citeproc with --natbib in tests. 2011-01-16 11:19:52 -08:00
John MacFarlane
a0e19ba8aa Merge branch 'tests' 2011-01-15 09:25:01 -08:00
John MacFarlane
18231a8232 Fixed lhs tests for new position of <title> after <meta>s. 2011-01-15 08:22:41 -08:00
John MacFarlane
9305114b9f LaTeX writer: Escape strings in \href{..}.
Previously strings weren't escaped, so %5D would be interpreted
as a LaTeX comment!
2011-01-14 18:59:50 -08:00
John MacFarlane
dc93073804 Minor code cleanup. 2011-01-14 18:09:16 -08:00
John MacFarlane
0222f367b1 Keep Tests.Arbitrary but remove quickcheck tests for now.
Remove Tests.Shared.
Remove dependency on QuickCheck.
2011-01-14 18:01:57 -08:00
John MacFarlane
09e9a86db9 Merge branch 'master' of github.com:jgm/pandoc into tests 2011-01-14 14:46:48 -08:00
John MacFarlane
81403b8d80 LateX writer: In nonsimple tables, put cells in \parbox.
Otherwise we can get problems with linebreaks, and cell spacing
isn't right.

Thanks to Jef Allbright for pointing out the problem.
2011-01-14 14:45:04 -08:00
John MacFarlane
d41c17a2d5 Added quickcheck tests for normalize in Shared. 2011-01-14 00:30:36 -08:00
John MacFarlane
b3fb541d01 Added Tests/Arbitrary.hs, with Arbitrary instances. 2011-01-13 22:31:04 -08:00
John MacFarlane
10747b7797 Fixed bug in markdown-citations.mhra.txt expected test output.
This failing test was a test suite bug, not a pandoc or citeproc bug.
2011-01-13 14:50:00 -08:00
John MacFarlane
75e8ab25ef Adjusted source to 80-column limit. 2011-01-13 11:11:55 -08:00
John MacFarlane
4ccd30fe3e Moved Tests.Shared -> Tests.Helpers.
Tests.Shared would be the natural place to put tests for functions
in Text.Pandoc.Shared.
2011-01-13 10:59:44 -08:00
John MacFarlane
99c361d2b4 Fixed bug in markdown-citations.mhra.txt expected test output.
This failing test was a test suite bug, not a pandoc or citeproc bug.
2011-01-13 10:58:58 -08:00
Nathan Gass
2dadb67b25 Generalized latexTestWithState to readerTestWithState. 2011-01-12 19:32:26 +01:00
Nathan Gass
daf5444e24 Merge branch 'tests' of github.com:xabbu42/pandoc into tests 2011-01-12 19:13:15 +01:00
Nathan Gass
e61348dc11 Reordered test files. 2011-01-12 19:12:54 +01:00
John MacFarlane
e9f1de639d test diff output: put +/- at beginning of line. 2011-01-12 09:59:06 -08:00
John MacFarlane
3ebfcd0cea Added line numbers to diff output in tests. 2011-01-12 08:29:13 -08:00
John MacFarlane
a2f562719d Updated lhs tests for new positioning of <title>. 2011-01-12 08:17:38 -08:00
John MacFarlane
5da2d1e66c Merge branch 'master' into tests 2011-01-12 08:13:11 -08:00
Nathan Gass
ff74c51b53 Remove some accidentally commited functions. Fixed a type and alignment. 2011-01-12 14:44:32 +01:00
Nathan Gass
ec4deb2532 Added some basic testing infrastructure and some latex reader tests. 2011-01-12 14:16:35 +01:00
Nathan Gass
4f6099f350 Started implementing splitted test suite.
Moved old tests into Old.hs and added new simple test-pandoc.hs for
loading and grouping together tests from different files. Later
commits will add more testfiles to the suite with more modular tests.
2011-01-12 13:11:08 +01:00
John MacFarlane
cf5e8a824f test-pandoc: Improved header for diff output. 2011-01-12 11:36:02 +01:00
John MacFarlane
530e3edc0f test-pandoc: More informative diff output on test failure.
Now the test suite tells you the exact command that was run,
and the file containing the expected output.
2011-01-12 11:35:49 +01:00
John MacFarlane
046c9c7d3b test-pandoc: Relocated --columns=80 to just where it's needed.
We only need it for certain table tests, because of the relative
alignments.
2011-01-12 11:35:44 +01:00
John MacFarlane
51d9d8b674 test-pandoc: Fixed + and - in diff output, which were reversed. 2011-01-12 11:35:40 +01:00
John MacFarlane
715e33705f test-pandoc: More diff-like diffs in case of test failure. 2011-01-12 11:35:34 +01:00
John MacFarlane
eb1d014859 Improvements to test suite.
+ You can now specify glob patterns after 'cabal test';
  e.g. 'cabal test latex' will only run the latex tests.

+ Instead of detecting highlighting support in Setup.hs,
  we now detect it in test-pandoc, by looking to see if
  'languages' is null.

+ We now verify the lhs readers against the lhs-test.native,
  normalizing with 'normalize'.  This makes more sense than
  verifying against HTML, which also brings in the HTML writer.

+ Added lhsn-test.nohl.{html,html+lhs}, so we can do the lhs
  tests whether or not highlighting has been installed.
2011-01-12 11:35:10 +01:00
John MacFarlane
91510a109f Improvements to --html5 support:
+ <nav> for TOC, <figure> for figures, type attribute in <ol>.
+ Don't add math javascript in html5.
+ Use style attributes instead of deprecated width, align.
+ html template: move <title> after <meta>.
  Note: charset needs to be declared before title.
+ slidy and s5 templates: move <title> after <meta>.
+ html template: Added link to html5 shim for IE.
+ Make --html5 have an effect only for 'html' writer (not s5, slidy, epub).
2011-01-11 23:15:30 -08:00
Nathan Gass
3bc0a55af0 Removed outdated comments. 2011-01-11 22:37:41 +01:00
Nathan Gass
e8fa72c6a7 Moved test-pandoc.hs to tests directory. 2011-01-11 21:49:49 +01:00
John MacFarlane
d891b2c29d LaTeX reader: Support simple tables. 2011-01-07 10:15:48 -08:00
John MacFarlane
93c3e27731 pandoc: Add newline to output unless standalone.
This avoids output that does not end with a newline, which
is inconvenient when working with many tools.

Updated tests accordingly.
2011-01-06 21:05:28 -08:00
John MacFarlane
71bedab81c LHS test changes for new wrapping & highlighting-kate version. 2011-01-06 21:04:57 -08:00
John MacFarlane
9ff560036e Fixed lhs-test.markdown for new wrapping. 2011-01-06 16:53:44 -08:00
John MacFarlane
303ce8a9e5 LaTeX reader: allow spaces btw \\begin or \\end and {. 2011-01-06 09:34:24 -08:00
John MacFarlane
3e61333af0 Fixed regression in markdown reader.
'(_hi_)' was being parsed with literal underscores (no emphasis).
The fix:  the 'str' parser now only parses alphanumerics and
embedded underscores.  All other symbols are handled by the
'symbol' parser.  This has a slight effect on the AST, since
you'll get [Str "hi",Str ":"] insntead of [Str "hi:"].  But there
should not be a visible effect in any of the writers.

Thanks to gwern for pointing out the regression.
2011-01-01 22:46:30 -08:00
John MacFarlane
904050fa36 New HTML reader using tagsoup as a lexer.
* The new reader is faster and more accurate.

* API changes for Text.Pandoc.Readers.HTML:
   - removed rawHtmlBlock, anyHtmlBlockTag, anyHtmlInlineTag,
     anyHtmlTag, anyHtmlEndTag, htmlEndTag, extractTagType,
     htmlBlockElement, htmlComment
   - added htmlTag, htmlInBalanced, isInlineTag, isBlockTag, isTextTag

* tagsoup is a new dependency.

* Text.Pandoc.Parsing: Generalized type on readWith.

* Benchmark.hs: Added length calculation to force full evaluation.

* Updated HTML reader tests.

* Updated markdown and textile readers to use the functions from
  the HTML reader.

* Note: The markdown reader now correctly handles some cases it did not
  before. For example:

    <hr/>

  is reproduced without adding a space.

    <script>
      a = '<b>';
    </script>

  is parsed correctly.
2010-12-30 13:55:40 -08:00
John MacFarlane
4bfe140ed1 Made --smart work with HTML reader.
It did not work before, because - and quotes were gobbled
up by the str parser.
2010-12-22 17:05:17 -08:00
John MacFarlane
8e9c490b0a Texinfo writer: Updated to use Pretty. 2010-12-22 11:43:43 -08:00
John MacFarlane
fd07db16e9 Man writer: updated to use Pretty. 2010-12-22 00:22:13 -08:00
John MacFarlane
c904024944 OpenDocument writer: Updated to use Pretty. 2010-12-21 16:59:17 -08:00
John MacFarlane
ebdbb06f94 Docbook writer: Updated to use Pretty. 2010-12-21 16:45:43 -08:00
John MacFarlane
78cea94f45 Markdown writer: use \ for newline instead of two spaces at eol.
(Unless --strict.)
2010-12-20 19:36:40 -08:00
John MacFarlane
2587543457 ConTeXt writer: Updated to use Text.Pandoc.Pretty. 2010-12-20 19:36:35 -08:00
John MacFarlane
71bc3789a3 Fixed markdown-citations.ieee.txt. 2010-12-19 12:43:25 -08:00
John MacFarlane
9fd45aaa2d Fixed markdown-citations.txt. 2010-12-19 12:42:32 -08:00
John MacFarlane
9210b7ef69 Fixed biblatex/natbib citation writer tests. 2010-12-19 12:41:27 -08:00
John MacFarlane
99a58e51f5 LaTeX writer: Modified to use Pretty.
Improved footnote formatting, removed spurious blank lines.
2010-12-19 10:14:12 -08:00
John MacFarlane
89bf312765 LaTeX writer: Use \paragraph, \subparagraph for level 4,5 headers. 2010-12-18 15:05:21 -08:00
John MacFarlane
543aa28c38 Added new prettyprinting module.
* Added Text.Pandoc.Pretty.
  This is better suited for pandoc than the 'pretty' package.
  One advantage is that we now get proper wrapping; Emph [Inline]
  is no longer treated as a big unwrappable unit. Previously
  we only got breaks for spaces at the "outer level." We can also
  more easily avoid doubled blank lines.  Performance is
  significantly better as well.

* Removed Text.Pandoc.Blocks.
  Text.Pandoc.Pretty allows you to define blocks and concatenate
  them.

* Modified markdown, RST, org readers to use Text.Pandoc.Pretty
  instead of Text.PrettyPrint.HughesPJ.

* Text.Pandoc.Shared:  Added writerColumns to WriterOptions.

* Markdown, RST, Org writers now break text at writerColumns.

* Added --columns command-line option, which sets stColumns
  and writerColumns.

* Table parsing:  If the size of the header > stColumns,
  use the header size as 100% for purposes of calculating
  relative widths of columns.
2010-12-17 13:39:17 -08:00
John MacFarlane
605648cbbf Added 'tests' Cabal flag.
+ This ensures that test-pandoc gets built.
+ 'cabal test' now runs this.
+ The old tests/RunTests.hs has been removed, and
  src/test-pandoc.hs added.
2010-12-15 17:54:51 -08:00
Nathan Gass
a312d2a8ae Use top-level header at end as bibliography title for natbib and biblatex output. 2010-12-15 10:21:56 -08:00
Nathan Gass
8f60176511 Remove punctuation at start of suffix for natbib and biblatex output.
This is necessary as the latex citation commands include there own
punctuation, which resulted in doubled commas for markdown documents
where citeproc output works correctly.
2010-12-15 10:21:53 -08:00
Nathan Gass
53cb199bab Added normalize funcion to latex citation tests.
This is necessary because converting from markdown to latex correctly
changes hyphens to en-dashes and some spaces to non-breaking spaces.
Converting back to markdown does not undo this changes, and so the
tests have to undo them.
2010-12-14 19:41:22 -08:00
Nathan Gass
34d30efc5c Added citation tests.
Added tests for latex  citation writer and reader,
markdown citation writer and additional markup in citations.
2010-12-14 18:38:40 -08:00
Nathan Gass
c2d3796439 Added support for latex cite commands in latex reader. 2010-12-13 20:48:19 -08:00
Nathan Gass
e8679c04c7 Disabled colored boxes around cites in latex template. 2010-12-13 20:43:17 -08:00
John MacFarlane
71e0557e61 Markdown reader: Fixed regression in reference key parser.
* The recent change allowing spaces and newlines in the URL
  caused problems when reference keys are stacked up without
  blank lines between. This is now fixed.
* Added test.
2010-12-13 20:03:12 -08:00
John MacFarlane
17d48cf4af Markdown reader: Allow linebreaks in URLs (treat as spaces).
Also, a string of consecutive spaces or tabs is now parsed
as a single space. If you have multiple spaces in your URL,
use %20%20.
2010-12-10 12:14:51 -08:00
paul.rivier
bb609a85e3 textile redcloth definition lists 2010-12-09 09:25:46 -08:00
John MacFarlane
88a40685b8 Textile reader: better treatment of acronyms.
We now parse PBS(Public Broadcasting System) as if it were
"PBS (Public Broadcasting System)".
2010-12-09 08:52:09 -08:00
John MacFarlane
9ead748cc9 RST reader: Added footnote suppport.
Resolves issue #258.

Note that there are some differences in how docutils and
pandoc treat footnotes.  Currently pandoc ignores the numeral
or symbol used in the note; footnotes are put in an auto-numbered
ordered list.
2010-12-08 08:39:50 -08:00
John MacFarlane
f02080b62d Textile reader: Implemented footnotes. 2010-12-08 00:44:46 -08:00
John MacFarlane
200ea33641 Made --smart work with RST reader. 2010-12-07 21:49:10 -08:00
John MacFarlane
ace3b80f1e Smart punctuation: don't alllow ellipses containing spaces.
Previously we allowed '. . .', ' . . . ', etc.  This caused
too many complications, and removed author's flexibility in
combining ellipses with spaces and periods.
2010-12-07 20:08:14 -08:00
John MacFarlane
50ca61ef49 Moved smartPunctuation from Markdown to Parsing.
+ Parameterized smartPunctuation on an inline parser.
+ Handle smartPunctuation in Textile reader.
2010-12-07 19:03:08 -08:00
John MacFarlane
f917b46500 Textile reader: implemented acronyms, (tm), (r), (c). 2010-12-07 18:28:36 -08:00
John MacFarlane
67445e7685 Fixed bugs in ieee.csl (Andrea Rossato). 2010-12-07 08:28:18 -08:00
John MacFarlane
5f283e4d47 Updated ieee citation test for punctuation-in-quote. 2010-12-07 08:14:26 -08:00
John MacFarlane
7864f30717 Markdown reader: handle curly quotes better.
Previously, curly quotes were just parsed literally, leading
to problems in some output formats.  Now they are parsed as
Quoted inlines, if --smart is specified.

Resolves Issue #270.
2010-12-06 20:36:58 -08:00
John MacFarlane
5a4609584c Fix regression: markdown references should be case-insensitive.
This broke when we added the Key type.  We had assumed that
the custom case-insensitive Ord instance would ensure case-insensitive
matching, but that is not how Data.Map works.

* Added a test case for case-insensitivity in markdown-reader-more
* Removed old refsMatch from Text.Pandoc.Parsing module;
* hid the 'Key' constructor;
* dropped the custom Ord and Eq instances, deriving instead;
* added fromKey and toKey to convert between Keys and Inline lists;
* toKey ensures that keys are case-insensitive, since this is the
  only way the API provides to construct a Key.

Resolves Issue #272.
2010-12-05 19:27:00 -08:00
Puneeth Chaganti
4d48abcb12 Added tests.
+ Added tables.org and writer.org to tests.
    + Added org.template to templates.
    + Changed RunTests.hs as required.
    + Minor changes to Org writer.
2010-12-04 23:49:53 +05:30
John MacFarlane
357b965b44 Merge branch 'citeproc' into master.
Conflicts:
	src/Text/Pandoc/Definition.hs
2010-12-03 23:43:47 -08:00
John MacFarlane
d4e512776d Textile reader: added hrule parser. 2010-12-03 23:10:52 -08:00
John MacFarlane
0356ad4de6 Textile reader: drop leading, trailing newline in pre block.
This is consistent with how the other readers work.
2010-12-03 23:10:52 -08:00
John MacFarlane
968748dec1 Textile reader: updated test suite to include raw HTML. 2010-12-03 23:10:52 -08:00
John MacFarlane
f415e9e119 Textile reader: parse raw by default.
It's part of the textile spec to allow raw HTML,
just as with markdown.
-R is no longer needed in test suite.
2010-12-03 23:10:52 -08:00
paul.rivier
c3866f3c66 punctuation handling, and more html-specific handling 2010-12-03 23:10:52 -08:00
Paul Rivier
d724c6b568 html inlines and html blocks handling in textile reader 2010-12-03 23:10:51 -08:00
Paul Rivier
fa0866886b textile reader now ignores html/css attributes 2010-12-03 23:10:51 -08:00
Paul Rivier
593b4f6c94 fix autolink by promoting it in the parser list, fix table parabreak 2010-12-03 23:10:51 -08:00
Paul Rivier
a7da0672dc more support for Textile reader (explicit links, images), tests and cabal entries 2010-12-03 23:10:51 -08:00
John MacFarlane
68d38db194 Revamped tests, using markdown output instead of HTML.
This is easier to inspect.
2010-11-28 10:03:05 -08:00
John MacFarlane
61b16116ce Citation tests: removed spurious double-spaces. 2010-11-28 08:12:32 -08:00
John MacFarlane
b2e9f64984 Updated citation tests to use en-dash between ranges. 2010-11-28 08:10:01 -08:00
John MacFarlane
b10e82c9fa Fixed spacing bug for reference-style citations. 2010-11-28 07:55:33 -08:00
John MacFarlane
e2e107cbed Fixed spacing in ieee citation test.
(Test now fails pending citeproc update.)
2010-11-27 19:20:06 -08:00
John MacFarlane
f64983f879 Merge branch 'master' into citeproc 2010-11-27 14:58:23 -08:00
John MacFarlane
e9cfbd5adc OpenDocument writer: don't print raw TeX. 2010-11-27 14:57:48 -08:00
John MacFarlane
8f1aed168b Removed extra line break from citation test output. 2010-11-27 11:27:52 -08:00
John MacFarlane
54397a9e99 Merge branch 'master' into citeproc 2010-11-27 10:58:05 -08:00
John MacFarlane
1ffbb59823 Minor adjustment in textile test suite. 2010-11-27 10:56:46 -08:00
John MacFarlane
c989bf028f Merge branch 'textile'
Conflicts:
	README
	man/man1/pandoc.1.md
	pandoc.cabal
2010-11-27 10:52:44 -08:00
John MacFarlane
71c9316a59 Use [] for superscripts and subscripts in textile writer. 2010-11-27 10:44:58 -08:00
John MacFarlane
cae3f8edba Fixed spacing problems in textile nested lists. 2010-11-27 10:44:35 -08:00
John MacFarlane
e8516ff337 Set HOME in RunTests.
Patch from Nathan Gass.
2010-11-26 11:48:22 -08:00
John MacFarlane
be909d2bfc Fixed eol mistake in test. 2010-11-22 23:10:00 -08:00
John MacFarlane
3c7c1d8574 Changed markdown citation tests.
Now the tests are produced in HTML format (so we can see all
formatting).  Also, we produce them in three different style,
chicago-author-date, ieee, and mhra.
2010-11-22 22:54:40 -08:00
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