Commit graph

1573 commits

Author SHA1 Message Date
John MacFarlane
c554c61907 EPUB: Use title instead of "Title Page" in contents.
Otherwise we have a hard-coded English string, which looks
strange in ebooks written in other languages.  Using the
title for this entry seems a good solution.  Closes #572.
2012-08-25 21:36:43 -07:00
John MacFarlane
a6dcae1648 Merge commit 'd25656571a4662a4e67b195daed69e77d80c4c2c'
Conflicts:
	src/Text/Pandoc/Writers/ODT.hs
2012-08-23 19:39:58 -07:00
John MacFarlane
d7e658c643 Don't strip meta and link elements in epub metadata.
Per
http://idpf.org/epub/30/spec/epub30-publications.html#sec-metadata-elem,
a metadata element can contain not just Dublin Core elements but also
meta and link elements, but Pandoc currently strips those out.

Patch from aberrancy. Closes #589.
2012-08-23 19:09:56 -07:00
John MacFarlane
dc8e5970bf Implemented Ext_backtick_code_blocks.
This is the variant github prefers.
2012-08-21 20:11:10 -07:00
John MacFarlane
dc6a133dbf Added Ext_fenced_code_attributes. 2012-08-21 19:35:36 -07:00
John MacFarlane
b985d33406 Changed nomenclature, delimited -> fenced code blocks. 2012-08-21 19:21:51 -07:00
John MacFarlane
7b34dd8dd1 Added Ext_abbrevations for PHP markdown style abbreviation keys.
Note:  pandoc does not have an abbreviation element (yet) and
so currently when this extension is enabled, it just causes
pandoc to skip the abbrevation keys.
2012-08-19 11:15:32 -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
fd616665ac Docx line breaks: Use w:cr in w:r instead of w:br.
This seems to fix a problem viewing pandoc-generated
docx files in LibreOffice.
2012-08-17 18:27:48 -07:00
John MacFarlane
c7bd034fa8 Added comments in Options. 2012-08-16 19:57:03 -07:00
John MacFarlane
a6f2b96084 Moved renderTags' from HTML reader & SelfContained to Shared.
Improved removal of markdown="1" attribute in Markdow reader.
2012-08-15 09:42:16 -07:00
John MacFarlane
3745706fa2 Tweaks on markdown="1" handling. 2012-08-15 09:26:47 -07:00
John MacFarlane
bb0b5e9022 Markdown: Prevent parse failure on HTML blocks with -raw_html. 2012-08-13 20:04:17 -07:00
John MacFarlane
76edb6b848 Pretty: Fixed bug that caused combining characters to be dropped. 2012-08-13 15:52:41 -07:00
John MacFarlane
27304513f6 Added Ext_raw_html extension.
Closes #556 -- you can now specify markdown-raw_html as your
input format.  (Read: markdown minus raw_html.)
2012-08-12 22:04:23 -07:00
John MacFarlane
e8e8468d69 Implemented Ext_mmd_title_block in markdown reader & writer. 2012-08-12 19:27:13 -07:00
John MacFarlane
5d83751af4 Implemented tex_math extensions in markdown writer. 2012-08-11 22:24:06 -07:00
John MacFarlane
e520762543 Implemented Ext_markdown_attribute in markdown writer. 2012-08-11 22:04:37 -07:00
John MacFarlane
6f3e228bd9 Mardkown reader: Implemented Ext_markdown_attribute. 2012-08-11 19:44:23 -07:00
John MacFarlane
872fd2fb9c Revert "Implemented Ext_markdown_attribute."
This reverts commit 78d3a0fb9d.
2012-08-11 16:36:54 -07:00
John MacFarlane
78d3a0fb9d Implemented Ext_markdown_attribute.
This adds markdown=1 to block tags.
2012-08-11 15:04:12 -07:00
John MacFarlane
9591fc9614 Implemented Ext_tex_math_single_backslash, Ext_tex_math_double_backslash. 2012-08-10 23:45:16 -07:00
John MacFarlane
eb4d522a56 Options and documentation for backslash tex math options.
Ext_tex_math_single_backslash and Ext_tex_math_double_backslash.
Still need to code in reader.
2012-08-10 21:57:54 -07:00
John MacFarlane
417cde38af Changed Ext_tex_math to Ext_tex_math_dollars. 2012-08-10 21:52:18 -07:00
John MacFarlane
88804c89bb Removed refs to Ext_header_identifiers in comments. 2012-08-10 21:48:05 -07:00
John MacFarlane
3a17919a46 Markdown: Allow pipe tables created by emacs orgtbl-mode to work.
The difference is the + separators.  Note: only simple org-tables
work, with no bottom line. This just allows you to use org-mode's
nice table editor to create regular pipe tables.

In particular, org-mode's method for determining column alignments
implicitly is not enabled.  You must put in :s to specify alignments,
as stated in the documentation.
2012-08-10 13:29:37 -07:00
John MacFarlane
8d65651309 Changed strict to markdown_strict. 2012-08-09 22:32:22 -07:00
John MacFarlane
05216d2919 Fixed handling of default extensions, so they don't override +options. 2012-08-09 20:41:50 -07:00
John MacFarlane
0cb7362f62 Removed --strict, added extensions to writer/reader names.
* The `--strict` option has been removed.
* Instead of using `--strict`, one can now use `strict` instead of
  `markdown` as an input or output format name.
* The `--enable` and `--disable` optinos have been removed.
* It is now possible to enable or disable specific extensions
  by appending them (with '+' or '-') to the writer or reader
  name.  For example `pandoc -f markdown-footnotes+hard_line_breaks`.
* The lhs extensions are now implemented this way, too; you can
  use either `+lhs` or `+literate_haskell`.
2012-08-09 20:24:05 -07:00
John MacFarlane
71e0c206c1 Added getReader, getWriter to Text.Pandoc. 2012-08-09 19:11:19 -07:00
John MacFarlane
a740de0508 Use safeRead instead of using reads directly (various modules). 2012-08-09 08:11:28 -07:00
John MacFarlane
10cdd59fa8 Added safeRead to Text.Pandoc.Shared. 2012-08-09 07:52:39 -07:00
John MacFarlane
244dae8da8 Added parseFormatSpec to Text.Pandoc. 2012-08-09 07:42:40 -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
6561ce0ec1 Markdown reader: Modified to use Builder from pandoc-types 1.10.*. 2012-08-07 22:49:15 -07:00
John MacFarlane
f9f6e5ec6f Made pandocExtensions default for reader/writer options. 2012-08-07 13:17:30 -07:00
John MacFarlane
8a101cffe3 Support hard_line_breaks markdown extension.
* Added Ext_hard_line_breaks.
* Added section in README on non-pandoc extensions.
* Exported pandocExtensions and strictExtensions in Text.Pandoc.Options.

Closes #514.
2012-08-06 22:14:35 -07:00
John MacFarlane
dc071f807d Markdown writer: Tables now sensitive to table extension options.
Ext_simple_table, Ext_multiline_tables, Ext_pipe_tables.
Simple tables are preferred over pipe tables when both are
enabled.  If no appropriate table style is available,
a raw HTML table is used.

So far there is no option for output of grid tables.
2012-08-05 10:23:30 -07:00
John MacFarlane
437b9ec5a4 Started making markdown table writer sensitive to options.
So far incomplete.
2012-08-05 00:02:08 -07:00
John MacFarlane
3f913c0cc5 Don't include empty captions in figures.
Closes #581.
2012-08-04 11:34:01 -07:00
John MacFarlane
c19c6fdc50 Markdown reader: look for raw html/latex blocks before tables.
Otherwise the following gets parsed as a table:

\begin{code}
--------------
-- My comment.
\end{code}

Closes #578.
2012-08-04 10:49:05 -07:00
John MacFarlane
64f1d68d4e Don't use escaped line breaks in plain output. 2012-08-02 22:22:52 -07:00
John MacFarlane
b6ab2d3cb8 Made markdown writer sensitive to Ext_subscript/superscript/strikeout.
HTML is used if these are disabled.
2012-08-02 21:40:54 -07:00
John MacFarlane
aef0f1d7c7 Made markdown writer sensitive to Ext_definition_lists.
IF not set, definition lists will be rendered as regular
paragraphs, with the term set off by a line break.
2012-08-02 21:35:02 -07:00
John MacFarlane
03b1ba546f Made markdown writer sensitive to Ext_startnum, Ext_fancy_lists. 2012-08-02 21:20:31 -07:00
John MacFarlane
d21304bab0 Made markdown reader sensitive to Ext_raw_tex. 2012-08-02 21:14:43 -07:00
John MacFarlane
214fef9e27 Made markdown writer sensitive to Ext_table_captions. 2012-08-02 21:07:40 -07:00
John MacFarlane
b98049ee6c Made markdown writer sensitive to Ext_pandoc_title_blocks. 2012-08-02 21:03:54 -07:00
John MacFarlane
1d7fd8012d Made markdown writer sensitive to Ext_footnotes.
If footnotes not enabled, footnotes are formatted like normal
markdown paragraphs, with a marker like [3].
2012-08-02 21:00:02 -07:00
John MacFarlane
2403ca86f9 Markdown reader: Import <> from Text.Pandoc.Builder.
This way the module will work with versions of Data.Monoid
that don't export <>.
2012-08-02 17:25:57 -07:00