Skip to content

Commit

Permalink
Change point parameter by points.
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-gimenez committed Sep 30, 2024
1 parent dcea371 commit e6706c6
Show file tree
Hide file tree
Showing 29 changed files with 196 additions and 165 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ To use this package, simply add the following code to your document:
show-grade-table: true,
clarifications: "Answer the questions in the spaces provided. If you run out of room for an answer, continue on the back of the page."
)
#g-question(point:2.5)[Is it true that $x^n + y^n = z^n$ if $(x,y,z)$ and $n$ are positive integers?. Explain.]
#g-question(points:2.5)[Is it true that $x^n + y^n = z^n$ if $(x,y,z)$ and $n$ are positive integers?. Explain.]
#v(1fr)
#g-question(point:2.5)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].
#g-question(points:2.5)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].
#v(1fr)
#g-question(point:2)[Compute $ integral_0^infinity (sin(x))/x $ ]
#g-question(points:2)[Compute $ integral_0^infinity (sin(x))/x $ ]
#v(1fr)
```

## Changelog

<!-- ### v0.4.0
- Change point parameter by points in g-question and g-subquestion.
- Include documentation.
- Use paper by default.
- Indenting subquestion.
Expand Down
41 changes: 22 additions & 19 deletions docs/pages/commands.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,35 @@ nav_exclude: false
## g-exam

Template for creating an exam.
- autor: Infomation of autor of exam.
- name (string, content): Name of author of exam.
- email (string): e-mail of author of exam.
- watermark (string): Watermark with information about the author of the document.
- scholl: Information of scholl.
name (string, content): Name of the school or institution generating the exam.
- **autor**: Infomation of autor of exam.
- **name** (string, content): Name of author of exam.
- **email** (string): e-mail of author of exam.
- **watermark** (string): Watermark with information about the author of the document.
- **scholl**: Information of scholl.
- **name** (string, content): Name of the school or institution generating the exam.
- logo (none, content, bytes): Logo of the school or institution generating the exam.
- exam-info: Information of exam
- academic-period(none, content, str): academic period.
- academic-level(none, content, str): acadmic level.
- academic-subject(none, content, str): acadmic subname,
- number(none, content, str): Number of exam.
- content(none, content, str): Conten of exam.
- model(none, content, str): Model of exam.
- **exam-info**: Information of exam
- **academic-period**(none, content, str): academic period.
- **academic-level**(none, content, str): acadmic level.
- **academic-subject**(none, content, str): acadmic subname,
- **number**(none, content, str): Number of exam.
- **content**(none, content, str): Conten of exam.
- **model**(none, content, str): Model of exam.

```
```

### Clarification

Clarifications of exam. It will appear in a box on the first page.
- question-text-parameters: Parameter of text in question and subquestion. For example, it allows
- **question-text-parameters**: Parameter of text in question and subquestion. For example, it allows
us to change the text size of the questions.
- show-studen-data(none, true, false, “first-page”, “odd-pages”): It shows a box for the student to
- **show-studen-data**(none, true, false, “first-page”, “odd-pages”): It shows a box for the student to
enter their details. It can appear on the first page or on all odd-numbered pages.
- show-grade-table: (bool): Show grade table.
- decimal-separator: (“.”, “,”): Indicates the decimal separation character.
- question-point-position: (none, left, right): Position of question point.
- show-solution: (true, false): It shows the solutions to the questions.
- **show-grade-table**: (bool): Show grade table.
- **decimal-separator**: (“.”, “,”): Indicates the decimal separation character.
- **question-point-position**: (none, left, right): Position of question point.
- **show-solution**: (true, false): It shows the solutions to the questions.

```
```
8 changes: 4 additions & 4 deletions docs/pages/configuration.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ To enter the questions, use the q-question, followed by the text of the question
score of the question by entering the parameter point.

```
#g-question(point: 2)[Question text.]
#g-question(points: 2)[Question text.]
#v(1fr)
)
```
Expand All @@ -85,15 +85,15 @@ question is worth a total of four points in the scorecard.
#import "@preview/g-exam:0.3.0": *
#show: g-exam.with()
#g-question(point: 2)[List prime numbers]
#g-question(points: 2)[List prime numbers]
#v(1fr)
#g-question[Complete the following sentences]
#g-subquestion(point: 2)[Don Quixote was written by ...]
#g-subquestion(points: 2)[Don Quixote was written by ...]
#v(1fr)
#g-subquestion(point: 2)[The name of the continent we live on is ...]
#g-subquestion(points: 2)[The name of the continent we live on is ...]
#v(1fr)
```

Expand Down
6 changes: 3 additions & 3 deletions docs/pages/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ This is the minimum model for generating an exam, in which you define the g-exa
questions and subquestions with the g-question and g-subquestion commands.

```
#import "@preview/g-exam:0.3.2": *
#import "@preview/g-exam:0.4.0": *
#show: g-exam.with()
#g-question(point: 2)[List prime numbers]
#g-question(points: 2)[List prime numbers]
#v(1fr)
#g-question(point: 1)[Complete the following sentences]
#g-question(points: 1)[Complete the following sentences]
#g-subquestion[Don Quixote was written by ...]
#v(1fr)
#g-subquestion[The name of the continent we live on is ...]
Expand Down
8 changes: 4 additions & 4 deletions examples/exam-latexmit-example-without-spaces.typ
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
)

#g-question[Given the equation $x^n + y^n = z^n$ for $(x,y,z)$ and $n$ positive integers.]
#g-subquestion(point: 10)[For what values of $n$ is the statement in the previous question true?]
#g-subquestion(points: 10)[For what values of $n$ is the statement in the previous question true?]

#g-solution(
alternative-content: v(1fr)
)[
I know the demostration, but there's no room on the margin. For any clarification ask Andrew Whilst.
]

#g-subquestion(point: 10)[For $n=2$ there's a theorem with a special name. What's that name?
#g-subquestion(points: 10)[For $n=2$ there's a theorem with a special name. What's that name?

#g-solution(
alternative-content: v(1fr)
Expand All @@ -47,11 +47,11 @@
]
]

#g-subquestion(point: 10)[What famous mathematician had an elegant proof for this theorem but
#g-subquestion(points: 10)[What famous mathematician had an elegant proof for this theorem but
there was not enough space in the margin to write it down?].
#v(1fr)

#g-question(point: 20)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].
#g-question(points: 20)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].

#g-solution(alternative-content: [#v(1fr)]
)[
Expand Down
8 changes: 4 additions & 4 deletions examples/exam-latexmit-wxample-with-points.typ
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
)

#g-question[Given the equation $x^n + y^n = z^n$ for $(x,y,z)$ and $n$ positive integers.]
#g-subquestion(point: 10)[For what values of $n$ is the statement in the previous question true?]
#g-subquestion(points: 10)[For what values of $n$ is the statement in the previous question true?]
#v(1fr)
#g-subquestion(point: 10)[For $n=2$ there's a theorem with a special name. What's that name?]
#g-subquestion(points: 10)[For $n=2$ there's a theorem with a special name. What's that name?]
#v(1fr)

#g-subquestion(point: 10)[What famous mathematician had an elegant proof for this theorem but
#g-subquestion(points: 10)[What famous mathematician had an elegant proof for this theorem but
there was not enough space in the margin to write it down?].
#v(1fr)

#g-question(point: 20)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].
#g-question(points: 20)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].
#v(1fr)
6 changes: 3 additions & 3 deletions examples/exam-localization.typ
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
),
)

#g-question(point: 2)[Question 1]
#g-question(points: 2)[Question 1]

#g-question(point: 1)[Question 2]
#g-question(points: 1)[Question 2]

#g-question(point: 1.5)[Question 3]
#g-question(points: 1.5)[Question 3]
14 changes: 7 additions & 7 deletions examples/exam-mathematics.typ
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
)
)

#g-question(point: 2)[Calculate the following operations and simplify if possible:
#g-question(points: 2)[Calculate the following operations and simplify if possible:
#g-subquestion[$display(5/12 dot 9/15=)$]
#v(1fr)

Expand All @@ -49,7 +49,7 @@
]
#pagebreak()

#g-question(point: 2)[Calculate the following operations and simplify if possible:
#g-question(points: 2)[Calculate the following operations and simplify if possible:
#g-subquestion[$display(4/11+5/11-2/11=)$]
#v(1fr)

Expand All @@ -64,7 +64,7 @@
]
#pagebreak()

#g-question(point: 2)[Calculate the following operations and simplify if possible:
#g-question(points: 2)[Calculate the following operations and simplify if possible:
#g-subquestion[$display(3/5 - (1-7/10) = )$]
#v(1fr)

Expand All @@ -73,24 +73,24 @@
]
#pagebreak()

#g-question(point: 2)[Sort the following fractions from highest to lowest:
#g-question(points: 2)[Sort the following fractions from highest to lowest:
\ \
#align(center, [$ 2/3 ; 3/8 ; 4/6 ; 1/2 $])
#v(1fr)
]

#g-question(point: 2)[In a garden we have 20 red, 10 white and 15 yellow rose bushes.
#g-question(points: 2)[In a garden we have 20 red, 10 white and 15 yellow rose bushes.
#g-subquestion[What fraction does each color represent?]
#v(1fr)

#g-subquestion[If we have pruned red rose bushes, what fraction do we have left to prune?]
#v(1fr)
]

#g-question(point: 2)[#lorem(30)
#g-question(points: 2)[#lorem(30)
#g-subquestion[#lorem(35)]
// #v(1fr)

#g-subquestion(point: 1)[#lorem(130)]
#g-subquestion(points: 1)[#lorem(130)]
// #v(1fr)
]
6 changes: 3 additions & 3 deletions examples/exam-minimal.typ
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#show: g-exam.with()

#g-question(point: 2)[Question 1]
#g-question(points: 2)[Question 1]

#g-question(point: 1)[Question 2]
#g-question(points: 1)[Question 2]

#g-question(point: 1.5)[Question 3]
#g-question(points: 1.5)[Question 3]
10 changes: 5 additions & 5 deletions examples/exam-points-position.typ
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#show: g-exam.with()

#g-question(point: 2, point-position: right)[Question 1]
#g-question(points: 2, point-position: right)[Question 1]

#v(5cm)

Expand All @@ -12,7 +12,7 @@
Determines by the position of the lines the type of system according to the number of solutions. \

#columns(2, gutter: 2cm)[
#g-subquestion(point: 0.5, point-position: left)[
#g-subquestion(points: 0.5, point-position: left)[
#align(center,
cetz.canvas(length: 0.7cm, {
cetz.plot.plot(
Expand Down Expand Up @@ -52,7 +52,7 @@
]
#colbreak()

#g-subquestion(point: 0.5, point-position: right)[
#g-subquestion(points: 0.5, point-position: right)[
#align(center,
cetz.canvas(length: 0.7cm, {
cetz.plot.plot(
Expand Down Expand Up @@ -95,8 +95,8 @@

#pagebreak()

#g-question(point: 1)[Question 2]
#g-question(points: 1)[Question 2]

#g-question(point: 1.6, point-position: right)[Question 3]
#g-question(points: 1.6, point-position: right)[Question 3]

#g-question()[Question 4]
6 changes: 3 additions & 3 deletions examples/exam-sugar-notation.typ
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#show: g-exam.with()

#g-question(point:.2)[Question]
#g-question(points:.2)[Question]

#g-subquestion(point:.2)[sub 3]
#g-subquestion(points:.2)[sub 3]

= Title

Expand All @@ -28,7 +28,7 @@

=? Solve this ecuation $x^2 -4x +4 = 0$

#g-question(point:.2)[ Solve this equation $x^2 -4x +4 = 0$ ]
#g-question(points:.2)[ Solve this equation $x^2 -4x +4 = 0$ ]

=! Solution of the question.

Expand Down
6 changes: 3 additions & 3 deletions examples/exam-table-content.typ
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
clarifications: "Answer the questions in the spaces provided. If you run out of room for an answer, continue on the back of the page."
)

#g-question(point:2.5)[Is it true that $x^n + y^n = z^n$ if $(x,y,z)$ and $n$ are positive integers?. Explain.]
#g-question(points:2.5)[Is it true that $x^n + y^n = z^n$ if $(x,y,z)$ and $n$ are positive integers?. Explain.]
#v(1fr)

#g-question(point:2.5)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].
#g-question(points:2.5)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].
#v(1fr)

#g-question(point:2)[Compute
#g-question(points:2)[Compute
$ integral_0^infinity (sin(x))/x $
]
#v(1fr)
8 changes: 4 additions & 4 deletions examples/size-text-question.typ
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
)

#g-question[#text(size:20pt)[Given] the equation $x^n + y^n = z^n$ for $(x,y,z)$ and $n$ positive integers.]
#g-subquestion(point: 10)[For what values of $n$ is the statement in the previous question true?]
#g-subquestion(points: 10)[For what values of $n$ is the statement in the previous question true?]

#g-solution(
alternative-content: v(1fr)
)[
I know the demostration, but there's no room on the margin. For any clarification ask Andrew Whilst.
]

#g-subquestion(point: 10)[For $n=2$ there's a theorem with a special name. What's that name?
#g-subquestion(points: 10)[For $n=2$ there's a theorem with a special name. What's that name?

#g-solution(
alternative-content: v(1fr)
Expand All @@ -49,11 +49,11 @@
]


#g-subquestion(point: 10)[What famous mathematician had an elegant proof for this theorem but
#g-subquestion(points: 10)[What famous mathematician had an elegant proof for this theorem but
there was not enough space in the margin to write it down?].
// #v(1fr)

#g-question(point: 20)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].
#g-question(points: 20)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$].

#g-solution(alternative-content: [#v(1fr)]
)[
Expand Down
Loading

0 comments on commit e6706c6

Please sign in to comment.