Commit graph

4622 commits

Author SHA1 Message Date
Albert Krewinkel
6d6724cf2c Org reader: Support more types of '#+BEGIN_<type>' blocks
Support for standard org-blocks is improved.  The parser now handles
"HTML", "LATEX", "ASCII", "EXAMPLE", "QUOTE" and "VERSE" blocks in a
sensible fashion.
2014-04-17 18:33:39 +02:00
Albert Krewinkel
0672f58a44 Org reader: Support footnotes 2014-04-17 13:23:14 +02:00
Albert Krewinkel
92582c6272 Org reader: introduce Reader environment around Blocks/Inlines
This introduces a Reader environment in the style of
Text.Pandoc.Parsing.F, but adapted to the Org reader parser.
2014-04-16 13:38:50 +02:00
Albert Krewinkel
5fc252270c Org reader: Fix code for subexpression parsing 2014-04-16 13:26:32 +02:00
Albert Krewinkel
346bcea713 Org reader: Better module description, minor style changes
Use module description analogous to the markdown reader's.
Use (<$) where it makes sense.
2014-04-16 13:23:30 +02:00
John MacFarlane
857fcff7d6 Merge pull request #1240 from neilmayhew/master
Docbook output of Line Blocks
2014-04-13 14:37:28 -07:00
John MacFarlane
86b4da9dec Merge pull request #1239 from tarleb/org-linebreak
Org linebreaks
2014-04-13 14:04:48 -07:00
John MacFarlane
d5d4227ea5 Merge pull request #1238 from tarleb/org-figures
Org reader: Add support for figures
2014-04-13 14:03:15 -07:00
John MacFarlane
d4c1cd456c Org reader: Removed ANN pragma.
This relies on Template Haskell, which causes problems in Windows
due to libraries with C dependencies.  We need to avoid using TH
in pandoc code.
2014-04-12 21:44:54 -07:00
Neil Mayhew
f22ce4ff28 Add some unit tests for Writers.Docbook
These are primarily aimed at testing the new treatment of line breaks,
but hopefully other tests can be added more easily now as features
and changes are implemented in the writer.

Adapted from Tests.Writers.HTML.tests.
2014-04-12 09:18:09 -06:00
Neil Mayhew
464d7a8e49 Improve handling of hard line breaks in Docbook writer
* Use a <literallayout> for the entire paragraph, not just for the
   newline character
 * Don't let LineBreaks inside footnotes influence the enclosing
   paragraph
2014-04-12 09:16:07 -06:00
Albert Krewinkel
67051b6e5d Fix editorconfig for test files
Test output files should be exactly as defined with regard to trailing
whitespace.  This keeps editorconfig from breaking those files.
2014-04-12 12:22:09 +02:00
Albert Krewinkel
82d4160bdc Org reader: Read linebreaks
Linebreaks are marked by the string `\\` at the end of a line.
2014-04-12 11:07:38 +02:00
Albert Krewinkel
36066699c3 Org writer: Fix output for linebreaks
Hard linebreaks in Org mode are represented by the string "\\" as the
last characters in a line.  Adds this feature to the Org-mode writer.
2014-04-12 10:47:49 +02:00
Albert Krewinkel
ae4280fba5 Org reader: Add support for figures
Support for figures (images with name and caption) is added.
2014-04-12 10:31:45 +02:00
John MacFarlane
8bc09ce6c7 Beamer template: Consistent styles for figure and table captions
Thanks to aaronwolen.
2014-04-11 11:12:13 -07:00
John MacFarlane
a6b6ec7be3 Beamer template: Adjust widths correctly for oversized images.
Thanks to Garrick Aden-Buie for the patch.
2014-04-11 10:52:26 -07:00
John MacFarlane
8699071ec2 HTML reader: Treat processing instructions & declarations as block.
Previously these were treated as inline, and included in paragraph
tags in HTML or DocBook output, which is generally not what is wanted.

Closes #1233.
2014-04-11 10:10:54 -07:00
John MacFarlane
2304e9cb94 Merge pull request #1231 from tarleb/org-fix-subexpr
Org reader: Fix parsing of sub-/superscript expressions
2014-04-11 07:37:57 -07:00
Albert Krewinkel
6f19be7d40 Org reader: Fix parsing of sub-/superscript expressions
This fixes the org-reader's handling of sub- and superscript
expressions.  Simple expressions (like `2^+10`), expressions in
parentheses (`a_(n+1)`) and nested sexp (like `a_(nested()parens)`) are
now read correctly.
2014-04-11 11:05:42 +02:00
John MacFarlane
ca40acea5b MediaWiki reader: Handle table rows containing just an HTML comment.
Closes #1230.
2014-04-10 16:52:30 -07:00
John MacFarlane
f48b564ac7 Updated GHC versions in tested-with field. 2014-04-10 11:04:05 -07:00
John MacFarlane
3e147199b8 Merge pull request #1229 from tarleb/org-math-improved
Org reader: Support more inline/display math variants
2014-04-10 11:02:01 -07:00
Albert Krewinkel
ace8837cd6 Org reader: Improve code by following HLint recommendations
HLint's recommendations for better code are applied to the Org-mode
reader code.
2014-04-10 19:17:58 +02:00
Albert Krewinkel
1715d7cee0 Org reader: Support more inline/display math variants
Support all of the following variants as valid ways to define inline or
display math inlines:

  - `\[..\]` (display)
  - `$$..$$` (display)
  - `\(..\)` (inline)
  - `$..$`   (inline)

This closes #1223.  Again.
2014-04-10 15:32:02 +02:00
John MacFarlane
a9eb0caabb Fixed cabal path in travis config. 2014-04-09 17:33:51 -07:00
John MacFarlane
a67b221d4d More travis tweaks. 2014-04-09 17:18:10 -07:00
John MacFarlane
1fd5ca48c1 Travis: gave up trying to test the sdist.
For some reason hsb2hs was not found, even though it was built.
2014-04-09 16:38:15 -07:00
John MacFarlane
f31f5924b3 More travis tweaks. 2014-04-09 15:07:36 -07:00
John MacFarlane
6b49015307 More travis tweaks. 2014-04-09 14:23:09 -07:00
John MacFarlane
cf66f10e0c Travis build: remove 6.12; add -v2 to dependencies install. 2014-04-09 12:18:57 -07:00
John MacFarlane
4152ca33e4 Travis: install hsb2hs. 2014-04-09 12:14:05 -07:00
John MacFarlane
3c472d0843 More travis tweaks. 2014-04-09 11:36:50 -07:00
John MacFarlane
7a4412c165 More travis changes. 2014-04-09 11:05:42 -07:00
John MacFarlane
f97b2e4bf4 Fixed $CABAL in travis script. 2014-04-09 10:43:06 -07:00
John MacFarlane
fca601d5f1 Updated travis script to test with multiple GHC versions. 2014-04-09 10:19:22 -07:00
John MacFarlane
91bc446e4b Merge pull request #1228 from tarleb/travis-fail-on-warnings
Force failure of a Travis build if GHC produces warnings
2014-04-09 10:03:00 -07:00
John MacFarlane
4eb150a14c Merge pull request #1227 from tarleb/editorconfig
Add .editorconfig
2014-04-09 10:01:52 -07:00
John MacFarlane
54e33a132b Merge pull request #1226 from tarleb/org-emphasis-reader
Org reader: Precise rules for the recognition of markup
2014-04-09 09:34:44 -07:00
Albert Krewinkel
3f5d9432ff Force failure of a Travis build if GHC produces warnings
Pandoc should, as stated in CONTRIBUTING.md, always compile without
warnings.  This patch forces GHC to treat warnings like errors during
Travis builds, making it possible to catch mistakes (like missing
top-level type definitions) early.
2014-04-09 17:58:55 +02:00
Albert Krewinkel
5b9f9047a0 Add .editorconfig
Use EditorConfig to define a some basic styling rules for code.  This
should also help to reduce the number of commits introducing trailing
whitespace.

See http://editorconfig.org/ for details.
2014-04-09 16:11:14 +02:00
Albert Krewinkel
030020236c Org reader: Precise rules for the recognition of markup
The inline parsers have been rewritten using the org source code as a
reference. This fixes a couple of bugs related to erroneous markup
recognition.
2014-04-09 15:26:06 +02:00
John MacFarlane
e555a5703d Textile reader: Improved link parsing.
In particular we now pick up on attributes. Since pandoc links
can't have attributes, we enclose the whole link in a span
if there are attributes.

Closes #1008.
2014-04-07 21:23:39 -07:00
John MacFarlane
bfd598e1e9 Merge pull request #1224 from tarleb/org-math
Org reader: Read inline math, recognize definition lists
2014-04-07 07:24:30 -07:00
Albert Krewinkel
c47bd8404f Org reader: Support inline math (like $E=mc^2$)
Closes #1223.
2014-04-07 11:47:36 +02:00
John MacFarlane
e352ec5a0e LaTeX writer: Workaround for level 4-5 headers in quotes.
These previously produced invalid LaTeX: `\paragraph` or
`\subparagraph` in a `quote` environment.  This adds an
`mbox{}` in these contexts to work around the problem.
See http://tex.stackexchange.com/a/169833/22451.

Closes #1221.
2014-04-06 16:32:53 -07:00
John MacFarlane
fcddd0e4bd LaTeX reader: handle @{} and p{length} in tabular.
The length is not actually recorded, but at least we get a table.

Closes #1180.
2014-04-06 15:11:49 -07:00
John MacFarlane
9f3f4298dd Moved some doc files from data-files to extra-source-files.
They aren't needed at runtime.

We keep README and COPYRIGHT in data to ensure that they'll be
available on all systems on which pandoc is installed.

Closes #1123.
2014-04-06 15:04:50 -07:00
Albert Krewinkel
480b33b710 Org reader: Add support for definition lists 2014-04-06 20:39:10 +02:00
Albert Krewinkel
4ebf6f6ebf Org reader: Minor code clean-up 2014-04-06 20:39:05 +02:00