chore: update workflow

This commit is contained in:
Kristofers Solo 2025-01-03 14:45:15 +02:00
parent fb90f28a0d
commit 331854ccac
38 changed files with 60 additions and 37 deletions

View File

@ -17,16 +17,25 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Typst - name: Setup fonts
run: |
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 uses: lvignoli/typst-action@main
with: with:
source_file: | source_file: |
main.typ 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:
name: PDF name: PDF
path: "*.pdf" path: |
*.pdf
- name: Get current date - name: Get current date
id: date id: date
run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV
@ -35,4 +44,4 @@ jobs:
if: github.ref_type == 'tag' if: github.ref_type == 'tag'
with: with:
name: "${{ github.ref_name }} — ${{ env.DATE }}" name: "${{ github.ref_name }} — ${{ env.DATE }}"
files: main.pdf files: "*.pdf"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -19,7 +19,6 @@
date: "", date: "",
body, body,
) = { ) = {
set document(author: authors) set document(author: authors)
set page( set page(
@ -39,7 +38,10 @@
lang: "lv", lang: "lv",
region: "lv", region: "lv",
) )
show raw: set text(features: (calt: 0)) show raw: set text(
font: "JetBrainsMono NF",
features: (calt: 0),
)
show math.equation: set text(weight: 400) show math.equation: set text(weight: 400)
@ -157,9 +159,7 @@
align( align(
center, center,
upper( upper(text(date)),
text(date),
),
) )
/* Title page config end */ /* Title page config end */
@ -192,7 +192,8 @@
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 ") + text( emph(it.counter.display(it.numbering) + " tabula ")
+ text(
weight: "bold", weight: "bold",
it.body, it.body,
), ),
@ -201,15 +202,19 @@
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. ") + text( emph(it.counter.display(it.numbering) + " att. ")
+ text(
weight: "bold", weight: "bold",
it.body, it.body,
), ),
) )
} }
if it.kind in ( if (
it.kind
in (
"i-figured-raw", "i-figured-raw",
"i-figured-\"attachment\"", "i-figured-\"attachment\"",
)
) { ) {
return align( return align(
end, end,
@ -236,7 +241,9 @@
numbering( numbering(
el.numbering, el.numbering,
..counter(heading).at(el.location()), ..counter(heading).at(el.location()),
) + " " + el.body, )
+ " "
+ el.body,
) )
} }
@ -263,10 +270,13 @@
} }
let number = if kind == "attachment" { let number = if kind == "attachment" {
(
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(
el.numbering, el.numbering,
@ -277,7 +287,8 @@
// Create counter based on the kind // Create counter based on the kind
return link( return link(
el.location(), el.location(),
number + if supplement != "" { number
+ if supplement != "" {
" " + supplement " " + supplement
} else { } else {
"" ""
@ -290,13 +301,17 @@
} }
/* --- Figure/Table config end --- */ /* --- 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 // Abstract
include "abstract.typ" include "abstract.typ"
@ -319,7 +334,6 @@
/* ToC config end */ /* ToC config end */
// show link: set text(fill: blue.darken(20%)) // show link: set text(fill: blue.darken(20%))
// Main body // Main body