Skip to content

Commit aa0d7b8

Browse files
authored
scholarly-tauthesis:0.14.3 (typst#2450)
1 parent ccd01ae commit aa0d7b8

32 files changed

+5263
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### .gitattributes
2+
#
3+
# Defines which files are to be interpreted as text files by Git, and therefore normalized.
4+
#
5+
6+
*.md text
7+
*.svg text
8+
*.typ text
9+
.gitattributes text
10+
.gitignore text
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
### .gitignore
2+
#
3+
# Defines which files are to be allowd into this project by Git.
4+
#
5+
6+
## Disallow everything.
7+
8+
*
9+
10+
## Allow specific files in project root.
11+
12+
!.gitattributes
13+
!.gitignore
14+
!LICENSE
15+
!thumbnail.png
16+
!typst.toml
17+
!tauthesis.typ
18+
19+
## Allow README files in all subfolders.
20+
21+
!**/
22+
!**/README.md
23+
24+
## Allow template root files.
25+
26+
!template/
27+
!template/bibliography.bib
28+
!template/brakets.typ
29+
!template/main.typ
30+
!template/preamble.typ
31+
32+
## Allow typst files in template/content/.
33+
34+
!template/content/
35+
!template/content/*.typ
36+
37+
## Allow image files under template/images/.
38+
39+
!template/images/
40+
!template/images/*.jpg
41+
!template/images/*.png
42+
!template/images/*.svg
43+
44+
## Allow code files under template/code/.
45+
46+
!template/code/
47+
!template/code/*.c
48+
!template/code/*.cc
49+
!template/code/*.cpp
50+
!template/code/*.h
51+
!template/code/*.hh
52+
!template/code/*.hs
53+
!template/code/*.java
54+
!template/code/*.jl
55+
!template/code/*.js
56+
!template/code/*.m
57+
!template/code/*.py
58+
!template/code/*.rs
59+
!template/code/*.svg
60+
!template/code/*.toml
61+
!template/code/*.ts
62+
!template/code/*.yaml
63+
!template/code/*.yml
64+
65+
# Allow utilities folder.
66+
67+
!utils/
68+
!utils/packageLocally.py
69+
70+
## Allow PhD publication metadata under template/publications/.
71+
72+
!template/publications/publications.yaml
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright © 2023 Santtu Söderholm
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the “Software”), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
# Tampere University Thesis Template
2+
3+
This is a TAU thesis template written in the [`typst`][typst]
4+
typesetting language, a potential successor to LaTeΧ. The
5+
version of typst used to test this template is
6+
[`0.13.0`][v0.13.0].
7+
8+
## Using the template on typst.app
9+
10+
This template is also available on [Typst Universe] as
11+
[`scholarly-tauthesis`][tau-template-page]. Simply create an account on
12+
<https://typst.app/> and start a new `scholarly-tauthesis` project by clicking
13+
on **Start from template** and searching for **scholarly-tauthesis**.
14+
15+
16+
If you have initialized your project with an older stable version of this
17+
template and wish to upgrade to a newer release, the simplest way to do it is
18+
to change the value of `$VERSION``0.9.0` in the import statements
19+
```typst
20+
#import "@preview/scholarly-tauthesis:$VERSION" as tauthesis
21+
```
22+
to correspond to a newer released version. Alternatively, you could download
23+
the `tauthesis.typ` file from the [thesis template repository][template-repo], and
24+
upload it into you project on <https://typst.app/>. Then use
25+
```typst
26+
#import "path/to/tauthesis.typ" as tauthesis
27+
```
28+
instead of
29+
```typst
30+
#import "@preview/scholarly-tauthesis:$VERSION" as tauthesis
31+
```
32+
to import the `tauthesis` module.
33+
34+
### Note
35+
36+
Versions of this template before 0.9.0 do not actually work with typst.app due
37+
to a packaging issue.
38+
39+
## Local installation
40+
41+
If [Typst Universe] is online, this template will be downloaded automatically
42+
to
43+
44+
$CACHEDIR/typst/packages/preview/scholarly-tauthesis/$VERSION/
45+
46+
when one runs the command
47+
48+
typst init @preview/scholarly-tauthesis:$VERSION mythesis
49+
50+
Here `$VERSION` should be ≥ 0.9.0. The value `$CACHEDIR` for your OS can be
51+
discovered from <https://docs.rs/dirs/latest/dirs/fn.cache_dir.html>.
52+
53+
### Manual installation
54+
55+
For a manual installation, download the contents of this repository via Git or
56+
as a ZIP file from the template [tags] page, and store them in the folder
57+
58+
$DATADIR/typst/packages/preview/scholarly-tauthesis/$VERSION/
59+
60+
so that a local installation of `typst` can discover the `tauthesis.typ` file
61+
no matter where you are running it from. To find out the value `$DATADIR` for
62+
your operating system, see <https://docs.rs/dirs/latest/dirs/fn.data_dir.html>.
63+
The value `$VERSION` is the version `A.B.C``0.9.0` of this template you wish
64+
to use.
65+
66+
### Initializing a local copy of the project
67+
68+
Once the package has been installed either automatically or manually, the command
69+
70+
typst init @preview/scholarly-tauthesis:$VERSION mythesis
71+
72+
creates a folder `mythesis` with the template files in place. Simply make the
73+
`mythesis` folder you current working directory and run
74+
```sh
75+
typst compile main.typ
76+
```
77+
in the shell of your choice to compile the document from scratch.
78+
Alternatively, type
79+
```sh
80+
typst watch main.typ &> typst.log &
81+
```
82+
to have a [`typst`][typst] process watch the file for changes and compile it
83+
when a file is changed. Possible error messages can then be viewed by checking
84+
the contents of the mentioned file `typst.log`.
85+
86+
### If all else fails…
87+
88+
… and these installation instructions do not work for some reason, the package
89+
file `tauthesis.typ` can be moved next to the file `template/main.typ`, and the
90+
import statements
91+
```typst
92+
#import "@preview/scholarly-tauthesis:$VERSION" as tauthesis
93+
```
94+
can be changed to
95+
```typst
96+
#import "relative/path/to/tauthesis.typ" as tauthesis
97+
```
98+
in all files that need to import the template package. This includes at least
99+
`template/main.typ` but possibly other content files as well.
100+
101+
## On the choice of fonts
102+
103+
As of 2025-04-16 the Typst packaging ecosystem has yet to figure out a best
104+
way of distributing template-specific fonts and other binary-format resources
105+
that a template might rely on. The packaging system currently relies on a [Git
106+
repository](https://github.com/typst/packages), which means that it is not
107+
practical to include the fonts that Tampere University recommends along with
108+
this template.
109+
110+
You should therefore download and install the (static) OpenType (`.otf`) or
111+
TrueType (`.ttf`) versions of the recommended fonts onto your system, if they
112+
are not already installed. If you want to write your thesis on [typst.app],
113+
it should be enough to upload the required (static versions) of the `.ttf` or
114+
`.otf` font files into the project there, if they are not already available on
115+
the service.
116+
117+
The current font recommendation is as follows:
118+
119+
- Normal text: [Roboto](https://fonts.google.com/specimen/Roboto),
120+
121+
- Mathematics: [STIX Two Math](https://github.com/stipub/stixfonts/releases) and
122+
123+
- Raw text or code: [Fira Mono](https://fonts.google.com/?query=Fira+Mono).
124+
125+
These are all openly licensed, meaning they should be accessible for all major
126+
operating systems. They also support the font features, such as small capital
127+
letters and bold text, that are required by this thesis template.
128+
129+
## Archiving the final version of your work
130+
131+
Before submitting your thesis to the university archives, it needs to be
132+
converted to PDF/A format. Typst versions ≥ 0.12.0 should support the creation
133+
of PDF/A-2b files, when run with the command
134+
```sh
135+
typst compile --pdf-standard a-2b template/main.typ
136+
```
137+
If a verification program such as [veraPDF](https://docs.verapdf.org/install/)
138+
still complains that the file `template/main.pdf` does not conform to the
139+
standard, the Muuntaja-service of Tampere University should be used to do the
140+
final conversion. See the related instructions ([link][pdfa-instructions]) for
141+
how to do it. Basically it boils down to feeding your compiled PDF document to
142+
the converter at <https://muuntaja.tuni.fi>. **Remember to check that the
143+
output of the converter is not corrupted, before submitting your thesis to the
144+
archives.**
145+
146+
147+
## Usage
148+
149+
You can either write your entire *main matter* in the
150+
[`main.typ`](./template/main.typ) file, or more preferrably, split it into
151+
multiple chapter-specific files and place those in the
152+
[`contents/`](./template/content) folder, which this template tries to
153+
demonstrate. If you choose to write your own commands (functions) in the
154+
[`preamble.typ`](./template/preamble.typ) file, this needs to be imported at
155+
the start of each chapter you plan to use the commands in. Sections that come
156+
before the main matter, like the Finnish and English abstracts
157+
([`tiivistelmä.typ`](./template/content/tiivistelmä.typ)|[`abstract.typ`](./template/content/abstract.typ))
158+
and [`preface.typ`](./template/content/preface.typ) must *not* be removed from
159+
the [`contents`](./template/content) folder, as the automation supposes that
160+
they are located there.
161+
162+
You should probably *not* modify the file [`tauthesis.typ`](./tauthesis.typ), unless there is a bug
163+
that needs fixing right now, and not when the maintainer of this project manages to find the time to
164+
do it.
165+
166+
## Contributing
167+
168+
Issues may be created in the issue tracker on the [template GitLab
169+
repository][template-repo], if one has a GitLab account. Merge requests may
170+
also be performed after GitLab account creation, and forking the project. See
171+
GitLab's documentation on this to find out how to do it ([link][forking]).
172+
173+
174+
## License
175+
176+
This project itself uses the MIT license. See the [LICENSE](./LICENSE) file for details.
177+
178+
<!-- Links -->
179+
180+
[typst.app]: https://typst.app/
181+
[Typst Universe]: https://typst.app/universe
182+
[forking]: https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html
183+
[pdfa-instructions]: https://libguides.tuni.fi/opinnaytteet/pdfa
184+
[tags]: https://gitlab.com/tuni-official/thesis-templates/tau-typst-thesis-template/-/tags
185+
[tau-template-page]: https://typst.app/universe/package/scholarly-tauthesis
186+
[template-repo]: https://gitlab.com/tuni-official/thesis-templates/tau-typst-thesis-template
187+
[typst]: https://github.com/typst/typst
188+
[v0.13.0]: https://github.com/typst/typst/releases/tag/v0.13.0

0 commit comments

Comments
 (0)