Formatting in a WebWork Problem

There are two types of formatting in WeBWork problems: text and math. WeBWork will do a better job if you keep this distinction clear.

Text Formatting

Here is a short guide of how you can do different bits of text formatting:

Bold face

Enclose the text between $BBOLD and $EBOLD, as in

I like $BBOLD heavy $EBOLD type in my problems.
				
to produce

I like heavy type in my problems.

Italics

Note, do not use text italics for math symbols, use the math constructs below. Ultimately, it is both easier and more uniform.

Enclose the text between $BITALIC and $EITALIC, as in

I like $BITALIC slanty $EITALIC type in my problems.
				
to produce

I like slanty type in my problems.

Centering

Note, do not use this to center a math equation, there is a math construct for that which will do a better job.

Enclose the text to be centered between $BCENTER and $ECENTER, as in

Here is some text which will be centered:
$BCENTER
Center me, please!
$ECENTER
Back to regular text now.
				
to produce

Here is some text which will be centered:

Center me, please!
Back to regular text now.

Paragraphs, line breaks, and other white space

In general, white space you type will be ignored. If you want to start a new paragraph, you need to insert $PAR. You could also insert $BR, which is short for "break". These two constructs are slightly different in how much vertical space they will leave. Personally, I would not worry about the distinction.

Math Formatting

WeBWork follows the convention of TeX, that the author should distinguish to the computer between what is math and what is text. The same thing will be typeset differently depending on which "mode" you are in. Note, math mode is not equivalent to setting everything in it in italics. WeBWork will know what to italicize and what to leave alone. It will take care of most conventions of math spacing too.

Regular math mode will put the math stuff right in the line. Displayed math mode puts the math on a line by itself, centered in the window. There are some subtler differences in terms of size and how some things are typeset, so don't combine centering and regular math mode and expect the same results as displayed math.

Both versions of math mode occur with the rest of your problem text, so should be between BEGIN_TEXT and END_TEXT.

Regular math mode starts with "\(" and ends with "\)". Displayed math mode starts with "\[" and ends with "\]".

For example,

Consider the function
\( f(x)     = e^x + \alpha^2_3  \), which contains greek letters,
superscripts, and subscripts.
to produce
Consider the function f(x) = ex + a23, which contains greek letters, superscripts, and subscripts.

See the LaTeX chart for more special LaTeX sequences which can be used in math mode.


John Jones
Last modified: Mon Jul 8 10:33:19 MST 2002

NSF Logo The work represented here was produced with partial support from a grant by the National Science Foundation (DUE-0125369).