Commit Graph
16121 Commits
Author SHA1 Message Date
Vladimir Alexiev 202eacb686 Update epub.md
minor typo s/above/about/
2022-11-16 10:42:05 -08:00
Alexander Batischev 1bea5e8a54 Allow mtl 2.3.1 2022-11-15 11:35:53 -08:00
John MacFarlane afe096d9e3 Markdown writer: escape ! before [.
See #8254.
2022-11-11 10:58:07 -08:00
Wout Gevaert 323be80838 Use 'literal tag' instead of 'text (T.unpack tag)' in tagWithAttrs 2022-11-11 10:12:07 -08:00
Wout Gevaert e9d2ceb9bd Add tests for the new table features 2022-11-11 10:12:07 -08:00
Wout Gevaert 0b003de6f1 Change the Mediawiki writer to use the 'new' table structure
Now MediaWiki tables can use colspan and rowspan :D
2022-11-11 10:12:07 -08:00
Wout Gevaert c5dbedcd4e [API change] Add functions htmlAddStyle, htmlAlignmentToString and htmlAttrs to Writers/Shared.hs
The functions htmlAddStyle and htmlAlignmentToString are moved from Writers/HTML.hs, where they were called 'addStyle' and 'alignmentToString' respectively.
The function htmlAttrs is split off from tagWithAttrs in Writers/Shared.hs. It creates a representation of an Attr object, as one would see in a tagWithAttrs (but without the tag)
2022-11-11 10:12:07 -08:00
John MacFarlane 61d6608350 Add CITATION.cff.
Closes #8434.
2022-11-10 15:50:41 -08:00
John MacFarlane 314c2d1d32 Better error when parsing EndNote references fails.
(Tell them that it concerns EndNote references.)
2022-11-10 10:14:59 -08:00
Amar Al-Zubaidi 03e478ee2c Add LaTeX variable urlstyle (#8429)
This is set to `same` by default, so users should not experience any change.
2022-11-10 08:39:14 -08:00
Albert Krewinkel 2f780ce45a .gitignore: ignore .stack-work in subdirectories 2022-11-10 14:16:49 +01:00
John MacFarlane 7ef00d7226 pandoc-server: add ContentType to CORS policy.
See #8427.
2022-11-09 17:49:40 -08:00
John MacFarlane 334903bb9d HTML template: remove default font size, line height...
...and font family in default inline css.  Closes #8423
(see comments there for motivation).  `mainfont`, `fontsize`,
and `linestretch` can still be used as before; the only difference
is that we no longer provide opinionated defaults.

This commit also adds a `maxwidth` variable that sets `max-width`;
if not set, 36em is used as a default.
2022-11-09 17:03:12 -08:00
John MacFarlane cb5e3ded12 In --verbose mode add message when running citeproc.
(As with other filters.)
2022-11-09 12:34:56 -08:00
John MacFarlane 1989573074 Ms writer: remove -C option on PSPIC.
Some old versions don't support this option, and since it's
the default it shouldn't be necessary.
2022-11-08 15:20:08 -08:00
John MacFarlane e2899fd52a Add simple CORS support to pandoc-server.
Closes #8427.
2022-11-08 12:45:15 -08:00
John MacFarlane dee186be7d make_artifacts.sh: add quotes. 2022-11-07 13:20:23 -08:00
John MacFarlane bf941efb28 Fix make_artifacts.sh. 2022-11-07 11:36:29 -08:00
John MacFarlane be7d4bd092 Fix CABALOPTS in make_artifacts.sh. 2022-11-07 10:47:57 -08:00
John MacFarlane ca46dc8a66 make_artifacts.sh: add a 'cabal test' as a sanity check.
It's possible that changes in upstream packages could make a
test fail, and we wouldn't want to release.
2022-11-07 08:42:08 -08:00
John MacFarlane 1bc48e9dc5 CI: use cabal 3.8.1.0, --ghc-options=-Werror.
Previously we had to work around a cabal-install bug that caused
`-Werror` to react to dependencies as well as local packages,
but this is fixed in cabal 3.8.1.0.  There are some cases in which
building dependencies only doesn't work (see #8084).
2022-11-07 08:32:54 -08:00
John MacFarlane 452fe5aa17 EPUB writer: refactor to use T.P.Chunks. 2022-11-06 21:31:40 -08:00
John MacFarlane 04973586eb Move SecInfo, toTOCTree to T.P.Chunks.
Also add `secPath` to `SecInfo`.
2022-11-06 21:31:40 -08:00
John MacFarlane 9e2df2a718 Add Text.Pandoc.Chunks.
This module provides functions to split Pandoc documents into
chunks to be rendered in separate files, e.g. one per section.

Internal identifiers are rewritten appropriately to point to
the new locations.

See #6122.
2022-11-06 21:31:34 -08:00
John MacFarlane 2dfa5e06b7 Remove stray character in epub.css. 2022-11-06 20:46:41 -08:00
John MacFarlane 036aac3851 Fix warnings. 2022-11-06 12:47:01 -08:00
John MacFarlane 2682c79e95 EPUB writer: refactor createChaptersAndRefTable. 2022-11-06 09:54:25 -08:00
John MacFarlane f9ce4ff4d0 T.P.Writers.Shared: refactor toTableOfContents.
We now export `toTOCTree` and `SecInfo`, which provide a more neutral
way of generating TOC information from Blocks, and we use these in
`toTableOfContents`.

This is desirable because some output formats may require a TOC
structure that isn't just a rendered pandoc list.
2022-11-06 09:50:14 -08:00
Marcin Serwin 347fe49115 Change default background color of PDFs generated via HTML (#8422)
* Change default background color of PDFs generated via HTML

* Update tests
2022-11-04 18:13:02 -07:00
nbehrnd aaac5eb7ec clarify font selection for pdf -t ms (#8421)
Previous versions of the documentation did not clarify much which
options of font selection are available for the generation of .pdf
via `-t ms`.  Nor was there a description how to extend the set of
of fonts provided by ghostscript/pdfgroff.  This commit equally
hints to Peter Schaffter's script install-fonts.sh to facilitate
greatly the later, too.
2022-11-04 10:11:12 -07:00
Olivier Benz 0eda40c93a Use ghc4pandoc 9.4.3 docker image (#8420) 2022-11-04 08:52:33 -07:00
John MacFarlane 848f6b51b2 Text.Pandoc.App: Change parseOptionsFromArgs and parseOptions... (#8406)
They now return `Either OptInfo Opt`.

Add `OptInfo` type.

Add `handleOptInfo` function.  This performs the IO actions for
things like `--version` that were previously done in `parseOptionsFromArgs`.
An argument for a `ScriptingEngine` has been added, to facilitate
printing custom templates and custom extensions for Lua filters.
(However, at this stage nothing is yet done with it.)

[API change]
2022-11-02 19:07:22 -07:00
John MacFarlane 8718fab964 EPUB writer: add includeTitlePage param to createNavEntry.
So far this isn't used, but it contributes to solving #6097.
2022-11-02 10:20:41 -07:00
John MacFarlane 56e35cd958 epub.css: left-align h1, as before. 2022-11-02 10:16:44 -07:00
John MacFarlane df8e8230c5 EPUB writer: Simplify params for createNavEntry. 2022-11-02 10:16:19 -07:00
John MacFarlane 61d93d2450 ODT reader: handle "section" elements.
Previously these were simply skipped! Closes #8409.
2022-11-02 09:56:22 -07:00
John MacFarlane b3f4a66ec8 ipynb reader: add cell id to attachment filename...
...when storing in the MediaBag. Otherwise attachments with the same name
can overwrite each other.  Closes #8415.
2022-11-02 09:23:09 -07:00
John MacFarlane 0c641c1025 Fix import. 2022-10-31 22:15:09 -07:00
John MacFarlane 9620ce3ea0 Add explicit imports to fix compiler warnings. 2022-10-31 21:20:52 -07:00
John MacFarlane df36019768 First stab at mtl 2.3 compliance.
This will no doubt produce a bunch of warnings and hence CI
failures, which we'll need to work around with explicit imports.
2022-10-31 16:51:51 -07:00
John MacFarlane 3e48d9701d Re-add TemplateHaskell pragma in pandoc-cli.
This was an hlint false positive.
2022-10-31 09:03:10 -07:00
John MacFarlane 487d8003a5 Improve 'make lint'. 2022-10-30 12:39:37 -07:00
John MacFarlane c7af10fe89 hlint suggestions. 2022-10-30 12:37:19 -07:00
John MacFarlane 8b3be07ae8 hlint suggestions. 2022-10-30 11:02:00 -07:00
John MacFarlane 55b8d0abee make lint: remove apply-refact 2022-10-30 11:01:58 -07:00
John MacFarlane 5dc2927c8a .hlint.yaml: ignore "Use <&>" 2022-10-30 10:59:24 -07:00
John MacFarlane 4f138b440b Nightly: strip executables on windows and macos. 2022-10-29 22:19:28 -07:00
John MacFarlane 73b7c63010 Use cabal for nightly builds. 2022-10-29 14:34:15 -07:00
John MacFarlane cd6945fb4b Fix an import warning. 2022-10-29 14:34:09 -07:00
John MacFarlane 56fe6fe417 Nightly windows: add stack clean. 2022-10-29 13:15:53 -07:00