WeBWorKdocs

sq_webwork:


Home
Current UR
courses
Visitor
page
Intro to
WeBWorK
WeBWorK 2
Twiki
WW
Community
Grant Support
& awards
Discussion
group
Problem
library
Write/modify
problems
Create &
manage course
Tutorial on
running a course
HowTos
FAQ
WeBWorK2
FAQ
Software
Download
How to
Install WW server
Feedback
Site Map
Change
preferences
Change
password





Prev | Next | manpages

TEXT

Description
The HEADER_TEXT() function is the basic print mechanism for PG problems. It concatenates its arguments and places them in the output text string for inclusion in the body of an HTML document. It can be used more than once in a PG source file.

Syntax

TEXT($string1, $string2...);

Params

A list of strings.

Action

Places its concatenated input in $STRINGforOUTPUT

Returns

Nothing

Examples

A barebones PG problem using TEXT:

DOCUMENT();
loadMacros(PGbasicmacros.pl,
PGanswermacros.pl );

TEXT(beginproblem());
TEXT( "Hello", ans_rule() , ".");
ANS(str_cmp("World") );
ENDDOCUMENT();

Notes

TEXT() is mainly used in constructing more abstract macros, however it can also be useful for directly including strings into the body of the HTML without any processing. For example, TEXT(beginproblem()); is often placed near the top of a PG problem source file in order to include "beginproblem"()'s output text, which indicates the number of the problem and the number of points it is worth.

See Also

"BEGIN_TEXT/END_TEXT", HEADER_TEXT

Macro Definition File

PG.pl

<| Post or View Comments |>


Prev | Next | manpages

Last update: Wednesday, January 10, 2007 at 10:27:14 PM.
This site maintained using Manila and Frontier software.