Commit Graph
15938 Commits
Author SHA1 Message Date
John MacFarlane 2d888d19ac Tweaked RELEASE-CHECKLIST. 2022-10-05 11:58:50 -07:00
Albert Krewinkel 9e3a2e0dde Extensions: fix JSON decoding of Extensions
Closes: #8352
2022-10-05 12:40:59 +02:00
John MacFarlane 3151800f34 Add authors target to Makefile. 2022-10-04 21:48:17 -07:00
John MacFarlane 2c37fc5550 Improve 'make prerelease' (formerly check). 2022-10-04 21:48:17 -07:00
John MacFarlane 96cbd762a1 Makefile: Improve checkdocs. 2022-10-04 21:48:17 -07:00
John MacFarlane 87bff28298 Removed some final blank lines. 2022-10-04 21:48:17 -07:00
John MacFarlane 1f982ddf47 Extend check-cabal to check all packages 2022-10-04 21:48:17 -07:00
John MacFarlane 875747f351 Fix rc build for Windows. 2022-10-04 14:19:12 -07:00
John MacFarlane ee62618a80 Add pandoc-lua.1 man page. 2022-10-04 13:16:19 -07:00
John MacFarlane 11d010c455 More build-arm.sh fixes. 2022-10-04 13:16:19 -07:00
John MacFarlane 05505df2f0 Fix typo in build-arm.sh. 2022-10-04 13:16:19 -07:00
Albert Krewinkel 86e009b495 Lua: add new module pandoc.format.
The module provides functions to query the set of extensions supported
by formats, and the set of extension enabled per default.
2022-10-04 13:06:23 -07:00
John MacFarlane a50765b3e4 moduledeps.lua: avoid duplicates when multiple ROOTs. 2022-10-04 12:30:03 -07:00
John MacFarlane 11ec70cfeb Better 'make moduledeps' target.
ROOT can now be multiple modules, and the complete transitive
dependencies of all of them will be printed.

    make moduledeps ROOT="Text.Pandoc.Class Text.Pandoc.Parsing"
2022-10-04 10:17:33 -07:00
John MacFarlane e33d61dff9 Makefile: add modules.csv target. 2022-10-04 10:17:33 -07:00
Albert Krewinkel 6ad05b7451 Lua: ensure that extensions marshaling is consistent. 2022-10-04 16:55:51 +02:00
John MacFarlane 42566afa3f Rename T.P.Readers.LaTeX.Types -> T.P.TeX. 2022-10-03 22:49:22 -07:00
John MacFarlane d5c7996e21 Rename T.P.Network.HTTP -> T.P.URI.
This is still an unexported internal module.
Export `urlEncode`, `escapeURI`, `isURI`, `schemes`, `uriPathToPath`.

Re-export `escapeURI` and `isURI` from T.P.Shared (as they
were exported before); drop exports of `schemes` and `uriPathToPath`
[API change].

With this change, T.P.Class no longer depends on T.P.Shared.
2022-10-03 22:32:19 -07:00
John MacFarlane ad0532244a Separate out T.P.Data, T.P.Translations from T.P.Class. (#8348)
This makes T.P.Class more self-contained, and suitable for extraction
into a separate package if desired.

[API changes]

- T.P.Data is now an exported module, providing `readDataFile`,
  `readDefaultDataFile` (both formerly provided by T.P.Class),
  and also `getDataFileNames` (formerly unexported in
  T.P.App.CommandLineOptions).

- T.P.Translations is now an exported module (along with
  T.P.Translations.Types), providing `readTranslations`,
  `getTranslations`, `setTranslations`, `translateTerm`,
  `lookupTerm`, `readTranslations`, `Term(..)`, and `Translations`.

- T.P.Class: `readDataFile`, `readDefaultDataFile`, `setTranslations`,
  and `translateTerm` are no longer exported.
  `checkUserDataDir` is now exported.

- Text.Pandoc now exports Text.Pandoc.Data and `setTranslations`
  and `translateTerm`.
2022-10-03 13:05:38 -07:00
Albert Krewinkel 2d565eda9e doc/lua-filters.md: fix documentation of PANDOC_WRITER_OPTIONS. 2022-10-03 20:01:55 +02:00
Albert Krewinkel 59e9df4262 doc/lua-filters.md: document pandoc.write_classic. 2022-10-03 19:57:02 +02:00
Albert Krewinkel 8986c03f20 Add test for custom bytestring writers 2022-10-03 19:46:57 +02:00
John MacFarlane f315248865 Remove unused lua53 flag. 2022-10-03 08:50:20 -07:00
Albert Krewinkel 3324664aab [API Change] Support bytestring custom writers.
New-style custom Lua writers can now define an alternative entry function
`BinaryWriter`. If a function with that name is defined, then pandoc
will treat the returned string as binary output. This allows to generate
formats like docx and odt with custom writers.
2022-10-03 08:47:32 -07:00
Albert Krewinkel 921d7dd271 Lua: deprecate classic custom writers. 2022-10-03 08:47:32 -07:00
Albert Krewinkel 309163f5bc [API Change] Base custom writers on Writer type.
The `T.P.Lua.writeCustom` function changed to allow either a TextWriter
or ByteStringWriter to be returned. The global variables
`PANDOC_DOCUMENT` and `PANDOC_WRITER_OPTIONS` are no longer set when the
writer script is loaded. Both variables are still set in classic writers
before the conversion is started, so they can be used when they are
wrapped in functions.
2022-10-03 08:47:32 -07:00
Albert Krewinkel 3b0e700720 Lua: add function pandoc.write_classic.
The function can be used to convert a classic writer into a new-style
writer by setting it as the value of `Writer`:

``` lua
Writer = pandoc.write_classic
```

or to fully restore the old behavior:

``` lua
function Writer (doc, opts)
  PANDOC_DOCUMENT = doc
  PANDOC_WRITER_OPTIONS = opts
  load(PANDOC_SCRIPT_FILE)()
  return pandoc.write_classic(doc, opts)
end
```
2022-10-03 08:47:32 -07:00
Albert Krewinkel 132931a491 Lua: Support running Lua with a GC-collected Lua state. 2022-10-03 08:47:32 -07:00
Albert Krewinkel c8d08b945c Remove support for Lua 5.3. 2022-10-03 08:47:32 -07:00
John MacFarlane e7d645c848 MANUAL.txt: update grid table documentation.
Add information about row/colspans and complex headers.

Closes #8346.
2022-10-02 22:40:35 -07:00
John MacFarlane d9004c9e5c Officially deprecate writeJATS...
in favor of writeJatsArchiving.
2022-10-02 11:21:06 -07:00
John MacFarlane 8b004e0c26 Add T.P.Citeproc.Name.
This exports `toName`, which previously had been part of
T.P.Citeproc.BibTeX.  T.P.Readers.RIS,EndNote can now depend on
this module without transitively depending on the LaTeX reader,
which is used in T.P.Citeproc.BibTeX.

Closes #8345.
2022-10-02 10:59:14 -07:00
John MacFarlane 1c01d39a17 Fix nightly flag for macos nightly build. 2022-10-02 09:33:52 -07:00
John MacFarlane 92e116af19 Make modules.dot target more robust.
Only include source-controlled files under src.
2022-10-01 17:52:03 -07:00
John MacFarlane dd07d8002f JATS writer: use <break/> for LineBreak...
in the limited contexts that accept it.

Closes #8344.
2022-10-01 17:46:13 -07:00
John MacFarlane 89e7e9b636 Makefile: add moduledeps target.
make moduledeps ROOTNODE=T.P.Parsing
2022-10-01 12:46:30 -07:00
John MacFarlane 20f82b0a8b Makefile target to get module dependeny subgraphs.
E.g. what depends on Text.Pandoc.Parsing?

    make modules.pdf ROOTNODE=T.P.Parsing

This is helpful for figuring out what we can split out as separate
packages.
2022-10-01 12:34:27 -07:00
John MacFarlane c51eeea4c7 Add Makefile target to create a directed graph of module dependencies. 2022-10-01 11:52:54 -07:00
Link Swanson 4e29d6d379 Remove unsupported element from pptx reference doc (#8342)
The default template contained text above the header, which can mislead
users into thinking there is a way to put  text there using pandoc

See #6338.
2022-10-01 10:30:07 -07:00
John MacFarlane 08b9530fc1 Fix nightly Windows build so it uses nightly flag. 2022-10-01 10:23:30 -07:00
John MacFarlane 42b6e3907c Fix nightly flag build. 2022-10-01 09:56:50 -07:00
John MacFarlane 215d62ccd6 Remove build versions info from --version output. 2022-09-30 17:18:15 -07:00
John MacFarlane aa0e9c4d6e Move --version handling to pandoc-cli.
Print flag settings (lua, server) and versions of all relevant packages.
Add suffix for nightly builds.

Move `nightly` flag from pandoc to pandoc-cli.

Closes #8339.
2022-09-30 16:46:39 -07:00
John MacFarlane 2bca1315ce Update RELEASE-CHECKLIST. 2022-09-30 16:46:39 -07:00
Albert Krewinkel 1148ead64c App: move initial input-to-Pandoc code to internal submodule 2022-09-30 23:42:41 +02:00
Albert Krewinkel cfc2024d37 Use server as command to start the pandoc server 2022-09-30 18:41:51 +02:00
Albert Krewinkel 1663dfc850 Use released gridtables 0.1.0.0 2022-09-30 18:31:55 +02:00
Albert Krewinkel b6a571d577 pandoc-cli: Allow building a binary without Lua support
Disabling the `lua` cabal flag will result in a binary without Lua.
2022-09-30 08:33:40 -07:00
Albert Krewinkel 5be9052f5f [API Change] Extract Lua code into new package pandoc-lua-engine
The flag 'lua53` must now be used with that package if pandoc is to be
compiled against Lua 5.3.
2022-09-30 08:33:40 -07:00
Albert Krewinkel 79980eee4a [API Change] Parameterize convertWithOpts over scripting engine. 2022-09-30 08:33:40 -07:00