This commit is contained in:
Kristofers Solo 2025-01-03 16:54:51 +02:00
parent a2dece79d6
commit e71ddd761a
10 changed files with 50 additions and 59 deletions

View File

@ -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:

View File

@ -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
View 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"

View File

@ -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,8 +199,7 @@
if it.kind == "i-figured-table" {
return align(
end,
emph(it.counter.display(it.numbering) + " tabula ")
+ text(
emph(it.counter.display(it.numbering) + " tabula ") + text(
weight: "bold",
it.body,
),
@ -202,16 +208,14 @@
if it.kind == "i-figured-image" {
return align(
start,
emph(it.counter.display(it.numbering) + " att. ")
+ text(
emph(it.counter.display(it.numbering) + " att. ") + text(
weight: "bold",
it.body,
),
)
}
if (
it.kind
in (
it.kind in (
"i-figured-raw",
"i-figured-\"attachment\"",
)
@ -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,8 +288,7 @@
// Create counter based on the kind
return link(
el.location(),
number
+ if supplement != "" {
number + if supplement != "" {
" " + supplement
} else {
""
@ -301,17 +301,13 @@
}
/* --- Figure/Table config end --- */
set list(
marker: (
set list(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
include "abstract.typ"