hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/mktypst.1
blob: 66b9722774df210020485f929b33de13d2080d70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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>