Skip to content

Commit 8c7efcf

Browse files
authored
feat: Separate CI Workflows and Codeblock (#9)
* ci: separate build and release workflows * feat: add codeblock * ci: checkout before building
1 parent 44c7462 commit 8c7efcf

File tree

4 files changed

+48
-12
lines changed

4 files changed

+48
-12
lines changed

.github/workflows/build.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build pdf
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
release_pdf:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: '0'
17+
- name: Compile Typst
18+
uses: lvignoli/typst-action@main
19+
with:
20+
source_file: |
21+
main.typ
File renamed without changes.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
# A helpful description of your flake
3-
description = "UiT Assignment Template";
3+
description = "Typst Assignment Template";
44

55
# Flake inputs
66
inputs = {

main.typ

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
While writing this report template, I enjoyed reading Michael Alley's "The Craft of Scientific Writing". I recommend having it by your side when you are stuck writing- it happens to all of us @AlleyMichael2018TCoS.
99

10-
#v(12pt)
10+
#v(9pt)
1111

1212
Make sure you clean up the template text before submitting your report. ;)
1313

14-
#v(12pt)
14+
#v(9pt)
1515
],
1616
header: [INF-XXXX Assignment X #datetime.today().display()],
1717
authors: ((
@@ -40,8 +40,6 @@
4040
= Introduction <sec:introduction>
4141
This section should be brief. Describe the assignment and the requirements in your own words. Avoid listing the requirements directly.
4242

43-
#v(12pt)
44-
4543
There are many opinions on first person speaking when writing a technical report. In general a:
4644

4745
+ First person report is good at:
@@ -53,7 +51,7 @@ There are many opinions on first person speaking when writing a technical report
5351

5452
It's not uncommon to mix these in your reports, and people like Einstein, Feynman, and Curie frequently used both forms in their texts.
5553

56-
#v(12pt)
54+
#v(9pt)
5755

5856
Here are some examples on how to start your introduction:
5957

@@ -63,6 +61,7 @@ Here are some examples on how to start your introduction:
6361
+ Boids is a computer model created by Craig Reynolds that simulates the flocking behavior of birds @TanenbaumAndrewS.2024Mos. In this report, we present an implementation of the model using the Python programming language.
6462
+ SQL is a widely used querying language used to process queries into table-based databases. This text details the implementation of a simplified server that implements a subset of the SQL language built over SQLite.
6563

64+
6665
== Outline <subsec:outline>
6766

6867
The rest of this paper is organized as follows:
@@ -82,7 +81,7 @@ The rest of this paper is organized as follows:
8281
= Theoretical Background <sec:technical_background>
8382
This section is where you provide information on the technical aspects of your design. You can usually assume that the theory required to solve the assignment is know to the reader, but if you want to clarify terms or go into detail about specific points in the theory (if you are doing something slightly different, or a detail of it is of notable importance to your implementation), consider writing a few words about it here.
8483

85-
#v(12pt)
84+
#v(9pt)
8685

8786
We want you to write a short section explaining the most important background information required to read and understand the rest of the report.
8887

@@ -92,27 +91,43 @@ We want you to write a short section explaining the most important background in
9291

9392
The basic concept of virtual memory is that you map the virtual address the processes use to a unique physical address in physical memory. This means that two processes can access the same virtual address in their address space but get two different results since the addresses point to different places in the physical memory. This again means that each process can use all of its 32-bit address space while still ensuring that no other processes can access its data @TanenbaumAndrewS.2024Mos.
9493

95-
#v(12pt)
94+
#v(9pt)
9695

9796
Using figures in technical backgrounds is encouraged, if that makes the concept easier to explain. Usually, you want figures/images as scaleable vector graphics\(SVG), especially for your graphs. Sometimes that is not doable, and you can use portable network graphics\(PNG) or similar.
9897

99-
#v(12pt)
98+
#v(9pt)
10099

101100
The following snippet shows how to import figures.
102101

103102
#figure(
104-
image("figures/jetson_nx.png", width: 89%),
103+
image("figures/jetson_nx.png", width: 85%),
105104
caption: [Block diagram of the Jetson Xavier NX],
106105
) <fig:block_diagram>
107106

108107
#figure(
109-
image("figures/NVSD_VDD_IN.svg", width: 89%),
108+
image("figures/NVSD_VDD_IN.svg", width: 82%),
110109
caption: [Total power consumption compared between NAS and SD-Card. / _Note_ the NAS-experiment did not complete in time, and the measurements for the NAS is fit to the SD-card measurements],
111110
) <fig:local_nas_sd_compare>
112111

113112
= Design <sec:design>
114113

115-
This is where you describe how you solved the assignment, at least on paper. Give a high-level view of your design. As a rule of thumb, if you find yourself describing code, you need to go to a higher abstraction level.
114+
This is where you describe how you solved the assignment, at least on paper. Give a high-level view of your design.This is where you describe how you solved the assignment, at least on paper. Give a high-level view of your design.
115+
As a rule of thumb, if you find yourself describing code, you need to go to a higher abstraction level. If you for some reson want to write code you can use the `raw` block as seen in the following example.
116+
117+
```c
118+
/* Simple copy from src to dest */
119+
char *strcpy(char *restrict dest,
120+
const char *restrict src)
121+
{
122+
char *destorig = dest;
123+
for (;; dest++, src++) {
124+
char copiedchar = *dest = *src;
125+
if (!copiedchar) break;
126+
}
127+
printf("Strings are green\n");
128+
return destorig;
129+
}
130+
```
116131

117132
#v(12pt)
118133

0 commit comments

Comments
 (0)