hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/mktypst.1
diff options
context:
space:
mode:
Diffstat (limited to 'mktypst.1')
-rw-r--r--mktypst.1122
1 files changed, 122 insertions, 0 deletions
diff --git a/mktypst.1 b/mktypst.1
new file mode 100644
index 0000000..66b9722
--- /dev/null
+++ b/mktypst.1
@@ -0,0 +1,122 @@
+.TH MKTYPST 1 "2026-09-18" "mktypst 0.1.0" "User Commands"
+.SH NAME
+mktypst \- dumb typst document generator
+.SH SYNOPSIS
+.B mktypst
+.RI [ options ]
+.I name
+.br
+.B mktypst
+.BR \-v | \-h
+.SH DESCRIPTION
+.B mktypst
+writes a Typst document that already imports and applies one of the
+.B @local/hachem
+templates, so you can start writing instead of pasting the same preamble every
+time.
+.PP
+It creates
+.IR name .typ
+(the
+.B .typ
+extension is added if you leave it off) and refuses to overwrite an existing
+file unless
+.B \-\-force
+is given. With
+.B \-\-stdout
+the document is written to standard output instead.
+.SH OPTIONS
+.TP
+.BR \-t ", " \-\-template " " \fIname\fR
+Template to apply:
+.B paper
+or
+.BR letter .
+Default
+.BR paper .
+.TP
+.BR \-T ", " \-\-title " " \fItitle\fR
+Document title. Defaults to
+.I name
+with any
+.B .typ
+trimmed.
+.TP
+.BR \-a ", " \-\-author " " \fIname\fR
+Author name. Defaults to
+.BR "git config user.name" ,
+falling back to
+.BR $USER .
+.TP
+.BR \-d ", " \-\-date " " \fIdate\fR
+Document date. Defaults to the current month and year, localized through
+.BR LC_TIME .
+.TP
+.BR \-f ", " \-\-force
+Overwrite an existing file.
+.TP
+.B \-\-stdout
+Write to standard output instead of a
+.B .typ
+file.
+.TP
+.BR \-v ", " \-\-version
+Print version and exit.
+.TP
+.BR \-h ", " \-\-help
+Print a usage summary and exit.
+.SH TEMPLATES
+.TP
+.B paper
+A two-column academic article.
+.TP
+.B letter
+A French formal letter.
+.PP
+Both are French by default; pass
+.B "lang: \(dqen\(dq"
+to the template for English.
+.SH ENVIRONMENT
+.TP
+.B LC_TIME
+Sets the locale used for the default date, so the month name matches your
+system's language.
+.SH EXAMPLES
+.TP
+.B mktypst rapport
+A paper, with the title, author and date filled in.
+.TP
+.B mktypst \-t letter \-T candidature lettre
+A letter.
+.TP
+.B mktypst \-\-stdout note
+Print the document instead of writing a file.
+.PP
+The generated file applies the chosen template with a
+.B #show
+rule; a paper reads:
+.PP
+.RS 4
+.EX
+#import "@local/hachem:0.1.0": paper
+
+#show: paper.with(
+ title: "Les Origines de YHWH",
+ date: "mars 2026",
+ authors: ((name: "Hachem H.", location: [Paris, France]),),
+)
+
+= Introduction
+.EE
+.RE
+.SH "EXIT STATUS"
+.TP
+.B 0
+The document was generated.
+.TP
+.B 1
+A usage error, or the file could not be written.
+.SH "SEE ALSO"
+.BR typst (1)
+.SH AUTHOR
+hachem <im@hachem.wtf>