# Quiz Syntax

It is recommended that the casual reader at least finish the keywords section. Those that are more ambitious may read formatting. People who want to get serious should finish question types. True power users should finish the document if time is to be had. If there is no time, then read those sections that are relevant.

## Quick Start

While QuizMaster offers a syntax that makes quizzes very customizable, we understand that it is frequently bothersome for a person to mind the details of the syntax while coming up or entering questions, so QuizMaster is also very undemanding: the most basic way to create a question is this

Yes, just like this. This is what QuizMaster is based on. When this is used, QuizMaster will demand an exact answer.

Different questions are separated by two newlines:

If you just intend to create quizlet-style questions, you can stop here, because this is all that you need, because the above is basically the functionality of quizlet's engine, (although it does have the capability to distinguish between different answers).

Unlike quizlet, multiple answers to each question is possible. Note that all the answers would have to be given. However, when the question is rendered, the different answers are each given an input box to use. The syntax for this is

There is no limit to the number of answers.

### Prompts

To distinguish between each of the choices, you can distinguish prompts. These prompts will be presented to the quiz-taker. The syntax for defining this is

Note that questions with single answers can also use prompts. The special characters and are Chinese variants of the [ and ] respectively. If necessary, copy and paste them from here. This character is used so as to decrease possible conflict with characters in mathematics.

## Keywords

Perhaps the most important feature in QuizMaster, keywords allow the creator of the quiz to define required words. If these keywords are present, everything else is optional. For example, for the answer Hello, [world], where "world" is a keyword, Hello, world, world, and Goodbye, world! are all correct, but Hello, is not. Obviously there are some downsides, so use it wisely, but don't be afraid to use it. As this is not flashcard software, it is intended to simulate a test. In tests, markschemes often outline what is necessary using positive marking, which is what we are trying to implemenet with the keywords system. The syntax to define this is

### Synonyms

Synonym-keywords are powered by natural language processing. These keywords permit synonyms to be accepted as well. For example, for the synonym keyword "good", "well" and "great" should also be accepted. As with regular keywords, use with caution, but do use it.

## Formatting

Formatting is intended to be used in questions, not prompts. These offer a much more varied styling system than quizlet's bold, albeit at a price: it is more tedious to define. Using something like html syntax, the basic syntax is this

Here, the style attribute is unconventional. It is defined as

For example,

These attributes are based on termcolor's options, but as blink is not supported by the latest html5, it is not permitted.

### Math

Mathematics with mathjax is permitted. "$...$" is not supported, because as the docs say, dollar signs appear too often in non-mathematical settings. For inline math, use "$$...$$" instead. Admittedly, the math doesn't render as well with the 0.3 seconds trasntion duration, but it does have the effect of the mathematics slowly popping out. As with formatting: do not try to use this in writing answers. These are defined elsewhere.

### Images

Images are defined using the "img" tag, in accordance with html. Similar to formatting, its syntax will be as such

It will have no closing tag. The "src" should be an online source, as we don't have as much storage space as google, and can't possibly host everyone's images securely. For example,

If the image does not dispaly correctly, please check the url for ">"s and spaces1 . If they contain these characters, use an url encoder to convert them to hex. The Bing encoder has been tested to work. Again, do not use these in answers, as they will be ignored.

## Question Types

As of now, there are three types of questions. The most basic is the written question, which allows for the described syntax of keywords. The definition of these questions is outlined in the "Quick Start" and "Multiple Answers" section. The other two types are the multiple coice question and the mathematics answer question respectively.

### Multiple Choice Question

The multiple choice question type allows the creator of the quiz to create a multiple choice question (well duh). The choices and the correct answer can be specified, which is different from quizlet, which only automatically generate (rather shoddy) multiple choice questions from its flashcards.

The choices themselves are defined in the question, while the answer is defined in the answers area.

The |choice1/choice2/choice3| will be rendered as an underline in the actual question. Note that the mcq is very important. Alternatives include multiple choice question and mode:multiple choice, case insensitive. The second line of the answer defines choice1 as the correct answer.

The |choice1/choice2/choice3| is just an example. The actual number of choices is unlimited. It will be rendered as a dropdown <select> menu. The choices should not contain spaces. Spaces that are contained must be escaped. Escaping is accomplished by placing a "\" (backslash) before the space character. For example,

The correct answer need not be escaped. In fact, do not escape it. There is no check if the correct answer is actually a viable choice, so check that it is.

### Mathematics Question

Note: math can be rendered in any question.

Mathematics questions allow the quiz taker to enter a mathematical equation as the answer. The correct answer is inputted in latex math mode. For example,

The latex should not be surrounded by any kind of math deliminator. As with multiple choice questions, the math is very important. Alternatives include mathematics, mode:math. and mode:mathematics. Note that keywords are not supported in math mode, and neither are prompts2, as mathematics equations contain a wide variety of special characters.

## Meta System

All meta pairs are defined using the same syntax as written questions. The only difference is that metas are headed with a *, which is why the * character should never be used at the start of a question that is not intended to be meta.

The question is called the "key" of the meta, and the answers are called the "value" of the meta. All meta tags are displayed below the quiz. The most common one, (indeed the default one), is the description. They are displayed in table format, and the newlines are actually rendered as newlines in the table.

## Configuration System

The creator of the quiz can configure many aspects of how their quiz is rendered. The most useful one (and as of now the only one) is the shuffle option, which controls whether the quiz is shuffled. These configuration systems are defined exactly like a written question, which is why there should never be a question simply called "shuffle". The default mode is on, but there can be changes. All changes apply to the entire scope, which is usually the entire quiz but not necessarily. (See the section on blocs.) To turn it on, use either yes, on, y, or shuffle. To disable it, use either no, off, n, or cancel.

There are two types of comments, the line comment and the block comment. These are not displayed in the quiz and serve more as an aid to the person reading the quiz, or as a temporary measure to remove a few quesitons.

The line comment is headed by a hastag (the #). The syntax is

The block comment is also defined like a written question. It is headed by "comment", which is why it should never be a question. The syntax is

The block comment ends at the paragraph break.

## Bloc System

The bloc system is a means to define and limit the scope of settings and bind questions together.

They are deliminated by "{" and "}". It is recommended that they be their own paragraph. However, line comments (but not block comments) can be close to them. For example,

Quizzes in each bloc stay together. For example, while the entire quiz might be shuffled, questions 2, 3, and 4 will always appear together, but not necessarily in that order.

Since each bloc is treated as a separate file by the parser, settings only apply within the bloc. For example, if a shuffle configuration is added that turns shuffling off in the bloc, then the questions 2, 3, and 4 will always appear together and in that order.

They can be infinitely nested, with those nested inside being deliminated by one more "{" than its container. For example,

1 It should not be possible for URLs to contain spaces anyways, so please make sure that it is actually a url.
2 This may be changed in the future