Setup Blocks
You might have noticed on previous pages that, every time we defined a <math> or <number> object, the value was displayed on screen. You can avoid that by using the <setup> tag; anything between <setup> and </setup> will be defined and available to use throughout your document, but will not be displayed on screen.
In the following example, the numbers , , and are defined as <math> objects; then theyβre used to compute the discriminant
. None of those definitions and computation are displayed on screen, but all four numbers are used later on.
For comparison, hereβs the same code with <setup> and </setup> removed. The four numbers from the <setup> block are all displayed on screen, which is confusing to the user!
Throughout the rest of this tutorial, weβll frequently use <setup> for definitions and computations that donβt need to appear on screen.
Next Steps
Itβs time to make our documents interactive! In the next section weβll learn the basics of how to get user input in a DoenetML document.