Consider the minimal working example (`mwe.qmd`) below:

```
---
title: MWE
author: Raniere Silva
---

Awesome.
```

`quarto render mwe.qmd --to markdown` works as expected and produces

```
---
author:
- Raniere Silva
title: MWE
toc-title: Table of contents
---

Awesome.
```

Pandoc's `--metadata` argument can be used to change the YAML file. For example, `quarto render mwe.qmd --to markdown --metadata="toc-title:Foo Bar"` produces

```
---
author:
- Raniere Silva
title: MWE
toc-title: Foo Bar
---

Awesome.
```

I expect that I could use Pandoc's `--metadata` to enable [citable articles](https://quarto.org/docs/authoring/create-citeable-articles.html) but `quarto render mwe.qmd --to markdown --metadata="citation:true"` produces

```
pandoc --metadata citation:true
  to: markdown
  output-file: mwe.md
  standalone: true
  default-image-extension: png
  
metadata
  title: MWE
  author: Raniere Silva
  
Error running filter /opt/quarto/share/filters/main.lua:
/opt/quarto/share/filters/main.lua:1177: attempt to index a boolean value (local 'citationMeta')
stack traceback:
        /opt/quarto/share/filters/main.lua:5261: in field 'Meta'
        /opt/quarto/share/filters/main.lua:79: in function 'run_emulated_filter'
        (...tail calls...)
        /opt/quarto/share/filters/main.lua:74: in function 'run_emulated_filter'
        /opt/quarto/share/filters/main.lua:566: in local 'callback'
        /opt/quarto/share/filters/main.lua:577: in upvalue 'run_emulated_filter_chain'
        /opt/quarto/share/filters/main.lua:610: in function </opt/quarto/share/filters/main.lua:607>
```

I believe this is because

> [--metadata](https://pandoc.org/MANUAL.html#option--metadata) affects the metadata of the underlying document (which is accessible from filters and may be printed in some output formats) and metadata values will be escaped when inserted into the template.

Is possible to extend `appendix-cite-as` to enable both formats and allow it to be enable by `--metadata`?
dragonstyle
2023-06-23T13:23:27Z
rgaiacs
bug
v1.4
closed
Error running filter `main.lua`: attempt to index a boolean value
https://github.com/quarto-dev/quarto-cli/issues/6013