Skip to content

Commit

Permalink
converted to kebab-case
Browse files Browse the repository at this point in the history
  • Loading branch information
wasaysir committed Jan 11, 2025
1 parent d2f15b2 commit a4a4b79
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
36 changes: 18 additions & 18 deletions packages/preview/ref-sheet/0.1.0/lib.typ
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#let cheatsheet(
title: [],
authors: (),
write_title: false,
font_size: 5.5pt,
line_skip: 5.5pt,
x_margin: 30pt,
y_margin: 0pt,
num_columns: 5,
column_gutter: 4pt,
numbered_units: false,
write-title: false,
font-size: 5.5pt,
line-skip: 5.5pt,
x-margin: 30pt,
y-margin: 0pt,
num-columns: 5,
column-gutter: 4pt,
numbered-units: false,
body) = {

let color_index = (
let color-index = (
rgb("ff595e"),
rgb("ff751f"),
rgb("E0A500"),
Expand All @@ -27,35 +27,35 @@

set page(paper: "a4",
flipped: true,
margin: (x: x_margin, y: y_margin))
margin: (x: x-margin, y: y-margin))

set text(size: font_size)
set text(size: font-size)

set heading(numbering: "1.1")

show heading: it => {
let index = counter(heading).at(it.location()).first()
let hue = color_index.at(calc.rem(index - 1, color_index.len()))
let hue = color-index.at(calc.rem(index - 1, color-index.len()))
let color = hue.darken(8% * (it.depth - 1))

set text(white, size: font_size)
set text(white, size: font-size)
block(
radius: 1.0mm,
inset: 1.0mm,
width: 90%,
above: line_skip,
below: line_skip,
above: line-skip,
below: line-skip,
fill: color,
it
)
}

let new_body = {
if write_title {
let new-body = {
if write-title {
par[#title by #authors]
}
body
}

columns(num_columns, gutter: column_gutter, new_body)
columns(num-columns, gutter: column-gutter, new-body)
}
16 changes: 8 additions & 8 deletions packages/preview/ref-sheet/0.1.0/template/main.typ
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
#show: cheatsheet.with(
title: "Cheatsheet Title",
authors: "Authors",
write_title: false,
font_size: 5.5pt,
line_skip: 5.5pt,
x_margin: 30pt,
y_margin: 30pt,
num_columns: 5,
column_gutter: 4pt,
numbered_units: false,
write-title: false,
font-size: 5.5pt,
line-skip: 5.5pt,
x-margin: 30pt,
y-margin: 30pt,
num-columns: 5,
column-gutter: 4pt,
numbered-units: false,
)

#include "units/00-general-formula.typ"
Expand Down

0 comments on commit a4a4b79

Please sign in to comment.