|
| 1 | +# SOS-UGent-style |
| 2 | +> Jouw hulplijn voor de UGent huisstijl in Typst. |
| 3 | +> Your hotline for UGent styling in Typst. |
| 4 | +
|
| 5 | +An unofficial template to bring the UGent style to Typst. |
| 6 | +For students and staff alike. |
| 7 | + |
| 8 | +## Table of Contents |
| 9 | +- [Goals](#goals) |
| 10 | +- [Features](#features) |
| 11 | +- [Demo](#demo) |
| 12 | +- [Usage](#usage) |
| 13 | +- [Installation](#installation-options) |
| 14 | + - [Fonts](#fonts) |
| 15 | +- [License](#license) |
| 16 | +- [Community and contributions](#community-and-contributions) |
| 17 | + - [TODO's](#todos) |
| 18 | + - [Used in](#used-in) |
| 19 | + - [Inspired by](#inspired-by) |
| 20 | + - [About the name](#about-the-name) |
| 21 | + |
| 22 | +## Goals |
| 23 | +It is often needed to present very similar content in different formats. |
| 24 | +This is why this template contains multiple entry points: |
| 25 | +- [x] ugent-doc |
| 26 | + Bare bones document with front page |
| 27 | + - [ ] Front page (all infrastructure is in place, just needs to be |
| 28 | + finalized to correctly show content) |
| 29 | +- [x] ugent-dissertation |
| 30 | + - Integrates some handy utility functions for dissertations. |
| 31 | +- [ ] ugent-beamer |
| 32 | + (not yet started. Contributions are welcome.) |
| 33 | +These should all work together, but unneeded formats can be deleted. |
| 34 | + |
| 35 | +## Features: |
| 36 | +- Closely resemble the official [UGent MS Word/PowerPoint cover templates](https://styleguide.ugent.be/templates/index.html). |
| 37 | +- Localized for: |
| 38 | + - [x] English |
| 39 | + - [x] Dutch/Nederlands |
| 40 | + - [ ] Create Dutch readme |
| 41 | +- Take the faculty as option and load corresponding logo & colors. |
| 42 | + - [x] Works with two faculties. For example for the 'Educatieve Master'. |
| 43 | + - [x] The logos are also localized. |
| 44 | +- Fonts |
| 45 | + - [x] For students: a good default, free font. |
| 46 | + - [x] For staff: good integration with UGent Panno Text. |
| 47 | + - [x] Easily adjustable according to preferences |
| 48 | +- Smart referencing (go beyond the default capabilities of Typst) |
| 49 | + - [x] Reference math equations _with_ parentheses. |
| 50 | + - [x] Correctly reference elements depending on the current language, the requested |
| 51 | + capitalization and the element being referenced |
| 52 | + (e.g. Annex A instead of the default Chapter A). |
| 53 | + - [x] When referencing an unnumbered subheading, textually refer to the closest |
| 54 | + numbered heading, but digitally link to the original target. |
| 55 | +- Other options |
| 56 | + - [x] Color internal and external links for clarity. |
| 57 | +- [Utility functions](utils/README.md) |
| 58 | + - [x] `todo`: Use margin or inline notes about todo's in different colors. |
| 59 | + With a separate `todo-outline` to keep track of them. |
| 60 | + - [x] `flex-caption`: Long figure captions, short summaries in the outline. |
| 61 | + - [x] Math: |
| 62 | + - [x] `all-math-figures`: easily collect all math figures in one outline. |
| 63 | + - [x] `outline-group-by`: group all math figures by type in this single outline. |
| 64 | + - ... |
| 65 | +- Reproducibility |
| 66 | + Scientific results (including documents) should be as reproducible as |
| 67 | + possible, preferably bit-for-bit. |
| 68 | + - [x] [Guix](https://guix.gnu.org/) integration |
| 69 | + (implemented, but only tested in 1 scenario) |
| 70 | +- [ ] Multi-file projects with individually-compilable parts (~ LaTeX' subfiles). |
| 71 | + Not yet feasable, see [design docs](src/design-docs/TODO-subfiles.md). |
| 72 | +- No mandatory dependencies. Only integrated optional dependencies. |
| 73 | + See [`utils/`](utils/lib.typ) and [`src/utils/`](src/utils/README.md) for background. |
| 74 | + - [x] Integrated ['glossy'](https://typst.app/universe/package/glossy) |
| 75 | + - [x] Integrated [margin/inline notes](https://typst.app/universe/package/drafting) |
| 76 | + |
| 77 | +## Demo |
| 78 | +<table> |
| 79 | + <tr> |
| 80 | + <td><img alt="Example of a dissertation title page. Dutch." src="examples/compiled/eduma-dissertation-nl.png"></td> |
| 81 | + <td><img alt="Example of a dissertation title page. English." src="examples/compiled/eduma-dissertation-en.png"></td> |
| 82 | + </tr> |
| 83 | +</table> |
| 84 | + |
| 85 | +## Usage |
| 86 | +Create a new copy of the template by executing |
| 87 | +`typst init @preview/sos-ugent-style` |
| 88 | +or "Start from template" in the web app. |
| 89 | +Use `typst compile dissertation.typ` to create the dissertation pdf. |
| 90 | +The same goes for `doc.typ` or `beamer.typ`. Remove the files you don't want. |
| 91 | + |
| 92 | +Most options are mentioned under [features](#features) and/or explained in |
| 93 | +the template itself. [Let me know](#community-and-contributions) if you have |
| 94 | +remarks or ideas to improve this section or the template itself. |
| 95 | + |
| 96 | +## Installation options |
| 97 | +* **Use Typst Universe** |
| 98 | + See [usage](#usage). This uses the latest version uploaded to the Universe, |
| 99 | + not necessarily the latest version. |
| 100 | +* To get the latest version or to work on the package itself: |
| 101 | + [download & symlink](https://github.com/typst/packages?tab=readme-ov-file#local-packages) |
| 102 | + to `~/.local/share/typst/packages/preview/sos-ugent-style/0.1.0`. |
| 103 | + As long as [my contributions](https://github.com/swaits/typst-collection/pull/55) |
| 104 | + are not merged into _glossy_ itself and this repo is not yet updated to |
| 105 | + glossy:0.9.0+, you should also download and link |
| 106 | + [my fork](https://github.com/th1j5/typst-glossy/tree/main/glossy). |
| 107 | +* **Use GUIX** |
| 108 | + <TODO: these instructions can be a lot clearer, certainly since we aim to |
| 109 | + provide easy access to this package for users not familiar with guix. |
| 110 | + If you read this and are interested in better guix documentation, open an |
| 111 | + issue or send a mail. An example about how guix is used to enable |
| 112 | + reproducibility is found in [my dissertation](#used-in).> |
| 113 | + See [Specifying Additional Channels](https://guix.gnu.org/manual/en/guix.html#Specifying-Additional-Channels) |
| 114 | + in the Guix manual for instructions how to add it to your installation |
| 115 | + or simply add the following snippet to your channels.scm: |
| 116 | + ```guile |
| 117 | + (channel |
| 118 | + (name 'sos-ugent-style) |
| 119 | + (url "https://codeberg.org/th1j5/typst-sos-ugent-style") |
| 120 | + (branch "main") |
| 121 | + ; To pin to a certain release or commit, use the tag or commit hash here |
| 122 | + ; This enables reproducibility with guix time-machine. Remove this field |
| 123 | + ; to follow the latest commits. |
| 124 | + (commit "v0.1.0")) |
| 125 | + ``` |
| 126 | + If you are on a tagged release (like `v0.1.0`), use `typst-sos-ugent-style` |
| 127 | + in your manifest and `@preview/sos-ugent-style:0.1.0` in `.typ` files. |
| 128 | + Besides the hassle-free font installation and free reproducibility |
| 129 | + garanties, the experience should be exactly the same as from Typst Universe. |
| 130 | + |
| 131 | + If you're following the main branch or are pinned to a non-release commit, |
| 132 | + use `typst-sos-ugent-style-next` in your manifest and |
| 133 | + `@next/sos-ugent-style:0.1.0` in `.typ` files. |
| 134 | + This is to signal to non-guix users that an unreleased version is used. |
| 135 | + |
| 136 | +### Fonts |
| 137 | +[Fonts cannot be packaged together with a Typst package/template. |
| 138 | +](https://forum.typst.app/t/where-should-template-fonts-be-placed/2094) |
| 139 | +The only way for Typst to find fonts are command-line options or environment |
| 140 | +variables. For reproducibility, we add fonts using Guix. |
| 141 | +If you don't use Guix, you can still find & install the fonts in the |
| 142 | +directory 'fonts', or point typst to this location. Read the license remarks. |
| 143 | + |
| 144 | +## License |
| 145 | +This software is released under the [GNU GPL v3.0 License](https://www.gnu.org/licenses/gpl-3.0.en.html). |
| 146 | +Some bundled assets are copyrighted by their respective owners. |
| 147 | +See [fonts](fonts/README.md) and [logos](src/logos/README.md). |
| 148 | +The `template` directory is available under the [MIT-0 license](https://opensource.org/license/mit-0), |
| 149 | +thus requiring no attribution. |
| 150 | + |
| 151 | +## Community and contributions |
| 152 | +This is intended to be useful for UGent students AND staff, but I will most |
| 153 | +likely not be maintaining it (I will be an ex-student). If you send me the |
| 154 | +location of a maintained fork, I'll gladly advertise it here. |
| 155 | +In the meantime, contributions are welcome. |
| 156 | +You can checkout `src/design-docs/` to learn about some design decisions. |
| 157 | + |
| 158 | +Contact: open an issue on codeberg or send a mail to |
| 159 | +thijs.paelman+ugenttypst at hotmail.be (yes, I know, I should really switch |
| 160 | +away from our evil overlords service 😓). |
| 161 | + |
| 162 | +### TODO's |
| 163 | +- [ ] Template |
| 164 | + - [ ] Show how to use a yaml file for abbreviations |
| 165 | + - [ ] How to set ugent font (not the default since this package is also used by students) |
| 166 | + - [ ] Maybe provide content about the perfect integration with Zotero? |
| 167 | +- [ ] Replace bookman font by a free alternative |
| 168 | +- [ ] Support both UGent Panno Text and our default font for headings. |
| 169 | + (the optimal font sizes differ between them - see code comments) |
| 170 | +- [ ] Rewrite goals & features in this readme to be clearer. |
| 171 | +- [ ] GUIX |
| 172 | + - [ ] Test and document GUIX more. |
| 173 | + - [ ] Contribute to guix-science |
| 174 | +- [ ] Remove the need for `flex-caption`: |
| 175 | + Add a show rule which parses array or dict captions as a flex-caption, |
| 176 | + without needing to import & specify the `flex-caption` function. |
| 177 | + (not yet possible - cannot provide array/dict to a figure.caption, see |
| 178 | + also https://github.com/typst/typst/issues/1295) |
| 179 | + |
| 180 | +### Used in: |
| 181 | +Are you using this template? Drop me a line! And tell your colleagues and |
| 182 | +friends :). This list can serve as an inspiration. Remember to distribute |
| 183 | +your version of `sos-ugent-style` _if_ you adapted it to your needs (GPLv3 |
| 184 | +license), or even better: create a pull request to contribute your |
| 185 | +enhancements! |
| 186 | +- [Educatieve Masterpraktijkproef "Automatisch afleiden. Een nieuwe manier van |
| 187 | + afleiden met veel potentieel?" -- Nederlands -- CC BY-NC-SA 4.0](https://codeberg.org/th1j5/masterpraktijkproef-eduma) |
| 188 | + - Appendix B is about `sos-ugent-style` and Typst. |
| 189 | + - Creates a complete 50 page appendix directly from a Jupyter Notebook. |
| 190 | + Includes some (interesting) hacks to accomplish this. |
| 191 | + - Renders graphs created almost directly by Python. |
| 192 | + - Uses Guix for reproducibility. |
| 193 | + - Embeds a lot of source data in the pdf, to distribute the ground truth. |
| 194 | + - Tried to do 'subfiles', did not yet succeed. |
| 195 | + - Counts words with `wordometer`. |
| 196 | + - Tries to use `typst-languagetool` to check grammar when using offline. |
| 197 | + |
| 198 | +### Inspired by |
| 199 | +- https://github.com/Dherse/masterproef/ (typst - Sébastien d'Herbais de Thun) |
| 200 | + MIT licensed here: https://github.com/Dherse/masterproef/tree/6d0cbab9afc8c53e4bd2518794cd13ca8063b4a2 |
| 201 | +- [ugent-beamer](https://github.com/driesbenoit/ugent-beamer) (LaTeX - Dries Benoit) |
| 202 | +- [ugent-doc](https://github.com/driesbenoit/ugent-doc) (LaTeX - Dries Benoit) |
| 203 | +- [masterproef-template](https://github.com/merlijn-sebrechts/masterproef-template) (LaTeX - Merlijn Sebrechts) |
| 204 | +- [ugent-thesis-latex-template](https://github.ugent.be/aavdiere/ugent-thesis-latex-template) |
| 205 | +- UGent [style guide](https://styleguide.ugent.be/) and faculty guidelines |
| 206 | + (mostly engineering & architecture and 'Educatieve master') |
| 207 | +- My own dissertations: |
| 208 | + - [Educatieve Masterpraktijkproef "Automatisch afleiden. Een nieuwe manier |
| 209 | + van afleiden met veel potentieel?" -- Nederlands -- CC BY-NC-SA 4.0]( |
| 210 | + https://codeberg.org/th1j5/masterpraktijkproef-eduma) |
| 211 | + - [Master's dissertation "Rerouting in-flight data packets on address |
| 212 | + changes" -- English -- CC BY-NC-SA 4.0](TODO: publish online) |
| 213 | + |
| 214 | +### About the name |
| 215 | +The original working title of the project was `ugent-style`, but the naming |
| 216 | +guidelines of Typst Universe required something more fun 😁. Thanks Noor for |
| 217 | +the excellent suggestion! Thank you everyone who responded on my little |
| 218 | +opinion poll. |
0 commit comments