Indenting, centering, justification - PGML

From WeBWorK_wiki
Jump to navigation Jump to search

Indenting

To indent a paragraph, use four spaces before the first line of the paragraph.

 This is flush left.
 
     This paragraph is indented.  It is
 a bit longer than the first one.

Note that only the first line needs to have the four spaces, but you are allowed to use four spaces for each line if you want, and it helps to make it easer to read if you do.

 This is flush left.
 
     This paragraph is indented.  It is
     a bit longer than the first one.
 
 This is flush left again.

You do not need to use a paragraph break to get indenting. For example:

 Indent a section by using four spaces or a tab
     This is indented,
     and continues on a second line.
         Another four spaces indents again.
     Go back to four to end the inner indenting.

Note, however, that since you do not need to use four spaces after the first line, you can't go back to no indenting by removing the last four spaces. You would need to end the paragraph to do that. Alternatively, you can end a line with three spaces to go back to no indenting.

 End the paragraph to go back to no indenting
     or use _three_ spaces to end the line   
 and that will end the indenting

Centering

To center a paragraph, begin it with >> and end it with <<.

 >> A centered line <<
 
 >> A centered paragraph that
 has two lines of text.  <<

(Think of the arrows as "pushing" the text from both sides to center it.)

You can also use the angle brackets on each line of the paragraph.

  >>    You can mark each                  <<
  >>    line separately if you want        <<
  >>    and all lines will be combined     <<
  >>    into one centered paragraph.       <<

Put two spaces after the << to force a line break within the centered paragraph.

You can combine centering with other formats, like headers

 >> ## A Centered Heading ## <<

Right-Justification

To right-justify a line or a paragraph, use >> on the left (but no << on the right).

 >> A right-justified line.
 
 >> A right-justified paragraph that
 has several lines, and will likely be
 more than one line on screen, as well.

As above, you can use angle brackets on each line

 >> A right-justified paragraph
 >> with several lines (that will be
 >> combined into one paragraph)

As before, you can force a line break with two spaces at the end of a line, and can combine right-justification with other environments

 >> ## A right-justified heading ##