hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/mktypst.1
blob: 27d12fe18cccc295948e0cf4281117ab8f26be08 (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
.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
Apply a template with a
.B #show
rule and set any of these named fields; every field is optional, and the
document body is whatever follows the rule. Both templates are French by
default \(em pass
.B "lang: \(dqen\(dq"
for English.
.SS paper
A two-column academic article.
.TP
.B title
Document title, centered at the top. Default: none.
.TP
.B date
Date line under the title, a string such as
.BR \(dqmars\ 2026\(dq .
Default: none.
.TP
.B authors
Array of author dictionaries, each
(name: \(dq...\(dq, location: [...]). Default: empty.
.TP
.B abstract
Abstract paragraph, shown before the first heading. Default: none.
.TP
.B lang
Text language, e.g.\&
.BR \(dqfr\(dq " or " \(dqen\(dq .
Default:
.BR \(dqfr\(dq .
.TP
.B region
Text region. Default:
.BR \(dqFR\(dq .
.TP
.B font
Body font. Default:
.BR \(dqEB\ Garamond\(dq .
.TP
.B size
Body text size. Default:
.BR 10pt .
.SS letter
A French formal letter.
.TP
.B sender
Your letterhead, a dictionary
(name: [...], address: [...]). Default: none.
.TP
.B recipient
The addressee, same shape as
.BR sender .
Default: none.
.TP
.B place
Place in the dateline (\(lqParis, le ...\(rq). Default: none.
.TP
.B date
Date in the dateline. Default: none.
.TP
.B subject
The
.B "Objet :"
line. Default: none.
.TP
.B opening
Salutation. Default:
.BR "Madame, Monsieur," .
.TP
.B closing
Closing formula. Default:
Veuillez agr\('eer, Madame, Monsieur, l\(cqexpression de mes salutations
distingu\('ees.
.TP
.B signature
Signature line, small caps. Defaults to the sender's name.
.TP
.B lang
Text language. Default:
.BR \(dqfr\(dq .
.TP
.B region
Text region. Default:
.BR \(dqFR\(dq .
.TP
.B font
Body font. Default:
.BR \(dqEB\ Garamond\(dq .
.TP
.B size
Body text size. Default:
.BR 11pt .
.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>