summaryrefslogtreecommitdiff
path: root/paper/lua-filters/abstract-to-meta/README.md
blob: 42c0d2993640525b2ad2a1decc90dc6536b080c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# abstract-to-meta

This moves a document's abstract from the main text into the
metadata. Metadata elements usually allow for finer placement
control in the final output, but writing body text is easier and
more natural.

## Defining an Abstract

A document abstract can either be put directly in the document
metadata, for example by inserting an *abstract* attribute into a
YAML block.

    ---
    abstract: |
      Place abstract here.

      Multiple paragraphs are possible.
    ---

The additional indentation and formatting requirements in YAML
headers can be confusing or annoying for authors. It is hence
preferable to allow abstracts be written as normal sections.

    # Abstract

    Place abstract here.

    Multiple paragraphs are possible.

This filter turns the latter into the former by looking for a
top-level header whose ID is `abstract`. Pandoc auto-creates IDs
based on header contents, so a header titled *Abstract* will
satisfy this condition.^[1]

[1]: This requires the `auto_identifier` extension. It is
     enabled by default.