Commit graph

709 commits

Author SHA1 Message Date
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