Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5964bc082a
|
||
|
|
41e1c184e8
|
No files matched your search
@@ -10,7 +10,7 @@ Pretty simple. Import `codly`. Initialize it. Import `codly-languages`.
|
||||
Configure `codly` with the languages. Like this:
|
||||
|
||||
```typst
|
||||
#import "@preview/codly:1.1.0": *
|
||||
#import "@preview/codly:1.1.1": *
|
||||
#show: codly-init
|
||||
|
||||
#import "@preview/codly-languages:0.1.3": *
|
||||
@@ -50,7 +50,6 @@ The following languages are still missing. All contributions welcome.
|
||||
- Jinja2
|
||||
- Jsonnet
|
||||
- Lean
|
||||
- Lisp
|
||||
- LiveScript
|
||||
- Makefile
|
||||
- MediaWiki
|
||||
@@ -93,6 +92,11 @@ The following languages are still missing. All contributions welcome.
|
||||
The `typst-small.png` icon included in this package came from the MIT-licensed
|
||||
[codly](https://github.com/Dherse/codly) project.
|
||||
|
||||
The `lisp.svg` icon comes [from
|
||||
Wikipedia](https://commons.wikimedia.org/wiki/File:Lisp_logo.svg), attribution:
|
||||
Jooja, CC BY-SA 4.0 <https://creativecommons.org/licenses/by-sa/4.0>, via
|
||||
Wikimedia Commons.
|
||||
|
||||
All other icons included here came from the MIT-licensed
|
||||
[devicon](https://github.com/devicons/devicon/) project.
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="256" cy="256" r="235" fill="#fff"/>
|
||||
<path stroke="#000" stroke-width="5" d="m255.56 20.008c-62.374 0.1169-122.17 24.922-166.3 68.992-92.236 92.091-92.353 241.52-0.2617 333.75 92.09 92.236 241.52 92.353 333.75 0.262 92.236-92.091 92.353-241.52 0.262-333.75-44.377-44.447-104.64-69.371-167.45-69.254zm2.281 1.0059c59.934 0.4846 119.39 23.809 164.46 68.953 91.701 91.845 91.585 240.64-0.259 332.34-45.922 45.851-120.32 45.793-166.17-0.129-45.851-45.922-45.793-120.32 0.129-166.17 46.412-46.339 46.471-121.53 0.13-167.94-37.084-37.141-94.457-46.553-140.66-21.658 42.416-31.541 92.711-45.798 142.37-45.396zm-190.84 130.26h40c9.943 42.147 25.204 79.418 40.75 116.43 15.9-41.326 33.203-81.249 55.25-116.43h40c-48.928 97.364-102.19 164.06-24 250h-40c-47.567-77.243-82.439-147.67-112-250z"/>
|
||||
<path d="m293 110.72c78.194 85.936 24.928 152.64-24 250h40c22.047-35.179 39.35-75.102 55.25-116.43 15.546 37.01 30.807 74.282 40.75 116.43h40c-29.561-102.33-64.433-172.76-112-250z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -4,7 +4,7 @@
|
||||
// To use:
|
||||
//
|
||||
// ```typst
|
||||
// #import "@preview/codly:1.1.0": *
|
||||
// #import "@preview/codly:1.1.1": *
|
||||
// #show: codly-init
|
||||
//
|
||||
// #import "codly-languages.typ": *
|
||||
@@ -80,6 +80,7 @@
|
||||
kt: (name: "Kotlin", color: rgb("#5e3cc2"), icon: __icon("kotlin.svg")),
|
||||
latex: (name: "LaTeX", color: rgb("#000000"), icon: __icon("latex.svg")),
|
||||
less: (name: "Less", color: rgb("#2a4d80"), icon: __icon("less.svg")),
|
||||
lisp: (name: "Lisp", color: rgb("#3FBF3F"), icon: __icon("lisp.svg")),
|
||||
lua: (name: "Lua", color: rgb("#000080"), icon: __icon("lua.svg")),
|
||||
markdown: (name: "Markdown", color: rgb("#000000"), icon: __icon("markdown.svg")),
|
||||
matlab: (name: "Matlab", color: rgb("#4499dd"), icon: __icon("matlab.svg")),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#import "/lib.typ": *
|
||||
#import "@preview/codly:1.1.0": *
|
||||
#import "@preview/codly:1.1.1": *
|
||||
#show: codly-init
|
||||
#codly(languages: codly-languages)
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 75 KiB |
@@ -42,6 +42,7 @@
|
||||
"kotlin",
|
||||
"latex",
|
||||
"less",
|
||||
"lisp",
|
||||
"lua",
|
||||
"markdown",
|
||||
"matlab",
|
||||
|
||||
+1
-4
@@ -253,7 +253,7 @@ Customize glossary appearance by defining a theme with three functions:
|
||||
// Individual glossary entry
|
||||
entry: (entry, index, total) => {
|
||||
// index = entry index, total = total entries in group
|
||||
let output = [#entry.short#entry.label] // **NOTE:** Label here!
|
||||
let output = [#entry.short]
|
||||
if entry.long != none {
|
||||
output = [#output -- #entry.long]
|
||||
}
|
||||
@@ -280,9 +280,6 @@ Entry fields available to themes:
|
||||
- `label`: Term's dictionary label
|
||||
- `pages`: Linked page numbers where term appears
|
||||
|
||||
**NOTE:** If the theme does not emit `entry.label`, linking form terms to their
|
||||
glossary entry will not work.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License.
|
||||
@@ -1,6 +0,0 @@
|
||||
watchexec \
|
||||
--watch . \
|
||||
--clear \
|
||||
--ignore 'tests/**/diff/**' \
|
||||
--ignore 'tests/**/out/**' \
|
||||
"typst-test r"
|
||||
@@ -40,7 +40,7 @@
|
||||
grid(
|
||||
columns: (1fr, auto),
|
||||
gutter: 0.75em,
|
||||
[#short-display#long-display#description#entry.label],
|
||||
[#short-display#long-display#description],
|
||||
text(fill: rgb("#666666"), entry.pages)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
grid(
|
||||
columns: (1fr, auto),
|
||||
gutter: 1em,
|
||||
[#short-display#entry.label#long-display#description#entry.label],
|
||||
[#short-display#entry.label#long-display#description],
|
||||
[#entry.pages]
|
||||
)
|
||||
}
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
},
|
||||
|
||||
entry: (entry, index, total) => {
|
||||
(entry.short + entry.label, entry.long, entry.description, entry.pages)
|
||||
(entry.short, entry.long, entry.description, entry.pages)
|
||||
}
|
||||
)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 99 KiB |
@@ -1,45 +0,0 @@
|
||||
#import "/lib.typ": *
|
||||
#import "@preview/glossarium:0.5.1": *
|
||||
|
||||
#set page(height: auto, width: 4.5in)
|
||||
#show link: set text(fill: red)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
= `glossy`:
|
||||
|
||||
#box(
|
||||
stroke: 1pt,
|
||||
inset: 1em,
|
||||
[
|
||||
#show: init-glossary.with((WWW: "World Wide Web"))
|
||||
|
||||
This should be a link: @WWW
|
||||
|
||||
This should be a link, too: @WWW
|
||||
|
||||
#glossary()
|
||||
]
|
||||
)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
= `glossarium`:
|
||||
|
||||
#box(
|
||||
stroke: 1pt,
|
||||
inset: 1em,
|
||||
[
|
||||
#show: make-glossary
|
||||
#let entry-list = (
|
||||
(key: "ML", short: "ML", long: "Machine Learning"),
|
||||
)
|
||||
#register-glossary(entry-list)
|
||||
|
||||
This should be a link: @ML
|
||||
|
||||
This should be a link, too: @ML
|
||||
|
||||
#print-glossary(entry-list)
|
||||
]
|
||||
)
|
||||
@@ -3,7 +3,7 @@
|
||||
#set text(lang: "cs", region: "CZ")
|
||||
|
||||
#show: init-glossary.with(yaml("glossary.yml"))
|
||||
#glossary(ignore-case: true, theme: theme-twocol)
|
||||
#glossary(ignore-case: true)
|
||||
|
||||
#line(length: 20em)
|
||||
|
||||
|
||||
Reference in new issue
Block a user