Skip to content

Commit 181176f

Browse files
authored
scholarly-tauthesis:0.11.0 (typst#2023)
1 parent 99afdd5 commit 181176f

27 files changed

+3349
-0
lines changed
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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/bibliography.bib
27+
!template/main.typ
28+
!template/preamble.typ
29+
30+
## Allow typst files in template/content/.
31+
32+
!template/content/
33+
!template/content/*.typ
34+
35+
## Allow image files under template/images/.
36+
37+
!template/images/
38+
!template/images/*.jpg
39+
!template/images/*.png
40+
!template/images/*.svg
41+
42+
## Allow code files under template/code/.
43+
44+
!template/code/
45+
!template/code/*.c
46+
!template/code/*.cc
47+
!template/code/*.cpp
48+
!template/code/*.h
49+
!template/code/*.hh
50+
!template/code/*.hs
51+
!template/code/*.java
52+
!template/code/*.jl
53+
!template/code/*.js
54+
!template/code/*.m
55+
!template/code/*.py
56+
!template/code/*.rs
57+
!template/code/*.svg
58+
!template/code/*.toml
59+
!template/code/*.ts
60+
!template/code/*.yaml
61+
!template/code/*.yml
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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
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+
## Archiving the final version of your work
102+
103+
Before submitting your thesis to the university archives, it needs to be
104+
converted to PDF/A format. Typst versions ≥ 0.12.0 should support the creation
105+
of PDF/A-2b files, when run with the command
106+
```sh
107+
typst compile --pdf-standard a-2b template/main.typ
108+
```
109+
If a verification program such as [veraPDF](https://docs.verapdf.org/install/)
110+
still complains that the file `template/main.pdf` does not conform to the
111+
standard, the Muuntaja-service of Tampere University should be used to do the
112+
final conversion. See the related instructions ([link][pdfa-instructions]) for
113+
how to do it. Basically it boils down to feeding your compiled PDF document to
114+
the converter at <https://muuntaja.tuni.fi>. **Remember to check that the
115+
output of the converter is not corrupted, before submitting your thesis to the
116+
archives.**
117+
118+
119+
## Usage
120+
121+
You can either write your entire *main matter* in the
122+
[`main.typ`](./template/main.typ) file, or more preferrably, split it into
123+
multiple chapter-specific files and place those in the
124+
[`contents/`](./template/content) folder, which this template tries to
125+
demonstrate. If you choose to write your own commands (functions) in the
126+
[`preamble.typ`](./template/preamble.typ) file, this needs to be imported at
127+
the start of each chapter you plan to use the commands in. Sections that come
128+
before the main matter, like the Finnish and English abstracts
129+
([`tiivistelmä.typ`](./template/content/tiivistelmä.typ)|[`abstract.typ`](./template/content/abstract.typ))
130+
and [`preface.typ`](./template/content/preface.typ) must *not* be removed from
131+
the [`contents`](./template/content) folder, as the automation supposes that
132+
they are located there.
133+
134+
You should probably *not* modify the file [`tauthesis.typ`](./tauthesis.typ), unless there is a bug
135+
that needs fixing right now, and not when the maintainer of this project manages to find the time to
136+
do it.
137+
138+
## Contributing
139+
140+
Issues may be created in the issue tracker on the [template GitLab
141+
repository][template-repo], if one has a GitLab account. Merge requests may
142+
also be performed after GitLab account creation, and forking the project. See
143+
GitLab's documentation on this to find out how to do it ([link][forking]).
144+
145+
146+
## License
147+
148+
This project itself uses the MIT license. See the [LICENSE](./LICENSE) file for details.
149+
150+
<!-- Links -->
151+
152+
[Typst Universe]: https://typst.app/universe
153+
[forking]: https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html
154+
[pdfa-instructions]: https://libguides.tuni.fi/opinnaytteet/pdfa
155+
[tags]: https://gitlab.com/tuni-official/thesis-templates/tau-typst-thesis-template/-/tags
156+
[tau-template-page]: https://typst.app/universe/package/scholarly-tauthesis
157+
[template-repo]: https://gitlab.com/tuni-official/thesis-templates/tau-typst-thesis-template
158+
[typst]: https://github.com/typst/typst
159+
[v0.13.0]: https://github.com/typst/typst/releases/tag/v0.13.0

0 commit comments

Comments
 (0)