Initial commit
This commit is contained in:
commit
3d3e006b59
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Otto Helen-Goldring
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
4
README.md
Normal file
4
README.md
Normal file
@ -0,0 +1,4 @@
|
||||
# rhul-template-typst
|
||||
|
||||
Unofficial report template for reports at Royal Holloway, University of London.
|
||||
Created by Otto Helen-Goldring and heavily modified from [light-report-uia](https://typst.app/universe/package/light-report-uia/).
|
95
lib.typ
Normal file
95
lib.typ
Normal file
@ -0,0 +1,95 @@
|
||||
// Royal Holloway, University of London Report template
|
||||
// Created by Otto Helen-Goldring in 2024 under the MIT License.
|
||||
// Modified from light-report-uia (https://typst.app/universe/package/light-report-uia/)
|
||||
|
||||
#let report(
|
||||
title: none,
|
||||
author: none,
|
||||
group_name: none,
|
||||
course_name: none,
|
||||
unit_type: none,
|
||||
report_type: none,
|
||||
supervisor: none,
|
||||
date: none,
|
||||
location: "Egham",
|
||||
references: "references.yml",
|
||||
body
|
||||
) = {
|
||||
set document(title: [#title - #group_name], author: author)
|
||||
set text(font: "Fira Sans")
|
||||
set par(justify: true)
|
||||
show link: underline
|
||||
|
||||
show heading: set block(above: 30pt, below: 30pt)
|
||||
|
||||
show heading.where(level: 1): set text(size: 20pt)
|
||||
|
||||
show heading.where(level: 1): set heading(supplement: [Chapter])
|
||||
show heading.where(level: 1): it => block({
|
||||
let prefix = if it.numbering != none {
|
||||
it.supplement + [ ] + counter(heading).display(it.numbering) + [: ]
|
||||
}
|
||||
text(weight: "regular",prefix) + it.body
|
||||
})
|
||||
|
||||
show heading.where(level: 2): set text(size: 16pt)
|
||||
|
||||
set page(header: context {if counter(page).get().first() > 1 [#report_type #h(1fr) #author]})
|
||||
|
||||
|
||||
// FRONT PAGE
|
||||
set align(center)
|
||||
|
||||
text(10pt, author + ", " + date)
|
||||
v(5mm)
|
||||
|
||||
text(22pt, "Final Year Project Report")
|
||||
v(1mm)
|
||||
text(14pt, unit_type + " - " + report_type, weight: "bold")
|
||||
v(3mm)
|
||||
line(length: 30%)
|
||||
text(25pt, weight: "bold", title)
|
||||
v(3mm)
|
||||
|
||||
text(18pt, group_name)
|
||||
text(18pt, author)
|
||||
v(3mm)
|
||||
line(length: 30%)
|
||||
|
||||
text(14pt, report_type + " submitted in part fulfilment of the degree of ")
|
||||
v(3mm)
|
||||
text(16pt, weight: "bold")[ #course_name ]
|
||||
v(3mm)
|
||||
text(18pt, "Supervisor: ", weight: "bold")
|
||||
text(18pt, supervisor)
|
||||
|
||||
v(1fr) // to bottom
|
||||
block(height: 25%, image("media/rhul.jpg", height: 75%))
|
||||
text(14pt)[Department of Computer Science#linebreak()Royal Holloway, University of London]
|
||||
v(20mm)
|
||||
|
||||
text(12pt)[#location, #date]
|
||||
|
||||
pagebreak()
|
||||
|
||||
// contents page
|
||||
set align(left)
|
||||
set heading(numbering: "1.1")
|
||||
|
||||
|
||||
outline(indent:2em, title: "Contents")
|
||||
|
||||
pagebreak()
|
||||
|
||||
// after the front page and content things
|
||||
|
||||
set page(numbering: "1", number-align: center)
|
||||
counter(page).update(1)
|
||||
|
||||
// main.typ
|
||||
body
|
||||
|
||||
pagebreak()
|
||||
|
||||
bibliography("template/" + references, title: "Bibliography")
|
||||
}
|
BIN
media/rhul.jpg
Normal file
BIN
media/rhul.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 98 KiB |
60
template/main.typ
Normal file
60
template/main.typ
Normal file
@ -0,0 +1,60 @@
|
||||
#import "../lib.typ": *
|
||||
|
||||
#show: report.with(
|
||||
title: "Algorithms for Lightsaber dueling", // Change accordingly
|
||||
author: "Anakin Skywalker", // Add your name here
|
||||
unit_type: "Full Unit", // Full Unit or Half Unit
|
||||
report_type: "Final Report", // Project Plan, Interim Report, Final Report
|
||||
course_name: "BSc (Hons) in Computer Science", // Change accordingly
|
||||
supervisor: "Obi-Wan Kenobi", // Add your supervisor's name here
|
||||
date: "October 2024", // Change accordingly
|
||||
)
|
||||
|
||||
#import "@preview/codly:1.0.0": *
|
||||
#show: codly-init.with()
|
||||
#codly(zebra-fill: color.hsl(200deg, 80%, 95%, 98%))
|
||||
#codly(display-name: false)
|
||||
|
||||
= Examples
|
||||
|
||||
#lorem(20)
|
||||
|
||||
== Citation
|
||||
This is something stated from a source @example-source.
|
||||
|
||||
== Tables
|
||||
Here's a table:
|
||||
#figure(
|
||||
caption: [Table of numbers],
|
||||
table(
|
||||
columns: (auto, auto),
|
||||
inset: 8pt,
|
||||
align: horizon,
|
||||
table.header(
|
||||
[*Letters*], [*Number*],
|
||||
),
|
||||
[Five], [5],
|
||||
[Eight], [8],
|
||||
)
|
||||
)
|
||||
|
||||
== Code blocks
|
||||
Here's a code block in Golang:
|
||||
|
||||
```go
|
||||
package main
|
||||
import "fmt"
|
||||
func main() {
|
||||
fmt.Println("Hello, world!")
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
== Math
|
||||
Let $a$, $b$, and $c$ be the side
|
||||
lengths of right-angled triangle.
|
||||
Then, we know that:
|
||||
$ a^2 + b^2 = c^2 $
|
||||
|
||||
Prove by induction:
|
||||
$ sum_(k=1)^n k = (n(n+1)) / 2 $
|
7
template/references.yml
Normal file
7
template/references.yml
Normal file
@ -0,0 +1,7 @@
|
||||
# https://typst.app/docs/reference/model/bibliography/
|
||||
|
||||
example-source:
|
||||
type: Web
|
||||
author: "Bob"
|
||||
title: Example web source
|
||||
url: https://example.org/
|
15
typst.toml
Normal file
15
typst.toml
Normal file
@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "rhul-report-template"
|
||||
version = "0.1.0"
|
||||
entrypoint = "lib.typ"
|
||||
authors = ["Otto Helen-Goldring"]
|
||||
license = "MIT"
|
||||
description = "Template for reports at the University of Agder"
|
||||
repository = "https://github.com/Weetile/rhul-report-template"
|
||||
keywords = ["rhul", "University of Royal Holloway", "Royal Holloway"]
|
||||
categories = ["report"]
|
||||
|
||||
[template]
|
||||
path = "template"
|
||||
entrypoint = "main.typ"
|
||||
thumbnail = "thumbnail.png"
|
Loading…
x
Reference in New Issue
Block a user