Skip to content

Commit

Permalink
Merge pull request #170 from TomVer99/feature/version-nr-on-cover-page
Browse files Browse the repository at this point in the history
Feature/version nr on cover page
  • Loading branch information
TomVer99 authored Sep 17, 2024
2 parents 6f6d0a8 + 6eeffe0 commit 955bdc0
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To get started with this Typst document template, follow these steps:

1. **Check for the roboto font**: Check if you have the roboto font installed on your system. If you don't, you can download it from [Google Fonts](https://fonts.google.com/specimen/Roboto).
2. **Install Typst**: I recommend to use VSCode with the [Typst LSP Extension](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp) or [Tinymist Typst Extension](https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist). You will also need a PDF viewer in VSCode if you want to view the document live.
3. **Import the template**: Import the template into your own typst document. `#import "@preview/unofficial-fhict-document-template:1.0.1": *`
3. **Import the template**: Import the template into your own typst document. `#import "@preview/unofficial-fhict-document-template:1.0.2": *`
4. **Set the available options**: Set the available options in the template file to your liking.
5. **Start writing**: Start writing your document.

Expand Down
Binary file modified documentation/manual.pdf
Binary file not shown.
9 changes: 7 additions & 2 deletions documentation/manual.typ
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
subtitle: [An unofficial template for FHICT document generation.],
authors: "TomVer99",
url: "https://github.com/TomVer99/FHICT-typst-template",
version: "1.0.1",
version: "1.0.2",
date: datetime.today(),
abstract: [
This template allows the user to easily generate documents in the style of the Fontys Hogeschool ICT.
Expand Down Expand Up @@ -109,6 +109,7 @@ This is a simple document.
arg[toc-depth],
arg[disable-toc],
arg[disable-chapter-numbering],
arg[disable-version-on-cover],
arg[chapter-on-new-page],
arg[pre-toc],
arg[table-of-figures],
Expand Down Expand Up @@ -253,6 +254,10 @@ This is a simple document.
Whether to disable chapter numbering.
]

#argument("disable-version-on-cover", types: "bool", default: false)[
Whether to display the latests version number on the cover page or not.
]

#argument("chapter-on-new-page", types: "bool", default: false)[
Whether to start each chapter on a new page.
]
Expand All @@ -269,11 +274,11 @@ This is a simple document.
Whether to show a table of listings.
]

#colbreak()
#argument("table-of-tables", types: "bool", default: false)[
Whether to show a table of tables.
]

#colbreak()
#argument("appendix", types: "content", default: none)[
Content to show in the appendix.
]
Expand Down
Binary file modified examples/showcase/showcase.pdf
Binary file not shown.
30 changes: 30 additions & 0 deletions template/fhict-template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
toc-depth: 3,
disable-toc: false,
disable-chapter-numbering: false,
disable-version-on-cover: false,
chapter-on-new-page: false,
pre-toc: none,
table-of-figures: none,
Expand Down Expand Up @@ -510,6 +511,35 @@
),
)
}

// Version
#if secondary-organisation-color == none and version-history != none and version-history.len() > 0 and disable-version-on-cover == false {
place(
right + horizon,
dy: 370pt,
box(
height: 30pt,
inset: 10pt,
fill: fontys-pink-1,
text(20pt, fill: white, font: "Roboto")[
#version-history.at(version-history.len() - 1).at("version")
],
),
)
} else if version-history != none and version-history.len() > 0 and disable-version-on-cover == false {
place(
right + horizon,
dy: 370pt,
box(
height: 30pt,
inset: 10pt,
fill: white,
text(20pt, fill: secondary-organisation-color, font: "Roboto")[
#version-history.at(version-history.len() - 1).at("version")
],
),
)
}
],
foreground: [
#if watermark != none [
Expand Down

0 comments on commit 955bdc0

Please sign in to comment.