Commit graph

1205 commits

Author SHA1 Message Date
Nikolay Yakimov
c1ff165154 MD Reader: Tests for links/footnotes after citations
In-text citation suffix clashes with links and footnotes
2015-04-20 01:31:45 +03:00
John MacFarlane
343b6051da Added test case for #2062. 2015-04-18 19:00:18 -07:00
John MacFarlane
d20152e011 Markdown writer: improved escaping.
`<` should not be escaped as `\<`, for compatibility with
original Markdown.  We now escape `<` and `>` with entities.
Also, we now backslash-escape square brackets.

Closes #2086.
2015-04-18 10:58:50 -07:00
John MacFarlane
d3544dc6f7 Markdown definition lists: don't require indent for first line.
Previously the body of the definition (after the `:` or `~` marker)
needed to be in column 4.  This commit relaxes that requirement,
to better match the behavior of PHP Markdown Extra.  So, now
this is a valid definition list:

    foo
    : bar

This patch also helps resolve a potentially ambiguity with table
captions:

    foo

      : bar

      -----
      table
      -----

Is "bar" a definition, or the caption for the table?  We'll count
it as a caption for the table.

Closes #2087.
2015-04-18 10:13:32 -07:00
John MacFarlane
10e28ef750 More principled fix for #1820.
If the tag parses as a comment, we check to see if the
input starts with `<!--`. If not, it's bogus comment mode
and we fail htmlTag.

Includes test case.  Closes #1820.
2015-04-17 22:56:33 -07:00
John MacFarlane
764f677530 Merge branch 'latex-tightlist' of https://github.com/jlduran/pandoc into jlduran-latex-tightlist
Conflicts:
	data/templates
2015-04-17 19:23:13 -07:00
John MacFarlane
28ca8566ab Merge pull request #1954 from mcmtroffaes/feature/citekey-firstchar-alphanum
Allow digit as first character of a citation key.
2015-04-17 19:10:37 -07:00
John MacFarlane
44fcc5f96e Merge pull request #2079 from lierdakil/rst-normalize-headings
RST Writer: Normalize headings to sequential levels
2015-04-17 19:06:25 -07:00
John MacFarlane
fb143be038 Merge pull request #2092 from lierdakil/issue1909
MD Reader: Smart apostrophe after inline math
2015-04-17 18:55:35 -07:00
John MacFarlane
9ad336f586 LaTeX template: redefine \paragraph, \subparagraph...
to behave more like section headers.  Closes #1658.
2015-04-17 18:51:36 -07:00
Nikolay Yakimov
94e4a5ec44 MD Reader: Test for smart ' after inline math 2015-04-18 00:53:20 +03:00
Nikolay Yakimov
4b7ddeb63f RST Writer: Tests for rubrics and heading normalization 2015-04-16 19:27:33 +03:00
John MacFarlane
c5acaec3b5 LaTeX template: include grffile together with graphicx.
This properly handles filenames containing spaces and dots.
Closes #2074.
2015-04-13 09:00:55 -07:00
John MacFarlane
fee04fbee0 Merge pull request #2072 from lierdakil/latex-reader-cleanup
LaTeX Reader: Code cleanup
2015-04-12 21:39:08 -07:00
John MacFarlane
6a83773f03 OpenDocument template: use text:p instead of text:h for title.
Using `text:h` causes problems with numbering.  Closes #2059.
Thansk to @nkalvi for diagnosing this.
2015-04-12 21:29:53 -07:00
Nikolay Yakimov
251ce0738d LaTeX Reader: Test for ^^ character escapes 2015-04-13 03:22:39 +03:00
Nikolay Yakimov
66a8016bb3 ODT Writer: Figure captions - Tests update 2015-04-12 00:56:02 +03:00
John MacFarlane
28497d484e RST writer: better handling of raw latex inline.
We use `` :raw-latex:`...` `` and add a definition for this
role to the template.

Closes #1961.
2015-04-07 22:07:38 -07:00
Nikolay Yakimov
96438b11e0 Latex Reader: More tests for corner cases 2015-03-30 06:40:01 +03:00
Nikolay Yakimov
8981856aad Latex Reader: Test for para starting with latex macro 2015-03-30 06:17:24 +03:00
Nikolay Yakimov
f3e8274d04 LaTeX Reader: check for block-level newcommand aliases in blockCommand 2015-03-30 05:37:00 +03:00
John MacFarlane
2d2e4c9ab2 Merge branch 'master' of https://github.com/rootzlevel/pandoc into rootzlevel-master
Conflicts:
	src/Text/Pandoc/Readers/Org.hs
2015-03-28 21:09:38 -07:00
John MacFarlane
743b680649 Merge branch 'master' of github.com:jgm/pandoc 2015-03-28 13:10:32 -07:00
John MacFarlane
c6aaeb3c4f Fixed typo in lhs-test.html. 2015-03-28 13:02:59 -07:00
John MacFarlane
b74af6762d Merge branch 'mpickering-errortype' 2015-03-28 12:15:09 -07:00
John MacFarlane
6f4018f8d3 Fixed lhs writer tests (overflow-x, not x-overflow). 2015-03-28 12:13:27 -07:00
John MacFarlane
6a3a04c428 Merge branch 'errortype' of https://github.com/mpickering/pandoc into mpickering-errortype
Conflicts:
	benchmark/benchmark-pandoc.hs
	src/Text/Pandoc/Readers/Markdown.hs
	src/Text/Pandoc/Readers/Org.hs
	src/Text/Pandoc/Readers/RST.hs
	tests/Tests/Readers/LaTeX.hs
2015-03-28 12:12:48 -07:00
John MacFarlane
5f74db8605 Updated tests for new highlighting-kate behavior. 2015-03-28 10:10:33 -07:00
John MacFarlane
619b2e8ca2 Merge pull request #1968 from lierdakil/issue1607
Fixes for multiple docx writer style bugs.
2015-03-16 12:02:40 -07:00
John MacFarlane
fcf1cd2f31 AsciiDoc writer: avoid wrapping after list marker.
Closes #1858.
2015-03-15 15:43:05 -07:00
John MacFarlane
451019290b AsciiDoc writer: insert some needed blank lines.
Closes #1860.
2015-03-15 14:48:01 -07:00
John MacFarlane
0deb7c507d Merge pull request #1989 from zudov/shortcut_ref_link_pr
Support shortcut reference links in markdown writer
2015-03-15 11:58:30 -07:00
Konstantin Zudov
b9f77ed03d Support shortcut reference links in markdown writer
Issue #1977

Most markdown processors support the [shortcut format] for reference links.
Pandoc's markdown reader parsed this shortcuts unoptionally.
Pandoc's markdown writer (with --reference-links option) never shortcutted links.

This commit adds an extension `shortcut_reference_links`. The extension is
enabled by default for those markdown flavors that support reading shortcut
reference links, namely:

    - pandoc
    - strict pandoc
    - github flavoured
    - PHPmarkdown

If extension is enabled, reader parses the shortcuts in the same way as
it preveously did. Otherwise it would parse them as normal text.

If extension is enabled, writer outputs shortcut reference links unless
doing so would cause problems (see test cases in `tests/Tests/Writers/Markdown.hs`).
2015-03-10 20:32:24 +02:00
Craig S. Bosma
513221f822 Org reader: add support for smart punctuation 2015-03-09 07:11:53 -05:00
Mathias Schenner
12bf0ff3e5 LaTeX reader: allow non-empty colsep in tables
The `tabular` environment allows non-empty column separators
with the "@{...}" syntax. Previously, pandoc would fail to
parse tables if a non-empty colsep was present. With this
commit, these separators are still ignored, but the table gets
parsed. A test case is included.
2015-03-08 15:47:39 +01:00
Mathias Schenner
1e3ef0e36f LaTeX reader: allow valign argument in tables
The `tabular` environment takes an optional parameter for
vertical alignment. Previously, pandoc would fail to parse
tables if this parameter was present. With this commit,
the parameter is still ignored, but the table gets
parsed. A test case is included.
2015-03-08 15:39:18 +01:00
Mathias Schenner
4f9a10619f LaTeX reader: add some test cases for simple tables 2015-03-08 15:17:09 +01:00
Nikolay Yakimov
59c4d28d8c Docx Writer: Tables test 2015-03-08 04:42:50 +03:00
Nikolay Yakimov
a82dedf1ff Lists test 2015-03-08 03:59:48 +03:00
John MacFarlane
48eaadc57f Fixed pipe tables -- headerless tables are not allowed.
GFM and PHP Markdown Extra pipe tables require headers.
Previously pandoc allowed pipe tables not to include headers,
and produced headerless pipe tables in Markdown output, but this
was based on a misconception about pipe table syntax. This
commit fixes this.

Note:  If you have been using headerless pipe tables, this may
cause existing tables to break.

Closes #1996.
2015-03-07 10:40:13 -08:00
Nikolay Yakimov
ae07d5ed49 Initial tests for writer 2015-03-03 14:37:02 +03:00
Hans-Peter Deifel
5871955169 Org reader: Add test for image links
Tests for image links with non-image targets, as introduced in
commit 2ca5101.
2015-02-26 13:11:50 +01:00
John MacFarlane
9a5e081073 Markdown writer: Avoid introducing spurious list items through wrapping.
Closes #1946.
2015-02-25 10:16:05 -08:00
Jesse Rosenthal
9654514e8a Docx reader: add test for verbatim in sub/superscript. 2015-02-21 08:45:38 -05:00
Jesse Rosenthal
2995526772 Docx reader: Add tests for new list style parsing. 2015-02-19 00:24:04 -05:00
Matthew Pickering
1a7a99161a Update tests 2015-02-18 21:09:07 +00:00
Matthias C. M. Troffaes
dccd408a9c Allow digit as first character of a citation key.
* Update parser to recognize citation keys starting with a digit.
* Update documentation accordingly.
* Test case added.

See https://github.com/jgm/pandoc-citeproc/issues/97
2015-02-18 15:30:17 +00:00
John MacFarlane
3480189e8e ICML writer: Better handling of raw blocks and inlines.
Previously these were always escaped and printed verbatim.
Now they are ignored unless the format is "icml", in which
case they are passed through unescaped.

Closes #1951.
2015-02-17 08:50:48 -08:00
Jesse Rosenthal
616e211f36 Docx reader: test lists in table cells. 2015-02-13 09:08:07 -05:00
John MacFarlane
12962e2332 Merge pull request #1927 from freephile/master
update syntax for Images/Media files in MediaWiki
2015-02-07 20:33:33 -08:00
John MacFarlane
bd7cf8dbd5 Merge branch 'patch/fixTexinfoWrap' of https://github.com/timtylin/scholdoc into timtylin-patch/fixTexinfoWrap
Conflicts:
	src/Text/Pandoc/Writers/Texinfo.hs
2015-02-07 20:28:56 -08:00
Tim Lin
858ebf99eb Texinfo writer: fix wrapping by using breakable spaces 2015-02-06 01:16:40 -08:00
Greg Rundlett
13c4757057 update syntax for Images/Media files in MediaWiki
The preferred syntax for Images and other media is [[File:Foo.jpg]] in MediaWiki since v1.14 (2008).  [[Image:Foo.jpg]] is deprecated but still works as an alias to the File namespace.
2015-02-05 17:03:20 -05:00
Tim Lin
0c18f3a854 Append newline to the LineBreak of various writers
This change improves output formatting of content with a large amount of force line breaks, such as line-blocks. The following writers are affected:

* Dokuwiki
* HTML
* EPUB (via HTML)
* LaTeX
* MediaWiki
* OpenDocument
* Texinfo

This commit resolves #1924
2015-02-04 22:42:22 -08:00
John MacFarlane
6a0d4da382 HTML writer: Add "inline" or "display" class to math spans.
This allows inline and display math to be styled differently.

Closes #1914.
2015-02-01 11:08:27 -08:00
John MacFarlane
33d1c8cc01 Merge pull request #1885 from mb21/html-reader-tables
fixes HTML Reader: tables
2015-01-25 10:46:47 -08:00
mb21
b40d33b174 fixes #1859 HTML Reader table parsing 2015-01-25 09:41:12 +01:00
Jesse Rosenthal
e88119f2d1 Docx Reader: Add test for VML images.
Since images are often visually (not structurally) placed on the page,
people might not always get the results they're looking for here.
2015-01-21 13:41:16 -05:00
John MacFarlane
fcd1599b09 FB2 writer: Add newline to output. 2014-12-15 22:14:29 -08:00
John MacFarlane
0eb3f8cff2 HTML writer: put newline btw img and caption paragraph. 2014-12-15 21:49:16 -08:00
John MacFarlane
a5cac0a0c4 Don't treat a citation as a reference link label.
Closes #1763.
2014-12-15 10:54:12 -08:00
John MacFarlane
47c360e079 Improved texorpdfstring patch #1148.
* Make LaTeX reader recognize texorpdfstring.
* Don't use texorpdfstring unless it's actually needed.
* Fix tests.
2014-12-15 10:06:03 -08:00
John MacFarlane
544f3e5b45 Merge branch 'use-texorpdfstring' of https://github.com/wilx/pandoc into wilx-use-texorpdfstring
Conflicts:
	src/Text/Pandoc/Writers/LaTeX.hs
	tests/Tests/Writers/LaTeX.hs
2014-12-15 10:01:50 -08:00
John MacFarlane
a864e9a348 Merge pull request #1805 from bergey/rst
RST Reader - Improved Role Support
2014-12-15 09:06:45 -08:00
John MacFarlane
9e75b9b84b DocBook readers: Include id on section headers.
Closes #1818.
2014-12-14 23:46:25 -08:00
John MacFarlane
1d3ca088f2 Merge pull request #1813 from tarleb/file-links
Org reader: properly handle links to `file:target`
2014-12-14 13:36:34 -08:00
Albert Krewinkel
4d85b17fc5 Org reader: properly handle links to file:target
Org links like `[[file:target][title]]` were not handled correctly,
parsing the link target verbatim.  The org reader is changed such that
the leading `file:` is dropped from the link target.

This is related to issues #756 and #1812.
2014-12-14 21:30:10 +01:00
John MacFarlane
2b08e32a90 Fixe autolinks with following punctuation.
Closes #1811.
The price of this is that autolinked bare URIs can no longer
contain `>` characters, but this is not a big issue.
2014-12-14 12:20:33 -08:00
Daniel Bergey
689fb112bf RST Reader: compute Attrs when role is defined
Move recursive role lookup from renderRole to addNewRole.  The Attr value
will be the same for every occurance of this role, so there's no reason
to compute it every time.  This allows simplifying the
stateRstCustomRoles map considerably.

We could go even further, and remove the fmt and attr arguments to
renderRole, which are null except for custom roles.
2014-12-12 14:45:45 +00:00
Daniel Bergey
4e040160e0 WIP: tests for RST roles 2014-12-12 14:45:45 +00:00
John MacFarlane
4ffa70970d Merge pull request #1695 from bjornbm/master
Escape inline verbatim spaces in LaTeX output
2014-12-10 09:07:46 -08:00
Bryan O'Sullivan
2150903230 DocBook reader: document/test "type" as implemented 2014-12-08 23:17:27 -08:00
Bryan O'Sullivan
aaf93d8f4e Fix test suite 2014-12-08 23:16:21 -08:00
Bryan O'Sullivan
fe1d147187 DocBook reader: add support for classname 2014-12-08 23:12:06 -08:00
Bryan O'Sullivan
33fdb6bc15 DocBook reader: add support for calloutlist and callout
We treat a calloutlist as a bulleted list. This works well in practice.
2014-12-08 22:26:09 -08:00
Matthew Pickering
48e2586ec8 Merge pull request #1746 from shelf/dw-ext-images
DokuWiki writer: fix external images
2014-12-08 23:55:36 +00:00
Daniel Bergey
74c1b547c2 parse RST class directives
The class directive accepts one or more class names, and creates a Div
value with those classes.  If the directive has an indented body, the
body is parsed as the children of the Div.  If not, the first block
folowing the directive is made a child of the Div.

This differs from the behavior of rst2xml, which does not create a Div
element.  Instead, the specified classes are applied to each child of
the directive.  However, most Pandoc Block constructors to not take an
Attr argument, so we can't duplicate this behavior.
2014-12-01 18:22:03 +00:00
Daniel Bergey
2cdfa5eb20 parse RST quoted literal blocks
closes #65
RST quoted literal blocks are the same as indented literal blocks (which
pandoc already supports) except that the quote character is preserved in
each line.

This includes test cases for the quoted literal block, as well as
additional tests for line blocks and indented literal blocks, to verify
that these are unaffected by the changes.
2014-12-01 18:22:03 +00:00
John MacFarlane
d8fde9547e Reverted "omit blank lines after list items," better fix for #1777.
Now we do as before, including blank lines after list items in
loose lists (even though RST doesn't care -- this is just a matter
of visual appeal).  But we chomp any excess whitespace after the
last list item, which solves #1777.
2014-11-25 12:34:44 -08:00
John MacFarlane
25e2c42347 RST writer: Omit blank lines after list items.
They are optional in RST (except after the last list item,
of course).

Fixes #1777.
2014-11-25 12:24:33 -08:00
John MacFarlane
9e5a8de95a Removed extra </body> tag from tests/html-reader.html. 2014-11-16 20:46:45 -08:00
John MacFarlane
46d343f474 Fixed bug in org with bulleted lists:
- a
   - b
   * c

was being parsed as a list, even though an unindented `*`
should make a heading.  See
<http://orgmode.org/manual/Plain-lists.html#fn-1>.
2014-11-13 23:40:18 -08:00
Caleb McDaniel
bd245450c4 Add tests for external links with anchors 2014-11-13 00:42:58 -05:00
John MacFarlane
43c1978fae Merge pull request #1645 from neongreen/issue1636
Fix 'Ext_lists_without_preceding_blankline' bug.
2014-11-12 09:05:29 -08:00
Timothy Humphries
98161afa1a DokuWiki writer: add external_images test
Add test for #1739.
2014-11-09 02:18:58 -05:00
Albert Krewinkel
e6cd8c9077 Org reader: allow empty links for gitit interop
While empty links are not allowed in Emacs org-mode,  Pandoc org-mode
should support them: gitit relies on empty links as they are used to
create wiki links.

Fixes jgm/gitit#471
2014-11-05 23:15:28 +01:00
Albert Krewinkel
daaf635806 Org reader: absolute, relative paths in links
The org reader was to restrictive when parsing links, some relative
links and links to files given as absolute paths were not recognized
correctly.  The org reader's link parsing function was amended to handle
such cases properly.

This fixes #1741
2014-11-05 22:27:25 +01:00
John MacFarlane
f3ac41937d DokuWiki writer: Better handling of block quotes.
This change ensures that multiple paragraph blockquotes are
rendered using native `>` rather than as HTML.

Closes #1738.
2014-11-04 14:52:19 -08:00
Alexander Sulfrian
79f25fb9ce TWiki Reader: add basic syntax test 2014-10-30 20:02:05 +01:00
Jesse Rosenthal
60846471a3 Docx test: Remove Danish header test.
Redundant, now that we're testing for a more generalized sort of
internationalized blocks.
2014-10-25 16:02:31 -04:00
Jesse Rosenthal
c0ddcb359e Docx reader: add tests for i18n headers.
This tests blockquotes and headers in Russian. Previous tests make sure
that this doesn't produce a regression in en-us Header and Blockquotes.
2014-10-25 16:00:27 -04:00
John MacFarlane
e16683b539 HTML writer: Make header attributes work outside top level.
Previously they only appeared on top level header elements.
Now they work e.g. in blockquotes.

Closes #1711.
2014-10-23 10:27:14 -07:00
John MacFarlane
78bdc08de7 Merge pull request #1706 from tarleb/org-symbol-entities
Org reader: parse LaTeX-style MathML entities
2014-10-21 10:11:19 -07:00
John MacFarlane
7f6bbfadf4 Pretty: Make CR + BLANKLINE = BLANKLINE.
This fixes an extra blank line we were getting at the end
of markdown fragments (as well as rst, org, etc.)

Closes #1705.
2014-10-20 20:26:08 -07:00
Albert Krewinkel
a5eb02f6a7 Org reader: parse LaTeX-style MathML entities
Org supports special symbols which can be included using LaTeX syntax,
but are actually MathML entities.  Examples for this are
`\nbsp` (non-breaking space), `\Aacute` (the letter A with accent acute)
or `\copy` (the copyright sign ©).

This fixes #1657.
2014-10-20 22:57:36 +02:00
John MacFarlane
d7169c715d Parsing: fixed inlineMath so it handles \text{..} containing $.
For example: `$x = \text{the $n$th root of $y$}`.  Closes #1677.
2014-10-19 16:42:56 -07:00
John MacFarlane
84f6b1e41a Merge pull request #1680 from shelf/master
Respect indent when parsing Org bullet lists
2014-10-18 13:20:27 -07:00
John MacFarlane
31713d572a Merge pull request #1700 from tarleb/org-emphasis-fix
Org reader: fix rules for emphasis recognition
2014-10-18 13:19:42 -07:00
Albert Krewinkel
e3c36ed6ce Org reader: Drop COMMENT document trees
Document trees under a header starting with the word `COMMENT` are
comment trees and should not be exported.  Those trees are dropped
silently.

This closes #1678.
2014-10-18 22:11:53 +02:00
Albert Krewinkel
d571bec454 Org reader: fix rules for emphasis recognition
Things like `/hello,/` or `/hi'/` were falsy recognized as emphasised
strings.  This is wrong, as `,` and `'` are forbidden border chars and
may not occur on the inner border of emphasized text.  This patch
enables the reader to matches the reference implementation in that it
reads the above strings as plain text.
2014-10-18 12:47:59 +02:00
Timothy Humphries
f1f56e8533 Fix indent issue for definition lists
Tidy up fix for #1650, #1698 as per comments in #1680.
Fix same issue for definition lists with the same method.
2014-10-17 20:06:25 -04:00
Bjorn Buckwalter
7960013cd4 Escape spaces. Fixes jgm/pandoc#1694. 2014-10-15 21:06:41 +02:00
Timothy Humphries
4f4b0f031d Respect indent when parsing Org bullet lists
Fixes issue with top-level bullet list parsing.
Previously we would use `many1 spaceChars` rather than respecting
the list's indent level. We also permitted `*` bullets on unindented
lists, which should unambiguously parse as `header 1`.
Combined, this meant headers at a different indent level were
being unwittingly slurped into preceding bullet lists, as per
Issue #1650.
2014-10-12 03:18:36 -04:00
John MacFarlane
fe6d43b3e0 Merge pull request #1601 from jkr/windowsfix
Fix path-slashes inside archive for windows
2014-09-27 16:21:17 -07:00
Matthew Pickering
fa2d11c954 Update tests for #1649 2014-09-27 22:40:25 +01:00
Artyom
bc115ffc2d Fix 'Ext_lists_without_preceding_blankline' bug.
* Fixes #1636.
  * Adds a test.
2014-09-26 13:32:08 +04:00
mpickering
c0b9ad4c5d EPUB Tests: Seperating image testing from other features 2014-09-25 13:33:25 +01:00
mpickering
cc07d0c6bf Shared: Make collapseFilePath OS-agnostic 2014-09-25 12:42:53 +01:00
John MacFarlane
0de27f3579 Updated tests for #1616 change. 2014-09-09 10:09:05 -07:00
Jesse Rosenthal
8d22bf26ab LaTeX writer: Test for protecting images in header. 2014-09-09 11:05:47 -04:00
Jesse Rosenthal
f56e0e958a Docx reader: Add test for polyglot headers.
Only Danish at the moment.
2014-09-05 22:07:06 -04:00
Jesse Rosenthal
313355e373 Org reader: Update Tests
Test for markup after blank line.
2014-09-04 19:55:53 -04:00
Jesse Rosenthal
08359c44e4 Docx Reader: Add tests for numbered headers. 2014-09-04 19:39:49 -04:00
Jesse Rosenthal
a6eead7f26 Docx reader: Modify mediabag test accordingly. 2014-09-02 14:05:54 -04:00
Jose Luis Duran
9557eb6f8e LaTeX writer: Use a declaration for tight lists
Currently, pandoc has hard-coded the following in order to make tight lists in
LaTeX:

```hs
text "\\itemsep1pt\\parskip0pt\\parsep0pt"
```

Which is fine, but does not allow customizations.  For example, the `memoir`
class already has a `\tightlist` declaration for this purpose:

```tex
\newcommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
```

I'm proposing to use a similar solution:

```diff
@@ In Writers/LaTeX.hs:
-then text "\\itemsep1pt\\parskip0pt\\parsep0pt"
+then text "\\tightlist"

@@ In templates/default.latex:
+\newcommand{\tightlist}{%
+  \setlength{\itemsep}{1pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}}
```

This allows us to customize the tightness to our needs.

Backward Compatibility

If a person is using a custom LaTeX template (not based upon the `memoir`
class), the `\tightlist` declaration must be added.
2014-09-01 05:08:24 +00:00
John MacFarlane
3533218d6d Merge pull request #1594 from jkr/itemFix
Item fix
2014-08-31 19:31:38 -07:00
Jesse Rosenthal
dfc8ab5a6a LaTeX writer: Add tests for header-in-item. 2014-08-31 16:05:20 -04:00
John MacFarlane
598d3ee23b Markdown reader: better handling of paragraph in div.
Previously text that ended a div would be parsed as Plain
unless there was a blank line before the closing div tag.

Test case:

    <div class="first">
    This is a paragraph.

    This is another paragraph.
    </div>

Closes #1591.
2014-08-31 12:55:47 -07:00
John MacFarlane
374bb3c147 DokuWiki writer: Make tables prettier by aligning columns.
Also cleaned up crufty code and added tests.
2014-08-30 21:24:33 -07:00
John MacFarlane
a8273009ba Textile reader: Improved table support.
We can now handle all different alignment types, for simple
tables only (no captions, no relative widths, cell contents just
plain inlines).  Other tables are still handled using raw HTML.

Addresses #1585 as far as it can be addresssed, I believe.
2014-08-30 20:34:42 -07:00
Jesse Rosenthal
4eb9769a4c Dokuwiki writer: Add a test for multiblock table cells.
We have to add a new file, because the original table tests don't look
for this.
2014-08-30 15:34:40 -04:00
John MacFarlane
218633548f Merge pull request #1574 from jlduran/latex-horizontal-rule
LaTeX writer: Make Horizontal Rules more flexible
2014-08-29 21:40:55 -07:00
John MacFarlane
017d44af1d Merge branch 'ugly-tables' of https://github.com/jlduran/pandoc into jlduran-ugly-tables 2014-08-29 21:24:36 -07:00
Jose Luis Duran
4c684561ee LaTeX writer: Add \strut to fix multiline tables
See: http://tex.stackexchange.com/questions/34971
2014-08-29 13:54:08 +00:00
Jesse Rosenthal
3b5a868533 Docx reader: update tests for new table behavior. 2014-08-28 14:39:04 -04:00
Jose Luis Duran
1fc665c07d LaTeX writer: Make Horizontal Rules more flexible
Currently, pandoc has hard-coded the following in order to make horizontal
rules in LaTeX:

```hs
"\\begin{center}\\rule{3in}{0.4pt}\\end{center}"
```

Which is fine, but does not allow customizations.  It also does not take into
consideration the current line width.

I'm proposing this change:

```diff
@@ In Writers/LaTeX.hs:
-"\\begin{center}\\rule{3in}{0.4pt}\\end{center}"
+"\\begin{center}\\rule{0.5\\linewidth}{\\linethickness}\\end{center}"
```
2014-08-28 03:12:37 +00:00
Jose Luis Duran
f1d330b7b5 LaTeX writer: Fix tables
- [x] Fix a bug introduced in 66378062b6, which
  causes the table caption to repeat across all pages
- [x] Address the issues discussed
  [here](https://groups.google.com/forum/#!msg/pandoc-discuss/qMu6_5lYy0o/ZAU7lzAIKw0J)
  regarding the extra vertical space.
  - [ ] NOTE: This will cause multiline table cells to appear unpadded. See
    http://tex.stackexchange.com/questions/34971
  - [x] Use [`\tabularnewline`](http://tex.stackexchange.com/questions/78796)
    instead of `\\`.
2014-08-28 02:02:20 +00:00
John MacFarlane
17f71002ae Merge pull request #1553 from mpickering/master
Txt2Tags reader: Header is now parsed only if standalone flag is set
2014-08-21 16:42:28 -07:00
mpickering
2a7319541d Txt2Tags Reader: Parse Meta information
The header is now parsed as meta information. The first line is the
`title`, the second is the `author` and third line is the `date`.
2014-08-21 17:09:40 +01:00
mpickering
2cd049a1bf Txt2Tags reader: Header is now parsed only if standalone flag is set 2014-08-20 18:11:37 +01:00
John MacFarlane
13469af843 More test updates. 2014-08-20 09:47:47 -07:00
John MacFarlane
7e69f4a4fa Updated tests. 2014-08-20 09:23:19 -07:00
John MacFarlane
9d52ecdd42 HTML reader: Parse appropriately styled span as SmallCaps. 2014-08-16 22:57:00 -07:00
Jesse Rosenthal
180f5cbe63 Docx reader: Test for character styles. 2014-08-16 14:05:56 -04:00
John MacFarlane
8bf39cf6d6 Markdown reader: Better handle quote characters in inline links.
This was previously failing to be recognized as a link:

    [Test](http://en.wikipedia.org/wiki/Ward's_method)

Closes #1534.
2014-08-14 10:59:27 -07:00
John MacFarlane
e917bcc124 Make raw_tex extension non-default for textile reader, writer.
Enable `raw_tex` extension in textile writer.

Closes #1532.
2014-08-14 09:49:31 -07:00
John MacFarlane
76d14bcc11 Old tests: better path for test program. 2014-08-13 12:20:25 -07:00
John MacFarlane
fc17b3bd41 Make options work with test-pandoc. 2014-08-13 12:19:42 -07:00
John MacFarlane
40e67b8737 Revised tests directory.
Renamed some tests, introducing subsidiary directories
for fb2, docx, epub.

Cleaned up tests in cabal file.

Combined dokuwiki-writer and dokuwiki_inline_formatting tests.
2014-08-13 11:16:50 -07:00
John MacFarlane
1d6e1cf9f3 Removed special testHook from Setup.
This was just too fragile and dependent on a changing Cabal API
(see #1526).

Instead of passing the bulid directory to the test program, we
now let the test program find itself (using executable-path)
and then find the pandoc executable relative to itself.
2014-08-13 08:12:07 -07:00
John MacFarlane
7684b24959 Merge pull request #1528 from mpickering/epubtitlepage
EPUB Reader: Ignores titlepage attribute
2014-08-12 16:56:38 -07:00
Matthew Pickering
063ba81622 EPUB Tests: Added wasteland test
This epub contains many epub:type elements including footnotes and
titlepage.
2014-08-13 00:25:18 +01:00
John MacFarlane
81157c7cc6 HTML writer: use 'uri' or 'email' class for autolinks.
This allows them to be styled specially.

Closes #1501.
2014-08-12 15:49:43 -07:00
John MacFarlane
3653018a70 Added mathml tests for docbook reader. 2014-08-12 14:10:52 -07:00
John MacFarlane
f97ec6db2c Markdown reader: Improved parsing of indented code in list items.
Indented code at the beginning of a list item must be indented eight
spaces from the margin (or from the edge of the container), or four
spaces past the list marker, whichever is farther.

Some examples in `tests/markdown-reader-more.txt`.
2014-08-12 11:10:48 -07:00
Jesse Rosenthal
45ec035e93 Docx reader: combine inlines properly in dropcaps.
Make sure that adjacent inlines are combined properly in dropcaps. This
updates the test results as well.
2014-08-11 23:31:16 -04:00
Jesse Rosenthal
0808449547 Docx: Add dropcap tests. 2014-08-11 23:10:50 -04:00
John MacFarlane
31811657fa Merge pull request #1521 from jkr/emptyEmph
Discard empty formatters
2014-08-11 14:44:08 -07:00
Jesse Rosenthal
241ef57bb2 Docx reader test: Add an emphasized space to normalize test.
This should be ignored, so the output should be the same as the previous
test.
2014-08-11 15:11:28 -04:00
John MacFarlane
6fae136cbb Textile reader: list and HTML block parsing improvements.
Closes #1513.

Lists can now start without an intervening blank line.
Also, html block-level tags that don't start a line are parsed
as RawInline and don't interrupt paragraphs, as in RedCloth.
2014-08-11 11:22:39 -07:00