Skip to content

Commit 1977b6c

Browse files
authored
ilm:1.4.2 (#3492)
1 parent b26445b commit 1977b6c

File tree

7 files changed

+796
-0
lines changed

7 files changed

+796
-0
lines changed

packages/preview/ilm/1.4.2/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MIT No Attribution
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this
4+
software and associated documentation files (the "Software"), to deal in the Software
5+
without restriction, including without limitation the rights to use, copy, modify,
6+
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
7+
permit persons to whom the Software is furnished to do so.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
10+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
11+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
12+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
13+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# ‘Ilm
2+
3+
> ‘Ilm (Urdu: عِلْم) is the Urdu term for knowledge. It is pronounced as [/ə.ləm/](https://en.wiktionary.org/wiki/%D8%B9%D9%84%D9%85#Urdu).
4+
5+
A versatile, clean and minimal template for non-fiction writing. The template is ideal for
6+
class notes, reports, and books.
7+
8+
It contains a title page, a table of contents, and indices for different types of figures;
9+
images, tables, code blocks.
10+
11+
Dynamic running footer contains the title of the chapter (top-level heading).
12+
13+
See the [example.pdf](https://github.com/talal/ilm/blob/main/example.pdf) file to see how it looks.
14+
15+
## Usage
16+
17+
You can use this template in the Typst web app by clicking "Start from template" on the
18+
dashboard and searching for `ilm`.
19+
20+
Alternatively, you can use the CLI to kick this project off using the command:
21+
22+
```sh
23+
typst init @preview/ilm
24+
```
25+
26+
Typst will create a new directory with all the files needed to get you started.
27+
28+
The template will initialize your package with a sample call to the `ilm` function in a
29+
show rule. If you, however, want to change an existing project to use this template, you
30+
can add a show rule like this at the top of your file:
31+
32+
```typ
33+
#import "@preview/ilm:1.4.2": *
34+
35+
#set text(lang: "en")
36+
37+
#show: ilm.with(
38+
title: [Your Title],
39+
author: "Max Mustermann",
40+
date: datetime(year: 2024, month: 03, day: 19),
41+
abstract: [#lorem(30)],
42+
bibliography: bibliography("refs.bib"),
43+
figure-index: (enabled: true),
44+
table-index: (enabled: true),
45+
listing-index: (enabled: true)
46+
)
47+
48+
// Your content goes below.
49+
```
50+
51+
> [!NOTE]
52+
> This template uses the [Iosevka] font for raw text. In order to use Iosevka,
53+
> the font must be installed on your computer. In case Iosevka is not installed, as will be
54+
> the case for Typst Web App, then the template will fall back to the default "Fira Mono"
55+
> font.
56+
57+
## Configuration
58+
59+
This template exports the `ilm` function with the following named arguments:
60+
61+
| Argument | Default Value | Type | Description |
62+
| --- | --- | --- | --- |
63+
| `title` | `Your Title` | [content] | The title for your work. |
64+
| `author` | `Author` | [string] | A string to specify the author's name |
65+
| `paper-size` | `a4` | [string] | Specify a [paper size string] to change the page size. |
66+
| `date` | `none` | [datetime] | The date that will be displayed on the cover page. |
67+
| `date-format` | `[month repr:long] [day padding:zero], [year repr:full]` | [string] | The format for the date that will be displayed on the cover page. By default, the date will be displayed as `MMMM DD, YYYY`. |
68+
| `abstract` | `none` | [content] | A brief summary/description of your work. This is shown on the cover page. |
69+
| `preface` | `none` | [content] | The preface for your work. The preface content is shown on its own separate page after the cover. |
70+
| `chapter-pagebreak` | `true` | [bool] | Setting this to `false` will prevent chapters from starting on a new page. |
71+
| `external-link-circle` | `true` | [bool] | Setting this to `false` will disable the maroon circle that is shown next to external links. |
72+
| `raw-text` | `(use-typst-defaults: false, custom-font: ("Iosevka", "Fira Mono")), custom-size: 9pt)` | [dictionary] | Setting `use-typst-defaults` to `true` will disable 'Ilm's custom formatting for raw text. |
73+
| `table-of-contents` | `outline()` | [content] | The result of a call to the [outline function][outline] or none. Setting this to `none` will disable the table of contents. |
74+
| `appendix` | `(enabled: false, title: "Appendix", heading-numbering-format: "A.1.1.", body: none)` | [dictionary] | Setting `enabled` to `true` and defining your content in `body` will display the appendix after the main body of your document and before the bibliography. |
75+
| `bibliography` | `none` | [content] | The result of a call to the [bibliography function][bibliography] or none. Specifying this will configure numeric, IEEE-style citations. |
76+
| `figure-index` | `(enabled: false, title: "Index of Figures")` | [dictionary] | Setting this to `true` will display an index of image figures at the end of the document. |
77+
| `table-index` | `(enabled: false, title: "Index of Tables")` | [dictionary] | Setting this to `true` will display an index of table figures at the end of the document. |
78+
| `listing-index` | `(enabled: false, title: "Index of Listings")` | [dictionary] | Setting this to `true` will display an index of listing (code block) figures at the end of the document. |
79+
80+
The above table gives you a _brief description_ of the different options that you can
81+
choose to customize the template. For a detailed explanation of these options, see the
82+
[example.pdf](https://github.com/talal/ilm/blob/main/example.pdf) file.
83+
84+
The function also accepts a single, positional argument for the body.
85+
86+
> [!NOTE]
87+
> The language setting for text (`lang` parameter of `text` function) should be
88+
> defined before the `ilm` function so that headings such as table of contents and
89+
> bibliography will be defined as per the text language.
90+
91+
[iosevka]: https://typeof.net/Iosevka/
92+
[bibliography]: https://typst.app/docs/reference/model/bibliography/
93+
[outline]: https://typst.app/docs/reference/model/outline/
94+
[bool]: https://typst.app/docs/reference/foundations/bool/
95+
[content]: https://typst.app/docs/reference/foundations/content/
96+
[datetime]: https://typst.app/docs/reference/foundations/datetime/
97+
[dictionary]: https://typst.app/docs/reference/foundations/dictionary/
98+
[paper size string]: https://typst.app/docs/reference/layout/page#parameters-paper
99+
[string]: https://typst.app/docs/reference/foundations/str/

0 commit comments

Comments
 (0)