https://github.com/larsgw/pandoc-reader-sdd
Custom Lua reader for Pandoc to ingest Structured Descriptive Data (SDD)
https://github.com/larsgw/pandoc-reader-sdd
Last synced: 3 months ago
JSON representation
Custom Lua reader for Pandoc to ingest Structured Descriptive Data (SDD)
- Host: GitHub
- URL: https://github.com/larsgw/pandoc-reader-sdd
- Owner: larsgw
- License: mit
- Created: 2023-05-05T19:48:41.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-06T17:33:16.000Z (over 1 year ago)
- Last Synced: 2025-01-06T02:42:24.955Z (4 months ago)
- Language: Lua
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SDD reader for Pandoc
A [custom reader](https://pandoc.org/custom-readers.html) for [Pandoc](https://pandoc.org/)
to turn [SDD](https://sdd.tdwg.org/) 1.1 datasets into documents (PDF, LaTeX, HTML, Markdown, etc.).
Requires Pandoc v2.16.2 or later.Currently it only supports checklists and dichotomous keys (see [Unsupported features](#unsupported-features)).
For more information, see:
> Willighagen, L. G. [](https://orcid.org/0000-0002-4751-4637) (2023).
> Ingesting Structured Descriptive Data into Pandoc. _Syntaxus baccata._ https://doi.org/10.59350/yg9hm-f1x47## Usage
pandoc -f path/to/sdd.lua [...]
### Examples
pandoc -f sdd.lua -t html sdd.xml > sdd.html
pandoc -f sdd.lua -t pdf --pdf-engine=xelatex -V mainfont="Times New Roman" sdd.xml > sdd.pdf
## Supported features
- Metadata (authors, publication date) is read from `` (respectively ``
and ``).
- The first `` is used to structure the document, and if there is no hierarchy
specified, the ``s are displayed before the taxonomy or, if a taxonomic `` is specified,
under the heading belonging to the first `` in the ``.
- The plain text and title belonging to ``s are displayed under the
headings of all the ``s in the ``.
- ``s are displayed the first time they are referenced, in a `` or ``.
Every `` is expected to have a caption in the first ``.
- Taxon names are displayed in short in keys (no authorship, abbreviated generic epithet for
species); in full in headings (with authorship); and if different the vernacular name is
listed below the heading. This uses ``/`` for the vernacular/fallback name,
`` (``) and `` for the scientific name, and ``
for determining when to italicize.### Standard-permitted extensions
Valid extensions, according to the XSD.
- ``s can have an element `` to specify the image width.
### Standard-disallowed extensions
Invalid extensions, according to the XSD.
- `` can have both a `` and ``, in which case only is the former is
displayed, under the assumption that the subkey is listed in the heading belonging to the
``.### Unsupported features
- Only supports one `` per file, as document-level metadata is defined in ``
and not ``.
- As `xml:lang` is mandatory on `` in SDD 1.1, making multi-language ``s difficult,
`xml:lang` on sub-elements is not supported and the first label is used.
- Species and sample descriptions (``, ``, and ``) are not
yet supported.
- Identifcation keys with `` are not yet supported.
- Publications (``) are not yet supported.
- The `role` of `` elements in `` elements is not yet taken into account.
- The more detailed information that can be entered in ``, such as `` and
``, is not yet handled.