John MacFarlane
9ab30c6495
Writers.Shared: export metaToJSON', addVariablesToJSON.
...
This allows us to add the variables AFTER using the metadata
to generate a YAML header (in the Markdown writer).
Addresses the problem shown by
https://travis-ci.org/jgm/pandoc/jobs/205154181#L705
See #3439
2017-02-25 23:13:23 +01:00
John MacFarlane
03941ca9b0
Writers.Shared: Changed metaToJSON a bit.
...
Now we handle metadata first, then variables.
This way, meta-json variable will not contain representations of
variables, only proper metadata.
2017-02-25 22:59:16 +01:00
John MacFarlane
bd5df466d7
AsciiDoc writer: use PandocMonad throughout.
...
Issues info messages for non-rendered raw content.
2017-02-25 22:29:38 +01:00
John MacFarlane
654859af4a
Docx writer: use Set for dynamic styles to avoid duplicates.
2017-02-25 20:47:58 +01:00
John MacFarlane
5441e11b06
Docx writer: bookmarks for Span with id.
...
And cleaned up code.
2017-02-25 20:41:44 +01:00
John MacFarlane
f8f3b69c25
Docx writer bookmark improvements.
...
- Bookmark start/end now surrounds content rather than preceding it.
- Bookmarks generated for Div with id. Fixes jgm/pandoc-citeproc#205 .
- Cleaner code for handling dir and style attributes for Div.
2017-02-25 15:51:53 +01:00
John MacFarlane
d3e5725cbc
Use catchError instead of runExceptT.
2017-02-24 15:55:40 +01:00
John MacFarlane
0448b7d1fc
Implemented \graphicspath
in LaTeX reader.
...
Closes #736 .
2017-02-24 15:34:41 +01:00
John MacFarlane
f3d81056d6
Removed \strut
at beginning of table cells.
...
This fixes a problem with alignment of lists in table cells
(closes #3436 ). The `\strut` at the end seems to be enough
to avoid the too-close spacing that motivated addition of
the strut in #1573 .
2017-02-23 22:25:08 +01:00
John MacFarlane
4739620afe
Special-case .stretch class for images in reveal.js.
...
Now in reveal.js, an image with class `stretch` in a paragraph
by itself will stretch to fill the whole screen, with no
caption or figure environment.
Closes #1291 .
2017-02-23 21:16:45 +01:00
mb21
3f6b50e525
imageSize interface change
...
`imageSize img` is now `imageSize opts img`
2017-02-22 15:34:53 +01:00
mb21
b312ac6d2d
make imageSize recognize basic SVG dimensions, see #3462
2017-02-22 15:34:53 +01:00
John MacFarlane
f90b82d3d9
MediaWiki writer: Remove newline before </ref>
.
...
Closes #2652 .
2017-02-21 23:03:10 +01:00
John MacFarlane
e462f80d74
MediaWiki writer: add display attribute on <math>
tags.
...
This allows display math to be rendered properly.
Closes #3452 .
2017-02-21 22:57:48 +01:00
John MacFarlane
7af3d90ae1
MediaWiki writer: Updated list of syntax highlighting languages.
...
Now 'r' gets you `<source>` rather than `<code>` (among others).
Closes #3461 .
2017-02-21 17:13:59 +01:00
John MacFarlane
612f1238aa
Use lazy loading for reveal.js slide shows.
...
* In HTML writer, with reveal.js we use data-src instead of src
for images.
* In SelfContained, we also load resources from data-src.
Closes #2283 .
2017-02-20 22:21:20 +01:00
John MacFarlane
3c3138b133
Added warnings for non-rendered blocks to some writers.
2017-02-17 23:11:31 +01:00
John MacFarlane
aee10a719b
FB2 writer: don't render RawBlock as code.
2017-02-17 21:41:47 +01:00
Alex Ivkin
93f0a9c2e5
ZimWiki writer: removed internal formatting from note and table cells, because ZimWiki does not support it ( #3446 )
2017-02-15 11:28:02 +01:00
Alexander Krotov
9e3f5a5147
Do not strip # from Org anchor links
...
Links with # are perfectly valid according to http://orgmode.org/manual/Internal-links.html#Internal-links
2017-02-12 17:09:44 +03:00
John MacFarlane
2759960204
RST reader/writer: properly handle table captions.
...
Currently the support for the `.. table` directive is a bit
limited; we don't yet support the `widths` field. But at least
you can have a proper captioned table.
2017-02-11 22:37:07 +01:00
John MacFarlane
31f5c02743
HTML writer: report when not rendering raw inline/block.
2017-02-11 00:20:45 +01:00
John MacFarlane
76c55466d3
Use new warnings throughout the code base.
2017-02-11 00:14:44 +01:00
John MacFarlane
c93ecfc3c5
Handle language in inline code with --listings.
...
Closes #3422 .
2017-02-05 22:22:42 +01:00
John MacFarlane
5f2f2efe32
Removed redundant import.
2017-02-05 11:54:05 +01:00
John MacFarlane
63b568f445
Changed writerEpubMetadata to a Maybe String.
...
API change.
2017-02-04 22:51:51 +01:00
John MacFarlane
7404c83fb3
Improved escaping in RST writer with smart option.
2017-02-04 22:09:06 +01:00
Albert Krewinkel
623d860be6
Org writer: reduce to two spaces after bullets
...
The org writer was inserting two spaces after list bullets. Emacs
Org-mode defaults to a single space, so behavior is changed to reflect
this.
Closes : #3417
2017-02-04 21:15:05 +01:00
John MacFarlane
e0abe18bb9
Markdown writer: Better escaping when +smart.
2017-02-04 21:06:42 +01:00
John MacFarlane
8418c1a7d7
Implemented +/-smart in rst writer.
...
Moved unsmartify to Writers.Shared.
2017-02-04 12:52:08 +01:00
Mauro Bieg
5cd475be70
HTML and DocBook writers: fix internal links with writerIdentifierPrefix opt ( #3398 )
...
closes #3397
2017-02-03 09:53:43 +01:00
Alexander Krotov
9327e70c10
Org.hs: remove misleading comment
...
This comment is likely copied from RST.hs where 'refs' variable indeed exists, but makes no sense here.
2017-02-02 08:58:35 +01:00
Alexander Krotov
59a2e5575a
Reduce state in Org writer ( #3404 )
2017-02-01 12:00:40 +01:00
John MacFarlane
7018003811
--mathml
and MathML in HTMLMathMethod longer take an argument.
...
The argument was for a bridge javascript that used to be necessary
in 2004. We have removed the script already.
2017-01-30 11:31:50 +01:00
John MacFarlane
d2e0592e01
LaTeX writer: export writeBeamer.
...
Removed writerBeamer from WriterOptions.
2017-01-28 09:52:45 +01:00
John MacFarlane
91cdcc796d
HTML: export separate functions for slide formats.
...
writeS5, writeSlideous, writeRevealJs, writeDZSlides, writeSlidy.
Removed writerSlideVariant from WriterOptions.
2017-01-27 22:39:36 +01:00
John MacFarlane
f5dd123819
HTML writer: export writeHtmlStringForEPUB.
...
Options: Remove writerEPUBVersion.
2017-01-27 10:27:34 +01:00
John MacFarlane
b6c1d491f5
Split writeDocbook into writeDocbook4, writeDocbook5.
...
Removed writerDocbookVersion in WriterOptions.
Renamed default.docbook template to default.docbook4.
Allow docbook4 as an output format.
But alias docbook = docbook4.
2017-01-26 22:40:57 +01:00
John MacFarlane
190943e1fd
EPUB writer: split writeEPUB into writeEPUB2, writeEPUB3.
...
Also include explicit epub2 output format in CLI tool.
2017-01-26 22:09:21 +01:00
John MacFarlane
fce0a60f0a
Provide explicit separate functions for HTML 4 and 5.
...
* Text.Pandoc.Writers.HTML: removed writeHtml, writeHtmlString,
added writeHtml4, writeHtml4String, writeHtml5, writeHtml5String.
* Removed writerHtml5 from WriterOptions.
* Renamed default.html template to default.html4.
* "html" now aliases to "html5"; to get the old HTML4 behavior,
you must now specify "-t html4".
2017-01-25 21:51:26 +01:00
John MacFarlane
65b8570e0e
Cleanups for rebase.
2017-01-25 17:07:43 +01:00
John MacFarlane
d1efc839f1
Removed writerHighlight; made writerHighlightStyle a Maybe.
...
API change.
For no highlighting, set writerHighlightStyle to Nothing.
2017-01-25 17:07:43 +01:00
John MacFarlane
01483f91bd
Revert "Added page breaks into Pandoc."
...
This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
2017-01-25 17:07:43 +01:00
John MacFarlane
73f57daf69
Fixed shadowing warnings.
2017-01-25 17:07:43 +01:00
John MacFarlane
4007d6a897
Removed writerIgnoreNotes.
...
Instead, just temporarily remove notes when generating
TOC lists in HTML and Markdown (as we already did in LaTeX).
Also export deNote from Text.Pandoc.Shared.
API change in Shared and Options.WriterOptions.
2017-01-25 17:07:42 +01:00
John MacFarlane
0bcc81c0b1
Removed writerTeXLigatures.
...
Make `smart` extension work in LaTeX/ConTeXt writers instead.
Instead of `-t latex --no-tex-ligatures`, do `-t latex-smart`.
2017-01-25 17:07:42 +01:00
John MacFarlane
412ed3f132
Make the smart
extension affect the Markdown writer.
...
Thus, to "unsmartify" something that has been parsed as
smart by pandoc, you can use `-t markdown+smart`, and
straight quotes will be produced instead of curly quotes,
etc.
Example:
% pandoc -f latex -t markdown+smart
``hi''---ok
^D
"hi"---ok
2017-01-25 17:07:42 +01:00
John MacFarlane
93e4cd9f8c
Fixed something small that broke in rebase.
2017-01-25 17:07:42 +01:00
John MacFarlane
6aff97e4e1
Text.Pandoc.Shared: Removed fetchItem, fetchItem'.
...
Made changes where these are used, so that the version
of fetchItem from PandocMonad can be used instead.
2017-01-25 17:07:42 +01:00
John MacFarlane
8165014df6
Removed --normalize
option and normalization functions from Shared.
...
* Removed normalize, normalizeInlines, normalizeBlocks
from Text.Pandoc.Shared. These shouldn't now be necessary,
since normalization is handled automatically by the Builder
monoid instance.
* Remove `--normalize` command-line option.
* Don't use normalize in tests.
* A few revisions to readers so they work well without normalize.
2017-01-25 17:07:41 +01:00