mirror of
https://github.com/kristoferssolo/Qualification-Thesis.git
synced 2025-10-21 20:10:37 +00:00
fix: CI
This commit is contained in:
parent
a2dece79d6
commit
e71ddd761a
28
.github/workflows/typst.yml
vendored
28
.github/workflows/typst.yml
vendored
@ -11,32 +11,22 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
packages: read
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Cache Microsoft fonts
|
- name: Install Typst
|
||||||
id: cache-msfonts
|
uses: typst-community/setup-typst@v3
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/ms-fonts
|
typst-version: 0.12
|
||||||
key: ${{ runner.os }}-msfonts-v1
|
cache-dependency-path: requirements.typ
|
||||||
- name: Install required fonts
|
- name: Compile Typst files
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
typst compile --font-path=assets/fonts main.typ kval_darbs_kristians_cagulis_kc22015.pdf
|
||||||
mkdir -p ~/.local/share/fonts
|
typst compile --font-path=assets/fonts documentary_page.typ
|
||||||
cp -r assets/fonts/* ~/.local/share/fonts/
|
|
||||||
fc-cache -f -v
|
|
||||||
- name: Compile main.typ
|
|
||||||
uses: lvignoli/typst-action@main
|
|
||||||
with:
|
|
||||||
source_file: |
|
|
||||||
main.typ
|
|
||||||
documentary_page.typ
|
|
||||||
- name: Rename main.pdf
|
|
||||||
run: mv main.pdf kval_darbs_kristians_cagulis_kc22015.pdf
|
|
||||||
- name: Upload PDF file
|
- name: Upload PDF file
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
#import "@preview/tablex:0.0.9": tablex
|
#import "@preview/tablex:0.0.9": tablex
|
||||||
#import "@preview/dashy-todo:0.0.1": todo
|
|
||||||
#import "src/layout.typ": project, indent-par
|
#import "src/layout.typ": project, indent-par
|
||||||
#import "src/layout.typ": indent
|
#import "src/layout.typ": indent
|
||||||
|
|
||||||
|
|||||||
6
requirements.typ
Normal file
6
requirements.typ
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#import "@preview/dashy-todo:0.0.1"
|
||||||
|
#import "@preview/fletcher:0.5.3"
|
||||||
|
#import "@preview/headcount:0.1.0"
|
||||||
|
#import "@preview/i-figured:0.2.4"
|
||||||
|
#import "@preview/tablex:0.0.9"
|
||||||
|
#import "@preview/wordometer:0.1.3"
|
||||||
@ -32,14 +32,21 @@
|
|||||||
paper: "a4",
|
paper: "a4",
|
||||||
)
|
)
|
||||||
set text(
|
set text(
|
||||||
font: "Times New Roman",
|
font: (
|
||||||
|
"Times New Roman",
|
||||||
|
"New Computer Modern",
|
||||||
|
),
|
||||||
size: 12pt,
|
size: 12pt,
|
||||||
hyphenate: auto,
|
hyphenate: auto,
|
||||||
lang: "lv",
|
lang: "lv",
|
||||||
region: "lv",
|
region: "lv",
|
||||||
)
|
)
|
||||||
show raw: set text(
|
show raw: set text(
|
||||||
font: "JetBrainsMono NF",
|
font: (
|
||||||
|
"JetBrainsMono NF",
|
||||||
|
"JetBrains Mono",
|
||||||
|
"Fira Code",
|
||||||
|
),
|
||||||
features: (calt: 0),
|
features: (calt: 0),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -192,29 +199,26 @@
|
|||||||
if it.kind == "i-figured-table" {
|
if it.kind == "i-figured-table" {
|
||||||
return align(
|
return align(
|
||||||
end,
|
end,
|
||||||
emph(it.counter.display(it.numbering) + " tabula ")
|
emph(it.counter.display(it.numbering) + " tabula ") + text(
|
||||||
+ text(
|
weight: "bold",
|
||||||
weight: "bold",
|
it.body,
|
||||||
it.body,
|
),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if it.kind == "i-figured-image" {
|
if it.kind == "i-figured-image" {
|
||||||
return align(
|
return align(
|
||||||
start,
|
start,
|
||||||
emph(it.counter.display(it.numbering) + " att. ")
|
emph(it.counter.display(it.numbering) + " att. ") + text(
|
||||||
+ text(
|
weight: "bold",
|
||||||
weight: "bold",
|
it.body,
|
||||||
it.body,
|
),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
it.kind
|
it.kind in (
|
||||||
in (
|
"i-figured-raw",
|
||||||
"i-figured-raw",
|
"i-figured-\"attachment\"",
|
||||||
"i-figured-\"attachment\"",
|
)
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
return align(
|
return align(
|
||||||
end,
|
end,
|
||||||
@ -241,9 +245,7 @@
|
|||||||
numbering(
|
numbering(
|
||||||
el.numbering,
|
el.numbering,
|
||||||
..counter(heading).at(el.location()),
|
..counter(heading).at(el.location()),
|
||||||
)
|
) + " " + el.body,
|
||||||
+ " "
|
|
||||||
+ el.body,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,8 +276,7 @@
|
|||||||
numbering(
|
numbering(
|
||||||
el.numbering,
|
el.numbering,
|
||||||
..counter(figure.where(kind: kind)).at(el.location()),
|
..counter(figure.where(kind: kind)).at(el.location()),
|
||||||
)
|
) + "."
|
||||||
+ "."
|
|
||||||
) // Only add dot for attachments
|
) // Only add dot for attachments
|
||||||
} else {
|
} else {
|
||||||
numbering(
|
numbering(
|
||||||
@ -287,12 +288,11 @@
|
|||||||
// Create counter based on the kind
|
// Create counter based on the kind
|
||||||
return link(
|
return link(
|
||||||
el.location(),
|
el.location(),
|
||||||
number
|
number + if supplement != "" {
|
||||||
+ if supplement != "" {
|
" " + supplement
|
||||||
" " + supplement
|
} else {
|
||||||
} else {
|
""
|
||||||
""
|
},
|
||||||
},
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,17 +301,13 @@
|
|||||||
}
|
}
|
||||||
/* --- Figure/Table config end --- */
|
/* --- Figure/Table config end --- */
|
||||||
|
|
||||||
set list(
|
set list(marker: (
|
||||||
marker: (
|
[•],
|
||||||
[•],
|
[--],
|
||||||
[--],
|
[\*],
|
||||||
[\*],
|
[·],
|
||||||
[·],
|
))
|
||||||
),
|
set enum(numbering: "1aiA)") // TODO: make the same style as LaTeX: 1. | (a) | i. | A.
|
||||||
)
|
|
||||||
set enum(
|
|
||||||
numbering: "1aiA)",
|
|
||||||
) // TODO: make the same style as LaTeX: 1. | (a) | i. | A.
|
|
||||||
|
|
||||||
// Abstract
|
// Abstract
|
||||||
include "abstract.typ"
|
include "abstract.typ"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user