Skip to contents

All iheiddown formats can add a statement on the use of generative AI to the document. Give the ai-statement field in the YAML header of the document:

ai-statement: false          # no generative AI was used
ai-statement: "Free text."   # your own statement
ai-statement:
  tools: ["Claude Opus 4.5 (Anthropic, May 2026)", "DeepL (DeepL SE, May 2026)"]
  uses: [checking grammar, translating sources]
  text: "Optional free text, which replaces the generated sentence."
  title: "Optional heading"

Give the version of each tool and the month you used it, as the Institute's rules on the use of AI in academic work ask. If the document has no ai-statement field, no statement is added. Make sure that the statement agrees with the current regulations of the Institute and the instructions of your supervisor or instructor.

Usage

ai_statement(spec = rmarkdown::metadata[["ai-statement"]])

ai_statement_filter()

Arguments

spec

The statement, in the same forms as the ai-statement field. By default, the ai-statement field of the document that is knitted.

Value

ai_statement() returns the statement as a Markdown string, or an empty string if there is no statement. ai_statement_filter() returns the path to the Lua filter.

Details

The PDF and poster formats use a Lua filter (ai-statement.lua) that Pandoc runs. The filter puts the statement:

  1. in a div with the id ai-statement, if the document has one (write ::: {#ai-statement} and ::: where you want it);

  2. in the front matter, for thesis_pdf();

  3. at the end of the document, for all other formats. If the last heading of the document has a references title, such as "References" or "Bibliography", the statement goes before that heading.

The superseded presentation format ({xaringan}) does not use Pandoc for the slides, so the presentation template calls ai_statement() on its last slide. ai_statement() makes the same text as the Lua filter.

Examples

ai_statement(FALSE)
#> [1] "No generative AI tools were used in the preparation of this document."
ai_statement(list(tools = c("Claude Opus 4.5 (Anthropic, May 2026)",
                            "DeepL (DeepL SE, May 2026)"),
                  uses = c("checking grammar", "translating sources")))
#> [1] "The author used Claude Opus 4.5 (Anthropic, May 2026) and DeepL (DeepL SE, May 2026) for checking grammar and translating sources. The author checked all output from these tools and takes full responsibility for the content of this document."