Commit graph

285 commits

Author SHA1 Message Date
John MacFarlane
39fdf08fcc Add press.md (formerly press.txt in website). 2022-06-06 10:07:29 -07:00
Albert Krewinkel
b2b21bb4c5
Lua: add function pandoc.mediabag.fill (#8104)
The function allows to fill the mediabag with all images in a given
document. Images that cannot be fetched are replaced with a Span
containing the image description.
2022-06-06 09:25:09 -07:00
Albert Krewinkel
dbc80c1a6b
JATS template: allow multiple licenses to be given.
The `license` metadata field can now be used to set the license of an
article; a list can be used to add multiple license statements.
2022-04-04 10:05:32 +02:00
Albert Krewinkel
c694a6e4f5
JATS template: allow multiple copyright statements, years, holders 2022-04-02 15:29:37 +02:00
Albert Krewinkel
ad726953b9
Lua: allow to pass Sources to pandoc.read (#8002)
Sources, the data type passed to the `Reader` function in custom
readers, are now accepted as input to `pandoc.read`.
2022-03-30 14:10:30 -07:00
Mario Lang
6e94c8ddcd
doc/lua-filters.md: Fix typo (#7981) 2022-03-23 11:15:43 +01:00
John MacFarlane
4f2e126d62 Add faq on converting from latex + bibtex. 2022-02-18 10:05:27 -08:00
Albert Krewinkel
7d3db1dd2d
Lua docs: fix typos, missing links 2022-02-07 09:30:12 +01:00
John MacFarlane
2b3433404e Remove sample RIS custom reader (since we now have a native one). 2022-02-06 19:13:34 -08:00
Albert Krewinkel
0f0b042139 Custom writer: support new-style Writer function. 2022-02-06 16:37:39 -08:00
Albert Krewinkel
49f1e7608e Lua: add module pandoc.layout to format and layout text 2022-02-06 16:01:24 -08:00
Albert Krewinkel
faf99ad356
docs/lua-filters.md: revert changes made in 3169367475
Partially reverts 3169367475. The result is
unpleasant, auto-generating module docs requires a different approach.
2022-02-06 09:43:58 +01:00
Albert Krewinkel
3169367475
Lua docs: allow to auto-generate Lua module documentations
No documentations are generated for now, this just adds the necessary
code and auto-formats file `doc/lua-filters.md`.
2022-02-05 13:32:02 +01:00
John MacFarlane
04d365623b doc/org.md: remove obsolete citations section.
This mostly described citation formats we no longer
support.
2022-02-03 18:59:40 -08:00
John MacFarlane
5c6b0c3abd Fix identifier in lua-filters doc. 2022-01-30 11:07:44 -08:00
John MacFarlane
96ab241056 lua-filters: put all parameters in code font. 2022-01-30 11:06:30 -08:00
Even Brenden
bd8b7ca62b
Add metadata file paragraph to Pandoc API doc (#7865) 2022-01-25 08:59:03 -08:00
John MacFarlane
7ddb609aae Fix div position in faqs. 2022-01-24 19:25:06 -08:00
John MacFarlane
623fa4e1b9 Fix lua-filters documentation for table column widths.
See #7864.
2022-01-24 09:29:34 -08:00
Benson Muite
9da69c4759
epub.doc: Update links to KindleGen (#7846)
KindleGen has been deprecated and we need to link to archived versions.

Co-authored-by: Mauro Bieg <mb21@users.noreply.github.com>
2022-01-22 15:31:29 -08:00
John MacFarlane
1e48297304 Fix pattern syntax in sample readability custom reader. 2022-01-16 11:02:03 -08:00
John MacFarlane
039c7e925a Minor edits to new custom reader example. 2022-01-16 10:44:26 -08:00
John MacFarlane
1be49f11f7 doc/custom-readers.lua: add example for "readable HTML." 2022-01-16 10:41:04 -08:00
John MacFarlane
0856eb3d1d Add FAQ on images in ipynb containers.
Closes #7749.
2022-01-14 10:21:29 -08:00
Martin Fischer
a0f9467b90 doc/jats.md: link JATS 2022-01-10 10:45:52 +01:00
Lucas Viana
fd43e0693f
Docs: document fancy_lists in doc/org.md (#7820)
Document the changes introduced in #7812
2022-01-09 15:58:53 -08:00
John MacFarlane
268bec1808 Further improvements to doc/lua-filters.md. 2022-01-07 23:35:32 -08:00
John MacFarlane
95b0645276 lua-filters.doc: use header attributes, not spans. 2022-01-07 23:24:39 -08:00
John MacFarlane
2fb903336b lua-filters.doc: use headings instead of nested def lists.
See #7807.
2022-01-07 23:22:18 -08:00
Albert Krewinkel
1f8638fb54 Lua: add pandoc.template module
The module provides a `compile` function to use strings as templates.
2022-01-04 11:55:59 -08:00
Albert Krewinkel
974a9d353a Lua: marshal templates as opaque userdata values 2022-01-04 11:55:59 -08:00
Albert Krewinkel
6a5ac90bf1 Lua: add pandoc.WriterOptions constructor 2022-01-04 11:55:59 -08:00
Albert Krewinkel
0d1d52f0a0 Lua: add function pandoc.write 2022-01-04 11:55:59 -08:00
Albert Krewinkel
efdba79ad1 Lua writer: allow variables to be set via second return value of Doc
New templates variables can be added by giving variable-value pairs as a
second return value of the global function `Doc`.

Example:

    function Doc (body, meta, vars)
      vars.date = vars.date or os.date '%B %e, %Y'
      return body, vars
    end

Closes: #6731
2022-01-02 11:55:02 -08:00
Albert Krewinkel
60fc05e2ce
doc/lua-filters.md: fix and improve documentation 2022-01-02 14:50:56 +01:00
Albert Krewinkel
85334eb6c4
Lua writer: provide global PANDOC_WRITER_OPTIONS
Closes: #6731
2022-01-02 13:57:01 +01:00
Albert Krewinkel
1e60181ee3 Lua: provide global PANDOC_WRITER_OPTIONS [API change]
API changes:

- The function T.P.Filter.applyFilters now takes a filter
  environment of type `Environment`, instead of a ReaderOptions value.
  The `Environment` type is exported from `T.P.Filter` and allows to
  combine ReaderOptions and WriterOptions in a single value.

- Global, exported from T.P.Lua, has a new type constructor
  `PANDOC_WRITER_OPTIONS`.

Closes: #5221
2022-01-01 14:31:42 -08:00
Albert Krewinkel
e58a5ceed8
Lua: marshal ReaderOptions field extensions, track_changes via JSON
Extensions are now available as a list of strings; the track-changes
settings are given as the kebab-case representation used in JSON.
2022-01-01 13:44:13 +01:00
Albert Krewinkel
03054a33e8 Lua: use global state when parsing documents in pandoc.read
The function `pandoc.read` is updated to use the same state that was
used while parsing the main input files. This ensures that log messages
are preserved and that images embedded in the input are added to the
mediabag.
2021-12-31 17:35:52 -08:00
Albert Krewinkel
8bd22270c8
doc/lua-filters.md: improve documentation of make_sections 2021-12-28 12:35:22 +01:00
Albert Krewinkel
fae63b09bb
Lua: use released pandoc-lua-marshal-0.1.3.
Inlines, Blocks, and List objects now have an `__eq` metamethod, testing
equality by comparing two lists element-wise.
2021-12-23 16:04:35 +01:00
Albert Krewinkel
ddd1b85608
JATS templates: fix affiliation tagging in articleauthoring output
Affiliations were `xlink`ed even in the articleauthoring tag set, but
`<aff>` are not allowed as children of `contrib-group` elements in that
tag set. Each affiliation must be listed directly in the contrib
element.
2021-12-23 09:11:54 +01:00
Albert Krewinkel
7954070b01
JATS templates: add support for article subtitles 2021-12-23 09:11:54 +01:00
Albert Krewinkel
17a32a99a5
Lua: simplify and deprecate function pandoc.utils.equals
The function is no longer required for element comparisons; it is now an
alias for the `==` operator.
2021-12-21 19:01:11 +01:00
Albert Krewinkel
d7cab51982 Lua: add new library function pandoc.utils.type.
The function behaves like the default `type` function from Lua's
standard library, but is aware of pandoc userdata types. A typical
use-case would be to determine the type of a metadata value.
2021-12-21 09:24:21 -08:00
Albert Krewinkel
74c2d9eb07
doc/lua-filters: numbers are now accepted as MetaValue 2021-12-19 15:59:05 +01:00
Albert Krewinkel
a0af1b5926
Lua: change representation of TableHead, TableFoot, and Row values.
The objects now also follow the principle that element attributes are
accessible through the `.attr` field. Rows in `TableHead` and
`TableFoot` are available via the `.rows` field. Row objects have a
`.cells` field, containing the list of table cells.

Closes: #7718
2021-12-19 09:44:56 +01:00
Albert Krewinkel
7a70b87fac Lua: add function pandoc.utils.references
List with all cited references of a document.

Closes: #7752
2021-12-17 14:45:27 -08:00
Albert Krewinkel
ce44cf688a
doc/lua-filters.md: add docs for Cell constructor 2021-12-14 09:13:38 +01:00
Albert Krewinkel
b8ada284b1
doc/lua-filters.md: update description of walk methods, fix typos 2021-12-13 21:03:26 +01:00