mirror of
https://github.com/JustAnyones/ktu-paper.git
synced 2026-11-04 00:30:18 +00:00
style: use consistent 2 space indentation
This commit is contained in:
2 files changed
+30
-22
No files matched your search
+16
-10
@@ -56,33 +56,39 @@
|
|||||||
if not namesFirst {
|
if not namesFirst {
|
||||||
(role, name) = (name, role)
|
(role, name) = (name, role)
|
||||||
}
|
}
|
||||||
(align(center)[
|
(
|
||||||
|
align(center)[
|
||||||
#set block(below: 8pt)
|
#set block(below: 8pt)
|
||||||
#block[#name]
|
#block[#name]
|
||||||
#block[#role]
|
#block[#role]
|
||||||
|
|
||||||
], [])
|
],
|
||||||
|
[],
|
||||||
|
)
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
} else {
|
} else {
|
||||||
align(alignment, table(
|
align(alignment, table(
|
||||||
columns: (198.5pt, 56.7pt),
|
columns: (198.5pt, 56.7pt),
|
||||||
table.header(
|
table.header([], []),
|
||||||
[], [],
|
|
||||||
),
|
|
||||||
..for author in authors {
|
..for author in authors {
|
||||||
let (name, role) = author
|
let (name, role) = author
|
||||||
name = [*#name*]
|
name = [*#name*]
|
||||||
if not namesFirst {
|
if not namesFirst {
|
||||||
(role, name) = (name, role)
|
(role, name) = (name, role)
|
||||||
}
|
}
|
||||||
(align(left)[
|
(
|
||||||
|
align(left)[
|
||||||
#set block(below: 8pt)
|
#set block(below: 8pt)
|
||||||
#block[#name]
|
#block[#name]
|
||||||
#block[#role]
|
#block[#role]
|
||||||
|
|
||||||
], [], [], [])
|
],
|
||||||
}
|
[],
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
)
|
||||||
|
},
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,7 +175,7 @@
|
|||||||
} else {
|
} else {
|
||||||
ktu-author-table(authors: authors, namesFirst: authorNamesFirst)
|
ktu-author-table(authors: authors, namesFirst: authorNamesFirst)
|
||||||
}
|
}
|
||||||
align(center+bottom, block([*#place, #year*]))
|
align(center + bottom, block([*#place, #year*]))
|
||||||
}
|
}
|
||||||
|
|
||||||
#let ktu-heading-page-centered(
|
#let ktu-heading-page-centered(
|
||||||
@@ -232,7 +238,7 @@
|
|||||||
ktu-title-header-block(
|
ktu-title-header-block(
|
||||||
subHeaders: (faculty, author),
|
subHeaders: (faculty, author),
|
||||||
bigTitle: projectTitle,
|
bigTitle: projectTitle,
|
||||||
subTitles: ("Akademinio sąžiningumo deklaracija",)
|
subTitles: ("Akademinio sąžiningumo deklaracija",),
|
||||||
)
|
)
|
||||||
v(20pt)
|
v(20pt)
|
||||||
[
|
[
|
||||||
|
|||||||
+14
-12
@@ -26,13 +26,13 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Paruošta pagal "Rašto ..."
|
* Paruošta pagal "Rašto ..."
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Further reading required:
|
* Further reading required:
|
||||||
* - Double line spacing | https://github.com/typst/typst/issues/106
|
* - Double line spacing | https://github.com/typst/typst/issues/106
|
||||||
* - Proposal: change `leading` option to `line-height` | https://github.com/typst/typst/issues/4224
|
* - Proposal: change `leading` option to `line-height` | https://github.com/typst/typst/issues/4224
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#let __METADATA_HEADING_ALIGN_LEFT = metadata("heading-align-left");
|
#let __METADATA_HEADING_ALIGN_LEFT = metadata("heading-align-left");
|
||||||
|
|
||||||
@@ -69,8 +69,7 @@
|
|||||||
let s = str(rounded)
|
let s = str(rounded)
|
||||||
let parts = s.split(".")
|
let parts = s.split(".")
|
||||||
let integer-part = parts.at(0)
|
let integer-part = parts.at(0)
|
||||||
let decimal-part = if parts.len() == 2 { parts.at(1) } else { ""}
|
let decimal-part = if parts.len() == 2 { parts.at(1) } else { "" }
|
||||||
|
|
||||||
|
|
||||||
let padded-decimal = if decimals > 0 {
|
let padded-decimal = if decimals > 0 {
|
||||||
let current-decimal-length = decimal-part.len()
|
let current-decimal-length = decimal-part.len()
|
||||||
@@ -101,7 +100,7 @@
|
|||||||
depth: none,
|
depth: none,
|
||||||
indent: 0em, // Disable the default outline indenting
|
indent: 0em, // Disable the default outline indenting
|
||||||
target: heading,
|
target: heading,
|
||||||
title: auto
|
title: auto,
|
||||||
) = {
|
) = {
|
||||||
// TODO: įtrauka
|
// TODO: įtrauka
|
||||||
set block(spacing: 0em)
|
set block(spacing: 0em)
|
||||||
@@ -228,7 +227,7 @@
|
|||||||
depth: none,
|
depth: none,
|
||||||
indent: 0em, // Disable the default outline indenting
|
indent: 0em, // Disable the default outline indenting
|
||||||
target: heading,
|
target: heading,
|
||||||
title: auto
|
title: auto,
|
||||||
) = {
|
) = {
|
||||||
__ktu_outline(depth: depth, indent: indent, target: target, title: title)
|
__ktu_outline(depth: depth, indent: indent, target: target, title: title)
|
||||||
}
|
}
|
||||||
@@ -281,8 +280,8 @@
|
|||||||
left: 30mm,
|
left: 30mm,
|
||||||
right: 10mm,
|
right: 10mm,
|
||||||
bottom: 20mm,
|
bottom: 20mm,
|
||||||
top: 20mm
|
top: 20mm,
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
set page(width: 595pt, height: 842pt)
|
set page(width: 595pt, height: 842pt)
|
||||||
|
|
||||||
@@ -325,7 +324,7 @@
|
|||||||
font: "Times New Roman",
|
font: "Times New Roman",
|
||||||
uppercaseSectionTitles: false,
|
uppercaseSectionTitles: false,
|
||||||
unnumberedHeadingAlignment: center,
|
unnumberedHeadingAlignment: center,
|
||||||
body
|
body,
|
||||||
) = {
|
) = {
|
||||||
show: __page_rules.with(font: font)
|
show: __page_rules.with(font: font)
|
||||||
|
|
||||||
@@ -365,7 +364,11 @@
|
|||||||
// Antraštė be nr.
|
// Antraštė be nr.
|
||||||
if it.numbering == none {
|
if it.numbering == none {
|
||||||
// Centruota lygiuotė by default, but can be overridden by the user
|
// Centruota lygiuotė by default, but can be overridden by the user
|
||||||
let explicitlyAlignLeft = it.body.has("children") and it.body.children.len() > 1 and it.body.children.at(1) == __METADATA_HEADING_ALIGN_LEFT
|
let explicitlyAlignLeft = (
|
||||||
|
it.body.has("children")
|
||||||
|
and it.body.children.len() > 1
|
||||||
|
and it.body.children.at(1) == __METADATA_HEADING_ALIGN_LEFT
|
||||||
|
)
|
||||||
|
|
||||||
// If the user explicitly set alignLeft to true, we should align left regardless of the global setting
|
// If the user explicitly set alignLeft to true, we should align left regardless of the global setting
|
||||||
let targetAlign = if explicitlyAlignLeft { left } else { unnumberedHeadingAlignment }
|
let targetAlign = if explicitlyAlignLeft { left } else { unnumberedHeadingAlignment }
|
||||||
@@ -379,7 +382,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Skyrius
|
// Skyrius
|
||||||
if it.numbering != none and it.level == 1 {
|
if it.numbering != none and it.level == 1 {
|
||||||
// abipusė lygiuotė
|
// abipusė lygiuotė
|
||||||
@@ -453,7 +455,7 @@
|
|||||||
// but some modules may require them
|
// but some modules may require them
|
||||||
uppercaseSectionTitles: false,
|
uppercaseSectionTitles: false,
|
||||||
unnumberedHeadingAlignment: center,
|
unnumberedHeadingAlignment: center,
|
||||||
body
|
body,
|
||||||
) = context {
|
) = context {
|
||||||
show: setup-page.with(
|
show: setup-page.with(
|
||||||
font: font,
|
font: font,
|
||||||
|
|||||||
Reference in new issue
Block a user