A text block in a PG file is enclosed by BEGIN_TEXT
and END_TEXT
, BEGIN_HINT
END_HINT
, or BEGIN_SOLUTION
END_SOLUTION
. Everything in a text block is in a new mode determined by PG, and it is possible to temporarily switch to TeX inline mode using \( \), TeX display mode using \[ \], or Perl mode using \{ \}. Inside a text block, you will not be able to access some special characters like $, %, ^, _ simply by typing them, so PG has special commands for them.
$DOLLAR produces $
$PERCENT produces %
$CARET produces ^
$US produces _
In a text block, you may want to break a line, create a new paragraph, center text, or make text bold, italic, underlined, or quoted. The commands for these things are different in HTML and TeX, so PG provides you with commands that work properly in both HTML and TeX. Notice that, for example, we have written ${BBOLD}Text made bold${EBOLD}
with extra curly braces around ${BBOLD}
and ${EBOLD}
to keep them from running together with the text they enclose. However, since the centered text is on a separate line from $BCENTER
and $ECENTER
, there is no chance of things running together and we omit the extra curly braces.
$BR produces a line break
$PAR produces a paragraph break
$BCENTER
Text made centered
$ECENTER
${BBOLD}Text made bold${EBOLD}
${BITALIC}Text made italic${EITALIC}
${BUL}Text underlined${EUL}
${LQ}Quoted text with curly TeX quotes${RQ}
If you want inequalities or curly braces, use TeX's math mode.
\( < \) less than
\( > \) greater than
\( \leq \) less than or equal
\( \geq \) greater than or equal
\( \lbrace \) left curly brace
\( \rbrace \) right curly brace
The commands just discussed are defined in PGbasicmacros.pl
.