John MacFarlane
1e78aec88e
HTML writer: info message if 'lang' is unspecified.
...
Closes #3486 .
2017-03-09 10:21:11 +01:00
John MacFarlane
239a17a986
HTML writer: fallback to basename rather than Untitled.
2017-03-09 09:41:22 +01:00
John MacFarlane
fd35661646
Remove space at beginning/end of RST code span.
...
Otherwise we get invalid RST. There seems to be no
way to escape the space.
Closes #3496 .
2017-03-08 19:06:32 +01:00
John MacFarlane
bcfb77e2ab
Markdown writer: Avoid spurious blanklines at end of document...
...
after tables and list, for example.
2017-03-08 12:47:39 +01:00
John MacFarlane
b6e7bfaf1d
Markdown writer: ensure space before list at top level.
...
Closes #3487 .
2017-03-08 12:42:01 +01:00
John MacFarlane
2645ce7aca
Markdown writer: escape unordered list markers at beginning of paragraph
...
to avoid false interpretation as a list.
Also handle `|`, and refactor code for escaping `%`.
Closes #3497 .
2017-03-08 12:06:08 +01:00
John MacFarlane
74afd2974a
Markdown writer: better handling of tables with empty columns.
...
E.g. an HTML table with two cells in the first row and one
in the second (but no row/colspan).
We now calculate the number of columns based on the longest
row (or the length of aligns or widths).
Closes #3337 .
2017-03-06 22:51:28 +01:00
John MacFarlane
13698e7968
Markdown writer: Fixed false ordered lists in YAML metadata.
...
Now we properly escape things that would otherwise start ordered
lists, such as
---
title: 1. inline
...
Closes #3492 .
Closes #1685 .
2017-03-06 21:18:32 +01:00
John MacFarlane
aeb11cea4e
Markdown writer: escape initial % in a paragraph...
...
...if the `pandoc_title_blocks` extension is enabled.
Otherwise in a document starting with a literal percent sign
the first line is wrongly interpreted as a title.
Closes #3454 .
2017-03-05 15:28:57 +01:00
John MacFarlane
0517cf0bc0
Fixed some loose ends in #1592 .
...
Added test cases.
Fixed HTML reader to parse a span with class "smallcaps" as
SmallCaps.
Fixed Markdown writer to render SmallCaps as a native span
when native spans are enabled.
2017-03-04 23:01:29 +01:00
John MacFarlane
739bf78c37
HTML writer: only issue warning for missing title if --standalone.
2017-03-04 14:50:48 +01:00
John MacFarlane
aa5ae5ff0f
HTML writer: Render SmallCaps as span with smallcaps class.
...
Rather than using a style attribute directly.
This gives the user more flexibility in styling small caps
in CSS.
See #1592 .
2017-03-04 14:46:54 +01:00
John MacFarlane
b64211a547
Use smallcaps class for SmallCaps in CommonMark writer.
...
See #1592 .
2017-03-04 14:43:52 +01:00
John MacFarlane
8f20d7d920
Markdown writer: Use span with class 'smallcaps' for SmallCaps.
...
Instead of a style attribute as before.
See #1592 .
2017-03-04 14:41:45 +01:00
John MacFarlane
e256c8ce17
Stylish-haskell automatic formatting changes.
2017-03-04 13:03:41 +01:00
John MacFarlane
69b3a369ca
HTML writer: issue warning if no title specified and template used.
...
See #3473 .
2017-03-04 11:14:41 +01:00
John MacFarlane
9616a8a2dd
OpenDocument writer: Clarified some code.
2017-03-03 23:16:15 +01:00
John MacFarlane
ce9d49ef04
OpenDocument writer: fixed dropped elements in some ordered lists.
...
Closes #2434 .
2017-03-03 22:48:37 +01:00
John MacFarlane
d18a1c1c9e
Docx writer: Don't include bookmarks on headers unless non-null id.
...
Closes #3476 .
2017-03-03 21:13:08 +01:00
Alexander Krotov
24f027fe8d
ConTeXt writer: remove unnecessary $ ( #3482 )
2017-03-03 10:43:17 +01:00
John MacFarlane
46135ac875
LaTeX writer: add \leavevmode
before hypertarget at start of paragraph.
...
Closes #2704 (formatting problems in beamer citations).
See
http://tex.stackexchange.com/questions/22852/function-and-usage-of-leavevmode
2017-03-02 12:13:20 +01:00
John MacFarlane
8709b7cf80
LaTeX writer: use % after hypertarget before code block
2017-03-02 12:13:02 +01:00
John MacFarlane
9e50319df3
LaTeX writer: minor tweak to hypertarget (semantically irrelevant).
2017-03-02 11:53:31 +01:00
John MacFarlane
a69cfa0178
Removed unnecessary import.
2017-03-02 11:28:29 +01:00
John MacFarlane
fe4311d5a1
LaTeX writer: always add hypertarget when there's a non-empty identifier.
...
Previously the hypertargets were only added when there was actually
a link to that identifier. Closes #2719 .
2017-03-01 21:38:28 +01:00
Alexander Krotov
39a8359b57
Writers: Use gets to access MonadState where possible ( #3480 )
2017-03-01 20:36:54 +01:00
John MacFarlane
ea619bfcb4
Markdown writer: Fixed grid tables embedded in grid tables.
...
Closes #2834 .
2017-03-01 17:41:14 +01:00
John MacFarlane
8b641f38ca
Markdown writer: Refactored gridTable to use widths in chars.
2017-03-01 17:08:14 +01:00
Mauro Bieg
d0fc2f1573
ODT writer: calculate aspect ratio for percentage-sized images ( #3478 )
...
closes #3239
2017-03-01 12:13:45 +01:00
John MacFarlane
c7e2c718eb
Removed --epub-stylesheet
; use --css
instead.
...
* Removed writerEpubStylesheet in WriterOptions.
* Removed `--epub-stylesheet` option.
* Allow `--css` to be used with epub.
* Allow multiple stylesheets to be used.
* Stylesheets will be taken both from `--css` and from
the `stylesheet` metadata field (which can contain either
a file path or a list of them).
Closes #3472 , #847 .
2017-02-27 21:29:16 +01:00
John MacFarlane
5a47f3422a
Fixed type sig for older GHC versions.
2017-02-25 23:56:32 +01:00
John MacFarlane
4aed13bf7c
Markdown writer: don't include variables in metadata blocks!
...
Previously variables set on the command line were included in
e.g. YAML metadata, contrary to documentation and intentions.
2017-02-25 23:46:39 +01:00
John MacFarlane
124551461c
Fixed addVariablesToJSON.
...
It was previously not allowing multiple values to become lists.
2017-02-25 23:42:56 +01:00
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