- name: pdfa
  schema:
    anyOf:
      - boolean
      - string
  tags:
    formats: [context]
  description:
    short: Adds the necessary setup to the document preamble to generate PDF/A of the type specified.
    long: |
      Adds the necessary setup to the document preamble to generate PDF/A of the type specified.

      If the value is set to `true`, `1b:2005` will be used as default.

      To successfully generate PDF/A the required
      ICC color profiles have to be available and the content and all
      included files (such as images) have to be standard conforming.
      The ICC profiles and output intent may be specified using the
      variables `pdfaiccprofile` and `pdfaintent`.  See also [ConTeXt
      PDFA](https://wiki.contextgarden.net/PDF/A) for more details.

- name: pdfaiccprofile
  schema:
    maybeArrayOf: string
  tags:
    formats: [context]
  description:
    short: |
      When used in conjunction with `pdfa`, specifies the ICC profile to use 
      in the PDF, e.g. `default.cmyk`.
    long: |
      When used in conjunction with `pdfa`, specifies the ICC profile to use 
      in the PDF, e.g. `default.cmyk`.

      If left unspecified, `sRGB.icc` is used as default. May be repeated to 
      include multiple profiles. Note that the profiles have to be available 
      on the system. They can be obtained from 
      [ConTeXt ICC Profiles](https://wiki.contextgarden.net/PDFX#ICC_profiles).

- name: pdfaintent
  schema: string
  tags:
    formats: [context]
  description:
    short: When used in conjunction with `pdfa`, specifies the output intent for the colors.
    long: |
      When used in conjunction with `pdfa`, specifies the output intent for
      the colors, for example `ISO coated v2 300\letterpercent\space (ECI)`

      If left unspecified, `sRGB IEC61966-2.1` is used as default.

- name: pdf-standard
  schema:
    maybeArrayOf:
      enum:
        # PDF versions
        - "1.4"
        - "1.5"
        - "1.6"
        - "1.7"
        - "2.0"
        # PDF/A standards (supported by both Typst and LaTeX)
        - a-1b
        - a-2a
        - a-2b
        - a-2u
        - a-3a
        - a-3b
        - a-3u
        - a-4
        - a-4f
        # PDF/A standards (Typst only)
        - a-1a
        - a-4e
        # PDF/UA standards
        - ua-1
        - ua-2
        # PDF/X standards (LaTeX only)
        - x-4
        - x-4p
        - x-5g
        - x-5n
        - x-5pg
        - x-6
        - x-6n
        - x-6p
  tags:
    formats: [$pdf-all, typst]
  description:
    short: PDF conformance standard (e.g., ua-2, a-2b,  1.7)
    long: |
      Specifies PDF conformance standards and/or version for the output.

      Accepts a single value or array of values:

      **PDF versions** (both Typst and LaTeX):
      `1.4`, `1.5`, `1.6`, `1.7`, `2.0`

      **PDF/A standards** (both engines):
      `a-1b`, `a-2a`, `a-2b`, `a-2u`, `a-3a`, `a-3b`, `a-3u`, `a-4`, `a-4f`

      **PDF/A standards** (Typst only):
      `a-1a`, `a-4e`

      **PDF/UA standards**:
      `ua-1` (Typst), `ua-2` (LaTeX)

      **PDF/X standards** (LaTeX only):
      `x-4`, `x-4p`, `x-5g`, `x-5n`, `x-5pg`, `x-6`, `x-6n`, `x-6p`

      Example: `pdf-standard: [a-2b, ua-2]` for accessible archival PDF.
