Skip to content

Text Block

The text block provides the ability to present the participant with a simple text. The structure of this block is summarised below.

Tip

If specification of a custom alignment is unnecessary, it is easier to use the available text shorthand in the stimulus block, instead of this block.

Parameters

text

Required.
String that specifies the text to be shown to the participant. This can be used to present the participant with a textual stimulus, to give the participant certain instructions, or to provide other types of information.

See Preliminaries for a refresher on how to write multi-line text.

alignment
Optional, defaults to CENTER.
Keyword that specifies the alignment of multi-line text. Available Keywords are LEFT, CENTER and RIGHT.

Example usage

The code below illustrates how the text block might be used.

experiment {
    trial {
        stimulus {
            text {
                text = "In the next trials, a word will briefly appear.\n\
Press the left arrowkey if the word contains at most one vowel\n\
and the right arrowkey if the word contains more than one vowel.\n\n\
For each trial, answer within 3 seconds." //(1)
                alignment = LEFT
            }
        }
        response {
            button
        }
    }

    // If specification of a custom alignment is unnecessary,
    // we recommend using the 'text' shorthand of the stimulus block instead.
    // Example:

    trial {
        max_duration = 3000

        stimulus {
            text = "We will start now."
        }
    }
}
  1. Confused? See Preliminaries for a refresher on how linebreaks work.
Back to top