forked from pencelheimer/typst_nure_template
fix(style): figures with raw, and raw text language
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
*.pdf
|
||||
test
|
||||
config
|
||||
wip
|
||||
|
||||
11
style.typ
11
style.typ
@@ -66,8 +66,10 @@
|
||||
}
|
||||
|
||||
set figure.caption(separator: [ -- ])
|
||||
show figure.where(kind: table): set figure.caption(position: top)
|
||||
show figure.caption.where(kind: table): set align(left)
|
||||
show figure.where(kind: table): set figure.caption(position: top)
|
||||
show figure.where(kind: raw): set figure.caption(position: top)
|
||||
show figure.where(kind: raw): set align(left)
|
||||
|
||||
// Numbering {{{1
|
||||
show heading.where(level: 1): it => {
|
||||
@@ -91,6 +93,7 @@
|
||||
upper(it)
|
||||
v(spacing * 2, weak: true)
|
||||
} else {
|
||||
// NOTE: completely different styling for ALL levels > 1
|
||||
set text(size: 14pt, weight: "regular")
|
||||
|
||||
v(spacing * 2, weak: true)
|
||||
@@ -103,7 +106,7 @@
|
||||
}
|
||||
|
||||
// Listings {{{1
|
||||
show raw: it => {
|
||||
show raw.where(block: true): it => {
|
||||
let raw-spacing = 0.5em
|
||||
set block(spacing: raw-spacing)
|
||||
set par(spacing: raw-spacing, leading: raw-spacing)
|
||||
@@ -120,7 +123,9 @@
|
||||
|
||||
// blocks `like this` aren't welcome, so ` is replaced with "
|
||||
show raw.where(block: false): it => text(
|
||||
lang: "uk",
|
||||
size: 14pt,
|
||||
hyphenate: false,
|
||||
weight: "regular",
|
||||
font: ("Times New Roman", "Liberation Serif"),
|
||||
)["#it.text"]
|
||||
@@ -141,6 +146,8 @@
|
||||
set math.equation(numbering: i => [(#upper(num-to-alpha.at(counter(heading).get().at(0))).#i)])
|
||||
|
||||
// Headings
|
||||
set heading(supplement: [Додаток])
|
||||
|
||||
show heading: it => if it.level == 1 {
|
||||
set align(center)
|
||||
set text(size: 14pt, weight: "regular")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Typst templates for NURE (Kharkiv National University of Radio Electronics) works
|
||||
*/
|
||||
|
||||
#import "style.typ": spacing, dstu-style, appendices-style
|
||||
#import "style.typ": appendices-style, dstu-style, spacing
|
||||
|
||||
// Practice and Laboratory works template {{{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user