Commit graph

12392 commits

Author SHA1 Message Date
Albert Krewinkel
786594b23b Lua: add pandoc.system module (#5468)
The `system` Lua module provides utility functions to interact with the
operating- and file system. E.g.

    print(pandoc.system.get_current_directory())

or

    pandoc.system.with_temporary_directory('tikz', function (dir)
      -- write and compile a TikZ file with pdflatex
    end)
2019-05-04 01:06:30 -04:00
John MacFarlane
4f260c96d9 LaTeX reader: Allow newlines in \mintinline. 2019-05-03 10:18:16 -07:00
chinapedia
cfb3726216 MediaWiki reader: handle multiple attributes in table row (#5471) 2019-05-01 20:21:15 -04:00
Shim Myeongseob
73efef589a Fix broken links in documents (#5473)
Fix broken links in doc/epub.md, doc/getting-started.md,
doc/customizing-pandoc.md, doc/using-the-pandoc-api.md.
Also, use absolute links to pandoc.org when possible, so that
the links can be followed by people viewing these documents
on GitHub.
2019-05-01 20:09:36 -04:00
John MacFarlane
a20323033e Fix footnote in image caption.
Regression!  The fix for #4683 broke this case.
2019-05-01 16:56:37 -07:00
Winnie Hellmann
4a7f5b6d13 Remove reference to head.min.js (#5448)
This file has been removed in 3.8.0: 29b0e86089

Add a note in the changelog that users will need to update reveal.js to at least 3.8.0
for their presentations generated with this version of pandoc to work correctly.
2019-05-01 19:08:12 -04:00
Albert Krewinkel
4d16239100
CI: test with GHC 8.6.5 2019-05-01 21:28:37 +02:00
John MacFarlane
f11d0c9dc8 HTML: prevent gratuitious emojification on iOS.
iOS chooses to render a number of Unicode entities,
including '↩', as big colorful emoji.  This can be
defeated by appending Unicode
VARIATION SELECTOR-15'/'VARIATION SELECTOR-16'.
So we now append this character when escaping
strings, for both '↩' and '↔'.

If other characters prove problematic, they can
simply be added to needsVariationSelector.

Closes #5469.
2019-04-30 22:32:52 -07:00
Alexander Krotov
2b2d9baaa8 Muse writer tests: compare Text without converting to [Char] 2019-04-28 03:21:14 +03:00
John MacFarlane
66dd2008b0 Fix --self-contained so it works when output format has extensions.
Previously if you used `--self-contained` with `html-smart` or
`html+smart`, it wouldn't work.
2019-04-25 21:56:26 -04:00
John MacFarlane
d88a601642 Allow use of -output-directory in --pdf-engine-opt.
This is currently possible with `mklatex` and `-outdir`, but
was not yet possible with xelatex and `-output-directory`.
Closes #5462.
2019-04-23 10:08:25 -07:00
John MacFarlane
dd344715f6 EPUB writer: Ensure unique ids for styleesheets in content.opf.
Closes #5463.
2019-04-23 09:48:50 -07:00
John MacFarlane
6699471484 HTML writer: Add class="heading" to level 7+ Headers...
rendered as p tags. Closes #5457.
2019-04-20 22:24:24 -07:00
John MacFarlane
66ffe1831e Update stack.yaml, use latest pandoc-citeproc and lts-13. 2019-04-18 21:36:39 -07:00
Herbert Valerio Riedel
75b2db9a84 Don't advertise base-4.8 support anymore (#5455)
Problem is that blaze-html provides the Semigroup instance for Html
conditionally only for base >= 4.9
2019-04-17 14:19:21 -07:00
John MacFarlane
1e6c6b449f Allow QuickCheck 2.13. 2019-04-17 08:26:55 -07:00
John MacFarlane
e1cc73ed97 Text.Pandoc.PDF: replace </> with literal "/".
We use forward-slash for a directory separator in tmpDir,
even on Windows (because that's what tex likes).  So we
should not put a backslash between the tmpDir and the
filename on Windows.  This is harmless enough in normal
Windows setups, but it breaks on Cygwin.

Closes #5451.  Thanks to @cc2x for noticing and diagnosing
the problem.
2019-04-16 21:12:42 -07:00
John MacFarlane
144b2eabc2 Tigthen up fix to #5446.
We only treat Span as transparent if it has no attributes.
2019-04-16 09:32:19 -07:00
Matthew Doty
32e358bfe9 Improved sample lua tikz filter in lua-filters docs (#5445)
There are three changes:

- It only processes elements which begin with \begin{tikzpicture}
- It uses pdf2svg instead of imagemagick to preserve fidelity
- The images produced have transparent backgrounds
2019-04-15 21:39:03 -07:00
John MacFarlane
e409509a68 RST writer: treat Span as transparent.
Previously an Emph inside a Span was being treated as
nested markup and ignored.  With this patch, the Span
is just ignored.

Closes #5446.
2019-04-15 09:48:11 -07:00
John MacFarlane
6d19c08e9f LaTeX template: Add pdflang to hypersetup if lang is set.
Closes #5443.
2019-04-11 16:58:36 -07:00
John MacFarlane
8f01044062 LaTeX reader: add braces when resolving \DeclareMathOperator.
These seem to be needed for xelatex but not pdflatex.
Closes #5441.
2019-04-10 21:26:23 -07:00
John MacFarlane
d50f2a0bf6 Update copyright year 2019-04-09 09:16:19 -07:00
John MacFarlane
0e37ed9f50 Use cmark-gfm 0.2.0. 2019-04-09 09:15:49 -07:00
ebiiim
bb5e079536 update: default.revealjs follow revealjs 3.8.0 (#5435) 2019-04-07 11:02:50 -06:00
Mauro Bieg
90dc3a3e13 Asciify.hs: add Turkish undotted-i (#5434)
fixes #5433
2019-04-07 11:01:56 -06:00
John MacFarlane
5e269b5326 Add Derek Chen-Becker to AUTHORS.md 2019-04-05 21:40:38 -07:00
Jesse Rosenthal
37d9e22028 clarify PowerPoint templating changes in changelog. 2019-04-05 19:55:17 -04:00
John MacFarlane
f75fcf6f31 Update man page and README. 2019-04-05 15:11:08 -07:00
John MacFarlane
cfcc2a3f3e Bump to 2.7.2, update changelog. 2019-04-05 15:10:18 -07:00
John MacFarlane
0c97aceea8 More fixes to beamer table footnotes. 2019-04-05 11:31:18 -07:00
John MacFarlane
708236aa8e LaTeX writer: rename stInMinipage -> stExternalNotes 2019-04-05 11:12:23 -07:00
John MacFarlane
085a893109 Make footnotes work properly in beamer tables.
This fixes a regression in beamer due to the fix to #5367.
We put table footnotes outside the table in beamer, because
footnote/footnotehyper don't work with beamer.
2019-04-05 11:02:24 -07:00
John MacFarlane
4f572ddf69 Vimwiki reader: improve handling of internal links.
1) Don't append `.html`
2) Add `wikilink` title

This mirrors behavior of other wiki readers.  Generally the
`.html` extension is not wanted.  It may be important for
output to HTML in certain circumstances, but it can always
be added using a filter that matches on links with title
`wikilink`.

Note that if you have a workflow that uses pandoc to convert
vimwiki to readable HTML pages, you may need to add such a
filter to reproduce current behavior.

Here is a filter that does the job:

```lua
function Link(el)
    if el.title == 'wikilink' then
      el.target = el.target .. ".html"
    end
    return el
end
```

Save this as `fixlinks.lua` and use with `--lua-filter fixlinks.lua`.

Closes #5414.
2019-04-05 10:04:28 -07:00
Jesse Rosenthal
ba7898bb3d PowerPoint writer code style fix
I had been using record syntax in an ADT, is bad style, since it means
that each record produces a partial function. Fortunately we weren't
using the partial functions anywhere, so this changes it to positional
syntax.
2019-04-05 12:05:08 -04:00
Jesse Rosenthal
b99188c44c Update pandoc.cabal with new pptx files. 2019-04-05 09:15:49 -04:00
Jesse Rosenthal
ab5c701343 PowerPoint writer: expand builtin reference doc to model all layouts
The previous built-in reference doc had only title and content
layouts. Add in a section-header slide and a two-content slide, so
users can more easily modify it to build their own templates.

Golden files needed to be regenerated. Checked on MS PowerPoint 2013.
2019-04-05 08:50:39 -04:00
Jesse Rosenthal
7ac860be74 PowerPoint tests: Regenerate golden files
Due to viewProps change in 61dc0f9f.

Golden files checked on PowerPoint 2013 (Win 10 on virtualbox).
2019-04-04 10:46:30 -04:00
Jesse Rosenthal
891ea3112b PowerPoint writer: Always open up in slide view
When editing a template/reference-doc, the user might be in Master
view, but when producing a slide show, it is assumed that slide view
will be desired. This removes the "lastView" attr from the
viewProps.xml slide so that the presentation will always open up in
slide view.

Note this requires creating a new "ppt/viewProps.xml" instead of just
moving over the old one from the viewProps file. Since this produces a
slightly different order of xml files in the content manifest, the
golden files will have to be rebuilt.
2019-04-04 10:46:30 -04:00
John MacFarlane
312b4b69b6 Add templates/default.xwiki to cabal data files. 2019-04-03 08:20:05 -07:00
John MacFarlane
c4e24c2ccb Add support for go with --listings.
Closes #5427.
2019-04-03 08:02:39 -07:00
John MacFarlane
23df94e30a Update command test #5416 to make it windows friendly 2019-04-02 17:59:47 -07:00
Andrew Dunning
81461dde58 Manual: Improve 'header' and 'heading' usage (#5424)
Corrects usage of 'heading' and 'header' in text (but does not change programmed names).
Partially addresses #5423.
2019-04-02 18:21:19 -06:00
Andrew Dunning
3d1409347a LaTeX template: Ensure correct heading/table order (#5421)
Improve the workaround for #1658, adapting a solution by @u-fischer in
<https://github.com/latex3/latex2e/issues/131> that works whether or not
the `indent` variable is enabled.

Remove `subparagraph` variable in LaTeX template.  The default is now
to use run-in style for level 4 and 5 headings (`\paragraph` and `\subparagraph`).
To get the previous default behavior (where these were formatted as blocks,
like `\subsubsection`), set the `block-headings` variable.

An example is given in the manual of reformatting the appearance of headings
more thoroughly using KOMA-Script.

Closes #5365.
2019-04-02 18:18:36 -06:00
John MacFarlane
40b60a911c Actually run the xwiki writer tests. 2019-04-02 17:11:35 -07:00
John MacFarlane
976929a4a4 Add test/writer.xwiki to cabal extra-source-files. 2019-04-02 16:45:28 -07:00
John MacFarlane
4ed247ec87 Add xwiki to cabal description 2019-04-02 16:45:20 -07:00
John MacFarlane
ba8d0d9f01 Add xwiki output format to manual. 2019-04-02 16:41:50 -07:00
John MacFarlane
ef2c970d0e Fix harmless error in file-scope code.
Closes #5422.
2019-04-02 16:33:59 -07:00
Derek Chen-Becker
45944b51a0 Add XWiki Support (#4167)
Add XWiki Support

Closes #1800
2019-04-02 17:27:02 -06:00