Commit graph

999 commits

Author SHA1 Message Date
John MacFarlane
e8ddcfd997 Scale LaTeX tables so they don't exceed columnwidth. 2013-08-19 16:03:22 -07:00
claremacrae
6cc284cc8e Bullet and ordered lists now always simple in dokuwiki writer (#386) 2013-08-19 20:45:31 +01:00
claremacrae
883f119c87 Removed unnecessary line-break after hard break in dokuwiki writer (#386) 2013-08-19 08:09:52 +01:00
John MacFarlane
8d441af3da Adjusted writers and tests for change in parsing of div/span.
Textile, MediaWiki, Markdown, Org, RST will emit raw HTML div tags for divs.
Otherwise Div and Span are "transparent" block containers.
2013-08-18 14:36:40 -07:00
claremacrae
288329044a Stop plain text ** and __ becoming formatting in dokuwiki writer (#386) 2013-08-18 09:15:33 +01:00
claremacrae
b5b622f5b8 Stop plain text // becoming an italic marker in dokuwiki writer (#386)
When the original document had text containing //, this was previously
included, unchanged, in the dokuwiki output, and this interacted badly
with later, intended, formating text.
2013-08-18 08:57:32 +01:00
claremacrae
6d484bc55e Treat inline code blocks like <code> instead of <tt> in dokuwiki writer (#386)
Done because I noticed that in the Autolinks section of writer.dokuwiki, the URL in inlined code was getting auto-linked, when it wasn't supposed to.

This also meant that any inline code examples that had text that looked like dokuwiki syntax could break the formatting of later text.
2013-08-18 08:13:34 +01:00
claremacrae
2a4bbe5d4f Nasty hack to stop C comments in inline code becoming italics in dokuwiki writer (#386) 2013-08-17 22:28:07 +01:00
claremacrae
84c2c5f01d Add more tests for dokuwiki writer (#386) 2013-08-17 19:03:58 +01:00
claremacrae
2ae2fcde2f Add extra pair of test files for dokuwiki writer (#386)
I've found some incorrect behaviours with the dokuwiki output, for which
extra test cases will be needed - that aren't covered by the standard 
pandoc test input files.
2013-08-17 18:53:01 +01:00
claremacrae
0961d49912 Fixed inlined code in dokuwiki writer (#386) 2013-08-17 12:34:05 +01:00
claremacrae
4c48433a2a Don't add entities in <code> blocks in dokuwiki writer (#386) 2013-08-17 12:20:34 +01:00
claremacrae
573bd1b61b Implement <code> blocks in dokuwiki writer (#386) 2013-08-17 11:20:51 +01:00
claremacrae
eb4fe5e82c Implement table headings in dokuwiki writer (#386) 2013-08-17 08:48:29 +01:00
John MacFarlane
441a7aebf8 LaTeX writer: Avoid problem with footnotes in unnumbered headers.
Closes #940.
Added test case.
2013-08-16 13:03:38 -07:00
John MacFarlane
309024971c Updated tests for latest pandoc-types changes. 2013-08-16 12:25:21 -07:00
John MacFarlane
3e8bd8aa15 Updated for removed unMeta, unFormat in pandoc-types. 2013-08-14 23:24:45 -07:00
John MacFarlane
eb0c0b86ed ODT/OpenDocument writer: Minor changes for ODF 1.2 conformance.
See #939.  We leave the nonconforming contextual-spacing attribute,
which is provided by LibreOffice itself and seems to be supported.
2013-08-11 17:13:46 -07:00
claremacrae
48645a4755 Initial implementation of tables in dokuwiki writer (#386)
Todo: alignment, and headings
2013-08-11 22:22:07 +01:00
John MacFarlane
6f736dfa75 Added Tests.Walk.
This verifies that walk and query match the generic traversals.
2013-08-10 19:04:15 -07:00
John MacFarlane
210d7b7bce Updated tests for new Format. 2013-08-10 17:53:11 -07:00
John MacFarlane
cbfa932106 Adjustments for new Format newtype. 2013-08-10 17:24:54 -07:00
claremacrae
e5004bcff0 Implement strikeout in dokuwiki writer (#386) 2013-08-06 07:43:32 +01:00
John MacFarlane
4a84b78100 MediaWiki writer: Use native mediawiki tables instead of HTML.
Closes #720.
2013-08-03 23:05:14 -07:00
claremacrae
b14b2d6a85 Implement footnotes in dokuwiki writer (#386) 2013-07-28 19:19:33 +01:00
claremacrae
b5f86a665d Removed incorrect entity conversion in dokuwiki writer (#386) 2013-07-28 18:59:16 +01:00
claremacrae
51b8ce49f1 Implemented linebreaks in dokuwiki writer (#386) 2013-07-28 18:42:53 +01:00
Clare Macrae
5b04d063a1 Convert bullet and numbered lists in dokuwiki writer (#386) 2013-07-26 06:19:40 +01:00
Clare Macrae
97d81c8b10 Corrected part of the failing test for lists in dokuwiki writer (#386) 2013-07-26 05:10:05 +01:00
John MacFarlane
85cc140744 Textile reader: Improved handling of <pre> blocks.
* Closed #927 (a bug in which `<pre>` in certain contexts was
  not recognized as a code block).
* Remove internal HTML tags in code blocks, rather than printing
  them verbatim.
* Parse attributes on `<pre>` tag for code blocks.
2013-07-25 09:45:23 -07:00
John MacFarlane
af5705308a Test suite changes for new highlighting-kate version. 2013-07-23 20:31:49 -07:00
John MacFarlane
800c5490ec LaTeX reader: Don't add spurious ", " to citation suffixes.
This is added when needed in Text.Pandoc.Biblio anyway.
2013-07-21 11:44:49 -07:00
Clare Macrae
c561be95a1 Add failing test for bullet and numbered lists in dokuwiki writer (#386) 2013-07-15 20:20:37 +01:00
Clare Macrae
18565e149a Implement conversion of images in dokuwiki writer (#386) 2013-07-15 19:29:39 +01:00
Clare Macrae
b2a8731e32 Weak implementation of hyperlinks for dokuwiki (#386)
TODO Simplify the code
2013-07-15 09:35:04 +01:00
Alexander Kondratskiy
0b49f810f4 Fixing wrong numbered-list indentation in open document format 2013-07-14 14:33:58 -04:00
Clare Macrae
660fb24472 Implemented horizontal rule for dokuwiki (#386) 2013-07-14 15:03:40 +01:00
Clare Macrae
2afa4ec924 Implemented Emphasis (italic) and Strong (bold) for dokuwiki (#386) 2013-07-14 14:58:42 +01:00
Clare Macrae
a43e5983da Implemented correct output of dokuwiki (#386) 2013-07-14 14:24:20 +01:00
Clare Macrae
7eded47bcd Initial work to create dokuwiki writer (#386)
In this first version, all dokuwiki files are straight copies of the
media wiki counterparts.
2013-07-14 13:40:27 +01:00
John MacFarlane
35e2caa058 Updated a test whose output changed due to last commit. 2013-07-13 13:47:09 -07:00
John MacFarlane
9009a7e4a8 Markdown writer: Commas are okay in plain yaml scalars.
It's just commas with brackets that can cause problems.
2013-07-01 21:00:46 -07:00
John MacFarlane
e7a68fc7e8 Markdown writer: Render yaml title block fields in alpha order.
This makes the output predictable; previously it varied across
implementations.
2013-07-01 20:56:27 -07:00
John MacFarlane
19ad69b1c6 Improvements to yaml title block writer. 2013-07-01 16:28:34 -07:00
John MacFarlane
21a9b44609 Switched order of fields in yaml header (writer test). 2013-07-01 14:38:32 -07:00
John MacFarlane
2d46828b1c Revert "Markdown writer: Don't include variables in metadata."
This reverts commit 0ec8573347.
2013-07-01 14:17:04 -07:00
John MacFarlane
0ec8573347 Markdown writer: Don't include variables in metadata. 2013-07-01 12:48:13 -07:00
John MacFarlane
5d01e9a117 Markdown writer: Support yaml title block. 2013-06-30 23:37:27 -07:00
John MacFarlane
5cb0f0bbf1 ConTeXt writer: Properly handle tables without captions.
The old output only worked in MkII. This should work in MkIV
as well.

Closes #837.
2013-06-28 21:30:27 -07:00
John MacFarlane
dd96213c05 Man writer: give more fine-grained control in template.
Now the `title`, `section`, `header`, and `footer` can all be set
individually in metadata.  The `description` variable has been
removed.

Quotes have been added so that spaces are allowed in the title.

If you have a title that begins

    COMMAND(1) footer here | header here

pandoc will parse it as before into a title, section, header, and
footer.  But you can also specify these elements explicitly.

Closes #885.
2013-06-27 19:32:28 -07:00
John MacFarlane
79a4ea03e2 Stop escaping | in LaTeX math.
This caused problems with array environments.  Closes #891.
2013-06-26 20:54:31 -07:00
John MacFarlane
f7f32af293 Use latest chicago-author-date.csl. 2013-06-25 22:37:03 -07:00
John MacFarlane
243c56a880 Fixed 'authors' metadata parsing in reST.
Semicolons separate different authors.
2013-06-25 22:32:50 -07:00
John MacFarlane
08631ef1a3 Some test suite fixes for new metadata. 2013-06-25 22:32:50 -07:00
John MacFarlane
f869f7e08d Use new flexible metadata type.
* Depend on pandoc 1.12.
* Added yaml dependency.
* `Text.Pandoc.XML`: Removed `stripTags`.  (API change.)
* `Text.Pandoc.Shared`:  Added `metaToJSON`.
  This will be used in writers to create a JSON object for use
  in the templates from the pandoc metadata.
* Revised readers and writers to use the new Meta type.
* `Text.Pandoc.Options`: Added `Ext_yaml_title_block`.
* Markdown reader:  Added support for YAML metadata block.
  Note that it must come at the beginning of the document.
* `Text.Pandoc.Parsing.ParserState`:  Replace `stateTitle`,
  `stateAuthors`, `stateDate` with `stateMeta`.
* RST reader:  Improved metadata.
  Treat initial field list as metadata when standalone specified.
  Previously ALL fields "title", "author", "date" in field lists
  were treated as metadata, even if not at the beginning.
  Use `subtitle` metadata field for subtitle.
* `Text.Pandoc.Templates`:  Export `renderTemplate'` that takes a string
  instead of a compiled template..
* OPML template:  Use 'for' loop for authors.
* Org template: '#+TITLE:' is inserted before the title.
  Previously the writer did this.
2013-06-24 20:29:41 -07:00
John MacFarlane
a2b98ba218 Added test for #882. 2013-06-19 09:27:11 -07:00
John MacFarlane
6c5ba22c96 Added a test for #833. 2013-06-19 09:00:37 -07:00
John MacFarlane
b04dfde403 RST reader: don't insert paragraphs where docutils doesn't.
rst2html doesn't add `<p>` tags to list items (even when they are
separated by blank lines) unless there are multiple paragraphs in the
list.  This commit changes the RST reader to conform more closely to
what docutils does.

Closes #880.
2013-06-18 10:04:37 -07:00
John MacFarlane
50ba5a801a Textile reader: Correctly handle entities. 2013-06-11 10:16:54 -07:00
John MacFarlane
8d19e45b97 LaTeX writer: Always create labels for sections.
Previously the labels were only created when there were links to
the section in the document.

Closes #871.
2013-06-02 14:38:18 -07:00
John MacFarlane
fa978e1365 Use latest highlighting-kate and texmath.
Closes #849.
2013-05-07 20:22:09 -07:00
John MacFarlane
816a5540f4 Updated tests for template changes. 2013-05-07 19:50:23 -07:00
John MacFarlane
fdd5f26d14 Updated tests for changes in LaTeX template. 2013-04-26 08:59:18 -07:00
John MacFarlane
ff6db9eab1 Updated tests to match new docbook template. 2013-04-15 20:51:00 -07:00
John MacFarlane
5c03275a63 Haddock reader improvements.
- Correctly handle ghci sessions.
- Fixed spacing issues.
- Simplified code.
2013-04-14 21:39:05 -07:00
John MacFarlane
da13ad89ce Man writer: use one decimal place for column widths.
This, I hope, will fix test failures on GHC 7.6 due to
(presumably) different rounding or floating point multiplication.
2013-04-09 19:56:43 -07:00
John MacFarlane
6dbf1859a2 Update markdown writer tests for changes in author in titleblock.
Authors are now put on separate lines.
2013-04-09 18:17:06 -07:00
John MacFarlane
e938fc1ae2 Fixed Haddock reader bugs with list item spaces and examples.
Closes #824.
2013-04-09 18:12:54 -07:00
John MacFarlane
129899647e Fixed haddock test output.
- omit extra spaces in list items
- correct line breaks in ghci output
2013-04-08 09:08:41 -07:00
David Lazar
2c9ea89ff7 Haddock reader: add tests. 2013-04-04 23:19:02 -07:00
John MacFarlane
186b4f0100 Modified haddock reader test stubs so they pass, for now. 2013-03-28 17:22:39 -07:00
John MacFarlane
0b85ad7546 Added stubs for haddock reader tests.
Modify tests/haddock-reader.haddock and
tests/haddock-reader.native.
2013-03-28 15:58:09 -07:00
John MacFarlane
48b23d491d MediaWiki reader: Correctly handle indented preformatted text
without preceding or following blank line.
2013-03-28 10:48:00 -07:00
John MacFarlane
099b4b7769 Mediawiki: Fixed regression for <ref>URL</ref>.
`<` is no longer allowed in URLs, according to the uri parser
in Text.Pandoc.Parsing.

Added a test case.
2013-03-28 09:54:02 -07:00
John MacFarlane
5b4d239b85 Added OPML template, tests.
Minor fixes to OPML writer.
Improved OPML reader tests.
2013-03-20 10:17:59 -07:00
John MacFarlane
74d53f4347 Added Text.Pandoc.Readers.OPML, exporting readOPML.
The _note attribute is supported.  This is unofficial, but
used e.g. in OmniOutliner and supported by multimarkdown.
We treat the contents as markdown blocks under a section
header.

Added to documentation and tests.
2013-03-19 20:22:14 -07:00
John MacFarlane
835deee58b Markdown writer: New approach for citations.
* Reverts 1.11 change that caused citations to be rendered as
  markdown citations, even if `--biblio` was specified, unless
  `citation` extension is disabled.  Now, formatted citations
  are always printed if `--biblio` was specified.  If you want to
  reformat markdown keeping pandoc markdown citations intact,
  just don't specify `--biblio`.

* Reverted now unnecessary changes to Text.Pandoc.Biblio adding the raw
  block to mark the bibliography, and to Text.Pandoc.Writers.Markdown
  to remove the bibliography if `citations` not specified.

* If the content of a `Cite` inline is a `RawInline "latex"`, which
  means that a LaTeX citation command was parsed and `--biblio` wasn't
  specified, then render it as a pandoc markdown citation.  This means
  that `pandoc -f latex -t markdown`, without `--biblio`, will convert
  LaTeX citation commands to pandoc markdown citations.
2013-03-17 10:33:54 -07:00
John MacFarlane
cae52ecc31 Revert "LaTeX reader: citation handling changes."
This reverts commit f7229b1473.
2013-03-17 08:48:29 -07:00
John MacFarlane
db3d4113a2 Markdown reader: don't lose parentheses in URLs.
Added tests.  This fixes a regression from 1.10.x.  Closes #786.
2013-03-13 19:20:25 -07:00
John MacFarlane
f7229b1473 LaTeX reader: citation handling changes.
Previously, a LaTeX citation would always be parsed as a Citation
element, with the raw LaTeX in the [Inline] part.

Now, the LaTeX citation is parsed as a Citation element only if
`--biblio` was specified (i.e. only if there is a nonempty set
of references in readerReferences).  Otherwise it is parsed as
raw LaTeX.

This will make it possible to simplify some things in the markdown
writer.  It also makes the LaTeX reader behave more like the Markdown
reader.
2013-03-09 10:33:25 -08:00
John MacFarlane
af7e97b9f5 Markdown writer: Render citations as pandoc-markdown citations.
Previously citations were rendered as citeproc-formatted citations
by default.  Now we render them as pandoc citations, e.g. `[@item1]`,
unless the `citations` extension is disabled.

If you still want formatted citations in your markdown output,
use `pandoc -t markdown-citations`.
2013-03-07 16:38:19 -08:00
John MacFarlane
3b63cb0903 Hide Text.Pandoc.Highlighting.
* Moved code for translating listings language names to
  highlighting-kate names and back from LaTeX reader to Highlighting.
* Text.Pandoc.Highlighting no longer exposed (API change)
* Text.Pandoc.Highlighting exports toListingsLang, fromListingsLang
2013-03-05 22:09:42 -08:00
John MacFarlane
5b0b21b51d Added test for pipe table with spaces around header lines. 2013-03-02 19:06:12 -08:00
John MacFarlane
d5c2ace9ae Updated tests for latex template change (microtype). 2013-02-27 19:42:54 -08:00
John MacFarlane
07e8cedf2b Make implicit_header_references work with explicit header ids.
(Markdown reader.)
2013-02-21 19:53:35 -08:00
John MacFarlane
5e9145bb62 Textile reader: Handle attributes on headers.
Includes `[lang]`, `(class #id)`, `{color:red}` styles.
2013-02-16 18:29:12 -08:00
John MacFarlane
cc410a71b5 Allow & in emails (for entities).
Added tests for entities in titles and links.
Closes #723.
2013-02-15 23:02:17 -08:00
John MacFarlane
90f0dd15b6 HTML writer: Support header attributes.
Note:  The attributes go on the enclosing section or div
if `--section-divs` is specified.

Also fixed a regression (only now noticed) in html+lhs output.
Previously the bird tracks were being omitted.
2013-02-14 19:35:58 -08:00
John MacFarlane
f53e0a44ce DocBook writer: for linebreak, but newline in literallayout.
Closes #725.
2013-01-28 11:18:05 -08:00
John MacFarlane
cc17c794a1 Updated latex table tests. 2013-01-28 10:49:18 -08:00
John MacFarlane
29a17b1767 Merge pull request #733 from jrunningen/master
Mediawiki reader: Don't require blanklines after tables.
2013-01-28 09:42:59 -08:00
John MacFarlane
72d11ad20b Markdown/RST reader: Skip blank lines.
This fixes a subtle regression involving grid tables with
empty cells.  Closes #732.

Also added test for grid table with empty cells.
2013-01-27 22:13:05 -08:00
Jeff Runningen
efddb85d46 Mediawiki reader: Don't require blanklines after tables. 2013-01-27 23:15:46 -05:00
John MacFarlane
9d549ab683 RST writer: Use .. code:: language for code blocks with language.
Closes #721.
Also fixed whitespace in lhs tests.
2013-01-26 16:12:11 -08:00
John MacFarlane
daeb52d4e0 Eliminated use of TH in test suite. 2013-01-23 19:26:39 -08:00
John MacFarlane
f468db9277 LaTeX template: Use \urlstyle{same} to avoid monospace URLs. 2013-01-21 11:52:00 -08:00
John MacFarlane
26d30d6d38 Use proportional font for email autolinks with obfuscation.
Closes #714.
2013-01-21 11:28:35 -08:00
John MacFarlane
af84953781 Markdown reader: Fixed bug with headerless grid tables.
The 1.10 code assumed that each table header cell contains
exactly one block. That failed for headerless tables (0) and also
for tables with multiple blocks in a header cell.

The code is fixed and tests provided. Thanks to Andrew Lee for
pointing out the bug.
2013-01-21 09:52:24 -08:00
John MacFarlane
9cc1cf1f40 Fixed bug with escaped % in LaTeX reader.
Also added tests.  Closes #710.
2013-01-20 19:21:13 -08:00
John MacFarlane
27e7c57721 LaTeX test updates for latest changes to template & h-k. 2013-01-19 10:41:42 -08:00
John MacFarlane
2fbe611a96 Get rid of compiler warnings in Tests.Helpers. 2013-01-19 10:41:12 -08:00
John MacFarlane
809d74b86d Set locale encoding in test suite.
This prevents a "commit buffer (invalid argument)" error on
Windows.
2013-01-18 11:23:09 -08:00
John MacFarlane
8eab759a9c RTF writer: Added writeRTFWithEmbeddedImages.
* RTF writer:  Export writeRTFWithEmbeddedImages instead of
  rtfEmbedImage.
* Text.Pandoc: Use writeRTFWithEmbeddedImages for RTF.
* Moved code for embedding images in RTF out of pandoc.hs.
2013-01-18 10:33:37 -08:00
John MacFarlane
bf3a911a1c Changed Ext_autolink_urls -> Ext_autolink_bare_uris.
Added tests.
2013-01-15 12:44:50 -08:00
John MacFarlane
e9b3d5aa7a Added lots of tests for bare URIs. 2013-01-15 12:28:31 -08:00
John MacFarlane
e0e36ce543 Revised URI parser.
* It no longer uses Network.URIs URI parser, which is too restrictive
  (not allowing unicode URIs unless encoded).
* It allows many more schemes.
* It better handles punctuation so as to avoid capturing trailing
  punctuation in bare URLs.
2013-01-15 10:52:02 -08:00
John MacFarlane
7bc37e4414 Use 'fig:' instead of '\SOH' in title to indicate figure.
Revises 1a4b47e933
2013-01-15 08:46:09 -08:00
John MacFarlane
1a4b47e933 Implemented Ext_implicit_figures.
* In markdown reader, add a '\1' character to the beginning
  of the title of an image that is alone in its paragraph,
  if implicit_figures extension is selected.
* In writers, check for Para [Image alt (src,'\1':tit)] and treat
  it as a figure if possible.
* Updated tests.

This is a bit of a hack, but it allows us to make implicit_figures
an extension of the markdown reader, rather than the writers.
2013-01-14 20:53:08 -08:00
John MacFarlane
51e0bd277a Parsing: Fixed uri -- escape unicode URLs.
Otherwise Network.URI.parseURI fails on e.g. Chinese
URLs.  Changed an incorrect test in markdown-reader-more.
2013-01-14 17:38:34 -08:00
John MacFarlane
45895b561f RST writer: Fixes bug with links with duplicate text.
We now (a) use anonymous links for links with inline URLs, and
(b) use an inline link instead of a reference link if the
reference link would require a label that has already been
used for a different link.

Closes #511.
2013-01-13 23:00:05 -08:00
John MacFarlane
9ee9096d07 Added tests for markdown line blocks and explicit header attributes. 2013-01-13 18:03:15 -08:00
John MacFarlane
5c067bb457 RST reader: Line block improvements.
* Use nonbreaking spaces for initial indent (otherwise lost in HTML and
  LaTeX).
* Allow multiple paragraphs in a single line block.
2013-01-13 11:15:31 -08:00
John MacFarlane
5ecadd7bfa Use line block in RST writer when a paragraph contains linebreaks.
Previously linebreaks weren't supported in RST, since RST
has no native linebreak construct.
2013-01-13 09:25:56 -08:00
John MacFarlane
70e308f2f9 Escape | as \vert in LaTeX math.
This avoids a clash with highlighting-kate's macros, which
redefine | as a short verbatim delimiter.  Thanks to
Björn Peemöller for raising this issue.
2013-01-12 10:21:19 -08:00
John MacFarlane
f2aa5fd661 Fixed/simplified diff output for tests. 2013-01-12 10:21:07 -08:00
John MacFarlane
d599c4cdab Added Attr field to Header.
Previously header ids were autogenerated by the writers.
Now they are generated (unless supplied explicitly) in the
markdown parser, if the `header_identifiers` extension is
selected.

In addition, the textile reader now supports id attributes on
headers.
2013-01-09 09:30:05 -08:00
John MacFarlane
8ff81dc9ca Updated tests for tight/loose lists.
Taking into account new context/latex output, and fixing
some bugs in the test suite Tests.Helpers and Tests.Writers.ConTeXt.
(We had the wrong order of expected/actual in the diff output.)
2013-01-07 20:58:49 -08:00
John MacFarlane
8c48bd8feb Don't put the text of an autolink in Code font. 2013-01-06 20:51:51 -08:00
John MacFarlane
300f8528da Mediawiki reader: interpret HTML in verbatim contexts as text.
Thanks to Jeff Runningen for reporting that mediawiki works
this way.
2013-01-06 19:35:40 -08:00
John MacFarlane
7d74a916ff Updated table tests for latex writer changes. 2013-01-05 20:03:50 -08:00
John MacFarlane
91e8d80eee MediaWiki writer: use <code> not <tt> for Code. 2013-01-04 23:16:49 -08:00
John MacFarlane
0f9e2c2320 Added css to preserve spaces in <code> tags.
Thanks to Dirk Laurie.
2013-01-04 23:02:22 -08:00
John MacFarlane
3d7608d855 Updated tests for latest highlighting-kate version. 2013-01-04 19:48:02 -08:00
John MacFarlane
5a4f7ec595 Added tests for implicit header references. 2013-01-03 20:43:44 -08:00
John MacFarlane
56ff5e1845 Updated test runner for changes in pandoc. 2013-01-03 11:20:10 -08:00
John MacFarlane
0675346e76 Fixed test suite to use Diff 0.2 API. 2013-01-02 11:41:22 -08:00
John MacFarlane
4cd573c61f Textile reader/writer: Fixed autolinks.
Previously the textile reader and writer incorrectly implented
RST-style autolinks for URLs and email addresses.

This has been fixed.  Now an autolink is done this way:

    "$":http://myurl.com
2012-11-06 16:05:17 -08:00
John MacFarlane
9d0b011869 RST writer: Don't add ":align: center" to figures. 2012-11-04 18:33:35 -08:00
John MacFarlane
06300e59d5 Removed citationSuppressParens.
Makefile: Use citeproc-0.3.6 release.
2012-10-28 09:36:15 -07:00
John MacFarlane
6f2347635c LaTeX reader: Initialize citationSuppressParens field. 2012-10-22 19:17:00 -07:00
John MacFarlane
cfab8eaecb Revert "LaTeX reader: Use new suppressParens option for footnote citations."
This reverts commit 7499499b68.

Conflicts:

	src/Text/Pandoc/Readers/LaTeX.hs
2012-10-21 23:16:23 -07:00
John MacFarlane
bfddcb46dc Revert "Adjust LaTeX reader test for last change."
This reverts commit ea34087cde.
2012-10-21 23:14:42 -07:00
John MacFarlane
ca583a340f Updated lhs-test.latex for new highlighting-kate treatment of `. 2012-10-20 23:54:05 -07:00
John MacFarlane
ea34087cde Adjust LaTeX reader test for last change. 2012-10-15 20:01:07 -07:00
John MacFarlane
7499499b68 LaTeX reader: Use new suppressParens option for footnote citations.
Also changed Biblio, Markdown reader, and LaTeX reader tests because
of new citationSuppressParens field in Citation.
2012-10-15 19:53:57 -07:00
John MacFarlane
ea8b8114e1 Textile reader: Fixed bug with list items containing line breaks.
Now pandoc correctly handles hard line breaks inside list items.
Previously they broke list parsing.  Thanks to Pablo
Rodríguez for pointing out the problem.
2012-10-13 10:44:38 -07:00
John MacFarlane
4349097990 LaTeX reader: Better support for citation commands.
* Make `\cite` etc. an AuthorInText.
* Make `\footcite` etc. into citations in notes.
2012-10-10 19:41:39 -07:00
John MacFarlane
f232034ab0 Textile reader: Implemented comment blocks. 2012-10-05 10:23:15 -07:00
John MacFarlane
eea4c9e4d3 Updated mediawiki writer test for <br /> change. 2012-10-04 08:36:00 -07:00
John MacFarlane
e8260c27e1 RST reader: Consolidate super/subscript, math into interpretedRole. 2012-09-30 20:28:50 -07:00
John MacFarlane
b07ea7a02d RST reader: Consolidated rawBlock into directive. 2012-09-30 09:59:22 -07:00
John MacFarlane
93e92a4716 Renamed removedLeadingTrailingSpace to trim.
Also removeLeadingSpace to triml,
removeTrailingSpace to trimr.
2012-09-29 17:09:34 -04:00
John MacFarlane
487d01118f RST reader: Consolidated math block parsers into directive. 2012-09-29 16:59:41 -04:00
John MacFarlane
ab17faf497 RST reader: Use Text.Pandoc.Builder.
This will give us more flexibility in the future.
It also gives built-in normalization.  Performance slightly
better.
2012-09-27 17:52:48 -07:00
John MacFarlane
731415a4e5 RST reader: Support :target: on image substitutions. 2012-09-27 15:40:09 -07:00
John MacFarlane
f76478bcb9 RST reader: Support :target: on .. image:: blocks.
Still not supported on substitution definitions.
2012-09-26 22:22:14 -07:00
John MacFarlane
6ad7ac1239 Removed need for utf8-string package.
* Depend on text.
* Expose Text.Pandoc.UTF8.
* Text.Pandoc.UTF8 now exports toString, fromString,
  toStringLazy, fromStringLazy.
* These are used instead of the old utf8-string functions.
2012-09-25 19:54:21 -07:00
John MacFarlane
4ab30f3cea Texinfo writer: Fixed internal cross-references.
Now we insert anchors after each header, and use @ref
instead of @uref for links.

Commas are now escaped as @comma{} only when needed; previously
all commas were escaped.  (This change is needed, in part, because @ref
commands must be followed by a real comma or period.)

Also insert a blank line in from of @verbatim environments.
2012-09-24 19:13:34 -07:00
John MacFarlane
22bd34fa33 Markdown reader: Fixed link parser to avoid exponential slowdowns.
Previously the parser would hang on input like this:

    [[[[[[[[[[[[[[[[[[hi

We fixed this by making the link parser parser characters
between balanced brackets (skipping brackets in inline code spans),
then parsing the result as an inline list.

One change is that

    [hi *there]* bud](/url)

is now no longer parsed as a link.  But in this respect pandoc behaved
differently from most other implementations anyway, so that seems okay.
All current tests pass.  Added test for this case.

Closes #620.
2012-09-22 14:05:09 -07:00
John MacFarlane
1038606036 LaTeX reader: Added a 'try' in rawLaTeXBlock.
This allows the markdown reader to treat '\begin' (not followed
by an argument) as a raw string rather than erroring out when
it doesn't find a '{'.

Closes #622.
2012-09-22 13:00:59 -07:00
John MacFarlane
93c35cbf14 Tests.Old: Set TMP to ".".
Otherwise TMP is unset and, on Windows, C:\Windows is used by default,
leading to permission violations.
2012-09-21 20:34:27 -07:00
John MacFarlane
e1be934dc2 LaTeX writer: Don't rely on the enumerate package.
Instead, use standard LaTeX commands to change numbering style.
2012-09-16 22:24:55 -07:00
John MacFarlane
1e2b20f8bc LaTeX writer: Properly escape strings inside \url{}.
Closes #576.
2012-09-16 11:20:53 -07:00
John MacFarlane
9f89269941 Merge pull request #596 from dlax/rst-fieldlists
improvements to rst reader for field lists
2012-09-16 10:19:42 -07:00
John MacFarlane
fc31bf27f5 MediaWiki reader: Allow table in table cell. 2012-09-15 21:06:55 -07:00
John MacFarlane
d9e34ce34d LaTeX writer: don't escape _ in url. 2012-09-15 20:43:36 -07:00
John MacFarlane
fc4ae15337 LaTeX writer: Don't use \endhead with longtable.
It causes the heading to be a different size form the body,
sometimes.
2012-09-15 20:40:48 -07:00
John MacFarlane
a71ac7cde7 Revised latex writer tests to use longtable. 2012-09-15 17:57:22 -04:00
John MacFarlane
64b0378f5d MediaWiki reader: Added test case for templates in list item. 2012-09-15 16:29:52 -04:00
John MacFarlane
2bc32bcb04 MediaWiki reader: Added test for ref. 2012-09-15 16:28:25 -04:00
John MacFarlane
0a2fb202fb MediaWiki reader: Interpret width attribute on table columns. 2012-09-15 15:04:11 -04:00
John MacFarlane
26fb63e294 MediaWiki reader: Got alignments working.
They only work on headers, because pandoc forces same
alignment for all cells in a column.
2012-09-15 14:20:50 -04:00
John MacFarlane
eca9eeab6b MediaWiki reader: Misc fixes, put category links at end. 2012-09-15 13:50:02 -04:00
John MacFarlane
9a54a949c7 MediaWiki reader: Parse styles after '{|' table start. 2012-09-15 00:23:24 -04:00
John MacFarlane
152ddfb232 MediaWiki reader: Added test for multi-paragraph cells. 2012-09-14 23:31:55 -04:00
John MacFarlane
ce509be57a MediaWiki reader: Table improvements, added simple table tests. 2012-09-14 10:55:16 -04:00
John MacFarlane
46be934994 MediaWiki reader: Images. 2012-09-13 18:16:25 -07:00
John MacFarlane
a0d7b3f37b MediaWiki reader: internal links. 2012-09-13 17:06:09 -07:00
John MacFarlane
fc2f7a4942 MediaWiki reader: Implemented basic internal links.
Including word-ending links and the "pipe trick."
2012-09-13 16:55:08 -07:00
John MacFarlane
5620848ef9 MediaWiki reader: Added tests for external mailto link. 2012-09-13 15:28:11 -07:00
John MacFarlane
017095f690 MediaWiki reader: Implemented numbered external links. 2012-09-13 15:24:05 -07:00
John MacFarlane
81bec8558c MediaWiki reader: Support HTML lists. 2012-09-13 14:47:11 -07:00
John MacFarlane
3fe6ea4c41 MediaWiki reader: Handle templates, variables as raw mediawiki.
Also check for column 1 in preformatted text.
2012-09-13 12:03:54 -07:00
John MacFarlane
5104c2190b MediaWiki reader: preformatted blocks and tests. 2012-09-12 22:44:11 -07:00
John MacFarlane
b703c76540 MediaWiki reader: Support <math> tag. 2012-09-12 19:57:34 -07:00
John MacFarlane
def768cd1f Added tests for mediawiki lists. 2012-09-12 19:48:11 -07:00
John MacFarlane
a76c6df826 More mediawiki reader tests. 2012-09-12 19:35:06 -07:00
John MacFarlane
b19aee4e1e Added some tests for mediawiki reader. 2012-09-12 19:15:34 -07:00
John MacFarlane
3d361b2101 Added basic mediawiki reader.
Text.Pandoc.Readers.MediaWiki module,
tests/mediawiki-reader.{txt,native}.
2012-09-12 09:05:10 -07:00
John MacFarlane
bad3c88cb6 HTML writer: Improve line breaks with <dd> tags.
We now put a newline between `</dd>` and `<dd>` when
there are multiple definitions.
2012-09-12 08:45:03 -07:00
John MacFarlane
3e8e20b4f5 Fixed spacing in context writer test. 2012-09-08 12:13:36 -07:00
John MacFarlane
7d0438897b LaTeX reader: Support obeylines environment.
Closes #604.
2012-09-06 16:27:01 -07:00
John MacFarlane
e2cc9e7ca1 LaTeX reader: Use curly quotes for bare straight quotes. 2012-09-06 16:02:56 -07:00
John MacFarlane
c9d1d97a28 Fixed footnotes bug in textile.
This affected notes occuring before punctuation, e.g.
`foo[1].`.

Closes #518.
2012-09-06 10:38:56 -07:00
Denis Laxalde
cdefeb9445 Fix RST reader for field lists items with body beginning after a new line 2012-08-29 20:47:49 +02:00
John MacFarlane
b21363f1d5 Added (failing) test case for #518. 2012-08-25 22:11:31 -07:00
John MacFarlane
5d3b295568 Man writer: Escape - as \-.
Unescaped -'s become hyphens, while \-'s are left as ascii
minus signs.  That is preferable for use with command-line
options.

See  http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html.
Thanks to Andrea Bolognani for bringing the issue to our
attention.
2012-08-18 10:29:15 -07:00
John MacFarlane
dfa4b76630 Changes to literate haskell options.
- Removed writerLiterateHaskell from WriterOptions.
- Removed readerLiterateHaskell from ReaderOptions.
- Added Ext_literate_haskell to Extensions.  Test for this
  instead of the above.
- Removed failUnlessLHS from Shared.

Note:  At this point, +lhs and .lhs extension no longer has any effect.
Need to fix.
2012-08-08 23:18:19 -07:00
John MacFarlane
fadc7b0d87 Major rewrite of markdown reader.
* Use Builder's Inlines/Blocks instead of lists.

* Return values in the reader monad, which are then
  run (at the end of parsing) against the final
  parser state.  This allows links, notes, and
  example numbers to be resolved without a second
  parser pass.

* An effect of using Builder is that everything is
  normalized automatically.

* New exports from Text.Pandoc.Parsing:
  widthsFromIndices, NoteTable', KeyTable', Key', toKey',
  withQuoteContext, singleQuoteStart, singleQuoteEnd, doubleQuoteStart,
  doubleQuoteEnd, ellipses, apostrophe, dash

* Updated opendocument tests.

* Don't derive Show for ParserState.

* Benchmarks:  markdown reader takes 82% of the time it took before.
  Markdown writer takes 92% of the time (here the speedup is probably
  due to the fact that everything is normalized by default).
2012-08-01 21:45:40 -07:00
John MacFarlane
00dc1e715e Moved WriterOptions and associated types Shared -> Options. 2012-07-26 22:59:56 -07:00
John MacFarlane
acbb4a5e46 Integrated test suite with cabal.
To run tests, configure with --enable-tests, then 'cabal test'.
You can specify particular tests using --test-options='-t markdown'.

No output is shown unless tests fail.  In the future, we can move
to the detailed-1.0 interface.
2012-07-26 09:43:27 -07:00
John MacFarlane
45e4c123a4 Moved tests to tests/, modified cabal file so lib isn't recompiled. 2012-07-26 08:37:36 -07:00
John MacFarlane
d2cc56a46a Revised code for pipe tables.
* All tables now require at least one body row.
* Renamed from 'extra' to 'pipe' tables.
* Moved functions from Parsing to Readers.Markdown.
* Cleaned up code; revised to parse in one pass rather than
  parsing a raw string, splitting it, and parsing the components.
* Allow pipe tables without pipes on the ends (as PHP Markdown Extra
  does).
2012-07-22 22:09:15 -07:00
John MacFarlane
5a704ecc6e Renamed tests/markdown-tables -> tests/extra-tables.
Added to cabal file.
2012-07-22 19:28:56 -07:00
John MacFarlane
511f5e891d Merge pull request #510 from mytskine/markdown-extra
Markdown extra tables [part of the multi-markdown syntax for tables]
2012-07-22 18:40:18 -07:00
John MacFarlane
1d19400572 Removed fb2.math-webtex.fb2 tests.
Test suite should not require net access to run.
2012-07-22 11:15:59 -07:00
Sergey Astanin
436a585c3b FB2: support images embedded as data URIs + tests. 2012-07-22 11:13:14 -07:00
Sergey Astanin
a9429e951c Test suite for FB2 writer. 2012-07-22 11:13:14 -07:00
John MacFarlane
26748da6d4 Don't recognize inline-markup starts inside words.
For example, "2*2 = 4*1" should not contain an emphasized
section.  Added test case for "Literal symbols".  Closes #569.
2012-07-16 10:58:44 -07:00
John MacFarlane
f68b05e74b Textile reader: properly handle links with surrounding brackets.
Square brackets need to be used when the link isn't surrounded by
spaces or punctuation, or when the URL ending may be ambiguous.

Closes #564.
2012-07-13 14:01:56 -07:00
John MacFarlane
7da913dbd7 ConTeXt writer: don't escape &,^,<,>.
Simplified escapes for `}` and `{` to `\{` and `\}`.

Thanks to Aditya Mahajan.
2012-06-27 15:05:13 -07:00
John MacFarlane
d320c2eac5 MediaWiki writer: Avoid extra blank lines after sublists.
Thanks to Gavin Beatty.
2012-06-27 14:46:46 -07:00
John MacFarlane
e9f6366af7 Don't escape _ as \letterunderscore{} in ConTeXt. 2012-06-26 19:50:52 -07:00
John MacFarlane
a08650a603 Updated tests for changes in LaTeX template. 2012-06-08 11:00:27 -07:00
John MacFarlane
3982aaaed6 Updated tests for changes in LaTeX changes. 2012-06-05 22:25:54 -07:00
John MacFarlane
337735ae32 Updated tests for changes in latex template. 2012-06-05 11:52:57 -07:00
John MacFarlane
927b5997d8 Added failing tests for note beginning with a citation.
See issue #531.
2012-06-03 19:26:36 -07:00
John MacFarlane
9ab5b00221 Updated test suite. 2012-06-03 11:08:57 -07:00
paul.rivier
75cba828b5 Textile reader: fix for <notextile> and ==.
Closes #517.
2012-05-29 17:40:55 -07:00
John MacFarlane
87f6256e4a Added (failing) tests for textual citations in footnotes. 2012-05-23 13:36:36 -07:00
John MacFarlane
4991852edb Markdown writer: Improved definition lists.
* Use `:` form instead of `~`, for better compatibility with other
  markdown implementations.

* Don't wrap the term, because it breaks definition lists.
2012-05-16 13:07:58 -07:00
John MacFarlane
4e35c67c23 LaTeX writer: More consistent interblock spacing. 2012-05-14 07:04:47 -07:00
John MacFarlane
87de361cdc DocBook reader: More improvements, passes tests. 2012-05-09 10:34:37 -07:00
John MacFarlane
fb62e0937c DocBook reader: More test improvements. 2012-05-08 23:53:55 -07:00
John MacFarlane
2e07fb623d DocBook reader tests - further refinements. 2012-05-08 23:39:01 -07:00
John MacFarlane
4f8c536de0 DocBook reader: More improvements, more tests pass. 2012-05-08 23:25:34 -07:00
John MacFarlane
8ba8a720ed DocBook reader: Improved def lists with multiple defs. 2012-05-08 22:18:24 -07:00
John MacFarlane
f1869a05fd Improved docbook reader tests. 2012-05-08 21:44:33 -07:00
John MacFarlane
c20c139255 Added docbook reader tests (still failing). 2012-05-08 20:26:39 -07:00
John MacFarlane
9961dc274a Improved spacing around LaTeX block environments.
verbatim, itemize, description, enumerate.
2012-04-30 09:26:15 -07:00
John MacFarlane
8201257b5c LaTeX writer: Fixed spacing in quote environments.
Closes #502.  Previously you'd get:

~~~
hi

\begin{quote}
hi

\end{quote}
hi
~~~

Now we get:

~~~
hi

\begin{quote}
hi
\end{quote}

hi
~~~
2012-04-30 07:46:38 -07:00
John MacFarlane
9820a78b15 Updated latex writer tests for new template. 2012-04-28 12:23:00 -07:00
John MacFarlane
4b77def061 Merge pull request #485 from paul-r-ml/master
Textile reader update
2012-04-27 15:00:02 -07:00
paul.rivier
7b111542c0 textile reader improvements : better conformance to RedCloth Textile inlines 2012-04-24 15:56:59 +02:00
John MacFarlane
869ff43442 LaTeX writer: Use fixltx2e package to provide '\textsubscript'. 2012-04-21 09:59:36 -07:00
paul.rivier
411d54ce98 Textile reader quick clean-up and added support for LaTeX blocks and inlines. 2012-04-17 13:14:05 +02:00
John MacFarlane
7495d970b7 Mardkown writer: escape < and $. 2012-04-15 11:03:52 -07:00
John MacFarlane
998c0c6ad0 Updated texinfo test to reflect template change. 2012-04-06 16:54:39 -07:00
John MacFarlane
f25dcacedf LaTeX writer: don't use eurosym package unless document has a €. 2012-04-03 18:49:05 -07:00
John MacFarlane
7bc4dc37b2 Added PDF metadata (title,author) in LaTeX standalone + PDF output.
Closes #459.
2012-03-25 12:10:43 -07:00
Greg Maslov
4a1ba8ce49 Oops! Forgot to munch whitespace / ignore body after directive. 2012-03-25 05:03:35 -04:00
Greg Maslov
618dc294f9 Add parsing support for the rST default-role directive. 2012-03-24 21:48:54 -04:00
John MacFarlane
9352750cb2 RST writer: Better handling of inline formatting.
* `hi*there*hi` now gets rendered properly as `hi\ *there*\ hi`
* Unnecessary '\ ' are avoided around :math:, :sub:, :sup:
* Implemented most of the rules in
  http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules,
  though some unnecessary '\ ' may be inserted when unicode quotes
  are used.
2012-03-24 15:53:57 -07:00
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