Skip to content

Commit

Permalink
point position in question and subquestion
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-gimenez committed Mar 1, 2024
1 parent 212fab4 commit 4c5eec6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions g-exam.typ
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@
})

locate(loc => {
let __g-question-point-position = __g-question-point-position-state.final(loc)
let __g-question-point-position = point-position
if __g-question-point-position == none {
__g-question-point-position = __g-question-point-position-state.final(loc)
}

if __g-question-point-position == left {
v(0.1em)
Expand Down Expand Up @@ -175,15 +178,18 @@

assert(point-position in (none, left, right),
message: "Invalid point position")

__g-question-number.step(level: 2)

let subg-question-point = 0
if point != none { subg-question-point = point }
__g-question-point.update(p => p + subg-question-point )

locate(loc => {
let __g-question-point-position = __g-question-point-position-state.final(loc)
let __g-question-point-position = point-position
if __g-question-point-position == none {
__g-question-point-position = __g-question-point-position-state.final(loc)
}

if __g-question-point-position == left {
v(0.1em)
Expand Down

0 comments on commit 4c5eec6

Please sign in to comment.