Commit graph

12697 commits

Author SHA1 Message Date
John MacFarlane
981b5de790 MANUAL.txt: fixed some markdown errors. 2019-09-28 11:16:46 -07:00
John MacFarlane
3f4fc4474f changelog.md: regularize date format. 2019-09-28 10:59:15 -07:00
John MacFarlane
e02a913137 Markdownify changelog -> changelog.md. 2019-09-28 10:46:41 -07:00
John MacFarlane
3b80a6adb4 Update changelog. 2019-09-28 10:22:22 -07:00
John MacFarlane
dd55e526e0 Update AUTHORS.md 2019-09-28 10:12:17 -07:00
John MacFarlane
c6aab850b5 Require doctemplates 0.6.1. 2019-09-27 22:36:58 -07:00
John MacFarlane
7d6783006a LogMessage: change UnknownExtension -> CouldNotDeduceFormat 2019-09-27 09:27:56 -07:00
John MacFarlane
d98dde07c9 Used released pandoc-citeproc 0.16.3. 2019-09-25 18:03:57 -07:00
John MacFarlane
fe72c9bbe4 Use latest skylighting.
This addresses #5776 for now, though ultimately we need a
new release of regex-pcre-builtin or some other solution.
2019-09-25 17:36:17 -07:00
John MacFarlane
c40e0c9e62 GitHub ci - back to using ignore-paths.
paths with ! doesn't seem to do it.
2019-09-25 09:53:44 -07:00
John MacFarlane
22821ba2da GitHub CI: use paths rather than paths-ignore, use branch to exclude rc/. 2019-09-25 09:22:26 -07:00
Nils Carlson
8028de3322 odt: Add external option for native numbering
This adds an external options +native_numbering to the
ODT writer enabling enumeration of figures and tables in
ODT output.
2019-09-24 15:23:59 -07:00
John MacFarlane
251e2b2d6d Use latest texmath. 2019-09-24 15:14:13 -07:00
Eigil Rischel
d42308129a LaTeX reader: Add 'tikzcd' to list of special environments.
This allows it to be processed by filters, in the same way that
one can do for 'tikzpicture'
2019-09-24 14:19:45 -07:00
John MacFarlane
dfb2a07539 Allow latest Diff. 2019-09-24 11:22:08 -07:00
John MacFarlane
570b96f4e8 Use pandoc-types 1.17.6.1 2019-09-24 09:39:00 -07:00
John MacFarlane
f223196c35 Man writer: suppress non-absolute link URLs.
Motivation: in a man page there's not much use for relative URLs,
which you can't follow.  Absolute URLs are still useful.  We previously
suppressed relative URLs starting with '#' (purely internal links),
but it makes sense to go a bit farther.

Closes #5770.
2019-09-23 17:46:39 -07:00
John MacFarlane
e99050283e ConTeXt unit tests - tweak code property.
Inline code will never have two consecutive newlines.
We get a counterexample in this case

https://pipelines.actions.githubusercontent.com/bMXCpShstkkHbFPgw9hBRMWw2w9plyzdVM8r7CRPFBHFvidaAG/5cf52d2d-3804-412d-ae65-4f8c059b0fb7/_apis/pipelines/1/runs/116/signedlogcontent/39?urlExpires=2019-09-23T17%3A38%3A05.8358735Z&urlSigningMethod=HMACV1&urlSignature=Qtd6vnzqgSwXpAkIyp9DJY4Kn7GJzYMR8UDkLR%2FsMQY%3D

so for simplicity we just weed out code with newlines.
2019-09-23 15:03:26 -07:00
John MacFarlane
67822bd925 Fix linux ci. 2019-09-23 09:49:54 -07:00
John MacFarlane
4b6a76c196 pandoc.cabal: repeat ghc-options in all stanzas. 2019-09-23 09:49:36 -07:00
John MacFarlane
5682184264 Fix tests in linux ci (GitHub). 2019-09-22 22:32:50 -07:00
John MacFarlane
f60ae7f327 Update pandoc-citeproc commit. 2019-09-22 22:09:51 -07:00
John MacFarlane
ba14649945 Improve test #5753 2019-09-22 22:00:20 -07:00
John MacFarlane
a846ce9dd4 Add HsYAML-aeson to stack.yaml. 2019-09-22 21:43:30 -07:00
John MacFarlane
1138d5bb36 Fix cabal command in linux ci. 2019-09-22 18:15:44 -07:00
John MacFarlane
74e25c5480 Use latest pandoc-citeproc. 2019-09-22 17:03:40 -07:00
John MacFarlane
ad64ec613d Switch to lts-14 resolver and ghc 8.6. 2019-09-22 12:43:29 -07:00
John MacFarlane
c2836b1c11 Require latest texmath. 2019-09-22 12:06:11 -07:00
John MacFarlane
9abed45879 RST reader: Fixed parsing of indented blocks.
We were requiring consistent indentation, but this
isn't required by RST, as long as each nonblank
line of the block has *some* indentation.

Closes #5753.
2019-09-22 12:01:45 -07:00
Nikolay Yakimov
9b6ee81c19 [Docx Writer] Re-use Readers.Docx.Parse for StyleMap (#5766)
* [Docx Parser] Move style-parsing-specific code to a new module

* [Docx Writer] Re-use Readers.Docx.Parse.Styles for StyleMap

* [Docx Writer] Move Readers.Docx.StyleMap to Writers.Docx.StyleMap

It's never used outside of writer code, so it makes more sense to scope it under writers really.
2019-09-22 12:00:35 -07:00
John MacFarlane
d247e9f72e Make plain output plainer.
Previously we used the following Project Gutenberg conventions
for plain output:

- extra space before and after level 1 and 2 headings
- all-caps for strong emphasis `LIKE THIS`
- underscores surrounding regular emphasis `_like this_`

This commit makes `plain` output plainer. Strong and Emph
inlines are rendered without special formatting.  Headings
are also rendered without special formatting, and with only
one blank line following.

To restore the former behavior, use `-t plain+gutenberg`.

API change: Add `Ext_gutenberg` constructor to `Extension`.

See #5741.
2019-09-22 11:33:09 -07:00
John MacFarlane
a9d106d1d1 Use released doctemplates 2019-09-22 10:58:04 -07:00
John MacFarlane
b64410ff9c Use HsYAML-0.2.0.0
Most of this is due to @vijayphoenix (#5704), but it
needed some revisions to integrate with current
master, and to use the released HsYAML.

Closes #5704.
2019-09-22 10:38:15 -07:00
John MacFarlane
fc443712d3 Preliminary GitHub action for release-candidate building. 2019-09-22 09:52:36 -07:00
John MacFarlane
4beca429a4 ci action: use list of paths to ignore. 2019-09-22 09:01:29 -07:00
John MacFarlane
88ba9a3127 Nightly - removed diagnostics. 2019-09-21 21:01:38 -07:00
John MacFarlane
b9ccd44f0a Actions ci - trigger on pull_request as well as push. 2019-09-21 17:49:00 -07:00
John MacFarlane
21b6bd623c Nightly - another attempt to fix windows. 2019-09-21 17:33:34 -07:00
John MacFarlane
780079aaec Merge branch 'lierdakil-docx-reader-styles' 2019-09-21 11:39:15 -07:00
Nikolay Yakimov
9dbfd23c56 Update documentation wrt docx reader custom style names 2019-09-21 11:37:21 -07:00
Nikolay Yakimov
5c5d1a65d9 [Docx Reader] Update tests
Notice this commit updates lists.docx. The old test file contained
references to "ListParagraph" style, which should never leak
outside of pandoc, so I'm not sure what that was supposed to test
for exactly.
2019-09-21 11:37:21 -07:00
Nikolay Yakimov
14b00517ae [Docx Writer] Consistently use style names, not style ids
Styles that this change affects: paragraph styles: Author, Abstract,
Compact, Figure, Captioned Figure, Image Caption, First Paragraph,
Source Code, Table Caption, Definition, Definition Term; character
styles: Verbatim Char, token styles (those with names ending in Tok)
2019-09-21 11:37:21 -07:00
Nikolay Yakimov
4a5e389f21 [Docx Writer] Code clean-up
Reduce code duplication, remove redundant brackets
2019-09-21 11:18:47 -07:00
Nikolay Yakimov
c113ca6717 [Docx Reader] Use style names, not ids, for assigning semantic meaning
Motivating issues: #5523, #5052, #5074

Style name comparisons are case-insensitive, since those are
case-insensitive in Word.

w:styleId will be used as style name if w:name is missing (this should
only happen for malformed docx and is kept as a fallback to avoid
failing altogether on malformed documents)

Block quote detection code moved from Docx.Parser to Readers.Docx

Code styles, i.e. "Source Code" and "Verbatim Char" now honor style
inheritance

Docx Reader now honours "Compact" style (used in Pandoc-generated docx).
The side-effect is that "Compact" style no longer shows up in
docx+styles output. Styles inherited from "Compact" will still
show up.

Removed obsolete list-item style from divsToKeep. That didn't
really do anything for a while now.

Add newtypes to differentiate between style names, ids, and
different style types (that is, paragraph and character styles)

Since docx style names can have spaces in them, and pandoc-markdown
classes can't, anywhere when style name is used as a class name,
spaces are replaced with ASCII dashes `-`.

Get rid of extraneous intermediate types, carrying styleId information.
Instead, styleId is saved with other style data.

Use RunStyle for inline style definitions only (lacking styleId and styleName);
for Character Styles use CharStyle type (which is basicaly RunStyle with styleId
and StyleName bolted onto it).
2019-09-21 11:18:15 -07:00
Nikolay Yakimov
fd14ad5261 [Docx Reader] Code clean-up
Reduce code duplication, remove redundant brackets, use newtype instead of data where appropriate
2019-09-21 11:18:15 -07:00
Nikolay Yakimov
6ceed9593a Add cabal.project.local to .gitignore 2019-09-21 11:18:15 -07:00
John MacFarlane
e3a6648e8f Nightlies - another attempt to fix windows build. 2019-09-21 10:35:31 -07:00
John MacFarlane
5ab14bfc0b Nightlies - 6 hour schedule for now. 2019-09-20 23:16:28 -07:00
John MacFarlane
7b879f867c Changes to Slides to be more flexible with Div structure.
Previously if you had

```
::: #foo
c
:::
```

slide level would be 1, not 2.
2019-09-20 23:15:41 -07:00
Ben Steinberg
7389919bb4 Preserve built-in styles in DOCX with custom style (#5670)
This commit prevents custom styles on divs and spans from overriding
styles on certain elements inside them, like headings, blockquotes,
and links. On those elements, the "native" style is required for the
element to display correctly. This change also allows nesting of
custom styles; in order to do so, it removes the default "Compact"
style applied to Plain blocks, except when inside a table.
2019-09-20 22:13:29 -07:00