diff --git a/packages/preview/ilm/1.4.2/LICENSE b/packages/preview/ilm/1.4.2/LICENSE new file mode 100644 index 0000000000..fc06cc4fe4 --- /dev/null +++ b/packages/preview/ilm/1.4.2/LICENSE @@ -0,0 +1,14 @@ +MIT No Attribution + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/preview/ilm/1.4.2/README.md b/packages/preview/ilm/1.4.2/README.md new file mode 100644 index 0000000000..49d7493c1a --- /dev/null +++ b/packages/preview/ilm/1.4.2/README.md @@ -0,0 +1,99 @@ +# ‘Ilm + +> ‘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). + +A versatile, clean and minimal template for non-fiction writing. The template is ideal for +class notes, reports, and books. + +It contains a title page, a table of contents, and indices for different types of figures; +images, tables, code blocks. + +Dynamic running footer contains the title of the chapter (top-level heading). + +See the [example.pdf](https://github.com/talal/ilm/blob/main/example.pdf) file to see how it looks. + +## Usage + +You can use this template in the Typst web app by clicking "Start from template" on the +dashboard and searching for `ilm`. + +Alternatively, you can use the CLI to kick this project off using the command: + +```sh +typst init @preview/ilm +``` + +Typst will create a new directory with all the files needed to get you started. + +The template will initialize your package with a sample call to the `ilm` function in a +show rule. If you, however, want to change an existing project to use this template, you +can add a show rule like this at the top of your file: + +```typ +#import "@preview/ilm:1.4.2": * + +#set text(lang: "en") + +#show: ilm.with( + title: [Your Title], + author: "Max Mustermann", + date: datetime(year: 2024, month: 03, day: 19), + abstract: [#lorem(30)], + bibliography: bibliography("refs.bib"), + figure-index: (enabled: true), + table-index: (enabled: true), + listing-index: (enabled: true) +) + +// Your content goes below. +``` + +> [!NOTE] +> This template uses the [Iosevka] font for raw text. In order to use Iosevka, +> the font must be installed on your computer. In case Iosevka is not installed, as will be +> the case for Typst Web App, then the template will fall back to the default "Fira Mono" +> font. + +## Configuration + +This template exports the `ilm` function with the following named arguments: + +| Argument | Default Value | Type | Description | +| --- | --- | --- | --- | +| `title` | `Your Title` | [content] | The title for your work. | +| `author` | `Author` | [string] | A string to specify the author's name | +| `paper-size` | `a4` | [string] | Specify a [paper size string] to change the page size. | +| `date` | `none` | [datetime] | The date that will be displayed on the cover page. | +| `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`. | +| `abstract` | `none` | [content] | A brief summary/description of your work. This is shown on the cover page. | +| `preface` | `none` | [content] | The preface for your work. The preface content is shown on its own separate page after the cover. | +| `chapter-pagebreak` | `true` | [bool] | Setting this to `false` will prevent chapters from starting on a new page. | +| `external-link-circle` | `true` | [bool] | Setting this to `false` will disable the maroon circle that is shown next to external links. | +| `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. | +| `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. | +| `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. | +| `bibliography` | `none` | [content] | The result of a call to the [bibliography function][bibliography] or none. Specifying this will configure numeric, IEEE-style citations. | +| `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. | +| `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. | +| `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. | + +The above table gives you a _brief description_ of the different options that you can +choose to customize the template. For a detailed explanation of these options, see the +[example.pdf](https://github.com/talal/ilm/blob/main/example.pdf) file. + +The function also accepts a single, positional argument for the body. + +> [!NOTE] +> The language setting for text (`lang` parameter of `text` function) should be +> defined before the `ilm` function so that headings such as table of contents and +> bibliography will be defined as per the text language. + +[iosevka]: https://typeof.net/Iosevka/ +[bibliography]: https://typst.app/docs/reference/model/bibliography/ +[outline]: https://typst.app/docs/reference/model/outline/ +[bool]: https://typst.app/docs/reference/foundations/bool/ +[content]: https://typst.app/docs/reference/foundations/content/ +[datetime]: https://typst.app/docs/reference/foundations/datetime/ +[dictionary]: https://typst.app/docs/reference/foundations/dictionary/ +[paper size string]: https://typst.app/docs/reference/layout/page#parameters-paper +[string]: https://typst.app/docs/reference/foundations/str/ diff --git a/packages/preview/ilm/1.4.2/lib.typ b/packages/preview/ilm/1.4.2/lib.typ new file mode 100644 index 0000000000..d4fb3877fa --- /dev/null +++ b/packages/preview/ilm/1.4.2/lib.typ @@ -0,0 +1,325 @@ +// Workaround for the lack of an `std` scope. +#let std-bibliography = bibliography +#let std-smallcaps = smallcaps +#let std-upper = upper + +// Overwrite the default `smallcaps` and `upper` functions with increased spacing between +// characters. Default tracking is 0pt. +#let smallcaps(body) = std-smallcaps(text(tracking: 0.6pt, body)) +#let upper(body) = std-upper(text(tracking: 0.6pt, body)) + +// Colors used across the template. +#let stroke-color = luma(200) +#let fill-color = luma(250) + +// This function gets your whole document as its `body`. +#let ilm( + // The title for your work. + title: [Your Title], + // Author's name. + author: "Author", + // The paper size to use. + paper-size: "a4", + // Date that will be displayed on cover page. + // The value needs to be of the 'datetime' type. + // More info: https://typst.app/docs/reference/foundations/datetime/ + // Example: datetime(year: 2024, month: 03, day: 17) + date: none, + // Format in which the date will be displayed on cover page. + // More info: https://typst.app/docs/reference/foundations/datetime/#format + // The default format will display date as: MMMM DD, YYYY + date-format: "[month repr:long] [day padding:zero], [year repr:full]", + // An abstract for your work. Can be omitted if you don't have one. + abstract: none, + // The contents for the preface page. This will be displayed after the cover page. Can + // be omitted if you don't have one. + preface: none, + // The result of a call to the `outline` function or `none`. + // Set this to `none`, if you want to disable the table of contents. + // More info: https://typst.app/docs/reference/model/outline/ + table-of-contents: outline(), + // Display an appendix after the body but before the bibliography. + appendix: ( + enabled: false, + title: "", + heading-numbering-format: "", + body: none, + ), + // The result of a call to the `bibliography` function or `none`. + // Example: bibliography("refs.bib") + // More info: https://typst.app/docs/reference/model/bibliography/ + bibliography: none, + // Whether to start a chapter on a new page. + chapter-pagebreak: true, + // Whether to display a maroon circle next to external links. + external-link-circle: true, + // Raw text customization + raw-text: ( + use-typst-defaults: false, + // List of fonts in order of priority. + custom-font: ("Iosevka", "Fira Mono"), + custom-size: 9pt, + ), + // Display an index of figures (images). + figure-index: ( + enabled: false, + title: "", + ), + // Display an index of tables + table-index: ( + enabled: false, + title: "", + ), + // Display an index of listings (code blocks). + listing-index: ( + enabled: false, + title: "", + ), + // The content of your work. + body, +) = { + // Set the document's metadata. + set document(title: title, author: author) + + // Set the body font. + set text(size: 12pt) // default is 11pt + + // Customize raw text formatting. + show raw: it => { + if raw-text.at("use-typst-defaults", default: false) { + it + } else { + set text( + // Reference: Typst's default is Fira Mono at 8.8pt + font: raw-text.at("custom-font", default: ("Iosevka", "Fira Mono")), + size: raw-text.at("custom-size", default: 9pt), + ) + it + } + } + + // Configure page size and margins. + set page( + paper: paper-size, + margin: (bottom: 1.75cm, top: 2.25cm), + ) + + // Cover page. + page( + align( + left + horizon, + block(width: 90%)[ + #let v-space = v(2em, weak: true) + #text(3em)[*#title*] + + #v-space + #text(1.6em, author) + + #if abstract != none { + v-space + block(width: 80%)[ + // Default leading is 0.65em. + #par(leading: 0.78em, justify: true, linebreaks: "optimized", abstract) + ] + } + + #if date != none { + v-space + text(date.display(date-format)) + } + ], + ), + ) + + // Configure paragraph properties. + // Default leading is 0.65em. + // Default spacing is 1.2em. + set par(leading: 0.7em, spacing: 1.35em, justify: true, linebreaks: "optimized") + + // Add vertical space after headings. + show heading: it => { + it + v(2%, weak: true) + } + // Do not hyphenate headings. + show heading: set text(hyphenate: false) + + // Show a small maroon circle next to external links. + show link: it => { + it + // Workaround for ctheorems package so that its labels keep the default link styling. + if external-link-circle and type(it.dest) != label { + sym.wj + h(1.6pt) + sym.wj + super(box(height: 3.8pt, circle(radius: 1.2pt, stroke: 0.7pt + rgb("#993333")))) + } + } + + // Display preface as the second page. + if preface != none { + page(preface) + } + + // Display table of contents. + if table-of-contents != none { + table-of-contents + } + + // Configure page numbering and footer. + set page( + footer: context { + // Get current page number. + let i = counter(page).at(here()).first() + + // Align right for even pages and left for odd. + let is-odd = calc.odd(i) + let aln = if is-odd { + right + } else { + left + } + + // Are we on a page that starts a chapter? + let target = heading.where(level: 1) + if query(target).any(it => it.location().page() == i) { + return align(aln)[#i] + } + + // Find the chapter of the section we are currently in. + let before = query(target.before(here())) + if before.len() > 0 { + let current = before.last() + let gap = 1.75em + let chapter = upper(text(size: 0.68em, current.body)) + if current.numbering != none { + if is-odd { + align(aln)[#chapter #h(gap) #i] + } else { + align(aln)[#i #h(gap) #chapter] + } + } + } + }, + ) + + // Configure equation numbering. + set math.equation(numbering: "(1)") + + // Display inline code in a small box that retains the correct baseline. + show raw.where(block: false): box.with( + fill: fill-color.darken(2%), + inset: (x: 3pt, y: 0pt), + outset: (y: 3pt), + radius: 2pt, + ) + + // Display block code with padding. + show raw.where(block: true): block.with(inset: (x: 5pt)) + + // Break large tables across pages. + show figure.where(kind: table): set block(breakable: true) + set table( + // Increase the table cell's padding + inset: 7pt, // default is 5pt + stroke: (0.5pt + stroke-color), + ) + // Use smallcaps for table header row. + show table.cell.where(y: 0): smallcaps + + // Wrap `body` in curly braces so that it has its own context. This way show/set rules + // will only apply to body. + { + // Configure heading numbering. + set heading(numbering: "1.") + + // Start chapters on a new page. + show heading.where(level: 1): it => { + if chapter-pagebreak { + pagebreak(weak: true) + } + it + } + body + } + + // Display appendix before the bibliography. + if appendix.enabled { + pagebreak() + heading(level: 1)[#appendix.at("title", default: "Appendix")] + + // For heading prefixes in the appendix, the standard convention is A.1.1. + let num-fmt = appendix.at("heading-numbering-format", default: "A.1.1.") + + counter(heading).update(0) + set heading( + outlined: false, + numbering: (..nums) => { + let vals = nums.pos() + if vals.len() > 0 { + let v = vals.slice(0) + return numbering(num-fmt, ..v) + } + }, + ) + + appendix.body + } + + // Display bibliography. + if bibliography != none { + pagebreak() + show std-bibliography: set text(0.85em) + // Use default paragraph properties for bibliography. + show std-bibliography: set par(leading: 0.65em, justify: false, linebreaks: auto) + bibliography + } + + // Display indices of figures, tables, and listings. + let fig-t(kind) = figure.where(kind: kind) + let has-fig(kind) = counter(fig-t(kind)).get().at(0) > 0 + if figure-index.enabled or table-index.enabled or listing-index.enabled { + show outline: set heading(outlined: true) + context { + let imgs = figure-index.enabled and has-fig(image) + let tbls = table-index.enabled and has-fig(table) + let lsts = listing-index.enabled and has-fig(raw) + if imgs or tbls or lsts { + // Note that we pagebreak only once instead of each each individual index. This is + // because for documents that only have a couple of figures, starting each index + // on new page would result in superfluous whitespace. + pagebreak() + } + + if imgs { + outline( + title: figure-index.at("title", default: "Index of Figures"), + target: fig-t(image), + ) + } + if tbls { + outline( + title: table-index.at("title", default: "Index of Tables"), + target: fig-t(table), + ) + } + if lsts { + outline( + title: listing-index.at("title", default: "Index of Listings"), + target: fig-t(raw), + ) + } + } + } +} + +// This function formats its `body` (content) into a blockquote. +#let blockquote(body) = { + block( + width: 100%, + fill: fill-color, + inset: 2em, + stroke: (y: 0.5pt + stroke-color), + body, + ) +} diff --git a/packages/preview/ilm/1.4.2/template/main.typ b/packages/preview/ilm/1.4.2/template/main.typ new file mode 100644 index 0000000000..87008e97ad --- /dev/null +++ b/packages/preview/ilm/1.4.2/template/main.typ @@ -0,0 +1,331 @@ +#import "@preview/ilm:1.4.2": * + +#set text(lang: "en") + +#show: ilm.with( + title: [The Beauty of\ Sharing Knowledge], + author: "Max Mustermann", + date: datetime(year: 2024, month: 03, day: 19), + abstract: [ + 'Ilm (Urdu: #text(lang: "ur", font: ("Noto Nastaliq Urdu", "Noto Naskh Arabic"), size: 0.8em)[عِلْم]) is the Urdu term for knowledge. In its general usage, 'ilm may refer to knowledge of any specific thing or any form of "learning". Subsequently, the term came to be used to refer to various categories of "sciences", especially when used in its plural form ('ulum). + ], + preface: [ + #align(center + horizon)[ + Thank you for using this template #emoji.heart,\ I hope you like it #emoji.face.smile + ] + ], + bibliography: bibliography("refs.bib"), + figure-index: (enabled: true), + table-index: (enabled: true), + listing-index: (enabled: true), +) + += Layout +The template uses `A4` as its page size, you can specify a different #link("https://typst.app/docs/reference/layout/page#parameters-paper")[paper size string] using: + +```typst +#show: ilm.with( + paper-size: "us-letter", +) +``` + +'Ilm display's its content in the following order: ++ Cover page ++ Preface page (if defined) ++ Table of contents (unless disabled) ++ Body (your main content) ++ Appendix (if defined) ++ Bibliography (if defined) ++ Indices (if enabled) --- index of figures (images), tables, or listings (code blocks) + +== Cover +The cover/title page has a title, author, date, and abstract which is a short description shown under the author name: + +```typst +#show: ilm.with( + title: [Your Title], + author: "Author Name", + date: datetime(year: 2024, month: 03, day: 19), + abstract: [Your content goes here], +) +``` + +Only the `title` and `author` fields are necessary; `date` and `abstract` are optional. + +By default, the date is shown in the format: `MMMM DD, YYYY`. You can change the date format by specifying a different format string: + +```typst +#show: ilm.with( + date-format: "[month repr:long] [day padding:zero], [year repr:full]", +) +``` + +See Typst's #link("https://typst.app/docs/reference/foundations/datetime/#format")[official documentation] for more info on how date format strings are defined. + +== Preface +The preface content is shown on its own separate page after the cover page. + +You can define it using: + +```typst +#show: ilm.with( + preface: [ + = Preface Heading + Your content goes here. + ], +) +``` + +#emoji.fire Tip: if your preface is quite long then you can define it in a separate file and import it in the template definition like so: + +```typst +#show: ilm.with( + // Assuming your file is called `preface.typ` and is + // located in the same directory as your main Typst file. + preface: [#include "preface.typ"], +) +``` + +== Table of Contents +By default, 'Ilm display a table of contents before the body (your main content). You can disable this behavior using: + +```typst +#show: ilm.with( + table-of-contents: none, +) +``` + +The `table-of-contents` option accepts the result of a call to the `outline()` function, so if you want to customize the behavior of table of contents then you can specify a custom `outline()` function: + +```typst +#show: ilm.with( + table-of-contents: outline(title: "custom title"), +) +``` + +See Typst's #link("https://typst.app/docs/reference/model/outline/")[official documentation] for more information. + +== Body +By default, the template will insert a #link("https://typst.app/docs/reference/layout/pagebreak/")[pagebreak] before each chapter, i.e. first-level heading. You can disable this behavior using: + +```typst +#show: ilm.with( + chapter-pagebreak: false, +) +``` + +== Appendices +The template can display different appendix, if you enable and define it: + +```typst +#show: ilm.with( + appendix: ( + enabled: true, + title: "Appendix", // optional + heading-numbering-format: "A.1.1.", // optional + body: [ + = First Appendix + = Second Appendix + ], + ), +) +``` + +The `title` and `heading-numbering-format` options can be omitted as they are optional and will default to predefined values. + +#emoji.fire Tip: if your appendix is quite long then you can define it in a separate file and import it in the template definition like so: + +```typst +#show: ilm.with( + appendix: ( + enabled: true, + // Assuming your file is called `appendix.typ` and is + // located in the same directory as your main Typst file. + body: [#include "appendix.typ"], + ), +) +``` + +== Bibliography +If your document contains references and you want to display a bibliography/reference listing at the end of the document but before the indices then you can do so by defining `bibliography` option: + +```typst +#show: ilm.with( + // Assuming your file is called `refs.bib` and is + // located in the same directory as your main Typst file. + bibliography: bibliography("refs.bib"), +) +``` + +The `bibliography` option accepts the result of a call to the `bibliography()` function, so if you want to customize the behavior of table of contents then you can do so by customizing the `bibliography()` function that you specify here. See Typst's #link("https://typst.app/docs/reference/model/bibliography/")[official documentation] for more information. + +== Indices +The template also displays an index of figures (images), tables, and listings (code blocks) at the end of the document, if you enable them: + +```typst +#show: ilm.with( + figure-index: ( + enabled: true, + title: "Index of Figures" // optional + ), + table-index: ( + enabled: true, + title: "Index of Tables" // optional + ), + listing-index: ( + enabled: true, + title: "Index of Listings" // optional + ), +) +``` + +The `title` option can be omitted as it is optional and will default to predefined values. + +== Footer +If a page does not begin with a chapter then the chapter's name, to which the current section belongs to, is shown in the footer. + +Look at the page numbering for the current page down below. It will show "#upper[Layout]" next to the page number because the current subheading _Footer_ is part of the _Layout_ chapter. + +When we say chapter, we mean the the first-level or top-level heading which is defined using a single equals sign (`=`). + += Text +Typst defaults to English for the language of the text. If you are writing in a different language then you need to define you language before the 'Ilm template is loaded, i.e. before the `#show: ilm.with()` like so: + +```typst +#set text(lang: "de") +#show: ilm.with( + // 'Ilm's options defined here. +) +``` + +By defining the language before the template is loaded, 'Ilm will set title for bibliography and table of contents as per your language settings as long as you haven't customized it already. + +== External links +'Ilm adds a small maroon circle to external (outgoing) links #link("https://github.com/talal/ilm")[like so]. + +This acts as a hint for the reader so that they know that a specific text is a hyperlink. This is far better than #underline[underlining a hyperlink] or making it a #text(fill: blue)[different color]. Don't you agree? + +If you want to disable this behavior then you can do so by setting the concerning option to `false`: + +```typst +#show: ilm.with( + external-link-circle: false, +) +``` + +== Blockquotes +'Ilm also exports a `blockquote` function which can be used to create blockquotes. The function has one argument: `body` of the type content and can be used like so: + +```typst +#blockquote[ + A wizard is never late, Frodo Baggins. Nor is he early. He arrives precisely when he means to. + --- Gandalf +] +``` + +The above code will render the following: + +#blockquote[ + A wizard is never late, Frodo Baggins. Nor is he early. He arrives precisely when he means to. + --- Gandalf +] + +== Small- and all caps +'Ilm also exports functions for styling text in small caps and uppercase, namely: `smallcaps` and `upper` respectively. + +These functions will overwrite the standard #link("https://typst.app/docs/reference/text/smallcaps/")[`smallcaps`] and #link("https://typst.app/docs/reference/text/upper/")[`upper`] functions that Typst itself provides. This behavior is intentional as the functions that 'Ilm exports fit in better with the rest of the template's styling. + +Here is how Typst's own #std-smallcaps[smallcaps] and #std-upper[upper] look compared to the 'Ilm ones:\ +#hide[Here is how Typst's own ] #smallcaps[smallcaps] and #upper[upper] + +They both look similar, the only difference being that 'Ilm uses more spacing between individual characters. + +If you prefer Typst's default spacing then you can still use it by prefixing `std-` to the functions: + +```typst +#std-smallcaps[your content here] +#std-upper[your content here] +``` + +== Tables +In order to increase the focus on table content, we minimize the table's borders by using thin gray lines instead of thick black ones. Additionally, we use small caps for the header row. Take a look at the table below: + +#let unit(u) = math.display(math.upright(u)) +#let si-table = table( + columns: 3, + table.header[Quantity][Symbol][Unit], + [length], [$l$], [#unit("m")], + [mass], [$m$], [#unit("kg")], + [time], [$t$], [#unit("s")], + [electric current], [$I$], [#unit("A")], + [temperature], [$T$], [#unit("K")], + [amount of substance], [$n$], [#unit("mol")], + [luminous intensity], [$I_v$], [#unit("cd")], +) + +#figure(caption: ['Ilm's styling], si-table) + +For comparison, this is how the same table would look with Typst's default styling: + +#[ + #set table(inset: 5pt, stroke: 1pt + black) + #show table.cell.where(y: 0): it => { + v(0.5em) + h(0.5em) + it.body.text + h(0.5em) + v(0.5em) + } + #figure(caption: [Typst's default styling], si-table) +] + += Code +== Custom formatting +'Ilm uses the _Iosevka_@wikipedia_iosevka font for raw text instead of the default _Fira Mono_. If Iosevka is not installed then the template will fall back to Fira Mono. + +#let snip(cap) = figure(caption: cap)[ + ```rust + fn main() { + let user = ("Adrian", 38); + println!("User {} is {} years old", user.0, user.1); + + // tuples within tuples + let employee = (("Adrian", 38), "die Mobiliar"); + println!("User {} is {} years old and works for {}", employee.0.1, employee.0.1, employee.1); + } + ``` +] + +#[ + #show raw: set text(font: "Fira Mono") + For comparison, here is what `code` in Fira Mono looks like: + #snip("Code snippet typeset in Fira Mono font") +] + +#[ + #show raw: set text(font: ("Iosevka", "Fira Mono")) + and here is how the same `code` looks in Iosevka: + #snip("Code snippet typeset in Iosevka font") +] + +In the case that both code snippets look identical then it means that Iosevka is not installed on your computer. + +You can disable 'Ilm's custom raw text formatting using the `raw-text` option: + +```typst +#show: ilm.with( + raw-text: ( + use-typst-defaults: true, + ), +) +``` + +Additionally, you can specify your own custom font and size using: + +```typst +#show: ilm.with( + raw-text: ( + // custom-font takes a list of fonts in order of priority. + custom-font: ("JetBrains Mono", "Cascadia Mono"), + custom-size: 10pt, + ), +) +``` diff --git a/packages/preview/ilm/1.4.2/template/refs.bib b/packages/preview/ilm/1.4.2/template/refs.bib new file mode 100644 index 0000000000..3b9966ad6a --- /dev/null +++ b/packages/preview/ilm/1.4.2/template/refs.bib @@ -0,0 +1,11 @@ +@misc{wikipedia_iosevka, + title = {Iosevka}, + year = 2024, + month = mar, + journal = {Wikipedia}, + url = {https://en.wikipedia.org/w/index.php?title=Iosevka&oldid=1217127968}, + urldate = {2024-06-18}, + copyright = {Creative Commons Attribution-ShareAlike License}, + note = {Page Version ID: 1217127968}, + language = {en} +} diff --git a/packages/preview/ilm/1.4.2/thumbnail.png b/packages/preview/ilm/1.4.2/thumbnail.png new file mode 100644 index 0000000000..d63740ff7f Binary files /dev/null and b/packages/preview/ilm/1.4.2/thumbnail.png differ diff --git a/packages/preview/ilm/1.4.2/typst.toml b/packages/preview/ilm/1.4.2/typst.toml new file mode 100644 index 0000000000..488020b30f --- /dev/null +++ b/packages/preview/ilm/1.4.2/typst.toml @@ -0,0 +1,16 @@ +[package] +name = "ilm" +version = "1.4.2" +compiler = "0.14.0" +entrypoint = "lib.typ" +repository = "https://github.com/talal/ilm" +authors = ["Muhammad Talal Anwar <@talal>"] +license = "MIT-0" +description = "Versatile and minimal template for non-fiction writing. Ideal for class notes, reports, and books" +keywords = ["notes", "script", "report", "book", "novel", "non-fiction", "running footer", "class", "lecture"] +categories = ["book", "report"] + +[template] +path = "template" +entrypoint = "main.typ" +thumbnail = "thumbnail.png"