Skip to content

Patch 2 - #14

Open
arran4 wants to merge 10 commits into
lvignoli:mainfrom
arran4:patch-2
Open

Patch 2#14
arran4 wants to merge 10 commits into
lvignoli:mainfrom
arran4:patch-2

Conversation

@arran4

@arran4 arran4 commented Aug 13, 2024

Copy link
Copy Markdown

I've added the ability to add an "output" file version, because the code accepts multiple input files, I had to improvise with using a : to separate the values.

Tested only on my use case sorry.

The options were also in the wrong spot and running the 'root' options as they seem to be positional. It seems some options such as font are quietly accepted despite being in the wrong location

arran4 added 10 commits May 31, 2024 19:57
To make it more obvious
arran@arran-desktop:/home/arran 27401 
% typst -h
The Typst compiler

Usage: typst [OPTIONS] <COMMAND>

Commands:
  compile  Compiles an input file into a supported output format [aliases: c]
  watch    Watches an input file and recompiles on changes [aliases: w]
  init     Initializes a new project from a template
  query    Processes an input file to extract provided metadata
  fonts    Lists all discovered fonts in system and custom font paths
  update   Self update the Typst CLI (disabled)
  help     Print this message or the help of the given subcommand(s)

Options:
      --color[=<WHEN>]  Set when to use color. auto = use color if a capable terminal is detected [default: auto] [possible values: auto, always, never]
      --cert <CERT>     Path to a custom CA certificate to use when making network requests [env: TYPST_CERT=]
  -h, --help            Print help
  -V, --version         Print version
arran@arran-desktop:/home/arran 27402 
% typst compile -h
Compiles an input file into a supported output format

Usage: typst compile [OPTIONS] <INPUT> [OUTPUT]

Arguments:
  <INPUT>   Path to input Typst file, use `-` to read input from stdin
  [OUTPUT]  Path to output file (PDF, PNG, or SVG)

Options:
      --root <DIR>
          Configures the project root (for absolute paths) [env: TYPST_ROOT=]
      --input <key=value>
          Add a string key-value pair visible through `sys.inputs`
      --font-path <DIR>
          Adds additional directories to search for fonts [env: TYPST_FONT_PATHS=]
      --diagnostic-format <DIAGNOSTIC_FORMAT>
          The format to emit diagnostics in [default: human] [possible values: human, short]
  -f, --format <FORMAT>
          The format of the output file, inferred from the extension by default [possible values: pdf, png, svg]
      --open [<OPEN>]
          Opens the output file using the default viewer after compilation
      --ppi <PPI>
          The PPI (pixels per inch) to use for PNG export [default: 144]
      --timings [<OUTPUT_JSON>]
          Produces performance timings of the compilation process (experimental)
  -h, --help
          Print help (see more with '--help')
@arran4

arran4 commented Jun 19, 2026

Copy link
Copy Markdown
Author

@lvignoli bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant