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
|
||||
permissions:
|
||||
contents: write
|
||||
packages: read
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Cache Microsoft fonts
|
||||
id: cache-msfonts
|
||||
uses: actions/cache@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Typst
|
||||
uses: typst-community/setup-typst@v3
|
||||
with:
|
||||
path: ~/.cache/ms-fonts
|
||||
key: ${{ runner.os }}-msfonts-v1
|
||||
- name: Install required fonts
|
||||
typst-version: 0.12
|
||||
cache-dependency-path: requirements.typ
|
||||
- name: Compile Typst files
|
||||
run: |
|
||||
sudo apt-get update
|
||||
mkdir -p ~/.local/share/fonts
|
||||
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
|
||||
typst compile --font-path=assets/fonts main.typ kval_darbs_kristians_cagulis_kc22015.pdf
|
||||
typst compile --font-path=assets/fonts documentary_page.typ
|
||||
- name: Upload PDF file
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
#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": 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",
|
||||
)
|
||||
set text(
|
||||
font: "Times New Roman",
|
||||
font: (
|
||||
"Times New Roman",
|
||||
"New Computer Modern",
|
||||
),
|
||||
size: 12pt,
|
||||
hyphenate: auto,
|
||||
lang: "lv",
|
||||
region: "lv",
|
||||
)
|
||||
show raw: set text(
|
||||
font: "JetBrainsMono NF",
|
||||
font: (
|
||||
"JetBrainsMono NF",
|
||||
"JetBrains Mono",
|
||||
"Fira Code",
|
||||
),
|
||||
features: (calt: 0),
|
||||
)
|
||||
|
||||
@ -192,29 +199,26 @@
|
||||
if it.kind == "i-figured-table" {
|
||||
return align(
|
||||
end,
|
||||
emph(it.counter.display(it.numbering) + " tabula ")
|
||||
+ text(
|
||||
weight: "bold",
|
||||
it.body,
|
||||
),
|
||||
emph(it.counter.display(it.numbering) + " tabula ") + text(
|
||||
weight: "bold",
|
||||
it.body,
|
||||
),
|
||||
)
|
||||
}
|
||||
if it.kind == "i-figured-image" {
|
||||
return align(
|
||||
start,
|
||||
emph(it.counter.display(it.numbering) + " att. ")
|
||||
+ text(
|
||||
weight: "bold",
|
||||
it.body,
|
||||
),
|
||||
emph(it.counter.display(it.numbering) + " att. ") + text(
|
||||
weight: "bold",
|
||||
it.body,
|
||||
),
|
||||
)
|
||||
}
|
||||
if (
|
||||
it.kind
|
||||
in (
|
||||
"i-figured-raw",
|
||||
"i-figured-\"attachment\"",
|
||||
)
|
||||
it.kind in (
|
||||
"i-figured-raw",
|
||||
"i-figured-\"attachment\"",
|
||||
)
|
||||
) {
|
||||
return align(
|
||||
end,
|
||||
@ -241,9 +245,7 @@
|
||||
numbering(
|
||||
el.numbering,
|
||||
..counter(heading).at(el.location()),
|
||||
)
|
||||
+ " "
|
||||
+ el.body,
|
||||
) + " " + el.body,
|
||||
)
|
||||
}
|
||||
|
||||
@ -274,8 +276,7 @@
|
||||
numbering(
|
||||
el.numbering,
|
||||
..counter(figure.where(kind: kind)).at(el.location()),
|
||||
)
|
||||
+ "."
|
||||
) + "."
|
||||
) // Only add dot for attachments
|
||||
} else {
|
||||
numbering(
|
||||
@ -287,12 +288,11 @@
|
||||
// Create counter based on the kind
|
||||
return link(
|
||||
el.location(),
|
||||
number
|
||||
+ if supplement != "" {
|
||||
" " + supplement
|
||||
} else {
|
||||
""
|
||||
},
|
||||
number + if supplement != "" {
|
||||
" " + supplement
|
||||
} else {
|
||||
""
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@ -301,17 +301,13 @@
|
||||
}
|
||||
/* --- Figure/Table config end --- */
|
||||
|
||||
set list(
|
||||
marker: (
|
||||
[•],
|
||||
[--],
|
||||
[\*],
|
||||
[·],
|
||||
),
|
||||
)
|
||||
set enum(
|
||||
numbering: "1aiA)",
|
||||
) // TODO: make the same style as LaTeX: 1. | (a) | i. | A.
|
||||
set list(marker: (
|
||||
[•],
|
||||
[--],
|
||||
[\*],
|
||||
[·],
|
||||
))
|
||||
set enum(numbering: "1aiA)") // TODO: make the same style as LaTeX: 1. | (a) | i. | A.
|
||||
|
||||
// Abstract
|
||||
include "abstract.typ"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user