Commit graph

5271 commits

Author SHA1 Message Date
Matthew Pickering
853830d12b Docx Parse: Updated tests 2014-08-11 10:30:32 -04:00
Matthew Pickering
973ed469de Docx Parse: Improved font recognition when specified in rFonts element 2014-08-11 10:30:32 -04:00
Matthew Pickering
427466f80c Docx Fonts: Derives Show and Eq 2014-08-11 10:30:32 -04:00
John MacFarlane
4e483dbf9a Merge pull request #1512 from mpickering/master
Improved EPUB Tests
2014-08-10 07:13:51 -07:00
John MacFarlane
65b31e0cac Merge pull request #1510 from jkr/spacefix
Docx reader: Fix spacing issue.
2014-08-10 07:11:59 -07:00
Matthew Pickering
f33ae631f3 Improved EPUB Tests
Rewrote features test to remove all unimplemented features.

There are now all three examples of where an image can be included in
the test.
  1. Cover image
  2. As a spine elemnt
  3. In the document

Tests have also been added to make sure that the mediabag contains all
these images after processing.
2014-08-10 14:58:53 +01:00
John MacFarlane
7ec8dd956f Removed OMath module, depend on texmath >= 0.8. 2014-08-10 06:19:41 -07:00
Jesse Rosenthal
c15978ce5e Change head/tail to pattern guards. 2014-08-10 09:10:34 -04:00
Jesse Rosenthal
a02ce74acf Docx reader: Fix spacing issue.
Previously spaces at the beginning of Emph/Strong/etc were kept
inside. This makes sure they are moved out.
2014-08-09 23:35:09 -04:00
John MacFarlane
eed1274fca Merge pull request #1509 from jkr/symbol
Parse "w:sym"
2014-08-09 20:22:06 -07:00
Matthew Pickering
ecb42cc002 Docx Tests: Updated for reading sym element 2014-08-09 22:37:12 -04:00
Matthew Pickering
3bb19307f6 Docx Parse: Recognises code points in sym elements which are in the private range 2014-08-09 22:37:12 -04:00
Matthew Pickering
5bedaba080 Added test for sym element 2014-08-09 22:37:12 -04:00
Matthew Pickering
edc57f77fc Added Text.Pandoc.Readers.Docx.Fonts 2014-08-09 22:37:12 -04:00
Matthew Pickering
504465c6a3 lib: Added symbol.txt and file to generate codepoint to unicode mapping 2014-08-09 22:37:12 -04:00
Matthew Pickering
2deaa7096f Docx Reader: Added recognition of sym element in paragraphs 2014-08-09 22:37:12 -04:00
John MacFarlane
c2a0d47c7b Merge pull request #1508 from mpickering/master
EPUB: Fixed another mediabag related regression..
2014-08-09 17:08:43 -07:00
Matthew Pickering
4ae61bdf8f EPUB: Fixed another mediabag related regression.. 2014-08-10 00:12:09 +01:00
John MacFarlane
1ea92c3e23 Merge pull request #1507 from mpickering/master
Images are now relative to manifest file.
2014-08-09 15:38:03 -07:00
Matthew Pickering
d0fbe5b751 Updated EPUB tests 2014-08-09 23:06:16 +01:00
Matthew Pickering
a6648e5a73 EPUB Reader: Changed image paths to be relative to manifest file 2014-08-09 23:06:16 +01:00
John MacFarlane
4983083079 HTML writer: Don't include empty TOC items for slide shows.
Previously creating a slide with a horizontal rule would result
in an empty list item in the TOC.  This patch fixes that.
2014-08-09 10:29:39 -07:00
John MacFarlane
6c44e66f2f Updated changelog. 2014-08-08 22:25:26 -07:00
John MacFarlane
bc06ef0edb Merge branch 'newbranch' of https://github.com/mpickering/pandoc into mpickering-newbranch
Conflicts:
	src/Text/Pandoc/Readers/EPUB.hs
2014-08-08 22:22:55 -07:00
John MacFarlane
19daf6cf0a Added native_divs and native_spans extensions.
This allows users to turn off the default pandoc behavior of
parsing contents of div and span tags in markdown and HTML
as native pandoc Div blocks and Span inlines.

Setting of default epub extensions has been moved from the EPUB
reader to Text.Pandoc.
2014-08-08 21:05:34 -07:00
John MacFarlane
e1cc5479c0 Updated changelog. 2014-08-08 20:26:38 -07:00
John MacFarlane
a4a6b6f28c Plain writer: Use ALL CAPS for level 1 headers. 2014-08-08 15:20:29 -07:00
Matthew Pickering
cfd8c0214c EPUB Reader: Improved robustness of image extraction
We now maintain the invariant that when fetchImages is called,
all images have absolute paths.

This patch fixes several bugs relating to this as there are three places
where images can be introduced.
  (1) During the HTML parse
  (2) As spine elements
  (3) As a cover image

For (1), the paths are corrected by the transformation renameImages
For (2) and (3), we need to append the "root" to the path we parse from the
spine
2014-08-08 23:04:03 +01:00
Matthew Pickering
40ae8efddc EPUB Reader: Fixed regressions in image extraction
Before the images were relative to the position of the package file. The
collapse function changed this so that they were then absolute in the
archive but the fetchImages function wasn't updated to recognise this.
2014-08-08 22:31:27 +01:00
Matthew Pickering
8c551f6f43 EPUB Reader: Use collapseFilePath 2014-08-08 22:31:22 +01:00
Matthew Pickering
5b5e53024d Added tests for collapseFilePath 2014-08-08 22:31:02 +01:00
Matthew Pickering
2d956677ef Shared: Added collapseFilePath function
This function removes intermediate "." and ".." from a path.
2014-08-08 22:31:02 +01:00
Matthew Pickering
116f03a70a EPUB Reader: Removed incorrectly set reader flag 2014-08-08 22:31:02 +01:00
John MacFarlane
aae90a8671 Merge pull request #1503 from jkr/streamlineMath
OMath parser: Change signature of exported function.
2014-08-08 13:45:30 -07:00
John MacFarlane
f723a0575d Markdown writer: Respect -raw_html.
pandoc -t markdown-raw_html should not emit any raw HTML, even
span and div tags that go with pandoc Span and Div elements.

Cleaned up a bit of the logic with extensions and plain.
2014-08-08 13:34:57 -07:00
Jesse Rosenthal
a426812ccc OMath parser: Change signature of exported function.
This changes the signature of the exported `readOMML` to `String ->
Either String [Exp]`, so it can now, in theory, be slotted into
TeXMath. It doesn't have any real error reporting yet, but that might
make more sense once I put it in a branch, and understand how it works
in the other readers.

It also now reads strings that parse to either oMath or oMathPara
elements. Note that the distinction is lost in the output. It's up to
the caller to remember the display type.
2014-08-08 16:34:38 -04:00
John MacFarlane
7b47042ae6 Textile reader: fixed list parsing bug. Closes #1500. 2014-08-08 12:18:47 -07:00
John MacFarlane
dd78dd6d1b Textile reader: don't allow inline formatting to extend over newline.
This matches behavior of RedCarpet, avoids some ugly bugs, and improves
performance.
2014-08-08 12:18:47 -07:00
John MacFarlane
e5fb97ff4f Merge pull request #1502 from jkr/streamlineMath
Streamline OMML parser
2014-08-08 11:26:26 -07:00
Jesse Rosenthal
2f7a627f6d OMath: Finish initial cleanup.
This gets rid of commented-out functions, cleans up whitespace errors,
and exports and imports the correct functions.
2014-08-08 14:16:54 -04:00
Jesse Rosenthal
ba5804f9ec OMath: Remove Namespaces
We still need to test against prefixes, but this is only going to look
at oMath fragments, so we're not going to be worried about looking up
the real namespace.
2014-08-08 14:15:17 -04:00
Jesse Rosenthal
0acd139fb1 OMath: Start phasing out internal OMath type.
This is the first step in removing the intermediate OMath type, which we
no longer need since we're writing straight to TeXMath Exp.
2014-08-08 14:14:30 -04:00
Jesse Rosenthal
cf849443cb OMath parser: don't group expressions if there's only one. 2014-08-08 14:12:05 -04:00
Matthew Pickering
40602c3df6 HTML EPUB exts: switch element can now be in either the inline or block position 2014-08-08 10:25:40 -07:00
John MacFarlane
10b662c120 EPUB test renaming.
Renamed epub test files so they're identified more clearly as
epub:  features.{epub,native} -> epub.features.{epub,native},
and similarly with formatting.{epub,native}.

Added epub test files to cabal file, so they'll be included in
the tarball.
2014-08-07 22:25:06 -07:00
John MacFarlane
94466c0060 HTML reader: Really ignore DOCTYPE and xml declarations.
This actually does what d71b013841
said it did.

Revised epub tests to remove the repeated DOCTYPE and xml tags.
2014-08-07 22:12:44 -07:00
John MacFarlane
3c4079edc8 Merge pull request #1488 from mpickering/epubfixes
EPUB Reader: Improved image extraction
2014-08-07 19:00:32 -07:00
John MacFarlane
08bed142ba Merge pull request #1496 from mpickering/master
Org Writer: Write anchor elements
2014-08-07 16:29:20 -07:00
Matthew Pickering
07bb41d6da Org Writer: Write anchor elements
The Org Writer now writes empty span elements which have an id as an anchor.

For example `Span ("uid", [], []) []` becomes `<<uid>>`
2014-08-08 00:20:18 +01:00
Matthew Pickering
090b2da267 EPUB tests: Updated test file 2014-08-07 22:56:30 +01:00