133 lines
3.3 KiB
Typst
133 lines
3.3 KiB
Typst
///////////////////////////////
|
||
// This Typst template is for working paper draft.
|
||
// It is based on the general SSRN paper.
|
||
// Copyright (c) 2024
|
||
// Author: Diaco
|
||
// License: MIT
|
||
// Version: 0.9.0
|
||
// Date: 2024-05-16
|
||
// Email: dyaco8464@yahoo.com
|
||
///////////////////////////////
|
||
|
||
#let paper(
|
||
font: "IRNazanin",
|
||
fontsize: 13pt,
|
||
company: "کیمیا رازی",
|
||
title: "گزارش تست مواد اولیه",
|
||
subtitle: "دپارتمان جوهر",
|
||
destinations: none,
|
||
purpose: none,
|
||
authors: "دیاکو سلطانپور",
|
||
date: "",
|
||
doc,
|
||
) = {
|
||
set math.equation(numbering: "(1)", supplement: auto)
|
||
|
||
set par(leading: 1em)
|
||
// Set and show rules from before.
|
||
|
||
set text(
|
||
font: font,
|
||
size: fontsize,
|
||
)
|
||
set page(
|
||
paper: "a4",
|
||
header: context {
|
||
if counter(page).get().first() > 1 [
|
||
#grid(
|
||
gutter: 5pt,
|
||
columns: (4.2%, 25%, 3%, 20%),
|
||
grid.cell(align: right, stroke: 1pt, image(
|
||
height: 19pt,
|
||
"kimia razi logo bw.png",
|
||
)),
|
||
align: top + right,
|
||
title,
|
||
"|",
|
||
subtitle,
|
||
grid.hline(start: 0),
|
||
)]
|
||
},
|
||
background: place(
|
||
dx: -54%,
|
||
dy: 63.5%,
|
||
rotate(
|
||
-90deg,
|
||
text(
|
||
13pt,
|
||
font: "IRZar",
|
||
// TODO: do not use grid. use #text and fr if possible
|
||
grid(
|
||
columns: (15%, 25%, 40%, 5%),
|
||
rows: 20pt,
|
||
align: top,
|
||
context [
|
||
#h(1fr) #company #h(2fr)|],
|
||
[#h(2fr) #title #h(4fr)|],
|
||
[#h(2fr)#(
|
||
destinations.map(destination => destination.name).join("\n")
|
||
) #h(2fr)],
|
||
grid.cell(fill: black, align: center, stroke: 1pt, text(
|
||
fill: white,
|
||
context (counter(page).display("۱/۱", both: true)),
|
||
)),
|
||
grid.hline(start: 0),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
)
|
||
set document(
|
||
title: title,
|
||
author: authors.map(author => author.name),
|
||
)
|
||
|
||
set align(right)
|
||
if subtitle != none {
|
||
text(align(center, { strong(company) }))
|
||
}
|
||
if subtitle != none {
|
||
text(align(center, { subtitle }))
|
||
}
|
||
text(18pt, align(center, { strong(title) }))
|
||
set text(13pt, font: "IRLotus")
|
||
align(center, line(length: 85%))
|
||
/*
|
||
pad(x: 40pt,
|
||
grid(
|
||
columns: (2fr, 3fr, 2fr, 3fr),
|
||
gutter: (2em,22pt),
|
||
[بازدید از:], grid.cell(align: left, strong(destinations.map(destination => destination.name).join("\n"))), [هدف بازدید:], grid.cell(align: left, strong(purpose)),
|
||
[تیم اعزامی:], grid.cell(align: left, strong(authors.map(author => author.name).join("\n"))), [تاریخ بازدید:], grid.cell(align(left, strong(date))),)
|
||
)
|
||
align(center, line(length: 85%))
|
||
|
||
v(10pt)
|
||
*/
|
||
set heading(numbering: "۱.۱- ")
|
||
set math.equation(numbering: "(1)")
|
||
set footnote(numbering: "۱.")
|
||
set footnote.entry(separator: line(length: 100%, stroke: 0.5pt))
|
||
set footnote.entry(indent: 0em)
|
||
set align(right)
|
||
|
||
show heading: it => [
|
||
#set align(right)
|
||
#counter(heading).display(
|
||
it.numbering,
|
||
) #it.body
|
||
#v(10pt)
|
||
]
|
||
|
||
set text(spacing: 100%)
|
||
set par(
|
||
leading: 1.2em,
|
||
first-line-indent: 0em,
|
||
justify: true,
|
||
)
|
||
|
||
columns(1, doc)
|
||
}
|
||
|
||
|