|
| 1 | +# clean-math-paper |
| 2 | + |
| 3 | +[](https://github.com/JoshuaLampert/clean-math-paper/actions/workflows/build.yml) |
| 4 | +[](https://github.com/JoshuaLampert/clean-math-paper) |
| 5 | +[](https://opensource.org/licenses/MIT) |
| 6 | + |
| 7 | +[Typst](https://typst.app/home/) paper template for mathematical papers built for simple, efficient use and a clean look. |
| 8 | +Of course, it can also be used for other subjects, but the following math-specific features are already contained in the template: |
| 9 | + |
| 10 | +- theorems, lemmas, corollaries, proofs etc. prepared using [great-theorems](https://typst.app/universe/package/great-theorems) |
| 11 | +- equation settings |
| 12 | + |
| 13 | +## Set-Up |
| 14 | + |
| 15 | +The template is already filled with dummy data, to give users an impression what it looks like. The paper is obtained by compiling `main.typ`. |
| 16 | + |
| 17 | +- after [installing Typst](https://github.com/typst/typst?tab=readme-ov-file#installation) you can conveniently use the following to create a new folder containing this project. |
| 18 | + |
| 19 | +```bash |
| 20 | +typst init @preview/clean-math-paper:0.2.5 |
| 21 | +``` |
| 22 | + |
| 23 | +- edit the data in `main.typ` → `#show template.with([your data])` |
| 24 | + |
| 25 | +### Parameters of the Template |
| 26 | + |
| 27 | +- `title`: Title of the paper. |
| 28 | +- `authors`: List of names of the authors of the paper. Each entry of the list is a dictionary with the following keys: |
| 29 | + - `name`: Name of the author. |
| 30 | + - `affiliation-id`: The ID of the affiliation in `affiliations`, see below. Can also be left empty. |
| 31 | + - optionally `orcid`: The [ORCID](https://orcid.org/) of the author. If provided, the author's name will be linked to their ORCID profile. |
| 32 | +- `affiliations`: List of affiliations of the authors. Each entry of the list is a dictionary with the following keys: |
| 33 | + - `id`: ID of the affiliation, which is used to link the authors to the affiliation, see above. Can also be left empty. |
| 34 | + - `name`: Name of the affiliation. |
| 35 | +- `date`: Date of the paper. |
| 36 | +- `abstract`: Abstract of the paper. If not provided, nothing will be shown. |
| 37 | +- `keywords`: List of keywords of the paper. If not provided, nothing will be shown. |
| 38 | +- `AMS`: List of AMS subject classifications of the paper. If not provided, nothing will be shown. |
| 39 | +- `lang`: Language of the paper. Supported languages are English, German, French, and Spanish, default is "en". |
| 40 | +- `translations`: Dictionary to override the language translations. Please refer to the `Support for languages` section for more information. |
| 41 | +- `heading-color`: Color of the headings including the title. |
| 42 | +- `link-color`: Color of the links. |
| 43 | +- `lines`: Boolean to enable or disable the horizontal lines around the title. Default is `true`. |
| 44 | +- `ncolumns`: Number of columns of the paper. Default is `1`. |
| 45 | +- `page-args`: Dictionary to set page arguments, e.g., to change the number of columns or page numbering. See [Typst docs](https://typst.app/docs/reference/layout/page/) for more information. The default page arguments can be accessed via `page-args`, i.e., if you want to change only some of the default settings, you can use `insert` on `page-args` to change specific settings. |
| 46 | +- `text-args-title`: Dictionary to set text arguments for the title, e.g., to change the font size or color. See [Typst docs](https://typst.app/docs/reference/text/text/) for more information. The default arguments can be accessed via `text-args-title`, i.e., if you want to change only some of the default settings, you can use `insert` on `text-args-title` to change specific settings. |
| 47 | +- `text-args-authors`: Dictionary to set text arguments for the authors' names, e.g., to change the font weight or style. See [Typst docs](https://typst.app/docs/reference/text/text/) for more information. The default arguments can be accessed via `text-args-authors`, i.e., if you want to change only some of the default settings, you can use `insert` on `text-args-authors` to change specific settings. |
| 48 | + |
| 49 | +### Support for mathblocks |
| 50 | + |
| 51 | +This template uses the [great-theorems](https://typst.app/universe/package/great-theorems) package to provide a set of mathblocks. Currently, the following blocks are available: `theorem`, `proposition`, `corollary`, `lemma`, `definition`, `remark`, `example`, `question`, and `proof`. If you want to define your own block, you can do this, e.g., by |
| 52 | + |
| 53 | +```typst |
| 54 | +#let answer = my-mathblock( |
| 55 | + blocktitle: "Answer", |
| 56 | + bodyfmt: text.with(style: "italic"), |
| 57 | +) |
| 58 | +``` |
| 59 | + |
| 60 | +where `my-mathblock` already includes the counter shared between mathblocks. You can also directly use `mathblock` instead if you do not want to use the default setting used in this template. |
| 61 | + |
| 62 | +### Support for languages |
| 63 | + |
| 64 | +This template includes translations for English, German, French, and Spanish. To use one of these languages, set the lang parameter to `en`, `de`, `fr`, or `es`: |
| 65 | + |
| 66 | +```typst |
| 67 | +#show: template.with( |
| 68 | + lang: "en" |
| 69 | +) |
| 70 | +``` |
| 71 | + |
| 72 | +For languages not included by default, or to override existing translations: |
| 73 | + |
| 74 | +- set `lang` to your language's ISO code (see [Typst docs](https://typst.app/docs/reference/text/text/#parameters-lang)) |
| 75 | +- provide a `translations` dictionary with your custom translations, like below |
| 76 | + |
| 77 | +```typst |
| 78 | +#show: template.with( |
| 79 | + lang: "en", |
| 80 | + translations: ( |
| 81 | + "theorem": "Theorem", |
| 82 | + "proposition": "Proposition", |
| 83 | + "corollary": "Corollary", |
| 84 | + "lemma": "Lemma", |
| 85 | + "definition": "Definition", |
| 86 | + "remark": "Remark", |
| 87 | + "example": "Example", |
| 88 | + "question": "Question", |
| 89 | + "proof": "Proof", |
| 90 | + "keywords": "Keywords", |
| 91 | + "ams": "AMS subject classification", |
| 92 | + "appendix": "Appendix", |
| 93 | + "abstract": "Abstract", |
| 94 | + ) |
| 95 | +) |
| 96 | +``` |
| 97 | + |
| 98 | +To modify specific translations for a supported language, a partial dictionary is enough. Only the specified keys will be overridden. |
| 99 | + |
| 100 | +## Acknowledgements |
| 101 | + |
| 102 | +Some parts of this template are based on the [arkheion](https://github.com/mgoulao/arkheion) template. |
| 103 | + |
| 104 | +## Feedback & Improvements |
| 105 | + |
| 106 | +If you encounter problems, please open issues. In case you found useful extensions or improved anything We are also very happy to accept pull requests. |
0 commit comments