grelin_templates/tech-report/data/code.typ
MORRO d83e6a99a9 Add tech-report and travel-plan templates, replacing feasibility.
Introduce tech-report/ with cover page, custom TOC, and summary flow; add travel-plan/ for trip planning; update README, gitignore, and brand colors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 13:56:22 +08:00

39 lines
1.2 KiB
Plaintext

#import "@preview/codly:1.3.0": *
#import "@preview/codly-languages:0.1.10": codly-languages
#import "theme.typ": *
#let codly-init-rule = codly-init.with()
#let codly-config = codly(
languages: codly-languages,
fill: code-block-fill,
radius: code-block-radius,
stroke: none,
zebra-fill: none,
number-format: none,
display-icon: false,
display-name: true,
default-color: color-body,
lang-stroke: (_) => none,
lang-fill: (_) => code-block-fill,
lang-radius: 0pt,
)
/// 与 codly 配合的语法高亮色(须在 codly-init 之后注册)
#let code-token-highlight-init(doc) = {
show raw.where(block: true): it => {
show "keyword": set text(fill: code-token-keyword)
show "comment": set text(fill: code-token-comment)
show "string": set text(fill: code-token-string)
show "number": set text(fill: code-token-number)
show "builtin": set text(fill: code-token-function)
show "function": set text(fill: code-token-function)
show "decor": set text(fill: code-token-function)
show "operator": set text(fill: code-token-operator)
show "punctuation": set text(fill: code-token-operator)
set text(fill: color-body)
it
}
doc
}