John MacFarlane
daf8d1db18
RST writer: improve grid table output, fix bug with empty rows.
...
Uses the new gridTable in Writers.Shared, which is here
improved to better handle 0-width cells.
Closes #3516 .
2017-03-21 14:16:46 +01:00
John MacFarlane
d3798a044d
Reuse Writers.Shared.gridTable in Haddock writer.
2017-03-21 10:20:18 +01:00
John MacFarlane
e6cdf21fa5
Moved more gridTable calculations to Writers.Shared.
2017-03-21 10:16:11 +01:00
John MacFarlane
e7336b1feb
Moved gridTable from Markdown writer to Writers.Shared.
2017-03-21 10:02:30 +01:00
Mauro Bieg
b010a8c5e7
docx writer: lang meta, see #1667 ( #3515 )
2017-03-20 10:06:24 +01:00
John MacFarlane
38c3a68346
LaTeX/Beamer writer: allow hyperlinks to frames.
...
Previously you could link to a header above or below slide
level but not TO slide level. This commit changes that.
Hypertargets are inserted inside frame titles; technically
the reference is to just after the title, but in normal
use (where slides are viewed full screen in a slide show),
this does not matter.
Closes #3220 .
2017-03-16 10:15:14 +01:00
John MacFarlane
482e5b78a0
OpenDocument writer: use more widely available bullet characters.
...
The old characters weren't available in some font sets.
These seem to work well on Windows and Linux versions of LibreOffice.
Closes #1400 .
2017-03-15 17:19:28 +01:00
John MacFarlane
0b4ae3af66
Removed unused symbol.
2017-03-13 22:21:50 +01:00
John MacFarlane
4de4816b99
RST writer: convert to PandocMonad, report on unrendered raw items.
2017-03-13 21:32:58 +01:00
John MacFarlane
db37b71d9a
Highlighting: highlighting now returns an Either rather than Maybe.
...
This allows us to display error information returned by the
skylighting library.
Display a warning if the highlighting library throws an error.
2017-03-13 11:38:19 +01:00
John MacFarlane
efcb51bcb0
Put TEI writer inside PandocMonad. Added warnings for omitted raw elements.
...
Also added identifiers on `<div>` elements. These were commented
out before, not sure why?
2017-03-13 11:08:17 +01:00
John MacFarlane
1012e668cf
Converted DokuWiki writer to use PandocMonad.
2017-03-12 23:15:22 +01:00
John MacFarlane
df7a443f67
MediaWiki writer: use PandocMonad.
2017-03-12 23:09:00 +01:00
John MacFarlane
d66b046c8a
Markdown writer: fixed bugs in simple/multiline list output.
...
* Previously we got overlong lists with `--wrap=none`. This is fixed.
* Previously a multiline list could become a simple list (and would
always become one with `--wrap=none`).
Closes #3384 .
2017-03-11 23:24:14 +01:00
John MacFarlane
ac15b0443f
ConTeXt writer: converted to use PandocMonad.
2017-03-10 20:54:52 +01:00
John MacFarlane
ba78b75146
Removed normalizeSpaces from Text.Pandoc.Shared.
...
Rewrote functions in RST reader and writer to avoid the need
for it.
Closes #1530 .
2017-03-10 20:45:21 +01:00
Alexander Krotov
d037c5019d
Add Muse writer ( #3489 )
...
* Add Muse writer
* Advertise new Muse writer
* Muse writer: add regressions tests
2017-03-10 10:16:27 +01:00
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