diff --git a/src/g-exam.typ b/src/g-exam.typ index 677ce9c..7290a3c 100644 --- a/src/g-exam.typ +++ b/src/g-exam.typ @@ -2,6 +2,7 @@ #import "./global.typ" : * #import "./auxiliary.typ": * #import "./g-question.typ": * +#import "./g-option.typ": * #import "./g-solution.typ": * #import "./g-clarification.typ": * diff --git a/src/g-option.typ b/src/g-option.typ new file mode 100644 index 0000000..d72a44f --- /dev/null +++ b/src/g-option.typ @@ -0,0 +1,14 @@ +#import"./global.typ": * + +/// Define a new block of options. +/// +/// *Example:* +/// ``` +/// #g-subquestion(points:2)[This is a sub-question] +/// ``` +/// +/// - body (string, content): Body of option label. +#let g-option( + body) = { + body + } \ No newline at end of file diff --git a/src/lib.typ b/src/lib.typ index 84d9d63..63c2a62 100644 --- a/src/lib.typ +++ b/src/lib.typ @@ -1,5 +1,3 @@ #let version = version((0,3,0)) -#import "g-exam.typ": g-exam, g-question, g-subquestion, g-solution, g-clarification -// #import "g-command.typ": g-question, g-subquestion, g-solution, g-clarification -// #import "g-sugar.typ": * +#import "g-exam.typ": g-exam, g-question, g-subquestion, g-option, g-solution, g-clarification diff --git a/test/grade-table/test-001-question-point.typ b/test/grade-table/test-001-question-point.typ new file mode 100644 index 0000000..787c7fb --- /dev/null +++ b/test/grade-table/test-001-question-point.typ @@ -0,0 +1,13 @@ +#import "../../src/lib.typ": * + +#show: g-exam.with( + show-student-data: "first-page", + show-grade-table: true, +) + +#g-question(points:2.1)[] +#g-question(points:3)[] +#g-question(points:2.3)[] +#g-question(points:3)[] +#g-question(points:2.1)[] +#g-question(points:3.3)[] diff --git a/test/grade-table/test-002-subquestion-point.typ b/test/grade-table/test-002-subquestion-point.typ new file mode 100644 index 0000000..11b351e --- /dev/null +++ b/test/grade-table/test-002-subquestion-point.typ @@ -0,0 +1,16 @@ +#import "../../src/lib.typ": * + +#show: g-exam.with( + show-student-data: "first-page", + show-grade-table: true, +) + + +#g-question()[] +#g-subquestion(points:1)[] +#g-subquestion(points:1)[] + +#g-question(points:3)[] +#g-subquestion(points:1.2)[] +#g-subquestion(points:1.3)[] + diff --git a/test/grade-table/test-003-sugar.typ b/test/grade-table/test-003-sugar.typ new file mode 100644 index 0000000..8bf18ac --- /dev/null +++ b/test/grade-table/test-003-sugar.typ @@ -0,0 +1,16 @@ +#import "../../src/lib.typ": * + +#show: g-exam.with( + show-student-data: "first-page", + show-grade-table: true, +) + + +=? [] +==? (points:1) [] +==? (points:2) [] + +=? (points:3)[] +==? (points:1.2)[] +==? (points:1.3)[] + diff --git a/test/grade-table/test-004-multioptions-points.typ b/test/grade-table/test-004-multioptions-points.typ new file mode 100644 index 0000000..2c93659 --- /dev/null +++ b/test/grade-table/test-004-multioptions-points.typ @@ -0,0 +1,23 @@ +#import "../../src/lib.typ": * + +#show: g-exam.with( + show-student-data: "first-page", + show-grade-table: true, +) + +#g-option()[Option A] +#g-question(points:2.1)[] +#g-question(points:3)[] +#g-question(points:2.3)[] +#g-question(points:3)[] +#g-question(points:2.1)[] +#g-question(points:3.3)[] + +#g-option()[Option B] +#g-question(points:2.1)[] +#g-question(points:3)[] +#g-question(points:2.3)[] +#g-question(points:3)[] +#g-question(points:2.1)[] +#g-question(points:3.3)[] +