Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Breaking
- Removed `custom-enum-numbering` helper
- Removed `subtask-label` helper
- Removed `bonus-show-star` option on `task` (in favor of the new `bonus-style` option)

### Added
- Added `subtask` system
Expand All @@ -17,6 +18,7 @@
- Added task text handling
- Added `begin-at-new-page` option for `task` and `subtask`
- Added `skip` option for `task` and `subtask`
- Added `bonus-style` option for `task`

## [0.4.0] - 2025-11-22

Expand Down
1 change: 1 addition & 0 deletions src/i18n.typ
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Points: (
de: "Punkte",
),
Bonus: (:),
// Theorem related
Theorem: (
de: "Satz",
Expand Down
22 changes: 14 additions & 8 deletions src/task.typ
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
begin-at-new-page: false,
/// Whether the task is a bonus task. -> bool
bonus: false,
/// Whether bonus tasks are marked with a star in the title. -> bool
bonus-show-star: true,
/// A styling function applied to the title of bonus tasks. -> function | none
bonus-style: t => [#t (#context i18n.translate("Bonus"))],
/// Whether the task is hidden in the score box. -> bool
hidden: false,
/// Padding above the task. -> auto | length
Expand Down Expand Up @@ -160,13 +160,19 @@
}

let title = {
task-prefix
if counter-show {
if task-prefix != "" [ ]
context c("sheetstorm-task").display()
let text = {
task-prefix
if counter-show {
if task-prefix != "" [ ]
context c("sheetstorm-task").display()
}
if name != none [: #emph(name)]
}
if bonus and type(bonus-style) == function {
text = bonus-style(text)
}
if name != none [: #emph(name)]
if bonus and bonus-show-star [\*]

text

if todo-show and maybe-todo != none {
h(0.7em)
Expand Down
4 changes: 2 additions & 2 deletions src/widgets.typ
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
tasks: auto,
/// Whether to show the points per task. -> bool
show-points: true,
/// Whether the points of bonus tasks count into the sum. -> bool
bonus-show-star: true,
/// Whether to mark bonus tasks in the score box with a star. -> bool
bonus-show-star: true,
/// Whether the points of bonus tasks count into the sum. -> bool
bonus-counts-for-sum: false,
/// Whether to fill all available horizontal space. -> bool
fill-space: false,
Expand Down
Binary file modified tests/examples/assignment/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading