### Configure Exam Clarifications in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/clarifications This Typst code configures the exam template to display a list of clarifications to students. It uses the `exam.with` function and accepts a collection of strings for the clarification messages. This is useful for setting expectations and rules for exam conduct and submission. ```typst #show: exam.with( clarifications: ( [Cheating, talking, getting up from the chair or disturbing the rest of the class can be reasons for withdrawing the exam that will be valued with a zero..], [All the operations must appear, it is not enough just to indicate the result.], [The shortest possible solution must be reached.], [It is allowed to use the calculator.], [It is not allowed to share material during the exam..], ) ) ``` -------------------------------- ### Apply Dyslexia-Friendly Font to Questions in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/font-type This code example shows how to apply a dyslexia-friendly font, such as 'OpenDyslexic', to the question text in Typst exams. It uses the `exam.with` function and specifies the `font` parameter within `question-text-parameters` along with size and spacing. ```typst #show: exam.with( question-text-parameters: (size: 16pt, spacing:200%, font:"OpenDyslexic), ) ``` ```typst #show: exam.with( question-text-parameters: (size: 16pt, spacing:200%, font:"OpenDyslexic), ) ``` -------------------------------- ### Modify Exam Localization Labels in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/localization Customizes the appearance of specific localization labels, such as table headers, by wrapping the text in additional formatting like asterisks. This example shows how to modify the grade table labels. ```typst #show: exam.with( localization: ( grade-table-queston: [*******Question*******], grade-table-total: [*******Total*******], grade-table-points: [*******Points*******], grade-table-grade: [*******Grade*******], ), ) ``` -------------------------------- ### Set Global Font for Entire Typst Document Source: https://matheschool.github.io/typst-g-exam/configuration/font-type This snippet illustrates how to change the font for the entire Typst document, including headers, footers, and question numbering. It uses the `#set text` command before calling the exam template, affecting all text elements. The example sets the font to 'PT Sans' with a specific size and spacing. ```typst #set text(font: "PT Sans", size: 18pt, spacing:200%) #show: exam.with( ) #question(points: 2)[#lorem(30)] ``` ```typst #set text(font: "PT Sans", size: 18pt, spacing:200%) #show: exam.with( ) #question(points: 2)[#lorem(30)] ``` -------------------------------- ### Typst: Format Exam Questions with Scores and Subquestions Source: https://matheschool.github.io/typst-g-exam/configuration/question Demonstrates the basic usage of 'question' and 'subquestion' commands in Typst to define exam items and their scores. The '#show: exam.with()' command is used to enable exam formatting. ```typst #show: exam.with() #question(points: 2)[List prime numbers] #v(1fr) #question(points: 1)[Complete the following sentences] #subquestion[Don Quixote was written by ...] #v(1fr) #subquestion[The name of the continent we live on is ...] #v(1fr) ``` -------------------------------- ### Typst Exam Configuration and Question Definition Source: https://matheschool.github.io/typst-g-exam/introduction/introduction This Typst code snippet demonstrates how to configure an exam using the g-exam template. It sets up school information, exam details, student data display options, and grade table visibility. It then defines multiple questions with specified points and content, using the `#question` and `#v` functions. ```typst #import "@preview/g-exam:0.4.4": * #show: exam.with( school: ( name: "Sunrise Secondary School", logo: read("./logo.png", encoding: none), ), exam-info: ( academic-period: "Academic year 2023/2024", academic-level: "1st Secondary Education", academic-subject: "Mathematics", number: "2nd Assessment 1st Exam", content: "Radicals and fractions", model: "Model A" ), show-student-data: "first-page", 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." ) #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) #question(points:2.5)[Prove that the real part of all non-trivial zeros of the function $zeta(z) "is" 1/2$]. #v(1fr) #question(points:2)[Compute $ integral_0^infinity (sin(x))/x $ ] #v(1fr) ``` -------------------------------- ### Configure Exam Header with School and Author Info (Typst) Source: https://matheschool.github.io/typst-g-exam/configuration/configuration This snippet shows how to configure the exam header using the `exam.with()` function. It allows specifying author details (name, email, watermark), school information (name, logo), and general exam details (academic period, level, subject, content, model). The logo is read from a local file. ```typst #show: exam.with( author: ( name: "Carl Friedrich Gauss", email: "matheschool@outlook.es", watermark: "Teacher: Carl", ), school: ( name: "Sunrise Secondary School", logo: read("./logo.png", encoding: none), ), exam-info: ( academic-period: "Academic year 2023/2024", academic-level: "1st Secondary Education", academic-subject: "Mathematics", number: "2nd Assessment 1st Exam", content: "Radicals and fractions", model: "Model A" ), ) ``` ```typst #show: exam.with( author: ( name: "Leonhard Euler", email: "matheschool@outlook.es", watermark: "Teacher: Leonhard", ), school: ( name: "Sunrise Secondary School", logo: read("./logo.png", encoding: none), ), exam-info: ( academic-period: "Academic year 2023/2024", academic-level: "1st Secondary Education", academic-subject: "Mathematics", number: "2nd Assessment 1st Exam", content: "Radicals and fractions", model: "Model A" ), ) ``` -------------------------------- ### Show Exam Template with Customization Source: https://matheschool.github.io/typst-g-exam/commands/commands This snippet demonstrates how to use the 'exam.with()' function to display an exam template. It allows for extensive customization of exam details, author information, school branding, and clarification settings. ```typst #show: exam.with() #set page(numbering: "1") #let exam = context { // Exam content goes here // Example: // "Introduction to Typst" // "Chapter 1: Basics" // "Exam 1.1" } #exam.with( autor: (name: "John Doe", email: "john.doe@example.com", watermark: "Confidential"), scholl: (name: "Example University", logo: none), // Replace 'none' with actual logo data if available "exam-info": (academic-period: "Fall 2023", academic-level: "Undergraduate", academic-subject: "Computer Science", number: "1", content: "Midterm Exam", model: "A"), clarification: ( question-text-parameters: (size: 12pt), show-studen-data: "first-page", show-grade-table: true, decimal-separator: ",", question-points-position: "right", show-solution: false ) ) ``` -------------------------------- ### Define Questions and Sub-questions with Scores (Typst) Source: https://matheschool.github.io/typst-g-exam/configuration/configuration This snippet demonstrates how to define main questions and nested sub-questions within an exam using Typst. Both questions and sub-questions can be assigned points using the `points` parameter. It's recommended to assign points at only one level (either main question or sub-question) to avoid double-counting. ```typst #import "@preview/g-exam:0.4.4": * #show: exam.with() #question(points: 2)[List prime numbers] #v(1fr) #question[Complete the following sentences] #subquestion(points: 2)[Don Quixote was written by ...] #v(1fr) #subquestion(points: 2)[The name of the continent we live on is ...] #v(1fr) ``` -------------------------------- ### Configure School Name and Logo for Typst Exam Source: https://matheschool.github.io/typst-g-exam/configuration/school This snippet demonstrates how to set the school's name and logo for an exam. The logo must be a valid image format supported by Typst. The `read` function is used to load the logo file. ```typst #show: exam.with( school: ( school: ( name: "Sunrise Secondary School", logo: read("./logo.png", encoding: none), ), ) ) ``` -------------------------------- ### Show Student Data on First Page (Typst) Source: https://matheschool.github.io/typst-g-exam/configuration/student-data Configures the student data header to appear only on the first page of the exam. This is achieved by setting the 'show-student-data' property to 'first-page'. ```typst #show: exam.with( show-student-data: "first-page", ) ``` ```typst #show: exam.with( show-student-data: "first-page", ) ``` -------------------------------- ### Configure Exam Header Information in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/exam-info This snippet demonstrates how to configure the exam header information using the `exam.with` function in Typst. It allows specifying academic period, level, subject, exam number, content, and model. This configuration appears in the exam header. ```typst #show: exam.with( exam-info: ( academic-period: "Curso 2024/2025", academic-level: "2º ESO", academic-subject: "Matemáticas", number: "1ª evaluación - 2º examen", content: "Probabilidad", model: "Modelo A" ), ) ``` -------------------------------- ### Show Student Data on All Pages (Typst) Source: https://matheschool.github.io/typst-g-exam/configuration/student-data Configures the student data header to appear on every page of the exam. This is achieved by setting the 'show-student-data' property to 'all-page'. ```typst #show: exam.with( show-student-data: "all-page", ) ``` ```typst #show: exam.with( show-student-data: "all-page", ) ``` -------------------------------- ### Configure Grade Table Visibility in Typst Exam Source: https://matheschool.github.io/typst-g-exam/configuration/grade-table This snippet demonstrates how to configure the 'show-grade-table' parameter within the Typst exam package. Setting 'show-grade-table' to 'true' will display the grade table, while 'false' will hide it. This is useful for controlling the output of exam results. ```typst #show: exam.with( show-grade-table: true, ) ``` ```typst #show: exam.with( show-grade-table: true, ) ``` -------------------------------- ### Configure Individual Student Data Fields (Typst) Source: https://matheschool.github.io/typst-g-exam/configuration/student-data Allows for separate configuration of individual student information fields like given name, family name, group, and date. Each field can be assigned a display rule (e.g., 'odd-page', 'first-page') or a boolean value (e.g., 'group: false'). ```typst #show: exam.with( show-student-data: ( given-name: "odd-page", family-name: "odd-page", group: false, date: "first-page" ), ) ``` ```typst #show: exam.with( show-student-data: ( given-name: "odd-page", family-name: "odd-page", group: false, date: "first-page" ), ) ``` -------------------------------- ### Typst: Set Score for Exam Questions Source: https://matheschool.github.io/typst-g-exam/configuration/question Shows how to assign a specific score to an exam question using the 'points' property within the 'question' command. This score will be displayed alongside the question text. ```typst #question(points: 2)[List prime numbers] ``` -------------------------------- ### Show Student Data on Odd Pages (Typst) Source: https://matheschool.github.io/typst-g-exam/configuration/student-data Configures the student data header to appear only on odd-numbered pages. This is useful for double-sided printing, ensuring the header appears on the first page of each sheet. Achieved by setting 'show-student-data' to 'odd-page'. ```typst #show: exam.with( show-student-data: "odd-page", ) ``` ```typst #show: exam.with( show-student-data: "odd-page", ) ``` -------------------------------- ### Customize Exam Localization Parameters in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/localization Allows customization of various text elements within the exam, such as table headers, labels for points, pages, and student information. This is achieved by providing custom text within the 'localization' parameter of the 'exam.with()' function. ```typst localization: ( grade-table-queston: [Question], grade-table-total: [Total], grade-table-points: [Points], grade-table-grade: [Grade], point: [point], points: [points], page: [page], page-counter-display: [1 of 1], family-name: [Surname], given-name: [Name], group: [Group], date: [Date], draft-label: [Draft], ) ``` -------------------------------- ### Define a Question with Score (Typst) Source: https://matheschool.github.io/typst-g-exam/configuration/configuration This Typst code defines a question for an exam. The `#question()` function is used, and an optional `points` parameter can be included to assign a score to the question. The `#v(1fr)` command is used for vertical spacing. ```typst #question(points: 2)[Question text.] #v(1fr) ``` -------------------------------- ### Set Exam to Draft in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/draft This code snippet demonstrates how to set the 'draft' field to true for an exam using Typst's 'exam.with()' function. This is useful for indicating that the exam is currently in a draft state and not yet finalized. No external dependencies are required beyond the Typst environment. ```typst #show: exam.with( draft: true, ) ``` -------------------------------- ### Typst: Set Score for Sub-Exam Questions Source: https://matheschool.github.io/typst-g-exam/configuration/question Demonstrates how to assign a score to a sub-question using the 'points' property within the 'subquestion' command. The sub-question's score contributes to the total score of its parent question. ```typst #subquestion(points: 2)[List prime numbers] ``` -------------------------------- ### Configure Author Information in Typst Exam Source: https://matheschool.github.io/typst-g-exam/configuration/author This snippet demonstrates how to set the author's name, email, and a custom watermark for a Typst exam. The name and email are embedded as PDF metadata, while the watermark appears on the exam document. ```typst #show: exam.with( author: ( name: "Carl Friedrich Gauss", email: "matheschool@outlook.es", watermark: "Teacher: Carl", ), ) ``` -------------------------------- ### Customize Question Font Parameters in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/font-type This snippet demonstrates how to set specific font parameters (size and spacing) for question text within a Typst exam. It utilizes the `exam.with` function and the `question-text-parameters` argument. This allows for differentiated text styling within the same document. ```typst #show: exam.with( question-text-parameters: (size: 16pt, spacing:200%), ) ``` ```typst #show: exam.with( question-text-parameters: (size: 16pt, spacing:200%), ) ``` -------------------------------- ### Typst: Set Decimal Separator for Scores Source: https://matheschool.github.io/typst-g-exam/configuration/question Shows how to specify the decimal separator for scores in Typst exams using the 'decimal-separator' property. This is useful for adapting to different language conventions, e.g., using ',' instead of '.' ```typst #show: exam.with( decimal-separator: ",", ) ``` -------------------------------- ### Typst: Position Score for Exam Questions (Right) Source: https://matheschool.github.io/typst-g-exam/configuration/question Illustrates how to control the display position of the question score using the 'points-position' property. Setting it to 'right' places the score to the right of the question text. ```typst #question(points: 2, points-position:right)[List prime numbers] ``` -------------------------------- ### Typst: Set Default Score Position for All Questions Source: https://matheschool.github.io/typst-g-exam/configuration/question Configures the default position for all question scores within an exam using the 'question-points-position' property in the '#show: exam.with()' directive. Setting it to 'right' applies this position globally. ```typst #show: exam.with( question-points-position: right, ) ``` -------------------------------- ### Typst: Position Score for Sub-Exam Questions (Right) Source: https://matheschool.github.io/typst-g-exam/configuration/question Explains how to set the display position for sub-question scores using 'points-position: right'. This ensures the score appears to the right of the sub-question text. ```typst #subquestion(points: 2, points-position:right)[List prime numbers] ``` -------------------------------- ### Set Exam Language in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/localization Specifies the language for exam text using the 'language' property within the 'exam.with()' function. Supported languages include 'en', 'es', 'de', 'fr', 'pt', 'it', 'nl'. ```typst #show: exam.with( language: "es", ) ``` -------------------------------- ### Modify Draft Mode Watermark Text in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/localization Changes the text displayed as a watermark in draft mode. The 'draft' parameter within 'exam.with()' can be set to a custom string. ```typst #show: exam.with( show-grade-table: true, draft: "Trial version", ) ``` -------------------------------- ### Set Paper Size to US Letter in Typst Exam Source: https://matheschool.github.io/typst-g-exam/configuration/paper-size This code snippet demonstrates how to change the default paper size from A4 to US Letter within a Typst exam. It utilizes the `#set page()` function to specify the desired paper dimensions. This setting affects the layout and printing of the exam document. ```typst #set page("us-letter") #show: exam.with( ) #question(points: 2)[#lorem(30)] ``` -------------------------------- ### Modify Draft Mode Watermark Size in Typst Source: https://matheschool.github.io/typst-g-exam/configuration/localization Adjusts the font size of the draft mode watermark text. This is done by wrapping the draft text in a '#text()' function and specifying the desired 'size'. ```typst #show: exam.with( show-grade-table: true, draft: #text(size: 20pt)[Draft], ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.