|
| 1 | +# May |
| 2 | + |
| 3 | +A simple and elegant document template for multiple daily tasks. |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | +This is my personal typst template designedfor homework, report or some other documents. You can obtain the same styles of this template by simply adding the follows two lines at the top of your document: |
| 8 | + |
| 9 | +```typst |
| 10 | +#import "@preview/may:0.1.1": * |
| 11 | +#show: may-sans |
| 12 | +// ... |
| 13 | +// Your typst documents here |
| 14 | +``` |
| 15 | + |
| 16 | +Alternatively you can also initialize a project with _may_ by running the following command: |
| 17 | + |
| 18 | +```sh |
| 19 | +typst init @preview/may |
| 20 | +``` |
| 21 | + |
| 22 | +This will create a new folder named `may` in the current path, along with a sample file `main.typ` as the start point. |
| 23 | + |
| 24 | +## Touying Slides Template |
| 25 | + |
| 26 | +We also provide a touying theme that is great for presentations! You can create slides in may theme as simple as adding these lines at the top: |
| 27 | + |
| 28 | +```typst |
| 29 | +#import "@preview/may:0.1.1": * |
| 30 | +
|
| 31 | +#show: may-pre.with( |
| 32 | + config-info( |
| 33 | + title: [Welcome to May!], |
| 34 | + subtitle: [Demo of Touying Slides Template May], |
| 35 | + author: [Carlos Mel], |
| 36 | + date: datetime.today(), |
| 37 | + institution: [Qiuzhen College, Tsinghua University] |
| 38 | + ), |
| 39 | +) |
| 40 | +``` |
| 41 | + |
| 42 | +You can modify the parameters in `config-info` to anything you prefer, and you can also customize the footer of this template by explicitly passing a footer to `may-pre` function. After the `show` command, `may-pre` will automatically create new sections and slides according to your 1st headers and 2nd headers. There are also some functions to create special slides in this theme, they are `title-slide`, `focus-slide` and `image-slide`. For more concreate usages you can refer to `slides.typ` template generated by `typst init @preview/may` and our showcases. |
| 43 | + |
| 44 | +## Tips |
| 45 | + |
| 46 | +It is recommanded to use this template along with to following fonts. |
| 47 | + |
| 48 | +* [Libertinus](https://github.com/alerque/libertinus) for latin main body. |
| 49 | +* [Maple Mono](https://github.com/subframe7536/maple-font) for codeblocks. |
| 50 | +* [霞鹜文楷](https://github.com/lxgw/LxgwWenKai) for Chinese characters. |
| 51 | + |
| 52 | +These are all open-sourced fonts of high quality. You can also use other fonts you prefer, by simply adding this line after the `show` command: |
| 53 | + |
| 54 | +```typst |
| 55 | +#set text(font: "FontName") |
| 56 | +``` |
| 57 | + |
| 58 | +You are welcomed to create new PRs to this repository and help improve this template. |
| 59 | + |
| 60 | +## Show Case |
| 61 | + |
| 62 | +**Document Preview** |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +**Slides Template Preview** |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +## Dependencies |
| 76 | + |
| 77 | +This template pre-includes these typst packages along with it. they are [physica](https://typst.app/universe/package/physica/), [touying](https://typst.app/universe/package/touying/). So you can directly access the functionalities without explicit importing them in you project with may. |
0 commit comments