### Install setuptools for Python Source: https://github.com/gpoore/text2qti/blob/master/README.md Installs the setuptools package for Python. Use 'python3' if 'python' is not aliased correctly on your system. ```bash python -m pip install setuptools ``` -------------------------------- ### Install development version of text2qti using setup.py Source: https://github.com/gpoore/text2qti/blob/master/README.md Installs the development version of text2qti by running the setup.py script. Use 'python3' if 'python' is not aliased correctly on your system. ```bash python setup.py install ``` -------------------------------- ### Install development version of text2qti using setup.py with user scheme Source: https://github.com/gpoore/text2qti/blob/master/README.md Installs the development version of text2qti using the user scheme, suitable for environments without root privileges. Use 'python3' if 'python' is not aliased correctly on your system. ```bash python setup.py install --user ``` -------------------------------- ### Install development version of text2qti using pip Source: https://github.com/gpoore/text2qti/blob/master/README.md Installs the development version of text2qti from the current directory using pip. ```bash python -m pip install . ``` -------------------------------- ### Install text2qti package Source: https://github.com/gpoore/text2qti/blob/master/README.md Installs the text2qti package using pip. Use 'python3' if 'python' is not aliased correctly on your system. ```bash python -m pip install text2qti ``` -------------------------------- ### Markdown Table Example Source: https://github.com/gpoore/text2qti/blob/master/README.md Provides an example of how to structure tables in Markdown, including headers and data cells. ```markdown Header | Header ------ | ------ Cell | Cell Cell | Cell ``` -------------------------------- ### Markdown Definition List Example Source: https://github.com/gpoore/text2qti/blob/master/README.md Demonstrates the syntax for creating definition lists using the 'def_list' Markdown extension. ```markdown term : definition ``` -------------------------------- ### text2qti file format example Source: https://github.com/gpoore/text2qti/blob/master/README.md Illustrates the text2qti file format, showing how Markdown content is wrapped and indented within the plain-text quiz structure. ```text **No indentation: text2qti wrapper syntax for Markdown** | | **Indentation: Now using Markdown** | **Everything below this must have at least this indentation** | | 1. Question. | | | Question continued, so indentation. | | *a) Correct answer. | | | Correct answer continued, so indentation. | | b) Another answer. | | ``` -------------------------------- ### Multi-line Paragraph Indentation Example Source: https://github.com/gpoore/text2qti/blob/master/README.md Demonstrates correct indentation for multi-line paragraphs in descriptions, questions, and text regions. ```markdown 1. A question paragraph that is long enough to wrap onto a second line. The second line must be indented to match up with the start of the paragraph text on the first line. Another paragraph. ``` -------------------------------- ### Markdown Footnote Example Source: https://github.com/gpoore/text2qti/blob/master/README.md Shows the syntax for creating footnotes in Markdown, including the footnote marker and the footnote text definition. ```markdown Normal text [^1]. [^1]: Footnote text. ``` -------------------------------- ### Convert LaTeX to MathML with Pandoc Source: https://github.com/gpoore/text2qti/blob/master/README.md Use the --pandoc-mathml option to convert LaTeX to MathML. This requires Pandoc to be installed. A cache file is created for performance. ```bash text2qti --pandoc-mathml quiz.txt ``` -------------------------------- ### Export Solutions to PDF Source: https://github.com/gpoore/text2qti/blob/master/README.md Export quiz solutions to PDF format using the --only-solutions option. Requires Pandoc and a LaTeX installation. ```bash --only-solutions solutions.pdf ``` -------------------------------- ### Line Comments in Quiz Files Source: https://github.com/gpoore/text2qti/blob/master/README.md Lines starting with a percent sign (%) are treated as comments and discarded. ```text % This is a line comment. ``` -------------------------------- ### Define Quiz Title in Text File Source: https://github.com/gpoore/text2qti/blob/master/README.md Start your quiz text file with a title using the 'Quiz title:' prefix. This ensures the quiz has a specific title in QTI format, rather than the default 'Quiz'. ```text Quiz title: Title here ``` -------------------------------- ### Markdown Image with Pandoc Attributes Source: https://github.com/gpoore/text2qti/blob/master/README.md Example of using Pandoc-style attributes with Markdown images to specify ID, classes, and dimensions. ```markdown ![alt_text](image_file){#id .class1 .class2 width=10em height=5em} ``` -------------------------------- ### Inline LaTeX Math Example Source: https://github.com/gpoore/text2qti/blob/master/README.md Supports inline LaTeX math within dollar signs. Ensure a non-space character follows the opening $ and precedes the closing $. ```latex $F = ma$ ``` -------------------------------- ### Markdown Fenced Code Block Example Source: https://github.com/gpoore/text2qti/blob/master/README.md Illustrates the use of fenced code blocks for including code snippets, using triple backticks. ```markdown ``` ``` ``` -------------------------------- ### Run text2qti Command-Line Application Source: https://github.com/gpoore/text2qti/blob/master/README.md Execute the text2qti command-line tool to convert a quiz file. Replace 'quiz.txt' with your actual file name. This generates a .zip file containing the QTI-formatted quiz. ```bash text2qti quiz.txt ``` -------------------------------- ### Customizing Group Solutions with 'solutions pick' Source: https://github.com/gpoore/text2qti/blob/master/README.md Specify the number of questions from a group to include in solutions using 'solutions pick'. Questions are taken sequentially from the beginning of the group by default. ```text2qti GROUP pick: 1 solutions pick: 2 1. A question. *a) true b) false 2. Another question. *a) true b) false 3. Yet another question. *a) true b) false END_GROUP ``` -------------------------------- ### Export Solutions to HTML Source: https://github.com/gpoore/text2qti/blob/master/README.md Export quiz solutions to HTML format using the --only-solutions option. ```bash --only-solutions solutions.html ``` -------------------------------- ### Using siunitx for Numbers and Units Source: https://github.com/gpoore/text2qti/blob/master/README.md Supports a subset of siunitx notation for numbers and units. Unit macros like \degree, \celsius, \fahrenheit, \ohm, \micro are supported. ```latex \num{1.23e5} ``` ```latex \si{m/s} ``` ```latex \si{N.m} ``` ```latex \SI{1.23e5}{m/s} ``` -------------------------------- ### Save Solutions Without Creating QTI Source: https://github.com/gpoore/text2qti/blob/master/README.md Use the --only-solutions option to save quiz solutions without generating a QTI file. Useful for verifying solutions independently. ```bash --only-solutions ``` -------------------------------- ### Configuring Quiz-Level Solution Options Source: https://github.com/gpoore/text2qti/blob/master/README.md Set quiz-level options to true/false to customize how solutions are generated. These options control feedback treatment, sampling of questions, and randomization of question order within groups. ```text2qti solutions sample groups: true ``` ```text2qti solutions randomize groups: true ``` -------------------------------- ### QTI Quiz with Title, Description, and Feedback Source: https://github.com/gpoore/text2qti/blob/master/README.md A QTI quiz structure including a title, description, question title, points, general feedback, and specific feedback for answers. This format is suitable for import into platforms like Canvas. ```markdown Quiz title: Addition Quiz description: Checking addition. Title: An addition question Points: 2 1. What is 2+3? ... General question feedback. + Feedback for correct answer. - Feedback for incorrect answer. a) 6 ... Feedback for this particular answer. b) 1 ... Feedback for this particular answer. *c) 5 ... Feedback for this particular answer. ``` -------------------------------- ### Upgrade text2qti package Source: https://github.com/gpoore/text2qti/blob/master/README.md Upgrades the text2qti package to the latest version using pip. Use 'python3' if 'python' is not aliased correctly on your system. ```bash python -m pip install text2qti --upgrade ``` -------------------------------- ### Export Solutions to Pandoc Markdown Source: https://github.com/gpoore/text2qti/blob/master/README.md Export quiz solutions to Pandoc Markdown format using the --solutions option. Suitable for LaTeX and HTML processing. ```bash --solutions ``` -------------------------------- ### Markdown Image Syntax Source: https://github.com/gpoore/text2qti/blob/master/README.md Standard Markdown syntax for including images with alternative text and a file path. ```markdown ![alt_text](image_file) ``` -------------------------------- ### Execute Python Code to Generate Questions Source: https://github.com/gpoore/text2qti/blob/master/README.md This Python code snippet demonstrates how to generate multiple-choice questions dynamically using textwrap and f-strings. The output is directly embedded into the quiz file. ```python import textwrap for x in [2, 3]: print(textwrap.dedent(rf""" 1. What is ${x}\times 5$? *a) ${x*5}$ b) ${x+1}$ """)) ``` -------------------------------- ### Markdown Numerical Question with Simple Answer Source: https://github.com/gpoore/text2qti/blob/master/README.md A simple numerical question asking for the sum of 2 and 3, with the exact answer provided. ```markdown 3. What is 2+3? = 5 ``` -------------------------------- ### Customizing Essay Question Solutions Source: https://github.com/gpoore/text2qti/blob/master/README.md Use an exclamation point '!' to denote solution-specific information for essay or upload questions. This content is only included in solutions and not in the QTI itself. ```text2qti 1. Write an essay about text2qti. ! This is important information about what the essay should cover. This will only appear in the solutions, and can be as long or short as you wish. ____ ``` -------------------------------- ### Define a Question Group Source: https://github.com/gpoore/text2qti/blob/master/README.md Use this format to define a group of questions from which a specified number will be randomly selected for a quiz. Defaults are provided for 'pick' and 'points per question'. ```text GROUP pick: 1 points per question: 1 1. A question. *a) true b) false 2. Another question. *a) true b) false END_GROUP ``` -------------------------------- ### Markdown Numerical Question with Exact Answer Source: https://github.com/gpoore/text2qti/blob/master/README.md A numerical question asking for the cube root of 2, with an acceptable answer range specified. ```markdown 2. What is the cube root of 2? = [1.2598, 1.2600] ``` -------------------------------- ### Markdown File-Upload Question Source: https://github.com/gpoore/text2qti/blob/master/README.md A file-upload question indicated by circumflex accents. Only supports general question feedback. ```markdown 1. Upload a file. ... General question feedback. ^^^^ ``` -------------------------------- ### Markdown Short-Answer Question Source: https://github.com/gpoore/text2qti/blob/master/README.md A short-answer question with multiple acceptable answers. Answers are treated as plain text. ```markdown 1. Who lives at the North Pole? * Santa * Santa Claus * Father Christmas * Saint Nicholas * Saint Nick ``` -------------------------------- ### Multiline Comments in Quiz Files Source: https://github.com/gpoore/text2qti/blob/master/README.md Use COMMENT and END_COMMENT on separate lines to discard a block of text. These delimiters must be on lines by themselves. ```text COMMENT This is a multiline comment. It will be discarded. END_COMMENT ``` -------------------------------- ### Markdown Numerical Question with Range Source: https://github.com/gpoore/text2qti/blob/master/README.md A numerical question asking for the square root of 2, with an acceptable answer range specified. ```markdown 1. What is the square root of 2? = 1.4142 +- 0.0001 ``` -------------------------------- ### Markdown Multiple-Choice Question Source: https://github.com/gpoore/text2qti/blob/master/README.md A basic multiple-choice question formatted in Markdown. The correct answer is indicated by an asterisk. ```markdown 1. What is 2+3? a) 6 b) 1 *c) 5 ``` -------------------------------- ### Markdown Multiple-Answers Question Source: https://github.com/gpoore/text2qti/blob/master/README.md A multiple-answers question where correct answers are marked with [*] and incorrect answers with [ ]. ```markdown 1. Which of the following are dinosaurs? [ ] Woolly mammoth [*] Tyrannosaurus rex [*] Triceratops [ ] Smilodon fatalis ``` -------------------------------- ### Markdown Text Region Source: https://github.com/gpoore/text2qti/blob/master/README.md A text region outside of questions, used for instructions or general comments. The title is treated as plain text. ```markdown Text title: Instructions about the next questions Text: General comments about the next questions. ``` -------------------------------- ### Markdown Essay Question Source: https://github.com/gpoore/text2qti/blob/master/README.md An essay question indicated by underscores. Only supports general question feedback. ```markdown 1. Write an essay. ... General question feedback. ____ ``` -------------------------------- ### HTML Comments in Markdown Text Source: https://github.com/gpoore/text2qti/blob/master/README.md Standard HTML comments can be used within Markdown text and are stripped during processing. ```html ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.