John MacFarlane
2b89aaf04d
Make internal links work in ODT/OpenDocument.
...
This adds proper bookmarks to the headers with non-null IDs.
Closes #4358 .
2018-05-14 10:37:46 -07:00
John MacFarlane
f240adfc13
EPUB writer: properly escape pagetitle.
...
Previously we weren't escaping `&` and other XML characters
in the pagetitle, so a title containing a `&` would be invalid.
2018-05-12 09:31:15 -07:00
Albert Krewinkel
d30fbc2879
Org reader: fix image filename recognition
...
Use a function from the *filepath* library to check whether a string is
a valid file name. The custom validity checker that was used before gave
wrong results, e.g. for absolute file paths on
Windows (kawabata/ox-pandoc#52 ).
2018-05-09 23:08:53 +02:00
John MacFarlane
b7356d3ddf
Restored and undeprecated gladtex for HTML math.
...
- Added `GladTeX` constructor to `Text.Pandoc.Options.HTMLMathMethod`
[API change, reverts removal in v2.2]
- Restored and undeprecated `--gladtex` option, removed in v2.2.
Closes #4607 .
2018-05-09 11:29:20 -07:00
John MacFarlane
d3be567a73
Fix regression with tex math environments in HTML + MathJax.
...
Closes #4639 .
2018-05-09 10:37:04 -07:00
John MacFarlane
81881ce470
Parsing: Lookahead for non-whitespace after single/double quote start.
...
Closes #4637 .
2018-05-09 10:00:34 -07:00
John MacFarlane
b8231a8eca
Fixed bug in uriPathToPath for Windows.
2018-05-08 11:31:00 -07:00
John MacFarlane
40603dd4cd
Support underline in docx writer.
...
Updated golden test and confirmed validity of file.
Closes #4633 .
2018-05-08 10:17:51 -07:00
John MacFarlane
780bf64d1d
Use uriPathToPath with file: URIs.
...
Closes #4613 .
Needs testing on Windows.
2018-05-08 09:56:42 -07:00
John MacFarlane
3a291dad35
Shared: add uriPathToPath.
...
This adjusts the path from a file: URI in a way that is sensitive
to Windows/Linux differences. Thus, on Windows,
`/c:/foo` gets interpreted as `c:/foo`, but on Linux,
`/c:/foo` gets interpreted as `/c:/foo`.
See #4613 .
2018-05-08 09:56:42 -07:00
John MacFarlane
eb733d1365
LaTeX reader: handle $ in /text{..} inside math.
...
This fixes the main problem in #4576 .
There is still an issue about `\SI`, but that's a separate issue.
2018-05-08 09:11:39 -07:00
John MacFarlane
0d83ce3bc4
HTML writer: Strip links from headers when creating TOC.
...
Otherwise the TOC entries will not link to the sections.
Closes #4340 .
2018-05-07 17:44:05 -07:00
Alexander Krotov
5879923422
Muse writer: add support for left-align and right-align classes
...
Address issue #4542
2018-05-07 14:54:20 +03:00
Alexander Krotov
621e864023
Use Data.Maybe.fromMaybe
2018-05-07 14:20:42 +03:00
Mauro Bieg
7c0ef68311
Revert piping html to pdf-engine ( #4628 )
...
* Revert "PDF: Use withTempDir in html2pdf." We're going back to using tmpFile instead of piping
* Revert "html2pdf: inject base tag wih current working directory (#4443 )"
Fixes #4413
2018-05-05 09:31:17 -07:00
Francesco Occhipinti
59f0c1d83b
catch IO errors when writing media files, closes #4559 ( #4619 )
...
If we do not catch these errors, any malformed entry in a media bag
could cause the loss of a whole document output. An example of
malformed entry is an entry with an empty file path.
2018-05-04 10:31:02 -07:00
John MacFarlane
cf0b1e435b
Relicense TikiWiki reader as GPL v2 or above, like rest of pandoc.
...
Author has given permission in an email, 3 May 2018.
See #4591 .
2018-05-03 18:24:46 -07:00
Alexander Krotov
3d766b5c44
Don't lowercase custom writer filename
...
Fixes #4610
2018-04-30 00:55:25 +03:00
Alexander Krotov
5ce91a7e01
FB2 reader: replace some errors with warnings
...
Now FB2 reader can read writer.fb2, which does not validate (yet).
2018-04-28 22:44:07 +03:00
Francesco Occhipinti
8b01f03eaa
RST writer: preserve empty inline parents in flatten ( #4603 )
2018-04-27 09:01:20 -07:00
Tim Parenti
9472811694
LaTeX writer: Update \lstinline delimiters. ( #4369 )
...
Don't delimit \lstinline with characters that are normally escaped.
Follow-up to #4111 , #4271 .
2018-04-26 12:41:15 -07:00
Alexander
1927bc9aac
Add FB2 reader ( #4539 )
2018-04-26 12:33:18 -07:00
John MacFarlane
619aaf29aa
Merge branch 'fb2-hrblankline' of https://github.com/labdsf/pandoc into labdsf-fb2-hrblankline
2018-04-26 12:29:06 -07:00
John MacFarlane
a96c762a10
RST reader: fix anonymous redirects with backticks.
...
Closes #4598 .
2018-04-26 12:23:25 -07:00
John MacFarlane
e3d05171f3
Make --ascii work for all XML formats (ICML, OPML, JATS,...).
...
Also document in manual.
2018-04-26 12:23:25 -07:00
John MacFarlane
3ed4861c62
Make --ascii work with ms and man output.
2018-04-26 12:23:25 -07:00
Francesco Occhipinti
eef1c211f5
RST reader: flatten nested inlines, closes #4368 ( #4554 )
...
nested inlines are not valid RST syntax, so we flatten them following
some readability criteria discussed in #4368 .
2018-04-26 12:17:51 -07:00
Joe Hermaszewski
cfa4eee28b
DocBook Reader: Read Latex math as output by asciidoctor ( #4569 )
2018-04-26 12:12:28 -07:00
Alexander Krotov
1b5948b079
Remove unused import
2018-04-26 14:43:27 +03:00
Alexander Krotov
4d89a1db7f
Muse reader: allow nested footnotes
2018-04-26 12:38:17 +03:00
Alexander Krotov
73463b8239
Muse reader: use Data.Map.member instead of lookup
2018-04-26 12:09:59 +03:00
Alexander Krotov
188f9f4c53
Simplify curSlideHasSpeakerNotes
2018-04-26 12:09:25 +03:00
John MacFarlane
c139a011fa
LaTeX reader: fixed previous commit.
2018-04-25 23:47:43 -07:00
John MacFarlane
06bc0376d1
LaTeX reader: Improve handling of raw LaTeX (for markdown etc.).
...
Previously there were some bugs in how macros were handled.
Closes #4589 , #4594 .
2018-04-25 23:20:52 -07:00
John MacFarlane
a9344bf308
LaTeX reader: support \MakeUppercase, `\MakeLowercase'.
...
Also `\MakeTextUppercase`, `\MakeTextLowercase` from textcase
and `\uppercase`, `\lowercase`.
We don't mimic exactly the quirky semantic differences between
these commands, but just uppercase/lowercase regular strings within
them. We leave commands and code alone.
Closes #4595 .
2018-04-25 17:39:49 -07:00
John MacFarlane
16f36eee43
Removed deprecated ancient HTML math methods.
...
Removed `--latexmathml`, `--gladtex`, `--mimetex`, `--jsmath`, `-m`,
`--asciimathml` options.
Removed `JsMath`, `LaTeXMathML`, and `GladTeX` constructors from
`Text.Pandoc.Options.HTMLMathMethod` [API change].
Removed unneeded data file LaTeXMathML.js and updated tests.
Bumped version to 2.2.
2018-04-25 17:18:56 -07:00
John MacFarlane
ad37fd8a03
Added licensing headers for DocBook, EPUB, JATS, OPML readers.
...
See #4592 .
2018-04-25 16:36:20 -07:00
John MacFarlane
dab3330a58
RST reader: allow < 3 spaces indent under directives.
...
Closes #4579 .
2018-04-22 12:20:25 -07:00
John MacFarlane
7fbe473b2e
Markdown reader/writer: spacing adjustments in tables.
...
* Markdown writer now includes a blank line at the end
of the row in a single-row multiline table, to prevent it from being
interpreted as a simple table. Closes #4578 .
* Markdown reader does a better job computing the relative width of
the last column in a multiline table, so we can round-trip tables
without constantly shrinking the last column.
2018-04-21 13:06:57 -07:00
John MacFarlane
229db80ac2
makePDF: Don't try to convert eps files.
...
pdflatex converts them itself, and JuicyPixels can't do it.
See #2067 .
2018-04-21 12:28:30 -07:00
John MacFarlane
cd51983afe
makePDF: For pdflatex, use a temp dir in the working directory.
...
Otherwise we can have problems with things like epstopdf.pl,
which pdflatex runs to convert eps files and which won't run
on a file above the working directory in restricted mode.
2018-04-21 12:27:30 -07:00
John MacFarlane
ec30d56e19
Mime: Use the alias application/eps for eps.
...
Instead of application/postscript. This will ensure that
we retain the eps extension after reading the image into
a mediabag and writing it again. See #2067 .
2018-04-21 12:11:48 -07:00
John MacFarlane
f508c833f1
Markdown reader: allow empty attributes.
...
See #2944 .
2018-04-19 23:01:52 -07:00
John MacFarlane
276894a2f2
RST writer: use more consistent indentation.
...
Previously we used an odd mix of 3- and 4-space indentation.
Now we use 3-space indentation, except for ordered lists,
where indentation must depend on the width of the list marker.
Closes #4563 .
2018-04-19 13:47:16 -07:00
John MacFarlane
c76565bef5
Parsing.uri: don't treat * characters at end as part of URI.
...
This fixes #4561 , a bug parsing emphasized bare links in RST.
2018-04-19 11:49:17 -07:00
John MacFarlane
b15f4f468d
Text.Pandoc.Class.writeMedia: unescape URI-escaping in file path.
...
This avoids writing things like `file%20one.png` to the file system.
2018-04-19 11:39:35 -07:00
John MacFarlane
b87dd19816
EPUB reader: fix images with space in file path.
...
Closes #4344 .
2018-04-19 11:35:26 -07:00
Alexander Krotov
caeb963447
FB2 writer: convert metadata value "abstract" to book annotation
2018-04-19 17:03:21 +03:00
Alexander Krotov
ce4326a4f1
Muse reader: allow "-" in anchors
2018-04-19 14:17:59 +03:00
John MacFarlane
bc9d296e5a
Markdown reader: handle table w/o following blank line in fenced div.
...
Closes #4560 .
2018-04-18 18:27:15 -07:00