Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07c8fa50f9
|
||
|
|
8da80916df
|
||
|
|
588eca1c7d | ||
|
|
7f3183bd92 | ||
|
|
3e70585ffa | ||
|
|
1230057477 | ||
|
|
60a54cccf5 | ||
|
|
7ad3c5ad65
|
||
|
|
079e80edb2
|
||
|
|
4761b49867
|
||
|
|
e4c1350ebc
|
||
|
|
b0dac5f91a | ||
|
|
d0e7fe4371
|
||
|
|
0cd345a123
|
||
|
|
d296f3a3f1
|
||
|
|
338fee564f
|
||
|
|
a76b261348
|
||
|
|
093fcf88fd
|
||
|
|
1e095a8b26
|
||
|
|
5ad6c10b65
|
No files matched your search
@@ -11,6 +11,8 @@ links below to their main page.
|
|||||||
- [**codly-languages**](https://typst.app/universe/package/codly-languages): A
|
- [**codly-languages**](https://typst.app/universe/package/codly-languages): A
|
||||||
set of language configurations for use with
|
set of language configurations for use with
|
||||||
[codly](https://typst.app/universe/package/codly).
|
[codly](https://typst.app/universe/package/codly).
|
||||||
|
- [easy-typography](https://typst.app/universe/package/easy-typography): Sets up
|
||||||
|
sensible typography defaults.
|
||||||
- [**glossy**](https://typst.app/universe/package/glossy): A very simple
|
- [**glossy**](https://typst.app/universe/package/glossy): A very simple
|
||||||
glossary system with easily customizable output.
|
glossary system with easily customizable output.
|
||||||
- [**rfc-vibe**](https://typst.app/universe/package/rfc-vibe): Bring RFC language
|
- [**rfc-vibe**](https://typst.app/universe/package/rfc-vibe): Bring RFC language
|
||||||
@@ -19,6 +21,9 @@ links below to their main page.
|
|||||||
create various run-in lists.
|
create various run-in lists.
|
||||||
- [**swank-tex**](https://typst.app/universe/package/swank-tex): Render those
|
- [**swank-tex**](https://typst.app/universe/package/swank-tex): Render those
|
||||||
funky logos for TeX, LaTeX, and friends.
|
funky logos for TeX, LaTeX, and friends.
|
||||||
|
- [**tasteful-pairings**](https://typst.app/universe/package/tasteful-pairings):
|
||||||
|
A carefully curated collection of font pairings focusing on readability and
|
||||||
|
typographic harmony.
|
||||||
|
|
||||||
## Templates
|
## Templates
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# remove-diff-out.sh
|
||||||
|
#
|
||||||
|
# Removes all files (including hidden) in any <pkg>/tests/<test>/diff or out directories.
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# 1) Make the shell match hidden files (dotfiles) in globs.
|
||||||
|
# 2) Let an empty glob expand to zero arguments rather than itself.
|
||||||
|
shopt -s dotglob nullglob
|
||||||
|
|
||||||
|
# 2) Loop over any matching directories: <pkg>/tests/<test>/{diff,out}
|
||||||
|
for dir in */tests/*/{diff,out}; do
|
||||||
|
# Only proceed if it's actually a directory
|
||||||
|
if [[ -d "$dir" ]]; then
|
||||||
|
echo "Removing files under: $dir"
|
||||||
|
# Remove everything inside (including hidden files)
|
||||||
|
rm -rf -- "$dir"/*
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Done!"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2024 Stephen Waits <steve@waits.net>
|
Copyright (c) 2025 Stephen Waits <steve@waits.net>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Configure `codly` with the languages. Like this:
|
|||||||
#import "@preview/codly:1.1.1": *
|
#import "@preview/codly:1.1.1": *
|
||||||
#show: codly-init
|
#show: codly-init
|
||||||
|
|
||||||
#import "@preview/codly-languages:0.1.4": *
|
#import "@preview/codly-languages:0.1.6": *
|
||||||
#codly(languages: codly-languages)
|
#codly(languages: codly-languages)
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -24,85 +24,38 @@ languages, should look like this:
|
|||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
The following languages are still missing. All contributions welcome.
|
Some languages are still missing. All contributions welcome.
|
||||||
|
|
||||||
- ASP
|
|
||||||
- ActionScript
|
|
||||||
- Ada
|
|
||||||
- AppleScript
|
|
||||||
- AsciiDoc
|
|
||||||
- Batch File
|
|
||||||
- CFML
|
|
||||||
- CSV
|
|
||||||
- Cabal
|
|
||||||
- Crontab
|
|
||||||
- D
|
|
||||||
- Diff
|
|
||||||
- DotENV
|
|
||||||
- Email
|
|
||||||
- Fish
|
|
||||||
- Fstab
|
|
||||||
- GLSL
|
|
||||||
- Graphviz
|
|
||||||
- Groff
|
|
||||||
- Group
|
|
||||||
- INI
|
|
||||||
- Jinja2
|
|
||||||
- Jsonnet
|
|
||||||
- Lean
|
|
||||||
- LiveScript
|
|
||||||
- Makefile
|
|
||||||
- MediaWiki
|
|
||||||
- NSIS
|
|
||||||
- Ninja
|
|
||||||
- Org mode
|
|
||||||
- Pascal
|
|
||||||
- Passwd
|
|
||||||
- Protobuf
|
|
||||||
- Puppet
|
|
||||||
- QML
|
|
||||||
- Racket
|
|
||||||
- Rego
|
|
||||||
- Regular Expressions
|
|
||||||
- Resolv
|
|
||||||
- RestructuredText
|
|
||||||
- Robot
|
|
||||||
- SLS
|
|
||||||
- SML
|
|
||||||
- Slim
|
|
||||||
- Strace
|
|
||||||
- SublimeEthereum
|
|
||||||
- SublimeJQ
|
|
||||||
- SystemVerilo
|
|
||||||
- TCL
|
|
||||||
- TOML
|
|
||||||
- Textile
|
|
||||||
- TodoTxt
|
|
||||||
- Verilog
|
|
||||||
- WGSL
|
|
||||||
- cmd-help
|
|
||||||
- gnuplot
|
|
||||||
- hosts
|
|
||||||
- http-request-response
|
|
||||||
- varlink
|
|
||||||
- vscode-wgsl
|
|
||||||
|
|
||||||
## Icon Attribution
|
## Icon Attribution
|
||||||
|
|
||||||
The `typst-small.png` icon included in this package came from the MIT-licensed
|
| **Icon** | **Source** | **License** |
|
||||||
[codly](https://github.com/Dherse/codly) project.
|
| ----------------- | --------------------------------------------- | -------------------------------- |
|
||||||
|
| `css3.svg` | [CSS-Next/logo.css][css3-source] | [CC0][css3-license] |
|
||||||
|
| `cuda.svg` | [vscode-icons/vscode-icons][cuda-source] | [MIT][cuda-license] |
|
||||||
|
| `lisp.svg` | [Wikipedia (User:Jooja)][lisp-source] | [CC BY-SA 4.0][lisp-license] |
|
||||||
|
| `nextflow.svg` | [nextflow-io/trademark][nextflow-source] | [Limited Use][nextflow-license] |
|
||||||
|
| `splunk.svg` | [denali-design/denali-icons][splunk-source] | [MIT][splunk-license] |
|
||||||
|
| `typst-small.png` | [Dherse/codly][typst-source] | [MIT][typst-license] |
|
||||||
|
|
||||||
The `lisp.svg` icon comes [from
|
[css3-source]: https://github.com/CSS-Next/logo.css/blob/main/css.svg?short_path=c59d4da
|
||||||
Wikipedia](https://commons.wikimedia.org/wiki/File:Lisp_logo.svg), attribution:
|
[css3-license]: https://github.com/CSS-Next/logo.css/blob/main/LICENSE
|
||||||
Jooja, CC BY-SA 4.0 <https://creativecommons.org/licenses/by-sa/4.0>, via
|
[cuda-source]: https://github.com/vscode-icons/vscode-icons/tree/master
|
||||||
Wikimedia Commons.
|
[cuda-license]: https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE
|
||||||
|
[lisp-source]: https://commons.wikimedia.org/wiki/File:Lisp_logo.svg
|
||||||
|
[lisp-license]: https://commons.wikimedia.org/wiki/File:Lisp_logo.svg#Licensing
|
||||||
|
[nextflow-source]: https://github.com/nextflow-io/trademark
|
||||||
|
[nextflow-license]: https://github.com/nextflow-io/trademark/blob/master/README.md
|
||||||
|
[splunk-source]: https://github.com/denali-design/denali-icons/blob/master/svg/splunk.svg
|
||||||
|
[splunk-license]: https://github.com/denali-design/denali-icons/blob/master/LICENSE.md
|
||||||
|
[typst-source]: https://github.com/Dherse/codly
|
||||||
|
[typst-license]: https://github.com/Dherse/codly/blob/main/LICENSE
|
||||||
|
|
||||||
The `cuda.svg` icon included in this package came from the MIT-licensed
|
All icons not listed in this table come from the
|
||||||
[vscode-icons](https://github.com/vscode-icons/vscode-icons) project.
|
[devicons/devicon][default-source] project, [MIT licensed][default-license].
|
||||||
|
|
||||||
All other icons included here came from the MIT-licensed
|
[default-source]: https://github.com/devicons/devicon/
|
||||||
[devicon](https://github.com/devicons/devicon/) project.
|
[default-license]: https://github.com/devicons/devicon/blob/master/LICENSE
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This package is released under the MIT License.
|
This package is released under the [MIT License](LICENSE).
|
||||||
@@ -1 +1,5 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#1572B6" d="M18.814 114.123L8.76 1.352h110.48l-10.064 112.754-45.243 12.543-45.119-12.526z"/><path fill="#33A9DC" d="M64.001 117.062l36.559-10.136 8.601-96.354h-45.16v106.49z"/><path fill="#fff" d="M64.001 51.429h18.302l1.264-14.163H64.001V23.435h34.682l-.332 3.711-3.4 38.114h-30.95V51.429z"/><path fill="#EBEBEB" d="M64.083 87.349l-.061.018-15.403-4.159-.985-11.031H33.752l1.937 21.717 28.331 7.863.063-.018v-14.39z"/><path fill="#fff" d="M81.127 64.675l-1.666 18.522-15.426 4.164v14.39l28.354-7.858.208-2.337 2.406-26.881H81.127z"/><path fill="#EBEBEB" d="M64.048 23.435v13.831H30.64l-.277-3.108-.63-7.012-.331-3.711h34.646zm-.047 27.996v13.831H48.792l-.277-3.108-.631-7.012-.33-3.711h16.447z"/></svg>
|
<!--from https://github.com/CSS-Next/logo.css/blob/main/css.svg?short_path=c59d4da cc0-->
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" role="img" aria-labelledby="css-logo-title css-logo-description">
|
||||||
|
<path id="bg" fill="#639" d="M0 0H840A160 160 0 0 1 1000 160V840A160 160 0 0 1 840 1000H160A160 160 0 0 1 0 840V0Z" />
|
||||||
|
<path id="fg" fill="#fff" d="m358.1,920c-64.23-.06-103.86-36.23-103.1-102.79,0,0,0-168.39,0-168.39,0-33.74,9.88-59.4,29.64-76.96,35.49-34.19,117.83-36.27,152.59.52,21.42,18.89,29.5,57.48,27.58,93.49h-73.72c.56-14.15-.19-35.58-8.51-43.65-10.81-14.63-39.36-12.91-46.91,2.32-4.64,8.26-6.96,20.49-6.96,36.67v146.18c0,30.65,10.65,46.15,31.96,46.49,9.96,0,17.53-3.62,22.68-10.85,7.19-8.58,8.31-27.58,7.73-41.32h73.72c5.04,70.07-36.32,119.16-106.71,118.29Zm234.04,0c-71.17.98-103.01-49.66-101.04-118.29h69.59c-1.93,29.92,8.35,57.17,32.99,55.27,10.99,0,18.73-3.44,23.2-10.33,8.5-12.59,10.09-48.95-2.06-63.02-8.49-13.55-39.03-25.51-55.16-33.57-23.03-11.02-39.61-24.1-49.75-39.26-22.87-33.64-20.75-107.48,11.34-137.4,31.18-36.92,112.61-38.62,143.82-.77,19.25,19.51,27.66,57.9,26.03,93.23h-67.02c.57-14.52-.8-37.95-6.44-46.49-3.95-7.23-11.43-10.85-22.42-10.85-19.59,0-29.38,11.71-29.38,35.12.21,24.86,9.9,35.06,32.48,45.45,29.24,11.36,66.42,30.76,79.9,54.24,40.2,71.54,12.62,180.82-86.09,176.65Zm224.76,0c-71.17.98-103.01-49.66-101.04-118.29h69.59c-1.93,29.92,8.35,57.17,32.99,55.27,10.99,0,18.73-3.44,23.2-10.33,8.5-12.59,10.09-48.95-2.06-63.02-8.49-13.55-39.03-25.51-55.16-33.57-23.03-11.02-39.61-24.1-49.75-39.26-22.87-33.64-20.75-107.48,11.34-137.4,31.18-36.92,112.61-38.62,143.82-.77,19.25,19.51,27.66,57.9,26.03,93.23h-67.02c.57-14.52-.8-37.95-6.44-46.49-3.95-7.23-11.43-10.85-22.42-10.85-19.59,0-29.38,11.71-29.38,35.12.21,24.86,9.9,35.06,32.48,45.45,29.24,11.36,66.42,30.76,79.9,54.24,40.2,71.54,12.62,180.82-86.09,176.65Z" />
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 778 B After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,6 @@
|
|||||||
|
<svg width="251" height="251" viewBox="0 0 251 251" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M0 47.0195C39.45 49.6394 71.06 81.3272 73.54 120.815H119.61C117.05 55.8589 64.93 3.64245 0 0.942627V47.0195Z" fill="#0DC09D"/>
|
||||||
|
<path d="M73.8 131.324C71.18 170.771 39.49 202.379 0 204.859V250.926C64.96 248.366 117.18 196.249 119.88 131.324H73.8Z" fill="#0DC09D"/>
|
||||||
|
<path d="M176.201 120.545C178.821 81.0972 210.511 49.4894 250.001 47.0095V0.942627C185.041 3.50245 132.821 55.619 130.121 120.545H176.201Z" fill="#0DC09D"/>
|
||||||
|
<path d="M250.001 204.849C210.551 202.229 178.941 170.542 176.461 131.054H130.391C132.951 196.01 185.071 248.226 250.001 250.926V204.849Z" fill="#0DC09D"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 693 B |
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- License: MIT. Made by Denali Design: https://github.com/denali-design/denali-icons -->
|
||||||
|
<svg width="800px" height="800px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<title>splunk</title>
|
||||||
|
<g id="Layer_2" data-name="Layer 2">
|
||||||
|
<g id="invisible_box" data-name="invisible box">
|
||||||
|
<rect width="48" height="48" fill="none"/>
|
||||||
|
</g>
|
||||||
|
<g id="Q3_icons" data-name="Q3 icons">
|
||||||
|
<path d="M37.5,4h-27A6.5,6.5,0,0,0,4,10.5v27A6.5,6.5,0,0,0,10.5,44h27A6.5,6.5,0,0,0,44,37.5v-27A6.5,6.5,0,0,0,37.5,4ZM33.6,26.1c0,.1,0,.2-.2.3L14.7,35.8c-.1.1-.3-.1-.3-.2V30.8c0-.1,0-.2.1-.2l13.6-6.8L14.5,16.9c-.1,0-.1-.1-.1-.2V11.9c0-.1.2-.3.3-.2l18.7,9.4a.5.5,0,0,1,.2.4Z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 743 B |
@@ -87,6 +87,7 @@
|
|||||||
markdown: (name: "Markdown", color: rgb("#000000"), icon: __icon("markdown.svg")),
|
markdown: (name: "Markdown", color: rgb("#000000"), icon: __icon("markdown.svg")),
|
||||||
matlab: (name: "Matlab", color: rgb("#4499dd"), icon: __icon("matlab.svg")),
|
matlab: (name: "Matlab", color: rgb("#4499dd"), icon: __icon("matlab.svg")),
|
||||||
mysql: (name: "MySQL", color: rgb("#00618a"), icon: __icon("mysql.svg")),
|
mysql: (name: "MySQL", color: rgb("#00618a"), icon: __icon("mysql.svg")),
|
||||||
|
nextflow: (name: "Nextflow", color: rgb("#0dc09d"), icon: __icon("nextflow.svg")),
|
||||||
neovim: (name: "Neovim", color: rgb("#517d37"), icon: __icon("neovim.svg")),
|
neovim: (name: "Neovim", color: rgb("#517d37"), icon: __icon("neovim.svg")),
|
||||||
nvim: (name: "Neovim", color: rgb("#517d37"), icon: __icon("neovim.svg")),
|
nvim: (name: "Neovim", color: rgb("#517d37"), icon: __icon("neovim.svg")),
|
||||||
nginx: (name: "Nginx", color: rgb("#009900"), icon: __icon("nginx.svg")),
|
nginx: (name: "Nginx", color: rgb("#009900"), icon: __icon("nginx.svg")),
|
||||||
@@ -125,6 +126,8 @@
|
|||||||
shell: (name: "Shell", color: rgb("#293138"), icon: __icon("bash.svg")),
|
shell: (name: "Shell", color: rgb("#293138"), icon: __icon("bash.svg")),
|
||||||
solidity: (name: "Solidity", color: rgb("#000000"), icon: __icon("solidity.svg")),
|
solidity: (name: "Solidity", color: rgb("#000000"), icon: __icon("solidity.svg")),
|
||||||
sol: (name: "Solidity", color: rgb("#000000"), icon: __icon("solidity.svg")),
|
sol: (name: "Solidity", color: rgb("#000000"), icon: __icon("solidity.svg")),
|
||||||
|
splunk: (name: "Splunk", color: rgb("#76a445"), icon: __icon("splunk.svg")),
|
||||||
|
spl: (name: "Splunk", color: rgb("#76a445"), icon: __icon("splunk.svg")),
|
||||||
sql: (name: "SQL", color: rgb("#f2f2f2"), icon: __icon("sql.svg")),
|
sql: (name: "SQL", color: rgb("#f2f2f2"), icon: __icon("sql.svg")),
|
||||||
sqlite: (name: "SQLite", color: rgb("#0b7fcc"), icon: __icon("sqlite.svg")),
|
sqlite: (name: "SQLite", color: rgb("#0b7fcc"), icon: __icon("sqlite.svg")),
|
||||||
ssh-config: (name: "SSH", color: rgb("#231f20"), icon: __icon("ssh.svg")),
|
ssh-config: (name: "SSH", color: rgb("#231f20"), icon: __icon("ssh.svg")),
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@@ -49,6 +49,7 @@
|
|||||||
"matlab",
|
"matlab",
|
||||||
"mysql",
|
"mysql",
|
||||||
"neovim",
|
"neovim",
|
||||||
|
"nextflow",
|
||||||
"nginx",
|
"nginx",
|
||||||
"nim",
|
"nim",
|
||||||
"nix",
|
"nix",
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
"sass",
|
"sass",
|
||||||
"scala",
|
"scala",
|
||||||
"solidity",
|
"solidity",
|
||||||
|
"splunk",
|
||||||
"sql",
|
"sql",
|
||||||
"sqlite",
|
"sqlite",
|
||||||
"ssh-config",
|
"ssh-config",
|
||||||
@@ -135,6 +137,7 @@ Found all base languages!
|
|||||||
"sh",
|
"sh",
|
||||||
"shell",
|
"shell",
|
||||||
"sol",
|
"sol",
|
||||||
|
"spl",
|
||||||
"ssh",
|
"ssh",
|
||||||
"styl",
|
"styl",
|
||||||
"tf",
|
"tf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "codly-languages"
|
name = "codly-languages"
|
||||||
version = "0.1.4"
|
version = "0.1.6"
|
||||||
entrypoint = "lib.typ"
|
entrypoint = "lib.typ"
|
||||||
authors = ["Stephen Waits <steve@waits.net>"]
|
authors = ["Stephen Waits <steve@waits.net>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
tests/**/out/
|
||||||
|
tests/**/diff/
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Stephen Waits <steve@waits.net>
|
||||||
|
|
||||||
|
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.
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Easy Typography for Typst
|
||||||
|
|
||||||
|
A Typst package that simplifies professional typography by providing sensible
|
||||||
|
defaults and easy customization options. Focus on your content while ensuring
|
||||||
|
beautiful, readable documents.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- 🎨 Precise heading scale with clear hierarchy
|
||||||
|
- 📏 Optimal line height and paragraph spacing
|
||||||
|
- 📖 Professional text justification and hyphenation
|
||||||
|
- ⚖️ Balanced vertical rhythm throughout
|
||||||
|
- ⚡ Simple configuration with reasonable defaults
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Basic usage with default settings:
|
||||||
|
|
||||||
|
```typst
|
||||||
|
#import "@preview/easy-typography:0.1.0": *
|
||||||
|
#show: easy-typography
|
||||||
|
|
||||||
|
= Your Document Title
|
||||||
|
Your content here...
|
||||||
|
```
|
||||||
|
|
||||||
|
Customized usage with specific fonts:
|
||||||
|
|
||||||
|
```typst
|
||||||
|
#show: easy-typography.with(
|
||||||
|
fonts: (
|
||||||
|
heading: "Source Sans Pro",
|
||||||
|
body: "Source Serif Pro"
|
||||||
|
),
|
||||||
|
body-size: 11pt,
|
||||||
|
paper: "a4",
|
||||||
|
margin: 2cm
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration Options
|
||||||
|
|
||||||
|
- `body-size`: Base size for body text (default: 10pt)
|
||||||
|
- `fonts`: Dictionary specifying heading and body fonts
|
||||||
|
- `heading`: Font for headings (default: "Libertinus Sans")
|
||||||
|
- `body`: Font for body text (default: "Libertinus Serif")
|
||||||
|
- `paper`: Paper size setting (optional)
|
||||||
|
- `margin`: Page margin setting (optional)
|
||||||
|
|
||||||
|
## Example Output
|
||||||
|
|
||||||
|
The package automatically handles:
|
||||||
|
|
||||||
|
- Heading sizes with natural visual hierarchy (H1-H5)
|
||||||
|
- Optimal spacing between elements
|
||||||
|
- Professional text justification
|
||||||
|
- Smart hyphenation
|
||||||
|
- Consistent vertical rhythm
|
||||||
|
|
||||||
|
See the [example output](thumbnail.png) for more information and a complete
|
||||||
|
example.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT License - See [LICENSE](LICENSE) for details.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#import "src/main.typ": easy-typography
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// Constants
|
||||||
|
|
||||||
|
// space above H1
|
||||||
|
#let heading-above-max = 1.25em
|
||||||
|
|
||||||
|
// space above H5
|
||||||
|
#let heading-above-min = 0.80em
|
||||||
|
|
||||||
|
// space below H1
|
||||||
|
#let heading-below-max = 0.65em
|
||||||
|
|
||||||
|
// space below H5
|
||||||
|
#let heading-below-min = 0.55em
|
||||||
|
|
||||||
|
// font size for H1
|
||||||
|
#let heading-size-max = 1.10em
|
||||||
|
|
||||||
|
// font size for H5
|
||||||
|
#let heading-size-min = 1.00em
|
||||||
|
|
||||||
|
// default text weight -- light is best for reading, and printers are fine with
|
||||||
|
// it these days
|
||||||
|
#let body-weight = "light"
|
||||||
|
|
||||||
|
// line spacing -- tight; efficient but still readable with good fonts
|
||||||
|
#let line-spacing = 1.30
|
||||||
|
|
||||||
|
// paragraph spacing -- defaults to a double-space
|
||||||
|
#let paragraph-spacing = 1.70
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
#import "constants.typ": *
|
||||||
|
|
||||||
|
/// The main function for easy typography setup.
|
||||||
|
///
|
||||||
|
/// - body-size (): The size of body text (default 10pt).
|
||||||
|
/// - fonts (): A dictionary specifying heading/body fonts.
|
||||||
|
/// - paper (str): The paper size to use (none to skip).
|
||||||
|
/// - margin (): Margin for the page (none to skip).
|
||||||
|
/// -> content
|
||||||
|
#let easy-typography(
|
||||||
|
body-size: 10pt,
|
||||||
|
fonts: (heading: "Libertinus Sans", body: "Libertinus Serif"),
|
||||||
|
paper: none,
|
||||||
|
margin: none,
|
||||||
|
body
|
||||||
|
) = {
|
||||||
|
// Optional page setup
|
||||||
|
if paper != none {
|
||||||
|
set page(paper: paper)
|
||||||
|
}
|
||||||
|
if margin != none {
|
||||||
|
set page(margin: margin)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paragraphs
|
||||||
|
set par(
|
||||||
|
leading: line-spacing * 0.5em,
|
||||||
|
spacing: paragraph-spacing * 0.5em,
|
||||||
|
justify: true,
|
||||||
|
linebreaks: "optimized",
|
||||||
|
)
|
||||||
|
|
||||||
|
// Body text
|
||||||
|
set text(
|
||||||
|
font: fonts.body,
|
||||||
|
fallback: false,
|
||||||
|
style: "normal",
|
||||||
|
weight: body-weight,
|
||||||
|
stretch: 100%,
|
||||||
|
size: body-size,
|
||||||
|
tracking: 0pt,
|
||||||
|
spacing: 100% + 0pt,
|
||||||
|
baseline: 0pt,
|
||||||
|
overhang: true,
|
||||||
|
hyphenate: true,
|
||||||
|
kerning: true,
|
||||||
|
ligatures: true,
|
||||||
|
number-width: "proportional",
|
||||||
|
// number-type: "lining", // commented: intentionally left up to the font to choose
|
||||||
|
)
|
||||||
|
|
||||||
|
show table: set text(number-width: "tabular")
|
||||||
|
|
||||||
|
/// Top-heavy easing function for heading sizes/spacing.
|
||||||
|
///
|
||||||
|
/// `sqrt(t)` gives biggest decrease at top, gentlest at bottom.
|
||||||
|
///
|
||||||
|
/// - max (length): Biggest size (H1)
|
||||||
|
/// - min (length): Smallest size (H5)
|
||||||
|
/// - level (length): From 1 to 5
|
||||||
|
/// -> length
|
||||||
|
let compute-size(max, min, level) = {
|
||||||
|
if level <= 1 {
|
||||||
|
max
|
||||||
|
} else if level >= 5 {
|
||||||
|
min
|
||||||
|
} else {
|
||||||
|
let t = (level - 1) / 4
|
||||||
|
max - (max - min) * calc.sqrt(t)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Heading weight logic
|
||||||
|
let compute-weight(level) = {
|
||||||
|
if level <= 1 {
|
||||||
|
"bold"
|
||||||
|
} else if level == 2 {
|
||||||
|
"semibold"
|
||||||
|
} else if level == 3 {
|
||||||
|
"medium"
|
||||||
|
} else {
|
||||||
|
"regular"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show headings using computed size/spacing values
|
||||||
|
show heading: it => block(
|
||||||
|
breakable: false,
|
||||||
|
sticky: true,
|
||||||
|
above: compute-size(heading-above-max, heading-above-min, it.level),
|
||||||
|
below: compute-size(heading-below-max, heading-below-min, it.level),
|
||||||
|
text(
|
||||||
|
font: fonts.heading,
|
||||||
|
size: compute-size(heading-size-max, heading-size-min, it.level),
|
||||||
|
weight: compute-weight(it.level),
|
||||||
|
it
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Finally, render the body
|
||||||
|
body
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 769 KiB |
@@ -0,0 +1,125 @@
|
|||||||
|
#import "/lib.typ": *
|
||||||
|
|
||||||
|
#import "@preview/codly:1.2.0": *
|
||||||
|
#import "@preview/codly-languages:0.1.1": *
|
||||||
|
#show: codly-init.with()
|
||||||
|
#codly(languages: codly-languages)
|
||||||
|
|
||||||
|
#show: easy-typography.with(
|
||||||
|
fonts: (heading: "Source Sans 3", body: "Source Serif 4"),
|
||||||
|
)
|
||||||
|
|
||||||
|
= Introducing Easy Typography
|
||||||
|
|
||||||
|
#set heading(numbering: (..nums) => {
|
||||||
|
numbering("1.1.", ..nums.pos().slice(1))
|
||||||
|
})
|
||||||
|
|
||||||
|
The `easy-typography` package transforms complex typographic decisions into
|
||||||
|
simple choices, letting you focus on your content while ensuring professional
|
||||||
|
results. By adjusting the settings to match your specific needs, you can refine
|
||||||
|
the aesthetic or adapt your layout for everything from casual reading to formal
|
||||||
|
publication.
|
||||||
|
|
||||||
|
== Core Typography Features
|
||||||
|
|
||||||
|
The package manages:
|
||||||
|
|
||||||
|
#columns(2)[
|
||||||
|
- Precise heading scale with a clear hierarchy
|
||||||
|
- Optimal line height and paragraph spacing
|
||||||
|
#colbreak()
|
||||||
|
- Professional text justification and hyphenation
|
||||||
|
- Balanced vertical rhythm throughout
|
||||||
|
]
|
||||||
|
|
||||||
|
These features ensure that your document is both visually appealing and easy to
|
||||||
|
read.
|
||||||
|
|
||||||
|
=== Type Formatting
|
||||||
|
|
||||||
|
This package automatically adjusts line spacing, paragraph spacing, and
|
||||||
|
justification to maintain a clean layout. Headings are also carefully weighted
|
||||||
|
to balance them against the body text, so you can focus on content rather than
|
||||||
|
tweaking spacing and sizing. Standard formatting like *bold* and _italic_
|
||||||
|
integrates seamlessly with `easy-typography`'s approach.
|
||||||
|
|
||||||
|
=== Heading Levels
|
||||||
|
|
||||||
|
The heading scale gracefully steps down, ensuring that each level remains
|
||||||
|
distinct yet consistent. Behind the scenes, `easy-typography` calculates the
|
||||||
|
ideal size for each heading, preserving a cohesive visual hierarchy as your
|
||||||
|
document gets deeper. This approach supports manuals, academic papers, and any
|
||||||
|
long-form text where structure matters. It also helps in shorter documents,
|
||||||
|
guaranteeing a crisp layout with minimal effort.
|
||||||
|
|
||||||
|
== Why Typography Matters
|
||||||
|
|
||||||
|
Good typography isn't just about aesthetics. It's about effective communication.
|
||||||
|
Well-designed text:
|
||||||
|
|
||||||
|
#columns(2)[
|
||||||
|
- Improves reading comprehension
|
||||||
|
- Reduces eye strain
|
||||||
|
- Maintains reader engagement
|
||||||
|
#colbreak()
|
||||||
|
- Establishes visual hierarchy
|
||||||
|
- Conveys professionalism
|
||||||
|
]
|
||||||
|
|
||||||
|
Notice how this document's typography enhances readability. The justified text,
|
||||||
|
proper hyphenation, and optimized line breaks create a clean, professional
|
||||||
|
appearance. With each heading level, the user can quickly scan and digest
|
||||||
|
important information.
|
||||||
|
|
||||||
|
== Example Usage and Output
|
||||||
|
|
||||||
|
#set heading(numbering: none)
|
||||||
|
#show raw.where(block: true): set text(size: 7pt)
|
||||||
|
|
||||||
|
#grid(
|
||||||
|
columns: (55%, auto),
|
||||||
|
gutter: 1.0em,
|
||||||
|
[
|
||||||
|
// code
|
||||||
|
```typst
|
||||||
|
#import "@preview/easy-typography:0.1.0": *
|
||||||
|
#show: easy-typography.with(
|
||||||
|
fonts: (
|
||||||
|
heading: "Source Sans Pro",
|
||||||
|
body: "Source Serif Pro"
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
#lorem(6)
|
||||||
|
= Level One
|
||||||
|
#lorem(6)
|
||||||
|
== Level Two
|
||||||
|
#lorem(6)
|
||||||
|
=== Level Three
|
||||||
|
#lorem(6)
|
||||||
|
==== Level Four
|
||||||
|
#lorem(6)
|
||||||
|
===== Level Five
|
||||||
|
#lorem(6)
|
||||||
|
```
|
||||||
|
],
|
||||||
|
box(
|
||||||
|
stroke: 0.5pt + silver,
|
||||||
|
inset: 0.5em,
|
||||||
|
radius: 0.2em,
|
||||||
|
[
|
||||||
|
#lorem(6)
|
||||||
|
= Level One
|
||||||
|
#lorem(6)
|
||||||
|
== Level Two
|
||||||
|
#lorem(6)
|
||||||
|
=== Level Three
|
||||||
|
#lorem(6)
|
||||||
|
==== Level Four
|
||||||
|
#lorem(6)
|
||||||
|
===== Level Five
|
||||||
|
#lorem(6)
|
||||||
|
]
|
||||||
|
) // box
|
||||||
|
)
|
||||||
|
After Width: | Height: | Size: 306 KiB |
@@ -0,0 +1,10 @@
|
|||||||
|
[package]
|
||||||
|
name = "easy-typography"
|
||||||
|
version = "0.1.0"
|
||||||
|
entrypoint = "lib.typ"
|
||||||
|
authors = ["Stephen Waits <steve@waits.net>"]
|
||||||
|
license = "MIT"
|
||||||
|
description = "Sets up sensible typography defaults."
|
||||||
|
keywords = ["easy", "typography", "defaults"]
|
||||||
|
repository = "https://github.com/swaits/typst-collection"
|
||||||
|
exclude = ["thumbnail.png", "tests"]
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
tests/**/out/
|
||||||
|
tests/**/diff/
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Stephen Waits <steve@waits.net>
|
||||||
|
|
||||||
|
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.
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
# Tasteful Pairings
|
||||||
|
|
||||||
|
A carefully curated collection of font pairings for [Typst](https://typst.app/),
|
||||||
|
focusing on readability and typographic harmony. Each pairing combines a
|
||||||
|
sans-serif heading font with a serif body font, following established
|
||||||
|
typographic principles for clear visual hierarchy and optimal reading
|
||||||
|
experience.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```typ
|
||||||
|
#import "@preview/tasteful-pairings:0.1.0": *
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```typ
|
||||||
|
#let pairing = font-pairings.at("modern-heritage")
|
||||||
|
|
||||||
|
#show heading: set text(font: pairing.heading)
|
||||||
|
#set text(font: pairing.body)
|
||||||
|
|
||||||
|
= Your Document Title
|
||||||
|
Your content here...
|
||||||
|
```
|
||||||
|
|
||||||
|
## Available Pairings
|
||||||
|
|
||||||
|
- **`ibm-plex`** - Modern corporate-friendly superfamily
|
||||||
|
- **`noto`** - Extensive language support, highly legible
|
||||||
|
- **`source`** - Adobe's refined open-source pair
|
||||||
|
- **`friendly-weather`** - Open Fira Sans with space-efficient Merriweather
|
||||||
|
- **`android`** - Complete Roboto family look
|
||||||
|
- **`kindle`** - Amazon's reading-optimized fonts
|
||||||
|
- **`office`** - Classic Microsoft Office combination
|
||||||
|
- **`modern-heritage`** - Contemporary Montserrat with timeless Georgia Pro
|
||||||
|
- **`legible`** - Reading-focused Lexend and Literata
|
||||||
|
|
||||||
|
## Gallery
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Philosophy
|
||||||
|
|
||||||
|
The pairings in this collection follow these principles:
|
||||||
|
|
||||||
|
1. **Sans for Headlines, Serif for Body** - Following traditional typographic
|
||||||
|
wisdom for clear hierarchy
|
||||||
|
2. **Readability First** - Each pairing is tested for optimal reading experience
|
||||||
|
3. **Complementary Characteristics** - Fonts are matched based on x-height,
|
||||||
|
weight balance, and character width
|
||||||
|
4. **Practical Applications** - Selected for real-world use cases from corporate
|
||||||
|
documents to digital reading
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT License](LICENSE).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#import "src/main.typ": font-pairings
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
#let font-pairings = (
|
||||||
|
"ibm-plex": (
|
||||||
|
heading: "IBM Plex Sans",
|
||||||
|
body: "IBM Plex Serif",
|
||||||
|
description: "A modern corporate-friendly superfamily with a wide weight range. Clean, neutral, and highly legible."
|
||||||
|
),
|
||||||
|
|
||||||
|
"noto": (
|
||||||
|
heading: "Noto Sans",
|
||||||
|
body: "Noto Serif",
|
||||||
|
description: "Huge language coverage, highly legible, and neutral. Great for multilingual documents."
|
||||||
|
),
|
||||||
|
|
||||||
|
"source": (
|
||||||
|
heading: "Source Sans 3",
|
||||||
|
body: "Source Serif 4",
|
||||||
|
description: "Adobe's open-source pair. Clean, highly readable, and well-hinted for both screen and print."
|
||||||
|
),
|
||||||
|
|
||||||
|
"friendly-weather": (
|
||||||
|
heading: "Fira Sans",
|
||||||
|
body: "Merriweather",
|
||||||
|
description: "Open, friendly sans plus a space-efficient modern serif. Good for text-heavy documents."
|
||||||
|
),
|
||||||
|
|
||||||
|
"android": (
|
||||||
|
heading: "Roboto",
|
||||||
|
body: "Roboto Serif",
|
||||||
|
description: "A complete Android-friendly look. Roboto is extremely common; Roboto Serif is its matching new serif companion."
|
||||||
|
),
|
||||||
|
|
||||||
|
"kindle": (
|
||||||
|
heading: "Amazon Ember",
|
||||||
|
body: "Bookerly",
|
||||||
|
description: "The Kindle pairing. Bookerly is a warm, book-like serif; Amazon Ember is a clean, readable sans."
|
||||||
|
),
|
||||||
|
|
||||||
|
"office": (
|
||||||
|
heading: "Calibri",
|
||||||
|
body: "Cambria",
|
||||||
|
description: "A classic Microsoft Office pairing. Calibri (sans) for headings, Cambria (serif) for body text."
|
||||||
|
),
|
||||||
|
|
||||||
|
"modern-heritage": (
|
||||||
|
heading: "Montserrat",
|
||||||
|
body: "Georgia Pro",
|
||||||
|
description: "Merges the warm, traditional forms of Georgia Pro with Montserrat’s clean, geometric lines. A modern-yet-classic pairing, equally suited to formal reports or stylish web layouts."
|
||||||
|
),
|
||||||
|
|
||||||
|
"legible": (
|
||||||
|
heading: "Lexend",
|
||||||
|
body: "Literata",
|
||||||
|
description: "An ultra-legible pairing designed for reading fluency. Lexend’s tall x-height and open shapes reduce visual stress, while Literata brings a warm, bookish feel to body text."
|
||||||
|
),
|
||||||
|
)
|
||||||
|
After Width: | Height: | Size: 994 KiB |
@@ -0,0 +1,23 @@
|
|||||||
|
#import "/lib.typ": *
|
||||||
|
|
||||||
|
#set page(margin: 1em, height: auto, width: 5.5in)
|
||||||
|
#set par(justify: true, linebreaks: "optimized")
|
||||||
|
|
||||||
|
#let keys = font-pairings.keys().sorted()
|
||||||
|
|
||||||
|
#for key in keys {
|
||||||
|
block(
|
||||||
|
stroke: 1pt + navy,
|
||||||
|
inset: 1em,
|
||||||
|
radius: 1em,
|
||||||
|
[
|
||||||
|
#let pairing = font-pairings.at(key)
|
||||||
|
#show heading: set text(font: pairing.heading, weight: "bold")
|
||||||
|
= #pairing.heading & #pairing.body #h(1fr) #text(fill: eastern, weight: "light", size: 0.8em, baseline: -3pt, ["#key"])
|
||||||
|
#set text(font: pairing.body, weight: "light")
|
||||||
|
#pairing.description
|
||||||
|
|
||||||
|
#lorem(20)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 366 KiB |
@@ -0,0 +1,10 @@
|
|||||||
|
[package]
|
||||||
|
name = "tasteful-pairings"
|
||||||
|
version = "0.1.0"
|
||||||
|
entrypoint = "lib.typ"
|
||||||
|
authors = ["Stephen Waits <steve@waits.net>"]
|
||||||
|
license = "MIT"
|
||||||
|
description = "A carefully curated collection of font pairings."
|
||||||
|
keywords = ["font", "pairing", "typography"]
|
||||||
|
repository = "https://github.com/swaits/typst-collection"
|
||||||
|
exclude = ["thumbnail.png", "tests"]
|
||||||