Commit graph

1586 commits

Author SHA1 Message Date
John MacFarlane
e6c76525b2 Text.Pandoc: writers now an assoc list of String, Writer.
A Writer can be a PureStringWriter, an IOStringWriter, or
an IOByteStringWriter.  ALL writers are now in the 'writers'
list, including the binary writers and fb2 writer.  Code simplified
at end of pandoc.hs.
2012-07-24 19:05:38 -07:00
John MacFarlane
999edd9608 Changed signatures of writeODT, writeDocx, writeEPUB.
These now take WriterOptions and Pandoc only.
The extra parameters for epub stylesheet, epub fonts,
reference Docx, and reference ODT have been removed, since
these things are now in WriterOptions.

Note:  breaking API change!
2012-07-24 09:56:00 -07:00
John MacFarlane
cd19d4596b Added fields to WriterOptions.
writerEpubStylesheet, writerEpubFonts, writerReferenceODT,
writerReferenceDocx.  These can now be removed as extra
parameters to the writers.
2012-07-24 09:49:57 -07:00
John MacFarlane
6da9d9bca5 Small fix to fix: Allow blank lines btw table and caption. 2012-07-24 09:24:56 -07:00
John MacFarlane
da1e99c03a Fixed performance improvement to tables. 2012-07-24 09:19:52 -07:00
John MacFarlane
2a4b987cc3 More performance improvements on pipe tables. 2012-07-24 09:08:54 -07:00
John MacFarlane
bab816cefe Refactored table parsers, captions now not part of core tableWith. 2012-07-24 09:06:13 -07:00
John MacFarlane
ce72d6aba8 Slight improvement to performance for pipe tables.
Still, pipe tables are a huge performance drag.  One benchmark:
With pipe tables, 1.25 sec (including this fix).
without pipe tables, 1.05 sec.
2012-07-24 07:13:49 -07:00
John MacFarlane
fb6e798917 Set writerTableOfContents for s5 in Text.Pandoc, not pandoc.hs. 2012-07-23 22:58:16 -07:00
John MacFarlane
1bd0c47968 Set writerSlideVariant in Text.Pandoc rather than pandoc.hs. 2012-07-23 22:53:35 -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
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
Sergey Astanin
436a585c3b FB2: support images embedded as data URIs + tests. 2012-07-22 11:13:14 -07:00
Sergey Astanin
b39597a910 Added a new FictionBook2 (FB2) writer. 2012-07-22 11:13:14 -07:00
John MacFarlane
f79ed27bb5 Use Parsec directly in Biblio and Templates. 2012-07-20 16:33:37 -07:00
John MacFarlane
2c30c48757 Use Parser as type synonym for Parsec. 2012-07-20 15:54:57 -07:00
John MacFarlane
5085962c28 Text.Pandoc.Parsing: Export all Parsec functions used in pandoc code.
No other module directly imports Parsec.  This will make it easier
to change the parsing backend in the future, if we want to.
2012-07-20 14:41:44 -07:00
John MacFarlane
a4c28ead79 Use Text.Parsec instead of Text.ParserCombinators.Parsec. 2012-07-20 14:19:06 -07:00
John MacFarlane
2351f7a112 Provide Data.Default instances for ParserState and WriterOptions.
Now you can use def (which is re-exported by Text.Pandoc) instead of
defaultParserState or defaultWriterOptions.  For now, these
are still defined too, so existing code need not change.

Closes #546.
2012-07-19 12:38:54 -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
Arlo O'Keeffe
d25656571a Set ODT title property 2012-07-13 15:19:39 -06: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
6442e185b3 HTML writer: Put mathjax in span with class "math".
Closes #562.
2012-07-11 16:54:13 -07:00
John MacFarlane
9e458d7974 Pretty: Added wide punctuation range to charWidth.
Fixes bug with Chinese commas in tables.
2012-06-30 11:51:52 -07:00
John MacFarlane
9d5230c0f6 Changed macro parser so it returns raw macro if stateApplyMacros false.
Closes #554.
2012-06-29 18:30:53 -07:00
John MacFarlane
6cdfde5807 SelfContained: Fix handling of absolute URLs in css imports.
Also allow single-quoted values.

Closes #535.
2012-06-28 18:35:21 -07:00
John MacFarlane
83238cb686 Added webm to mime types. Closes #543. 2012-06-28 09:48:07 -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
dc158768b9 Docbook reader: Added support for "bold" emphasis.
Thanks to mb21.
2012-06-26 19:41:34 -07:00
John MacFarlane
527be1ddf2 Don't generate empty H1 after hrule slide breaks.
We now use a slide-level header with contents [Str "\0"] to mark
an hrule break.  This avoids creation of an empty H1 in these
contexts.

Closes #484.
2012-06-25 14:52:09 -07:00
John MacFarlane
4cf3aaecde Test for base 4.4.0 instead of 4.5.0 for argument/filename encoding. 2012-06-25 14:27:22 -07:00
John MacFarlane
cc39c313c5 Don't encode/decode file paths if base >= 4.5.
Prior to base 4.5 (and perhaps earlier - check), filepaths and command
line arguments were treated as unencoded lists of bytes, not unicode
strings, so we had to work around that by encoding and decoding
them.  This commit adds CPP checks for base 4.5 that disable the
encoding/decoding.

Fixes a bug with multilingual filenames when pandoc was compiled
with ghc 7.4. Closes #540.
2012-06-24 10:58:15 +02:00
John MacFarlane
c24b7991aa Fixed shadowing warning. 2012-06-08 11:12:56 -07:00
John MacFarlane
db645f7087 Biblio: Workaround broken toCapital in citeproc-0.3.4. 2012-06-08 10:28:51 -07:00
John MacFarlane
c06ed6e3b1 Biblio: Add comma to beginning of bare suffix, e.g. @item1 [50].
Motivation: @item1 [50] should be as close as possible to
[@item1, 50].
2012-06-05 11:54:27 -07:00
John MacFarlane
0dab912c22 Markdown reader: Added cf. and cp. to list of likely abbreviations. 2012-06-04 11:13:41 -07:00
John MacFarlane
34fac208d2 Fixed --incremental behavior for Beamer.
When `--incremental` is used, lists inside block quotes should
appear all at once (as in HTML).
2012-06-03 09:14:09 -07:00
John MacFarlane
5669dc2a47 Simplified bullet characters so they work with Word 2007.
Closes #520.
2012-06-01 18:44:00 -07:00
John MacFarlane
e14712dabd LaTeX writer: Ensure newline after Verbatim at end of footnote.
This fixes a regression. Also added a test for this.
2012-06-01 10:50:22 -07:00
John MacFarlane
4834865653 Escape % as \letterpercent{} not \letterpercent in ConTeXt. 2012-05-31 19:15:42 -07:00
John MacFarlane
81be8fbf77 Merge pull request #521 from jonassmedegaard/master
Slidy lang support, and new Slideous writer
2012-05-30 18:21:26 -07:00
paul.rivier
75cba828b5 Textile reader: fix for <notextile> and ==.
Closes #517.
2012-05-29 17:40:55 -07:00
John MacFarlane
9a47237412 RST reader: handle figures.
Closes #522.
2012-05-29 16:59:56 -07:00
John MacFarlane
91e9d904b5 Org writer: Add space before language name.
Closes #523.
2012-05-29 16:27:19 -07:00
John MacFarlane
60495e9fb3 Added a couple needed trys to textile reader. 2012-05-29 16:23:40 -07:00
John MacFarlane
3b4e4de52b ConTeXt writer: ensure space after \stopformula. 2012-05-29 12:43:11 -07:00
Jonas Smedegaard
61f8dd4da8 Add support for Slideous output. 2012-05-24 10:31:18 +02:00
John MacFarlane
9552543b96 Massively simplified Text.Pandoc.Biblio.
Fixed a bug with citations in notes and captions.

We now handle note citations by inserting notes at the
beginning, and removing notes within notes later.
2012-05-23 16:11:05 -07:00