typst-itmo/chastotnie-methods/lab1/lab1.typ
2024-09-06 03:01:06 +03:00

85 lines
1.5 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#set document(
title: [Частотные методы - Лабораторная работа №1],
author: "Капралов Егор"
)
#set page(
paper: "a4",
margin: (left: 30mm, right: 15mm, top: 20mm, bottom: 20mm),
numbering: "1"
)
#set text(
font: "Liberation Serif",
size: 14pt,
lang: "ru",
region: "RU"
)
#set par(
justify: true,
leading: 1.5em,
first-line-indent: 1.25cm
)
// remove leading dot from the heading numbering
#set heading(
numbering: (..nums) => nums.pos().map(str).join(".")
)
#show heading: it => {
set text(weight: "bold")
// format non-numbered headings differently
if it.numbering == none {
set align(center)
set text(size: 16pt)
block(below: 2.5em, above: 2.5em, upper(it))
} else {
set text(size: 14pt)
block(below: 2em, above: 2em, it)
}
}
#show raw.where(lang: "matlab"): it => {
set text(size: 11pt, font: "Courier Prime")
set par(leading: 1.15em)
it
}
#let chapter(title) = {
pagebreak(weak: true)
heading(numbering: none, title)
}
#let title() = {
set page(
)
}
#title()
#outline(title: "Содержание")
#chapter[Вступление]
= Первый заголовок
#lorem(100)
#chapter[Основная часть]
= Второй заголовок
#lorem(100)
#chapter[Заключение]
= Третий заголовок
#lorem(50)
== Почти третий заголовок
#lorem(50)