summaryrefslogtreecommitdiff
path: root/crates/typst-cli/src/args.rs
diff options
context:
space:
mode:
authorYip Coekjan <69834864+Coekjan@users.noreply.github.com>2024-05-30 16:00:10 +0800
committerGitHub <noreply@github.com>2024-05-30 08:00:10 +0000
commit023b8068f70d6f94b432a918ecf7f09d5118ce46 (patch)
treee7c0ddf6bcc9a1a0af1ab9170549e3cc67c91e14 /crates/typst-cli/src/args.rs
parentb15aa664f2aa5f25cdf81e0f3bf277938383cf59 (diff)
Improve CLI help doc about input & output (#4282)
Diffstat (limited to 'crates/typst-cli/src/args.rs')
-rw-r--r--crates/typst-cli/src/args.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/crates/typst-cli/src/args.rs b/crates/typst-cli/src/args.rs
index 22769fb2..36fb044f 100644
--- a/crates/typst-cli/src/args.rs
+++ b/crates/typst-cli/src/args.rs
@@ -71,11 +71,12 @@ pub struct CompileCommand {
#[clap(flatten)]
pub common: SharedArgs,
- /// Path to output file (PDF, PNG, or SVG).
- /// Use `-` to write output to stdout; For output formats emitting one file per page,
- /// a page number template must be present if the source document renders to multiple pages.
- /// Use `{p}` for page numbers, `{0p}` for zero padded page numbers, `{t}` for page count.
- /// For example, `doc-page-{0p}-of-{t}.png` creates `doc-page-01-of-10.png` and so on.
+ /// Path to output file (PDF, PNG or SVG). Use `-` to write output to stdout.
+ ///
+ /// For output formats emitting one file per page (PNG & SVG), a page number template
+ /// must be present if the source document renders to multiple pages. Use `{p}` for page
+ /// numbers, `{0p}` for zero padded page numbers and `{t}` for page count. For example,
+ /// `page-{0p}-of-{t}.png` creates `page-01-of-10.png`, `page-02-of-10.png` and so on.
#[clap(required_if_eq("input", "-"), value_parser = ValueParser::new(output_value_parser))]
pub output: Option<Output>,
@@ -169,7 +170,7 @@ pub enum SerializationFormat {
/// Common arguments of compile, watch, and query.
#[derive(Debug, Clone, Args)]
pub struct SharedArgs {
- /// Path to input Typst file, use `-` to read input from stdin
+ /// Path to input Typst file. Use `-` to read input from stdin
#[clap(value_parser = input_value_parser)]
pub input: Input,