|
| 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