forked from typst/packages
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'typst:main' into release-0.5.1
- Loading branch information
Showing
3,511 changed files
with
431,489 additions
and
19 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Jonathan Halmen | ||
|
||
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, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Abbr -- eviations made simple | ||
|
||
Short package for making the handling of abbreviations, acronyms, and | ||
initialisms _easy_. | ||
|
||
Declare your abbreviations anywhere, use everywhere -- they get picked up | ||
automatically. | ||
|
||
## Features | ||
- Automatic plurals, with optional overrides. | ||
- Automatic 1- or 2-column sorted list of abbreviations | ||
- Automatic links to list of abbreviations, if included. | ||
- styling configuration | ||
|
||
## Getting started | ||
|
||
```typst | ||
#import "@preview/abbr:0.1.1" | ||
#abbr.list() | ||
#abbr.make( | ||
("PDE", "Partial Differential Equation"), | ||
("BC", "Boundary Condition"), | ||
("DOF", "Degree of Freedom", "Degrees of Freedom"), | ||
) | ||
= Constrained Equations | ||
#abbr.pla[BC] constrain the #abbr.pla[DOF] of the #abbr.pla[PDE] they act on.\ | ||
#abbr.pla[BC] constrain the #abbr.pla[DOF] of the #abbr.pla[PDE] they act on. | ||
#abbr.add("MOL", "Method of Lines") | ||
The #abbr.a[MOL] is a procedure to solve #abbr.pla[PDE] in time. | ||
``` | ||
 | ||
|
||
|
||
## API Reference | ||
### Configuration | ||
- **style**`(func)`\ | ||
Set a callable for styling the short version in the text. | ||
|
||
### Creation | ||
- **add**`(short, long, long-plural)`\ | ||
Add single entry to use later.\ | ||
`long-plural` is *optional*, if not given but used, an `s` is appended to create a | ||
plural. | ||
|
||
- **make**`(list, of, entries)`\ | ||
Add multiple entries, each of the form `(short, long, long-plural)`. | ||
|
||
### Listing | ||
- **list**`(title)`\ | ||
Create an outline with all abbreviations in short and expanded form | ||
|
||
### Usage | ||
- **s**`()` - short\ | ||
force short form of abbreviation | ||
- **l**`()` - long\ | ||
force long form of abbreviation | ||
- **a**`()` - auto\ | ||
first occurence will be long form, the rest short | ||
- **pls**`()` - plural short\ | ||
plural short form | ||
- **pll**`()` - plural long\ | ||
plural long form | ||
- **pl**`()` - plural automatic\ | ||
plural. first occurence long form, then short | ||
|
||
|
||
## Why yet another Abbreviations package? | ||
|
||
This mostly exists because I started working on it before checking if somebody | ||
already made a package for it. After I saw that e.g. `acrotastic` exists, I kept | ||
convincing myself a new package still makes sense for the following reasons: | ||
* Getting to know Typst | ||
* More automatic handling than other packages | ||
* Ability to keep keys as [Content] instead of having to stringify everything | ||
|
||
Especially the last part seems to lower the friction of writing for me. It seems | ||
silly, I know. | ||
|
||
## Contributing | ||
|
||
Please head over to the [hub](https://sr.ht/~slowjo/typst-packages) to find the | ||
mailing list and ticket tracker. | ||
|
||
Or simply reach out on IRC ([#typst on | ||
libera.chat](https://web.libera.chat/gamja/?autojoin=#typst))! |
Oops, something went wrong.