From WeBWorK
Revision as of 17:38, 16 August 2018 by Gage (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Most people write problems starting from templates. Problems from the OPL can be modified to suit individual needs, or existing problem templates can be used to create new problems.

Basic Information

WeBWorK problems should be written with the use of MathObjects. Most of the templates mentioned above will include the MathObject Macros (recognizable by the line "" in the LoadMacros section of the code). For those who would like to read up on the basics of coding problems the following pages are recommended:

Templates, programming examples, and problem libraries from the University of Lethbridge

Sean Fitzpatrick ( contributed the following:

This summer, one of my colleagues hired a student to help her go through all of the libraries, marcos, contexts, etc. and put together a collection of templates and programming examples. I got permission from her to put everything on a public GitHub repository; you can find the fruits of their efforts here:

The programming examples are not questions. They're an attempt at producing an exhaustive list of every possible way of inputting and evaluating something using the various contexts. In the documentation there's a nice flowchart for deciding which context to use for a given problem.

I hope this is useful. It's the beginnings of what will hopefully be a longer project (done mostly over summers), so it's not yet as polished as it could be.

Reference documents and manuals


This category has the following 7 subcategories, out of 7 total.



M cont.


  • PGML(2 C, 21 P)


S cont.

follow us