Skip to content

Issue setting a variable of type Dictionary from the command line #10298

@ZoomRmc

Description

@ZoomRmc

I have a trouble setting up a variable of a type Dictionary from the command line.
From what I see in the docs, there's only one such variable, namely the margin for typst.

There's no problem setting it with the defaults YAML, but I'm not sure if pandoc currently can parse a dictionary from the command line.
The issue is exacerbated by a total lack of any error feedback on incorrectly formatted options from the CLI.

The following syntaxes should be equal:

  • CLI: -V margin={left:1cm, right:1cm, bottom:1cm, top:1cm, x:0cm, y:0cm}

  • defaults.yaml:

    variables:
      margin:
        left: 1cm
        right: 1cm
        bottom: 1cm
        top: 1cm
        x: 0cm
        y: 0cm

Tested on latest release (3.5).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions