Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-gimenez committed Mar 21, 2024
1 parent 56f0721 commit 435c033
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
source_paths: "documentation/document.typ"
root_path: '.'

- name: Compile Typst to PDF
- name: Compile Typst to PDF
uses: mkpoli/compile-typst-action@main
with:
source_paths: "examples/*.typ"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Template to create exams with header, school letterhead, grade chart, ...

[![.github/workflows/integration.yaml](https://github.com/MatheSchool/typst-g-exam/actions/workflows/integration.yaml/badge.svg)](https://github.com/MatheSchool/typst-g-exam/actions/workflows/integration.yaml)

## Features

- Scoreboard.
Expand Down
Binary file modified documentation/document.pdf
Binary file not shown.
15 changes: 11 additions & 4 deletions documentation/document.typ
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#import "@preview/tidy:0.2.0"
// https://github.com/Mc-Zen/tidy

#let docs = tidy.parse-module(
read("../g-exam.typ"),
name: "g-exam (Exam generator)")
#let exam-docs = tidy.parse-module(
read("../src/g-exam.typ"),
name: "Exam definition")

#tidy.show-module(docs, style: tidy.styles.default)
#let command-docs = tidy.parse-module(
read("../src/g-command.typ"),
name: "Command definitions")


#tidy.show-module(exam-docs, style: tidy.styles.default)

#tidy.show-module(command-docs, style: tidy.styles.default)
20 changes: 20 additions & 0 deletions src/g-command.typ
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
// #import "./g-exam.typ": *
#import"./global.typ": *

/// Show a question.
///
/// *Example:*
/// ```
/// #g-question(point:2)[This is a question]
/// ```
///
/// - point (none, float): Points of the question.
/// - point-position(none, left, right): Position of points. If none, use the position defined in G-Exam.
/// - body (string, content): Body of question.
#let g-question(
point: none,
point-position: none,
Expand Down Expand Up @@ -57,6 +67,16 @@
})
}

/// Show a sub-question.
///
/// *Example:*
/// ```
/// #g-subquestion(point:2)[This is a sub-question]
/// ```
///
/// - point (none, float): Points of the sub-question.
/// - point-position(none, left, right): Position of points. If none, use the position defined in G-Exam.
/// - body (string, content): Body of sub-question.
#let g-subquestion(
point: none,
point-position: none,
Expand Down

0 comments on commit 435c033

Please sign in to comment.