Skip to main content
Chemistry LibreTexts

2.7: Future PG version features

  • Page ID
    557634
  • ​

    ​

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\ket}[1]{\left| #1 \right>}\)
    \(\newcommand{\bra}[1]{\left< #1 \right|}\)
    \(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
    \(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
    \(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
    \(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
    \(\newcommand{\expect}[1]{\langle #1 \rangle}\)
    \(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    This guide targets the PG 2.17 subset available in ADAPT and the standalone webwork-pg-renderer. Newer PG releases add features that are not yet available in this environment, but understanding what is coming helps you plan problems that will benefit from future upgrades and avoid reinventing patterns that already exist upstream.

    Use this page when: you see a feature in online examples or the OpenWeBWorK wiki that does not work in ADAPT and want to know which PG version introduced it.

    How to read this page

    • Features listed under each version are cumulative: PG 2.19 includes everything from 2.18 and earlier.
    • Items marked (PG only) are changes to the problem-authoring language. Items marked (WW only) are server or UI changes that do not affect .pg files.
    • The textbook currently targets PG 2.17. Everything below that line already works in ADAPT.

    PG 2.17 (current ADAPT baseline)

    This is what ADAPT and the standalone renderer support today. Key features already documented in this textbook:

    • Java and Flash applet support removed (problems using them will show a warning).
    • GraphTool additions: point tool, three-point quadratic tool, four-point cubic tool, and keyboard controls for accessibility.
    • DraggableProof updated to work in Gateway quizzes when written correctly.
    • MathQuill input improvements for expressions and units.

    PG 2.18 features (not yet in ADAPT)

    PG 2.18 is the first version with significant new authoring capabilities beyond what ADAPT currently supports.

    New PGML syntax

    PG 2.18 is the first version that reduces the need for many of the workarounds you see in this textbook, especially for inserting images into PGML and creating checkbox (select-all-that-apply) questions.

    New PGML syntax: feature and what it does.
    Feature What it does
    PGML images Insert images with [!alt text!]{image source}{width}{height} directly in PGML instead of using command substitution or HTML.

    New macros

    New macros: macro and description.
    Macro Description
    plotly3D.pl Plot 3D curves and surfaces using the plotly.js library. Useful for visualizing molecular structures, reaction coordinate diagrams, or any data that needs a third axis.
    randomPerson.pl Generate a random person name with correct pronoun methods (he/she/they). Produces inclusive, readable story problems.
    parserCheckboxList.pl Native checkbox answer type for select-all-that-apply questions. Replaces the RadioButtons-per-statement workaround documented in Multiple Answer.
    parserRadioMultiAnswer.pl Tie a radio answer together with dependent answer blanks that change based on the radio choice. Useful for branching questions.
    parserLinearRelation.pl Context for lines and linear inequalities as MathObjects.
    specialTrigValues.pl Standard trig values on the unit circle as a helper macro.

    Updated macros

    • niceTables.pl: Completely overhauled. If you are writing table-heavy problems, the 2.18 version has better options and cleaner syntax than what is documented in Making Tables with niceTables.
    • parserCheckboxList.pl / parserRadioButtons.pl: Past-answer display now shows meaningful labels instead of B0, B1, etc.
    • parserGraphTool.pl: Number line mode for intervals, default answer checkers, a generateAnswerGraph method for solutions, and a dynamic help system.
    • parserPopUp.pl: New DropDown method as a modern replacement for PopUp.

    Other PG 2.18 changes

    • MathQuill: typing deg produces a degree symbol; trig and log functions auto-wrap arguments in parentheses.
    • Units: students can enter °C and °F directly; many new units added (angstroms, microseconds, picometers, etc.); plural forms accepted (30 ft, 30 feet, 1 foot).
    • Hardcopy generation revamped with a theme system (eleven themes included).
    • LTI 1.3 authentication module added.

    PG 2.19 features (not yet in ADAPT)

    PG 2.19 adds several quality-of-life improvements for PGML authoring.

    New PGML syntax

    PG 2.19's biggest authoring win is native PGML tables, which means you can build tables directly inside a PGML block without the explicit loadMacros("niceTables.pl") call you currently need.

    New PGML syntax: feature and what it does.
    Feature What it does
    PGML tables Create tables directly in PGML blocks using niceTables.pl syntax. The macro is automatically loaded when using PGML, so no explicit loadMacros call is needed.
    HTML div/span tags in PGML Add HTML <div> or <span> tags within PGML using [< ... >] syntax. This replaces the MODES workaround for wrapper divs documented in Randomized Matching Problems.
    Horizontal rules fixed PGML horizontal rules updated and made reliable.

    New macros and MathObjects

    New macros and MathObjects: macro and description.
    Macro Description
    contextBoolean.pl Boolean MathObject context with parsing of boolean expressions, reduction rules with AND/OR, and customizable true/false symbols including unicode. Relevant for logic gates in genetics or Boolean search problems.
    parserMultipleChoice.pl Umbrella macro that loads all multiple choice parsers at once: PopUp, CheckboxList, RadioButtons, RadioMultiAnswer. Simplifies the loadMacros block.

    Other PG 2.19 changes

    • Matrix MathObjects: New methods for creating zero, permutation, and elementary matrices; tests for triangular, orthogonal, diagonal, symmetric, row echelon, and reduced row echelon forms.
    • Fraction MathObjects: New num and den methods for extracting numerator and denominator.
    • Compute behavior: Calling Compute on a number now creates a Real directly instead of stringifying and passing to Formula.
    • Knowls: Reworked to open in modal dialogs instead of inline expansion.
    • The attempts table has been removed; feedback is now associated directly with each answer blank. (WW only)
    • The PG editor now has an option to convert problems to PGML (use with care, conversion is not complete). (WW only)

    Breaking changes in PG 2.19

    • parserPopUp.pl default change: When the correct answer is a non-negative integer, it is now treated as an index into the answer array (consistent with other macros) rather than the literal answer string. Problems using integer values as PopUp answers may need updating.

    Deprecated in PG 2.19

    • compoundProblem.pl (all versions: compoundProblem.pl, compoundProblem2.pl, compoundProblem5.pl): Migrate to scaffold.pl instead.

    PG 2.20 features (current release)

    PG 2.20 focuses on graphing tool improvements, modern plotting, units as MathObjects, and cleanup of deprecated patterns.

    New macros and features

    PG 2.20 brings unit-aware MathObjects through contextUnits.pl, so you can grade answers that include units as part of the MathObject system instead of relying on external workarounds. It also introduces a modern plotting macro and a new context extension mechanism.

    New macros and features: macro / feature and description.
    Macro / Feature Description
    plots.pl Modern, efficient plotting macro for a wide variety of graph types. Intended as a more capable replacement for older graphing approaches.
    contextUnits.pl Units implemented as MathObject classes. Students can enter answers with units and have them graded as part of the MathObject framework.
    contextExtensions.pl New context extension mechanism. Fraction contexts are now extensions of the parent context rather than standalone replacements.

    Updated macros

    • parserGraphTool.pl: Four new tools added: polygon tool, sine wave tool, vector tool, and improved fill tool.
    • contextReaction.pl: Improvements to chemical reaction context. Relevant for chemistry and biochemistry problems.
    • parserPopUp.pl: Full HTML now supported in drop-down menu items (bold, subscripts, etc.).
    • Degree n matrices: Improvements to matrices/tensors with more than two dimensions.
    • Rserve interface: Rewritten within PG; the Statistics::R::IO::Rserve package is no longer required.

    Breaking changes in PG 2.20

    • custom_problem_grader_0_60_100 removed: Problems must be converted to use custom_problem_grader_fluid instead. This is relevant if you copy older problems that use the 0/60/100 grading scale.
    • Degree 1 vs degree 2 matrix comparison: Changed behavior when comparing a degree 1 matrix and a degree 2 matrix.

    WeBWorK 2.20 server changes (WW only)

    • Problem editor upgraded to CodeMirror 6 with accordioning, autocompletion, and improved syntax highlighting.
    • Security vulnerability fixes and database efficiency improvements.
    • Problems can now be loaded directly from the Problem Editor or from sample problems.

    What this means for ADAPT authors today

    Until ADAPT upgrades its PG version, the workarounds documented in this textbook remain necessary. Here is a summary of what changes when ADAPT eventually updates:

    The following table maps each workaround documented in this textbook to the PG version that eliminates it, so you can plan which problems to update first when ADAPT upgrades.

    What this means for ADAPT authors today reference.
    Current workaround Available in What replaces it
    RadioButtons per statement for select-all-that-apply (Multiple Answer) PG 2.18 Native parserCheckboxList.pl with proper checkbox UI
    PopUp for dropdown menus PG 2.18 DropDown method in parserPopUp.pl
    MODES wrapper for flexbox divs in matching layouts (Randomized Matching Problems) PG 2.19 [< ... >] div/span syntax in PGML
    Explicit loadMacros("niceTables.pl") for tables PG 2.19 niceTables.pl auto-loaded with PGML
    Command substitution or HTML for images in PGML PG 2.18 Native [!alt!]{src}{w}{h} PGML image syntax
    No 3D visualization available PG 2.18 plotly3D.pl for 3D curves and surfaces
    TikZ images not available PG 2.16+ PGtikz.pl for LaTeX-quality vector graphics (requires server-side LaTeX; not available in ADAPT's renderer subset)
    Plain text in PopUp/DropDown menu items PG 2.20 Full HTML in drop-down items (bold, subscripts, special characters)
    custom_problem_grader_0_60_100 PG 2.20 Removed. Use custom_problem_grader_fluid instead
    PGgraphmacros.pl for static plots PG 2.20 plots.pl for modern, efficient graph generation
    No native unit-aware answer checking PG 2.20 contextUnits.pl for units as MathObject classes

    Apply it today

    • Write problems using the PG 2.17 patterns in this textbook. They will continue to work in newer versions.
    • When ADAPT upgrades, revisit select-all-that-apply problems (switch from RadioButtons fallback to CheckboxList) and matching layouts (replace MODES wrappers with PGML div syntax).
    • Do not use TikZ, plotly3D, plots.pl, contextUnits.pl, CheckboxList, RadioMultiAnswer, or DropDown in problems intended for the current ADAPT environment.
    • If you copy a problem that uses custom_problem_grader_0_60_100, replace it with custom_problem_grader_fluid (required in PG 2.20, works in all versions).

    Next, depending on what you are doing:


    This page titled 2.7: Future PG version features was last modified on Fri, 27 Feb 2026 15:10:55 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Neil R. Voss.