Commit graph

1658 commits

Author SHA1 Message Date
John MacFarlane
4d1c82de9e Docx writer: Use rIdNN identifiers for r:embed in images. 2013-01-06 19:07:35 -08:00
John MacFarlane
c7f4333f83 UTF8 module: Remove \r when reading.
This should prevent problems with extra CRs on windows.
2013-01-06 16:35:59 -08:00
John MacFarlane
f779411fe2 Docx writer: Use separate footnotes.xml for notes.
This seems to help LibreOffice convert the file, even though
it was valid docx before.

Note that the references in notes must be in
word/_rels/footnotes.xml.rel.  We handle this now by simply
making that file contain all the references in
word/_rels/document.xml.rel.  Something better could be done
eventually, but this works.

Closes #637.
2013-01-06 12:26:44 -08:00
John MacFarlane
dd6dab45fb LaTeX tables: Use minipage rather than parbox for block containers.
This allows verbatim code to be included in grid tables.
Closes #663.
2013-01-05 19:12:41 -08:00
John MacFarlane
4343f0dbcd Implemented --toc-depth (and --toc!) for RTF writer. 2013-01-05 18:23:51 -08:00
John MacFarlane
65d01857fb Support --toc-depth in context writer. 2013-01-05 18:15:34 -08:00
John MacFarlane
f9799c2a42 For epub3, use epub:type to mark footnotes and footnote refs.
This yields nice popup footnotes in iBooks.  See
http://www.pigsgourdsandwikis.com/2012/05/creating-pop-up-footnotes-in-epub-3-and.html
2013-01-05 17:18:43 -08:00
John MacFarlane
0cc9504796 EPUB changes.
* Epub writer now exports writeEPUB, not writeEPUB2 and writeEPUB3.
* Options now exports EPUBVersion
* WriterOptions now includes writerEpubVersion.
2013-01-05 13:00:12 -08:00
John MacFarlane
ea3eaaa553 Implemented --toc-depth for markdown writer. 2013-01-05 12:31:15 -08:00
John MacFarlane
08efc7db60 Implemented toc-depth for html writer. 2013-01-05 12:07:09 -08:00
John MacFarlane
c45ae571cc Changed --toc-level to --toc-depth. 2013-01-05 12:03:05 -08:00
John MacFarlane
2e0894554c Implemented --toc-level for rst. 2013-01-05 11:55:29 -08:00
John MacFarlane
123b94ad81 Implemented --toc-level in LaTeX writer. 2013-01-05 11:49:42 -08:00
John MacFarlane
7c10e57997 Changed --epub-toc-level to --toc-level.
Also writerEpubTOCLevel -> writerTOCLevel.
So far this is only implemented in the EPUB writer.
2013-01-05 11:36:55 -08:00
John MacFarlane
91e8d80eee MediaWiki writer: use <code> not <tt> for Code. 2013-01-04 23:16:49 -08:00
John MacFarlane
e91bae4f5b Renamed writerEPUBMetadata -> writerEpubMetadata.
API change for consistency.
2013-01-04 22:41:27 -08:00
John MacFarlane
30361308e7 Added --epub-chapter-level and --epub-toc-level options.
Also added writerEpubChapterLevel and writerEpubTOCLevel fields
to WriterOptions.
2013-01-04 22:29:41 -08:00
John MacFarlane
0654c4c05a EPUB writer: Parameterize header level for splitting chapters. 2013-01-04 21:55:56 -08:00
John MacFarlane
5d9fc46992 Markdown reader: Warn about duplicate note references.
Closes #375.
2013-01-04 12:08:30 -08:00
John MacFarlane
ef806f6a99 Markdown reader: Warn about duplicate link references. 2013-01-04 12:01:09 -08:00
John MacFarlane
7f36925c48 Markdown reader: Export readMarkdownWithWarnings.
Note:  This is not yet used, and the parser does not yet
generate any warnings.
2013-01-04 11:32:17 -08:00
John MacFarlane
7ef07ea3fc Added stateWarnings.
It is not connected to anything yet.
2013-01-03 20:52:51 -08:00
John MacFarlane
c435e9cda7 Implemented Ext_header_identifiers, Ext_implicit_header_references.
Now by default pandoc will act as if link references have been defined
for all headers.  So, you can do this:

    # My header

    Link to [My header].
    Another link to [it][My header].

Closes #691.
2013-01-03 20:35:01 -08:00
John MacFarlane
5e5859f126 Revert "Workaround for problem with file-embed."
This reverts commit 84ed0f055f.
2012-12-30 15:50:37 -08:00
John MacFarlane
84ed0f055f Workaround for problem with file-embed.
file-embed uses forward slashes as path separators, even
on Windows.  So we just convert backslashes to forward
before doing a lookup.
2012-12-29 20:44:09 -08:00
John MacFarlane
c2fe3aae64 Made embed_data_files flag work. 2012-12-29 18:45:20 -08:00
John MacFarlane
1864bb0994 Data files changes.
* Added `embed_data_files` flag.  (not yet used)
* Shared no longer exports `findDataFile`.
* `readDataFile` now returns a strict bytestring.
* Shared now exports `readDataFileUTF8` which returns a string like
  the old `readDataFile`.
* Rewrote modules to use new data file functions and to avoid
  using functions from Paths_pandoc directly.
2012-12-29 17:54:07 -08:00
John MacFarlane
3df2f1e3de EPUB3: Don't use the switch statement for mathml.
It is not widely implemented yet.
2012-12-19 11:29:03 -08:00
John MacFarlane
2695434113 Fixed bug in withRaw.
Didn't correctly handle case where nothing is parsed.
2012-12-13 19:04:01 -08:00
John MacFarlane
6e36375bdc LaTeX reader: Make command macros work everywhere, including non-math.
Environment macros still not supported.
2012-12-12 19:28:33 -08:00
John MacFarlane
4cd573c61f Textile reader/writer: Fixed autolinks.
Previously the textile reader and writer incorrectly implented
RST-style autolinks for URLs and email addresses.

This has been fixed.  Now an autolink is done this way:

    "$":http://myurl.com
2012-11-06 16:05:17 -08:00
John MacFarlane
4aa3e1f978 Textile parser: Expanded list of stringBreakers.
This fixes a bug on input like "(_hello_)" which should
be a parenthesized emphasized "hello".

The new list is taken from the PHP source of textile 2.4.
2012-11-06 09:18:02 -08:00
John MacFarlane
54fb384369 HTML writer: Include highlighting-css for code spans, too.
Previously it was only included if used in a code block.
Closes #653.
2012-11-05 10:45:49 -08:00
John MacFarlane
09603b94f7 LaTeX reader: skip comments in handleIncludes. 2012-11-05 08:22:26 -08:00
John MacFarlane
7af45f78d1 Textile reader: Allow newlines before pipes in table.
Closes #654.
2012-11-05 08:16:15 -08:00
John MacFarlane
5914be88a8 EPUB writer: Rationalized templates.
* Previously there were three different templates involved in
  epub production. There is now just one template, default.epub
  or default.epub3.
* It can now be overridden using `--template`, just like other
  templates.
2012-11-04 21:21:57 -08:00
John MacFarlane
83b326b005 EPUB: removed need for separate epub-titlepage template.
The titlepage stuff is now folded into the epub-page template.
A titlepage variable selects it.
2012-11-04 21:08:40 -08:00
John MacFarlane
a7b8351d43 EPUB writer: Removed need for separate epub-coverpage template.
The standard epub-page template is now used.
2012-11-04 20:53:41 -08:00
John MacFarlane
7f5e2af1fb EPUB writer: Improved handling of CSS.
* Code highlighting now works by default.
* Quote styles work as in pandoc's HTML writer.
2012-11-04 18:58:37 -08:00
John MacFarlane
9d0b011869 RST writer: Don't add ":align: center" to figures. 2012-11-04 18:33:35 -08:00
John MacFarlane
1f29592b64 EPUB writer: Set epub3 variable before calling templates. 2012-11-04 18:14:27 -08:00
John MacFarlane
ae6028d442 EPUB writer: Better TOC and footnote handling.
* Here we go back to splitting the document at the Pandoc AST
  level, and converting each chapter to HTML separately.
* Fixes bug in footnote processing introduced by
  commit 01d109e2ef.  The bug caused
  all footnotes to appear in the last chapter, so that footnote
  links from other chapters would not work.  Closes #651.
* We also disable writerTableOfContents, since TOC is automatic
  for epub.
2012-11-04 18:06:28 -08:00
John MacFarlane
b69792e2ed EPUB: Use section divs by default for better semantic markup. 2012-11-04 12:51:17 -08:00
John MacFarlane
a2cb53640d LaTeX writer: Don't use [fragile] unnecessarily.
We were using [fragile] on slides even if they only contained
code that was rendered using `\texttt`.  Now `[fragile]` is
only used for slides containing inline code if that code
is rendered using listings. Closes #649.
2012-11-04 11:09:42 -08:00
John MacFarlane
569954e1d5 Improved support for MathML in EPUB3.
* MathML math method now used always in EPUB3 (even if another
  math method specified in options).
* epub:switch is used to specify a non-MathML default. This is supposed
  to proide a good fallback behavior in older readers, though I'm
  not sure how well it works in practice.
2012-11-04 10:37:57 -08:00
John MacFarlane
dfca59943d EPUB: Don't use opf:role in EPUB3. 2012-11-02 21:23:02 -07:00
John MacFarlane
afa5a4da67 EPUB: Fixed invalid nesting problem in nav.xhtml. 2012-11-02 21:12:56 -07:00
John MacFarlane
e9542a60b5 EPUB: Added properties attribute. 2012-11-02 21:10:08 -07:00
John MacFarlane
63bed5dc2e HTML writer: Use XHtml5 only if blaze version current enough. 2012-11-02 21:04:32 -07:00
John MacFarlane
5b7d27912a HTML writer: Use Text.Blaze.XHtml5 instead of Html5.
This is needed for epub.
2012-11-02 20:59:45 -07:00