Skip to content

Commit

Permalink
fix: cleanup template and add git username field
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz Jörg committed Feb 4, 2024
1 parent a93ab7b commit 9ec7902
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 13 deletions.
18 changes: 12 additions & 6 deletions main.typ
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "template.typ": *
#import "@preview/tablex:0.0.8": tablex, rowspanx, colspanx
#show: uit_template.with(
title: [Assignment template using IEEEtran.cls for IEEE Journals and Transactions],
title: [Assignment template using IEEE-style for Journals and Transactions],
abstract: [
This document describes the most common article elements and how to use the
IEEEtran class with Typst to produce files that are suitable for submission to
Expand All @@ -25,6 +25,7 @@
organization: [UiT Artic University of Tromsø],
location: [Tromsø, Norway],
email: "abc@uit.no",
git: "abc",
),),
index-terms: (
"Assignment submission",
Expand Down Expand Up @@ -120,16 +121,20 @@ address space while still ensuring that no other processes can access its data
Using figures in technical backgrounds is encouraged. Usually you want to have
figures/images as scalable vector graphics\(svg),especially for your graphs, but
sometimes that is not doable and you can use i.e. portable network
graphics\(png) or similar. The following snippet shows how to import figures.
graphics\(png) or similar.

#v(12pt)

The following snippet shows how to import figures.

#figure(
image("figures/jetson_nx.png", width: 80%),
image("figures/jetson_nx.png", width: 89%),
caption: [Block diagram of the Jetson Xavier NX],
) <fig:block_diagram>

#figure(
image("figures/NVSD_VDD_IN.svg", width: 80%),
caption: [Total power consumption compared between NAS and SD-Card. _Note_ the
image("figures/NVSD_VDD_IN.svg", width: 89%),
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],
) <fig:local_nas_sd_compare>
Expand Down Expand Up @@ -210,7 +215,8 @@ You should present the results of your tests here, either using an illustration
and/or a table of results. These will be valuable in the discussion section. The
following is an example for how to format a table of results in Typst.

// TODO: Table here
#v(12pt)

#figure(
tablex(
columns: 7,
Expand Down
57 changes: 50 additions & 7 deletions template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
set document(title: title, author: authors.map(author => author.name))

// Set the body font.
// set text(font: "Times New Roman", size: 10pt)
// set text(font: "New Computer Modern", size: 10pt)
set text(font: "STIX Two Text", size: 10pt)

// Configure the page.
set page(
paper: paper-size,
header: header,
// The margins depend on the paper size.
margin: if paper-size == "a4" {
(x: 41.5pt, top: 80.51pt, bottom: 89.51pt)
Expand All @@ -41,12 +42,44 @@
bottom: (64pt / 279mm) * 100%,
)
},
header: header,
// Show copyright only ont the first page
footer: locate(loc => {
let page-counter = counter(page)
if page-counter.at(loc).first() == 1 [
#set align(center)
#set text(8pt)
979-8-3503-2934-6/23/\$31.00 ©2023 IEEE
]
}),
)

// Configure equation numbering and spacing.
set math.equation(numbering: "(1)")
set math.equation(numbering: "(1)", supplement: [])
show math.equation: set block(spacing: 0.65em)

// Configure figures and tables.
set figure(supplement: [])
show figure: it => {
set text(8pt)
set align(center)
if it.kind == image [
#box[
#it.body
#v(10pt, weak: true)
Fig#it.caption
]
] else if it.kind == table [
#box[
Table#it.caption
#v(10pt, weak: true)
#it.body
]
] else [
...
]
}

// Configure appearance of equation references
show ref: it => {
if it.element != none and it.element.func() == math.equation {
Expand All @@ -61,6 +94,10 @@
}
}

// Configure Tables
// set table(stroke: 0.5pt)
// show table: set text(8pt)

// Configure lists.
set enum(indent: 10pt, body-indent: 9pt)
set list(indent: 10pt, body-indent: 9pt)
Expand Down Expand Up @@ -114,14 +151,14 @@

// Display the paper's title.
v(3pt, weak: true)
align(center, text(18pt, title))
align(center, text(22pt, title))
v(8.35mm, weak: true)

// Display the authors list.
for i in range(calc.ceil(authors.len() / 3)) {
let end = calc.min((i + 1) * 3, authors.len())
for i in range(calc.ceil(authors.len() / 4)) {
let end = calc.min((i + 1) * 4, authors.len())
let is-last = authors.len() == end
let slice = authors.slice(i * 3, end)
let slice = authors.slice(i * 4, end)
grid(
columns: slice.len() * (1fr,),
gutter: 12pt,
Expand All @@ -139,6 +176,9 @@
if "email" in author [
\ #link("mailto:" + author.email)
]
if "git" in author [
\ #author.git
]
})),
)

Expand All @@ -155,10 +195,13 @@

// Display abstract and index terms.
if abstract != none [
#set text(weight: 700)
// #set par(leading: 0.5em)
#set text(weight: 700, size: 9pt)
#h(1em) _Abstract_---#abstract

#if index-terms != () [
#v(9pt)
#set text(weight: 700, size: 9pt, style: "italic")
#h(1em)_Index terms_---#index-terms.join(", ")
]
#v(2pt)
Expand Down

0 comments on commit 9ec7902

Please sign in to comment.