Commit graph

5749 commits

Author SHA1 Message Date
mpickering
515a120d04 Add support for KaTeX HTML math
Closes #1626
2014-09-25 18:32:42 +01:00
mpickering
575c76e36b HTML Writer: MathML now outputted with tex annotation.
Closes #1635
2014-09-25 15:28:50 +01: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
mpickering
56e4ecab20 MediaBag: Fixes Windows specific path problems
Changes the internal representation to fix the problem.

I haven't tested this on windows.

Closes #1597
2014-09-25 12:19:52 +01:00
John MacFarlane
0fbe7df818 Merge pull request #1639 from RyanGlScott/master
Bump text, random, http-client upper bounds
2014-09-22 22:10:01 -07:00
RyanGlScott
9cf9985ecf Bump text, random, http-client upper bounds 2014-09-22 21:47:16 -05:00
Mark Szepieniec
84b75a1c2a ConTeXt writer: add function toLabel
This function can be used to sanitize reference labels so that
they do not contain any of the illegal characters \#[]",{}%()|= .

Currently only Links have their labels sanitized, because they
are the only Elements that use passed labels.
2014-09-18 23:27:14 +02:00
Jesse Rosenthal
020a527c15 Docx writer: Renumber header and footer relationships to avoid collisions.
We previously took the old relationship names of the headers and footer in
secptr. That led to collisions. We now make a map of availabl names in the
relationships file, and then rename in secptr.
2014-09-11 15:11:44 -04:00
John MacFarlane
0de27f3579 Updated tests for #1616 change. 2014-09-09 10:09:05 -07:00
John MacFarlane
cfda93a283 LaTeX template: Added \VerbatimFootnotes if there is verbatim in notes.
Fixes a bug when there is verbatim inside notes.
Closes #1616.
2014-09-09 09:36:32 -07:00
Jesse Rosenthal
8d22bf26ab LaTeX writer: Test for protecting images in header. 2014-09-09 11:05:47 -04:00
Jesse Rosenthal
1326a41780 LaTeX writer: Protect graphics in headers.
Graphics in `\section`/`\subsection` etc titles need to be `\protect`ed.

This adds a state value and manually turns it on before every invocation
of `sectionHeader` and manually turns it off after. Using a writer value
and applying `local` would probably be cleaner, but this fits with the
current style.
2014-09-09 10:56:37 -04:00
Jesse Rosenthal
132814aeb6 Docx Reader: Remove header class properly in other langs
When we encounter one of the polyglot header styles, we want to remove
that from the par styles after we convert to a header. To do that, we
have to keep track of the style name, and remove it appropriately.
2014-09-06 07:53:29 -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
71452946d9 Docx reader: Use polyglot header list.
We're just keeping a list of header formats that different languages use
as their default styles. At the moment, we have English, German, Danish,
and French. We can continue to add to this.

This is simpler than parsing the styles file, and perhaps less
error-prone, since there seems to be some variations, even within a
language, of how a style file will define headers.
2014-09-05 21:59:58 -04:00
Jesse Rosenthal
13fefd7959 Docx Reader: Start list of polyglot section headers. 2014-09-05 17:31:24 -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
73b887e2df Org reader: Added state changing blanklines.
This allows us to emphasize at the beginning of a new paragraph (or, in
general, after blank lines).
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
ac8ed1fa93 Docx reader: Rewrite rewriteLink to work with new headers.
There could be new top-level headers after making lists, so we have to
rewrite links after that.
2014-09-04 16:44:21 -04:00
Jesse Rosenthal
7fe54505df Docx reader: Single-item headers in ordered lists are headers.
When users number their headers, Word understands that as a single item
enumerated list. We make the assumption that such a list is, in fact, a header.
2014-09-04 16:35:57 -04:00
Jesse Rosenthal
a6eead7f26 Docx reader: Modify mediabag test accordingly. 2014-09-02 14:05:54 -04:00
Jesse Rosenthal
4ef850ded5 Docx reader: Fix window path for image lookup.
Don't use os-sensitive "combine", since we always want the paths in our
zip-archive to use forward-slashes.
2014-09-02 13:45:01 -04:00
John MacFarlane
db90667a79 EPUB writer: Don't include nav node in spine unless --toc was requested.
Previously we included it in the spine with `linear="no"`, leading
to odd results in some readers.

Closes #1593.
2014-09-01 16:31:32 -07:00
John MacFarlane
cb1a8da01c LaTeX writer: Avoid using reserved characters as \lstinline delimiters.
Closes #1595.
2014-09-01 10:11:09 -07:00
John MacFarlane
43ebb0229f EPUB writer: Fixed typo. 2014-09-01 08:04:21 -07:00
John MacFarlane
3533218d6d Merge pull request #1594 from jkr/itemFix
Item fix
2014-08-31 19:31:38 -07:00
John MacFarlane
01b7957812 EPUB writer: Extract title even from structured title.
Added docTitle'.
2014-08-31 14:47:07 -07:00
John MacFarlane
5459b22d50 Use real copyright symbol in README epub metadata example. 2014-08-31 14:46:51 -07:00
Jesse Rosenthal
dfc8ab5a6a LaTeX writer: Add tests for header-in-item. 2014-08-31 16:05:20 -04:00
Jesse Rosenthal
d3053807a8 LaTeX writer: Put ~ before header in item text.
Because of the built-in line skip, LaTeX can't handle a section header
as the first element in a list item. (To be precise, it can't handle it
if the list immediately follows a section header, but the instance is
rare enough that we can afford to be a bit more general). This puts a
non-breaking space before the header to solve this problem. We won't see
this space, since the header skips a line before printing anyway.

The output is ugly in LaTeX and this structure seems like it should
probably be avoided. But it is valid HTML and native pandoc, so we
should have some sort of typesettable representation in LaTeX.
2014-08-31 16:05:09 -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
6cf9ab7855 README: escape (c) in epub metadata example 2014-08-31 12:31:36 -07:00
John MacFarlane
54df49335a EPUB writer: Don't use opf:title-type for epub2.
It is not supported and epubcheck complains.
2014-08-31 12:08:17 -07:00
John MacFarlane
d1948ce012 EPUB, EPUB3 templates: Handle structured metadata on titlepage.
Previously we just expected 'title', 'subtitle', 'author', 'date'.
Now we still support those, but also support the format recommended
for epub metadata in the pandoc README:

    ---
    title:
    - type: main
      text: My Book
    - type: subtitle
      text: An investigation of metadata
    creator:
    - role: author
      text: John Smith
    - role: editor
      text: Sarah Jones
    identifier:
    - scheme: DOI
      text: doi:10.234234.234/33
    publisher:  My Press
    rights:  (c) 2007 John Smith, CC BY-NC
    ...
2014-08-31 12:01:55 -07:00
John MacFarlane
b9d524c703 Use protocol-relative URL for mathjax.
See jgm/pandoc-templates#67.
2014-08-31 11:18:43 -07:00
John MacFarlane
611bc27862 Shared: Moved import of toChunks outside of conditional.
Closes #1590.
2014-08-31 11:17:53 -07:00
John MacFarlane
4455905550 Makefile: simplified 'make dist'.
Note that this may not work with older cabal versions.
2014-08-30 23:15:04 -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
d97aed3903 DokuWiki writer: Handle table cell alignments.
Closes #1566.
2014-08-30 20:54:33 -07:00
John MacFarlane
434ab0db13 Updated changelog. 2014-08-30 20:36:58 -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
John MacFarlane
b50927527c PDF: Catch errors in conversion of images and display message.
See #1582.
2014-08-30 18:45:58 -07:00
John MacFarlane
fcd35cc955 Put version in lower-left corner of man pages. 2014-08-30 16:11:45 -07:00
John MacFarlane
58b32107ad Makefile: Add README as dependency of man pages. 2014-08-30 15:39:40 -07:00
John MacFarlane
78da4d7bd8 Updated README date 2014-08-30 14:15:22 -07:00
John MacFarlane
6ce7081617 Version bump to 1.13.1. 2014-08-30 13:50:49 -07:00
John MacFarlane
9c8588f208 Makefile: Fixed install target to use copy, register.
This way the last configuration is used.
2014-08-30 13:40:45 -07:00
John MacFarlane
8f53918ebe Added new dokuwiki multiblock table tests to pandoc.cabal. 2014-08-30 13:14:50 -07:00