Lem/Docs

figure generate

Generate an SVG intermediate from an automatic manuscript brief.

Invocation#

Shell
lem-cli figure generate <id-or-title> [--output-name <name>]

Inputs and options#

  • id-or-title selects the paper.
  • --output-name <name> controls the output stem; the CLI adds -preview for the SVG intermediate.

Output and state#

Proposes one validated brief, generates the SVG into the paper's figures directory, and prints the result as JSON. A successful result has state generated and asset_path.

Refusals#

  • An option outside --label, --caption, --output-name, --source-image, and --feedback is refused as an unexpected argument; a recognized option without a value is refused.
  • The public generate surface documents only --output-name; the shared parser currently accepts the other recognized figure options but generate does not use them.
  • No valid automatic brief, no local source directory, or SVG generation failure produces a refusal or failed result; failed results exit nonzero. The automatic brief is proposed from the whole manuscript (a brief request may name one section, which must exist: “<main.tex> has no section "<title>"; its sections are: …”); a paper without a manuscript, or an empty one, answers “Cannot propose figure briefs: paper section context is unavailable.”; a manuscript that is there but cannot be read answers “Cannot propose figure briefs: manuscript source <path> cannot be read: <cause>” before any model is asked; a model answer that is not an object with a briefs list is refused as such. The SVG preview declares its own size.