Commit graph

6331 commits

Author SHA1 Message Date
Philip Pesca
01a52e2300 HTML writer: ensure TeX formulas are rendered correctly (#5658)
The web service passed in to `--webtex` may render formulas using inline
or display style by default. Prefixing formulas with the appropriate
command ensures they are rendered correctly.

This is a followup to the discussion in #5656.
2019-07-24 10:10:36 -07:00
John MacFarlane
060141bf2c Templates: don't import/export varListToJSON.
We'll be removing that in doctemplates 0.3.
2019-07-23 21:49:13 -07:00
John MacFarlane
1187ca3517 Templates: Change type of renderTemplate'.
Return value is now Text rather than being polymorphic.
This makes room for upcoming removal of the TemplateTarget
class from doctemplates.

Other code modified accordingly, and should compile with
both current and upcoming version of doctemplates.
2019-07-23 21:40:24 -07:00
Philip Pesca
bc508534a6 HTML writer: render inline formulas correctly with --webtex (#5656)
We add `\textstyle` to the beginning of the formula to ensure it will be rendered in inline style.
Closes #5655.
2019-07-23 12:21:31 -07:00
John MacFarlane
d9960244d8 LaTeX reader: support tex \tt command.
Closes #5654.
2019-07-22 15:29:07 -07:00
Albert Krewinkel
63c65c89da
Org reader: accept ATTR_LATEX in block attributes
Attributes for LaTeX output are accepted as valid block attributes;
however, their values are ignored.

Fixes: #5648
2019-07-22 08:12:22 +02:00
John MacFarlane
91d4283263 LaTeX writer: fix line breaks at start of paragraph.
Previously we just omitted these. Now we render them
using `\hfill\break` instead of `\\`.  This is a revision
of a PR by @sabine (#5591) who should be credited with the
idea.

Closes #3324.
2019-07-20 17:12:53 -07:00
John MacFarlane
b6f9318c9b PDF: Better detection of a Cygwin environment.
Should close #5451.

Unlike the earlier fix, this one doesn't spill out to stderr
when 'uname -o' fails.
2019-07-20 16:50:53 -07:00
John MacFarlane
fb73b5c27b Revert "PDF: create temp dir in . on Cygwin."
This reverts commit 50885eabde.

Reopens #5451.

The problem with the previous commit is that it would lead to
spurious messages on stderr on platforms like macOS.
2019-07-20 12:59:34 -07:00
John MacFarlane
8435de3236 Removed an unnecessary liftIO. 2019-07-20 12:53:44 -07:00
John MacFarlane
30eda43192 Moved istty check. 2019-07-20 12:51:03 -07:00
John MacFarlane
8643361d2e Minor code clarity change. 2019-07-20 12:26:24 -07:00
John MacFarlane
465eeece6b LaTeX reader: search for image with list of extensions...
like latex does, if an extension is not provided.

Closes #4933.
2019-07-20 10:17:49 -07:00
John MacFarlane
339392bf54 Markdown: Ensure that expanded latex macros end with space if original did.
Closes #4442.
2019-07-19 10:32:59 -07:00
John MacFarlane
50885eabde PDF: create temp dir in . on Cygwin.
See #5451.
2019-07-19 09:41:19 -07:00
Agustín Martín Barbero
bd69218451 Change order of ilvl and numId in document.xml (#5647)
Workaround for Word Online shortcomming. Fixes #5645

Also, make list para properties go first.

This reordering of properties shouldn't be necessary but
it seems Word Online does not understand the docx correctly otherwise.
2019-07-19 09:32:43 -07:00
John MacFarlane
28cad16517 Markdown writer: prefer using raw_attribute when enabled.
The `raw_attribute` will be used to mark raw bits, even HTML
and LaTeX, and even when `raw_html` and `raw_tex` are enabled,
as they are by default.

To get the old behavior, disable `raw_attribute` in the writer.

Closes #4311.
2019-07-18 22:31:03 -07:00
John MacFarlane
5c655e86d5 HTML writer: ensure that line numbers in code blocks get id-prefix.
Closes #5650.
2019-07-18 22:08:37 -07:00
John MacFarlane
c75faac1b5 LaTeX reader: handle \looseness command values better.
Closes #4439.
2019-07-16 13:42:34 -07:00
John MacFarlane
0d72237e27 Dokuwiki writer: handle mixed lists without HTML fallback.
Closes #5107.
2019-07-16 13:14:37 -07:00
John MacFarlane
100624a009 Ms writer: Use .LP instead of .PP for line block.
Closes #5588.
2019-07-16 12:17:02 -07:00
John MacFarlane
5454aad324 Make filterIpynbOutput strip ANSI escapes from code in output...
for non-ipynb formats, when the default "best" option is used with
--ipynb-output.  The escape sequences cause problems in many formats,
including LaTeX.  Closes #5633.
2019-07-16 09:27:51 -07:00
Karl Pettersson
5303791bc4 Customizable type of PDF/A for the ConTeXt writer (issue #5608) (#5610)
* Let the user choose type of PDF/A generated with ConTeXt (closes #5608)
* Updated ConTeXt test documents for changes in tagging
* Updated color profile settings in accordance with ConTeXt wiki
* Made ICC profile and output intent for PDF/A customizable
* Read pdfa variable from meta (and updated manual)
2019-07-15 11:55:04 -07:00
John MacFarlane
680d7b515f Logging: Added UnknownExtensions constructor to LogMessage.
[API change]

Issue this warning when we're falling back to markdown or
html because we don't recognize the extension of the input or
output files.
2019-07-14 11:35:17 -07:00
John MacFarlane
ed0548d898 Change formatForFilePaths to return a Maybe.
Internal change. This will make it easier to emit messages
when we're guessing at a format.
2019-07-14 10:48:38 -07:00
Alexander Krotov
0713cb65bc Muse: add RTL support
Closes #5551
2019-07-14 18:22:52 +03:00
Vasily Alferov
f6c92c7523 Fix #4499: add mbox and hbox handling to LaTeX reader (#5586)
When `+raw_tex` is enabled, these are passed through literally.
Otherwise, they are handled in a way that emulates LaTeX's behavior.
2019-07-13 16:55:41 -07:00
John MacFarlane
7bc9eab846
Merge pull request #5589 from blmage/fix-3992
Add support for EPUB2 covers (fix #3992)
2019-07-13 16:48:09 -07:00
John MacFarlane
1e0d4f16b0
Merge pull request #5590 from blmage/fix-4206
Do not override "fileN" medias when writing to EPUB format (fix #4206)
2019-07-13 16:45:58 -07:00
John MacFarlane
4a5e727c8c Man writer: Improved definition list term output.
Now we boldface code but not other things. This matches the
most common style in man pages (particularly option lists).

Also, remove a regression in the last commit in which 'nowrap'
was removed.
2019-07-13 16:41:43 -07:00
John MacFarlane
d0bf7efe95 Man writer: fixed boldfacing of definition terms.
Previously the bold-facing would be interrupted by
other formatting, because we used `.B`.

Closes #5620.
2019-07-13 16:12:28 -07:00
John MacFarlane
a16311c225
Merge pull request #5606 from blmage/odt-frames
Improve the parsing of frames in ODT documents
2019-07-13 15:53:58 -07:00
John MacFarlane
1784161946 LaTeX reader: Properly handle \providecommand and environment...
They are now ignored if the corresponding command or environment
is already defined.

Closes #5635.
2019-07-13 15:51:33 -07:00
John MacFarlane
5f495eaace EPUB writer: Use svg tag wrapper for cover image.
In addition, the code generating the image has been moved
to the template, to make it more customizable.

Those who use custom EPUB templates will need to adjust their
templates, adding the code to generate the cover image.
(Previously this was just inserted into 'body'.)

Closes #5643.
2019-07-13 15:20:14 -07:00
John MacFarlane
6d30d3e0b3 Pass through aria- attributes to HTML5.
Also document addition of data- prefix to unknown attributes.

Closes #5646.
2019-07-12 17:03:01 -07:00
Brian Leung
1d9ff85b45 RST reader: keep name property in imgAttr. (#5637)
Closes #5619.
2019-07-10 18:35:01 -07:00
Mauro Bieg
95d7d1b908
Extensions.hs fix typo in PHP Markdown comment 2019-07-10 09:25:42 +02:00
Brian Leung
9c4ba81357 Markdown reader: handle inline code more eagerly within lists. (#5628)
Closes #5627.
2019-07-06 23:14:21 +02:00
Pete Ryland
24c781039f Fix redundant constraint warnings. (#5625) 2019-07-02 10:29:34 +02:00
niszet
b6c53553a9 Update Lua function names in pandoc.system
Fixed function names of pandoc.system.get_working_directory() and
pandoc.system.with_temporary_directory() which are written in the
manual of lua filter.
2019-06-23 14:03:14 +02:00
Mauro Bieg
ecea807397 JATS Writer: do not emit empty <fn-group> (#5595)
introduced by e87b54dcad
2019-06-21 19:06:28 +02:00
oquechy
f0edf60364 Support epigraph command in LaTeX Reader.
Closes #3523.
2019-06-21 18:27:26 +02:00
blmage
e683707d60 Improve the parsing of frames in ODT documents 2019-06-20 21:54:30 +02:00
blmage
43347888d5 Handle the case where the "cover" meta does not link to the manifest 2019-06-18 19:09:53 +02:00
blmage
efe318b3f6 Add support for EPUB2 covers (fix #3992) 2019-06-18 19:09:53 +02:00
blmage
45b7460959 Do not override existing "fileN" medias when writing to EPUB format (fix #4206) 2019-06-18 19:06:18 +02:00
Jeroen de Haas
e67f4c58f2 Powerpoint code formatting is now context dependent (#5573)
This commit alters the way in which the Powerpoint writer treats
inline code and code blocks.

- Inline code is now formatted at the same size as the surrounding
  text.
- Code blocks are now given a margin and font size according to their
  level.
- Furthermore this commit allows changing the font with which code is
  formatted via the `monofont` option.

Tested in
- PowerPoint 365 for Windows - 1808 (Build 10730.20344 Click-to-Run)
- PowerPoint 365 for Mac - 16.26 (19060901)
2019-06-14 08:42:06 -07:00
John MacFarlane
92ccb88cb7 Don't look for template files remotely for remote input.
Previously pandoc would look for the template at a remote
URL when a URL was used for the input file, instead of taking
it from the data-dir.

Closes #5579.
2019-06-13 09:40:46 -07:00
John MacFarlane
fa50da3030 OpenDocument writer: Avoid duplicate attributes.
We use the innermost attribute in nested cases.

Closes #4634.
2019-06-12 21:51:09 -07:00
Albert Krewinkel
11bb862767 Lua: add a clone() method to all AST elements (#5572)
Closes: #5568
2019-06-12 09:58:38 -07:00