diff --git a/doc/guide/appendices/schema-install.xml b/doc/guide/appendices/schema-install.xml index 6221bfee78..addd8dd8bc 100644 --- a/doc/guide/appendices/schema-install.xml +++ b/doc/guide/appendices/schema-install.xml @@ -11,7 +11,7 @@ Schema Tools -

This appendix has technical information about tools that work with the RELAX-NG schema and our additional validation stylesheet. See for a more general overview.

+

This appendix has technical information about tools that work with the RELAX-NG schema and the validation-plus stylesheet. See for a more general overview.

diff --git a/examples/errors/sample-errors-and-warnings.xml b/examples/errors/sample-errors-and-warnings.xml index db35ce1ead..30ffc4bc51 100644 --- a/examples/errors/sample-errors-and-warnings.xml +++ b/examples/errors/sample-errors-and-warnings.xml @@ -699,6 +699,21 @@ systems. + + + + +

+ This exercise has no content in its statement. + It should throw a PTX warning during the representations build. +

+
+ + + + +
+
diff --git a/examples/webwork/sample-chapter/my-generated/webwork/an-exercisegroup-exercise.xml b/examples/webwork/sample-chapter/my-generated/webwork/an-exercisegroup-exercise.xml index 727bc7bf12..f2ba82d33e 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/an-exercisegroup-exercise.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/an-exercisegroup-exercise.xml @@ -1,6 +1,6 @@ - +

What is 1+1\text{?}

>

diff --git a/examples/webwork/sample-chapter/my-generated/webwork/answer-arrays.xml b/examples/webwork/sample-chapter/my-generated/webwork/answer-arrays.xml index c61e072a65..e652fdc807 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/answer-arrays.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/answer-arrays.xml @@ -1,6 +1,6 @@ - +

These answer blanks are all expecting some sort of answer in an array format.

{\left(0,0\right)} = {}

{\left\lt 1,2\right>} = {}

diff --git a/examples/webwork/sample-chapter/my-generated/webwork/answer-format-extra-macros.xml b/examples/webwork/sample-chapter/my-generated/webwork/answer-format-extra-macros.xml new file mode 100644 index 0000000000..b73aa66590 --- /dev/null +++ b/examples/webwork/sample-chapter/my-generated/webwork/answer-format-extra-macros.xml @@ -0,0 +1,105 @@ + + + +

Three more flavors, each needing a macro file loaded by <pg-macros>. +

    +
  1. +

    Three quarters, as a fraction:

    +
  2. +
  3. +

    The solutions of 3x > 6\text{,} as an inequality:

    +
  4. +
  5. +

    Four meters, a number with its units:

    +
  6. +

+
+ +

+ {\frac{3}{4}} +

+
+ +

+ x > 2 +

+
+ +

+ 4\ {\rm m} +

+
+
+ + 2"); +Context("Numeric"); +$quantity = NumberWithUnits("4 m"); + +############################################################ +# Body +############################################################ + +BEGIN_PGML +Three more flavors, each needing a macro file loaded by [||]*. +a. Three quarters, as a fraction: [_]{$fraction}{6} [@AnswerFormatHelp('fractions')@]* + +a. The solutions of [`3x > 6\text{,}`] as an inequality: [_]{$inequality}{8} [@AnswerFormatHelp('inequalities')@]* + +a. Four meters, a number with its units: [_]{$quantity}{8} [@AnswerFormatHelp('units')@]* + +END_PGML + +############################################################ +# End Problem +############################################################ + +ENDDOCUMENT(); +]]> +
diff --git a/examples/webwork/sample-chapter/my-generated/webwork/answer-format-gallery.xml b/examples/webwork/sample-chapter/my-generated/webwork/answer-format-gallery.xml new file mode 100644 index 0000000000..e388b4ab87 --- /dev/null +++ b/examples/webwork/sample-chapter/my-generated/webwork/answer-format-gallery.xml @@ -0,0 +1,169 @@ + + + +

Nine flavors of answer, each blank linking to format help of its own kind. +

    +
  1. +

    An angle, in degrees, half of a right angle:

    +
  2. +
  3. +

    Three quarters, as a decimal:

    +
  4. +
  5. +

    The exponent in 2^3 = 8\text{:}

    +
  6. +
  7. +

    The natural logarithm of 2\text{,} exactly:

    +
  8. +
  9. +

    The value of \lim_{x\to 2}(x^2+2)\text{:}

    +
  10. +
  11. +

    Any formula equal to x^2+1\text{:}

    +
  12. +
  13. +

    The open interval from 1 to 5\text{:}

    +
  14. +
  15. +

    The point where y=x+1 crosses x=1\text{:}

    +
  16. +
  17. +

    The vector from the origin to that point:

    +
  18. +

+
+ +

+ 45 +

+
+ +

+ 0.75 +

+
+ +

+ 3 +

+
+ +

+ \ln\mathopen{}\left(2\right) +

+
+ +

+ 6 +

+
+ +

+ x^{2}+1 +

+
+ +

+ \left(1,5\right) +

+
+ +

+ \left(1,2\right) +

+
+ +

+ \left<1,2\right> +

+
+
+ + "); + +############################################################ +# Body +############################################################ + +BEGIN_PGML +Nine flavors of answer, each blank linking to format help of its own kind. +a. An angle, in degrees, half of a right angle: [_]{$angle}{4} [@AnswerFormatHelp('angles')@]* + +a. Three quarters, as a decimal: [_]{$decimal}{6} [@AnswerFormatHelp('decimals')@]* + +a. The exponent in [`2^3 = 8\text{:}`] [_]{$exponent}{4} [@AnswerFormatHelp('exponents')@]* + +a. The natural logarithm of [`2\text{,}`] exactly: [_]{$logarithm}{6} [@AnswerFormatHelp('logarithms')@]* + +a. The value of [`\lim_{x\to 2}(x^2+2)\text{:}`] [_]{$limit}{4} [@AnswerFormatHelp('limits')@]* + +a. Any formula equal to [`x^2+1\text{:}`] [_]{$syntaxanswer}{10} [@AnswerFormatHelp('syntax')@]* + +a. The open interval from [`1`] to [`5\text{:}`] [_]{$interval}{8} [@AnswerFormatHelp('intervals')@]* + +a. The point where [`y=x+1`] crosses [`x=1\text{:}`] [_]{$point}{8} [@AnswerFormatHelp('points')@]* + +a. The vector from the origin to that point: [_]{$vector}{8} [@AnswerFormatHelp('vectors')@]* + +END_PGML + +############################################################ +# End Problem +############################################################ + +ENDDOCUMENT(); +]]> +
diff --git a/examples/webwork/sample-chapter/my-generated/webwork/deep-nested-lists.xml b/examples/webwork/sample-chapter/my-generated/webwork/deep-nested-lists.xml index 633610b907..658acfcab9 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/deep-nested-lists.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/deep-nested-lists.xml @@ -1,6 +1,6 @@ - +

Ordered list.

  1. diff --git a/examples/webwork/sample-chapter/my-generated/webwork/divisional-bare.xml b/examples/webwork/sample-chapter/my-generated/webwork/divisional-bare.xml index a47e4003ee..695fe56239 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/divisional-bare.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/divisional-bare.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/divisional-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/divisional-conclusion.xml index e6d5066f94..17bd93e0bf 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/divisional-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/divisional-conclusion.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/divisional-introduction-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/divisional-introduction-conclusion.xml index de8da43e8f..57166d0ad3 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/divisional-introduction-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/divisional-introduction-conclusion.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/divisional-introduction.xml b/examples/webwork/sample-chapter/my-generated/webwork/divisional-introduction.xml index f97623c62c..06f84e1e82 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/divisional-introduction.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/divisional-introduction.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-conclusion.xml index 996cb05ed6..dde4d2064a 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-conclusion.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-introduction-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-introduction-conclusion.xml index 892b21c323..22c65b6223 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-introduction-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-introduction-conclusion.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-introduction.xml b/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-introduction.xml index f3a65a86f4..2500361394 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-introduction.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/divisional-title-introduction.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/divisional-title.xml b/examples/webwork/sample-chapter/my-generated/webwork/divisional-title.xml index 7af89d0ced..579147bee4 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/divisional-title.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/divisional-title.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-bare.xml b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-bare.xml index 2caeacb9a0..3c93cc4219 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-bare.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-bare.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-conclusion.xml index 45c1a171bf..6fa982e3f5 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-conclusion.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-introduction-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-introduction-conclusion.xml index 526bf0b3ae..7fdb28f267 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-introduction-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-introduction-conclusion.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-introduction.xml b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-introduction.xml index 2a59ef14d4..bbf4768216 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-introduction.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-introduction.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-conclusion.xml index c909df126b..3b268bf07d 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-conclusion.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-introduction-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-introduction-conclusion.xml index 547844cefa..b6177297b8 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-introduction-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-introduction-conclusion.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-introduction.xml b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-introduction.xml index 87a6490525..e1a4e819f9 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-introduction.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title-introduction.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title.xml b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title.xml index 70c74a6999..6dd98d73dd 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/exercisegroup-title.xml @@ -1,6 +1,6 @@ - +

    1+1=2

    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/function-with-domain-issues.xml b/examples/webwork/sample-chapter/my-generated/webwork/function-with-domain-issues.xml index d267541eed..83945ef736 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/function-with-domain-issues.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/function-with-domain-issues.xml @@ -1,6 +1,6 @@ - +

    1. Suppose the correct answer is \displaystyle {\sqrt{x-4}}\text{.}

      diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-five-image-1.pdf b/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-five-image-1.pdf index 321ddb9c52..82c1c338cd 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-five-image-1.pdf and b/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-five-image-1.pdf differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-five-image-1.png b/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-five-image-1.png index 003665da62..21bf6f663d 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-five-image-1.png and b/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-five-image-1.png differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-thirteen-image-1.pdf b/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-thirteen-image-1.pdf index 5a040d2bbd..41d9fc5d40 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-thirteen-image-1.pdf and b/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-thirteen-image-1.pdf differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-thirteen-image-1.png b/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-thirteen-image-1.png index 93d91c79f9..ca2a011d69 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-thirteen-image-1.png and b/examples/webwork/sample-chapter/my-generated/webwork/images/box-diagonal-thirteen-image-1.png differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/latex-image-with-preamble-image-1.pdf b/examples/webwork/sample-chapter/my-generated/webwork/images/latex-image-with-preamble-image-1.pdf index ef8ced05e9..5dfc4945bc 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/latex-image-with-preamble-image-1.pdf and b/examples/webwork/sample-chapter/my-generated/webwork/images/latex-image-with-preamble-image-1.pdf differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/latex-image-with-preamble-image-1.png b/examples/webwork/sample-chapter/my-generated/webwork/images/latex-image-with-preamble-image-1.png index 0f9e8c2aa2..7919aef9aa 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/latex-image-with-preamble-image-1.png and b/examples/webwork/sample-chapter/my-generated/webwork/images/latex-image-with-preamble-image-1.png differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/randomized-latex-image-image-1.pdf b/examples/webwork/sample-chapter/my-generated/webwork/images/randomized-latex-image-image-1.pdf index ca4a9ebce6..44d22184f1 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/randomized-latex-image-image-1.pdf and b/examples/webwork/sample-chapter/my-generated/webwork/images/randomized-latex-image-image-1.pdf differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/randomized-latex-image-image-1.png b/examples/webwork/sample-chapter/my-generated/webwork/images/randomized-latex-image-image-1.png index 8dc374fda0..b88e44a1e1 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/randomized-latex-image-image-1.png and b/examples/webwork/sample-chapter/my-generated/webwork/images/randomized-latex-image-image-1.png differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/special-characters-image-1.pdf b/examples/webwork/sample-chapter/my-generated/webwork/images/special-characters-image-1.pdf index 9cafd8c114..37e26d8c83 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/special-characters-image-1.pdf and b/examples/webwork/sample-chapter/my-generated/webwork/images/special-characters-image-1.pdf differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/special-characters-image-1.png b/examples/webwork/sample-chapter/my-generated/webwork/images/special-characters-image-1.png index 9cb2110be7..bfa1d0317e 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/special-characters-image-1.png and b/examples/webwork/sample-chapter/my-generated/webwork/images/special-characters-image-1.png differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/images/static-latex-image-image-1.pdf b/examples/webwork/sample-chapter/my-generated/webwork/images/static-latex-image-image-1.pdf index 8e1c49f97f..a2d3c9b165 100644 Binary files a/examples/webwork/sample-chapter/my-generated/webwork/images/static-latex-image-image-1.pdf and b/examples/webwork/sample-chapter/my-generated/webwork/images/static-latex-image-image-1.pdf differ diff --git a/examples/webwork/sample-chapter/my-generated/webwork/inline-bare.xml b/examples/webwork/sample-chapter/my-generated/webwork/inline-bare.xml index cd4d98af61..b7ccc74b10 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/inline-bare.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/inline-bare.xml @@ -1,6 +1,6 @@ - +

      1+1=2

      diff --git a/examples/webwork/sample-chapter/my-generated/webwork/inline-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/inline-conclusion.xml index 7be2a5fff0..c8df2319b1 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/inline-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/inline-conclusion.xml @@ -1,6 +1,6 @@ - +

      1+1=2

      diff --git a/examples/webwork/sample-chapter/my-generated/webwork/inline-introduction-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/inline-introduction-conclusion.xml index 8ace6d69dc..35d3ed8103 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/inline-introduction-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/inline-introduction-conclusion.xml @@ -1,6 +1,6 @@ - +

      1+1=2

      diff --git a/examples/webwork/sample-chapter/my-generated/webwork/inline-introduction.xml b/examples/webwork/sample-chapter/my-generated/webwork/inline-introduction.xml index 147440b0f3..58bee89932 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/inline-introduction.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/inline-introduction.xml @@ -1,6 +1,6 @@ - +

      1+1=2

      diff --git a/examples/webwork/sample-chapter/my-generated/webwork/inline-title-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/inline-title-conclusion.xml index 5392474cd0..4b67e28149 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/inline-title-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/inline-title-conclusion.xml @@ -1,6 +1,6 @@ - +

      1+1=2

      diff --git a/examples/webwork/sample-chapter/my-generated/webwork/inline-title-introduction-conclusion.xml b/examples/webwork/sample-chapter/my-generated/webwork/inline-title-introduction-conclusion.xml index 800774531e..cd8f3ad4b1 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/inline-title-introduction-conclusion.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/inline-title-introduction-conclusion.xml @@ -1,6 +1,6 @@ - +

      1+1=2

      diff --git a/examples/webwork/sample-chapter/my-generated/webwork/inline-title-introduction.xml b/examples/webwork/sample-chapter/my-generated/webwork/inline-title-introduction.xml index 983f0197e8..85c2c57079 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/inline-title-introduction.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/inline-title-introduction.xml @@ -1,6 +1,6 @@ - +

      1+1=2

      diff --git a/examples/webwork/sample-chapter/my-generated/webwork/inline-title.xml b/examples/webwork/sample-chapter/my-generated/webwork/inline-title.xml index 8c02f13075..5ac291688b 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/inline-title.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/inline-title.xml @@ -1,6 +1,6 @@ - +

      1+1=2

      diff --git a/examples/webwork/sample-chapter/my-generated/webwork/list-indentation-with-images-and-tables.xml b/examples/webwork/sample-chapter/my-generated/webwork/list-indentation-with-images-and-tables.xml index 97593bc461..3033d9895c 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/list-indentation-with-images-and-tables.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/list-indentation-with-images-and-tables.xml @@ -1,6 +1,6 @@ - +

      1. Structured item

        diff --git a/examples/webwork/sample-chapter/my-generated/webwork/list-indentation.xml b/examples/webwork/sample-chapter/my-generated/webwork/list-indentation.xml index 4f9e40a9e1..bb7ee80d26 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/list-indentation.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/list-indentation.xml @@ -1,6 +1,6 @@ - +

        1. Simple item

          diff --git a/examples/webwork/sample-chapter/my-generated/webwork/mathobject-string-answers.xml b/examples/webwork/sample-chapter/my-generated/webwork/mathobject-string-answers.xml index 30425e12d4..ea59786051 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/mathobject-string-answers.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/mathobject-string-answers.xml @@ -1,6 +1,6 @@ - +

          1. Special characters used by XML, character escaping: <>&'";

            diff --git a/examples/webwork/sample-chapter/my-generated/webwork/multiple-choice-popup-or-radio-buttons.xml b/examples/webwork/sample-chapter/my-generated/webwork/multiple-choice-popup-or-radio-buttons.xml index b68f09b6aa..21ac59d2c1 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/multiple-choice-popup-or-radio-buttons.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/multiple-choice-popup-or-radio-buttons.xml @@ -1,6 +1,6 @@ - +

            My favorite color is

            • ?

            • diff --git a/examples/webwork/sample-chapter/my-generated/webwork/number-or-function.xml b/examples/webwork/sample-chapter/my-generated/webwork/number-or-function.xml index e93f26d265..96a67deef8 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/number-or-function.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/number-or-function.xml @@ -1,9 +1,9 @@ - +

              1. -

                Suppose the correct answer is {-2}\text{.}

                +

                Suppose the correct answer is {3}\text{.}

                • @@ -11,7 +11,7 @@

              2. -

                Suppose the correct answer is \displaystyle {\frac{7-2x^{7}}{x}}\text{.}

                +

                Suppose the correct answer is \displaystyle {\frac{3x^{9}+9}{x}}\text{.}

                • @@ -22,12 +22,12 @@

                  - -2 + 3

                  - \frac{7-2x^{7}}{x} + \frac{3x^{9}+9}{x}

                  Solution explanation goes here.

                  diff --git a/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/1-Instructive_Examples/1_9-Answer_Formats_and_Extra_Macros/1_9_1-A_Gallery_of_Answer_Formats.pg b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/1-Instructive_Examples/1_9-Answer_Formats_and_Extra_Macros/1_9_1-A_Gallery_of_Answer_Formats.pg new file mode 100644 index 0000000000..1484bba5bc --- /dev/null +++ b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/1-Instructive_Examples/1_9-Answer_Formats_and_Extra_Macros/1_9_1-A_Gallery_of_Answer_Formats.pg @@ -0,0 +1,85 @@ +############################################# +### Generated from PreTeXt source +### +### https://pretextbook.org +### +############################################# +## DBsubject() +## DBchapter() +## DBsection() +## Level() +## KEYWORDS() +## TitleText1() +## EditionText1() +## AuthorText1() +## Section1(not reported) +## Problem1(1.9.1) +## Author() +## Institution() +## Language(en-US) + +DOCUMENT(); + +############################################################ +# Load Macros +############################################################ +loadMacros( + "PGstandard.pl", + "PGML.pl", + "AnswerFormatHelp.pl", + "contextForm.pl", + "PGcourse.pl", +); +COMMENT('Authored in PreTeXt'); + +############################################################ +# Header +############################################################ + +############################################################ +# PG Setup Code +############################################################ +Context("Numeric"); +$angle = Real(45); +$decimal = Real(0.75); +$exponent = Real(3); +$logarithm = Compute("ln(2)"); +$limit = Real(6); +$syntaxanswer = Formula("x^2+1"); +Context("Interval"); +$interval = Compute("(1,5)"); +Context("Vector"); +$point = Point("(1,2)"); +$vector = Vector("<1,2>"); + +############################################################ +# Body +############################################################ + +BEGIN_PGML +Nine flavors of answer, each blank linking to format help of its own kind. +a. An angle, in degrees, half of a right angle: [_]{$angle}{4} [@AnswerFormatHelp('angles')@]* + +a. Three quarters, as a decimal: [_]{$decimal}{6} [@AnswerFormatHelp('decimals')@]* + +a. The exponent in [`2^3 = 8\text{:}`] [_]{$exponent}{4} [@AnswerFormatHelp('exponents')@]* + +a. The natural logarithm of [`2\text{,}`] exactly: [_]{$logarithm}{6} [@AnswerFormatHelp('logarithms')@]* + +a. The value of [`\lim_{x\to 2}(x^2+2)\text{:}`] [_]{$limit}{4} [@AnswerFormatHelp('limits')@]* + +a. Any formula equal to [`x^2+1\text{:}`] [_]{$syntaxanswer}{10} [@AnswerFormatHelp('syntax')@]* + +a. The open interval from [`1`] to [`5\text{:}`] [_]{$interval}{8} [@AnswerFormatHelp('intervals')@]* + +a. The point where [`y=x+1`] crosses [`x=1\text{:}`] [_]{$point}{8} [@AnswerFormatHelp('points')@]* + +a. The vector from the origin to that point: [_]{$vector}{8} [@AnswerFormatHelp('vectors')@]* + +END_PGML + +############################################################ +# End Problem +############################################################ + +ENDDOCUMENT(); diff --git a/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/1-Instructive_Examples/1_9-Answer_Formats_and_Extra_Macros/1_9_2-Answers_Needing_Extra_Macros.pg b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/1-Instructive_Examples/1_9-Answer_Formats_and_Extra_Macros/1_9_2-Answers_Needing_Extra_Macros.pg new file mode 100644 index 0000000000..66f64b2f73 --- /dev/null +++ b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/1-Instructive_Examples/1_9-Answer_Formats_and_Extra_Macros/1_9_2-Answers_Needing_Extra_Macros.pg @@ -0,0 +1,69 @@ +############################################# +### Generated from PreTeXt source +### +### https://pretextbook.org +### +############################################# +## DBsubject() +## DBchapter() +## DBsection() +## Level() +## KEYWORDS() +## TitleText1() +## EditionText1() +## AuthorText1() +## Section1(not reported) +## Problem1(1.9.2) +## Author() +## Institution() +## Language(en-US) + +DOCUMENT(); + +############################################################ +# Load Macros +############################################################ +loadMacros( + "PGstandard.pl", + "PGML.pl", + "AnswerFormatHelp.pl", + "parserNumberWithUnits.pl", + "contextFraction.pl", + "contextInequalities.pl", + "PGcourse.pl", +); +COMMENT('Authored in PreTeXt'); + +############################################################ +# Header +############################################################ + +############################################################ +# PG Setup Code +############################################################ +Context("Fraction"); +$fraction = Fraction(3, 4); +Context("Inequalities"); +$inequality = Compute("x > 2"); +Context("Numeric"); +$quantity = NumberWithUnits("4 m"); + +############################################################ +# Body +############################################################ + +BEGIN_PGML +Three more flavors, each needing a macro file loaded by [||]*. +a. Three quarters, as a fraction: [_]{$fraction}{6} [@AnswerFormatHelp('fractions')@]* + +a. The solutions of [`3x > 6\text{,}`] as an inequality: [_]{$inequality}{8} [@AnswerFormatHelp('inequalities')@]* + +a. Four meters, a number with its units: [_]{$quantity}{8} [@AnswerFormatHelp('units')@]* + +END_PGML + +############################################################ +# End Problem +############################################################ + +ENDDOCUMENT(); diff --git a/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/2-Technical_Examples/2_3-Stress_Tests/2_3_5.pg b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/2-Technical_Examples/2_3-Stress_Tests/2_3_5.pg index a52d7f368c..ccd05210a8 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/2-Technical_Examples/2_3-Stress_Tests/2_3_5.pg +++ b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/2-Technical_Examples/2_3-Stress_Tests/2_3_5.pg @@ -27,6 +27,7 @@ loadMacros( "PGstandard.pl", "PGML.pl", "AnswerFormatHelp.pl", + "niceTables.pl", "PGcourse.pl", ); COMMENT('Authored in PreTeXt'); @@ -45,6 +46,14 @@ Context('Numeric'); ############################################################ BEGIN_PGML +>> [@DataTable( + [ + [ + PGML(q"What's up, Doc?"), + ], + ], + align => '*{1}{l}', + valign => 'middle',);@]* << END_PGML diff --git a/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/def/set1_9-Answer_Formats_and_Extra_Macros.def b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/def/set1_9-Answer_Formats_and_Extra_Macros.def new file mode 100644 index 0000000000..4743bd8161 --- /dev/null +++ b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/def/set1_9-Answer_Formats_and_Extra_Macros.def @@ -0,0 +1,15 @@ +openDate = 01/01/2027 at 12:00am +dueDate = 12/31/2027 at 10:00pm +answerDate = 12/31/2027 at 10:00pm +paperHeaderFile = Integrating_WeBWorK_into_Textbooks/header/1_9-Answer_Formats_and_Extra_Macros.pg +screenHeaderFile = Integrating_WeBWorK_into_Textbooks/header/1_9-Answer_Formats_and_Extra_Macros.pg +description = Answer Formats and Extra Macros +problemListV2 +problem_start +source_file = Integrating_WeBWorK_into_Textbooks/1-Instructive_Examples/1_9-Answer_Formats_and_Extra_Macros/1_9_1-A_Gallery_of_Answer_Formats.pg +problem_id = 1 +problem_end +problem_start +source_file = Integrating_WeBWorK_into_Textbooks/1-Instructive_Examples/1_9-Answer_Formats_and_Extra_Macros/1_9_2-Answers_Needing_Extra_Macros.pg +problem_id = 2 +problem_end diff --git a/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/def/set2_3-Stress_Tests.def b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/def/set2_3-Stress_Tests.def index 7f6db80946..55c0cf1253 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/def/set2_3-Stress_Tests.def +++ b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/def/set2_3-Stress_Tests.def @@ -25,7 +25,3 @@ problem_start source_file = Integrating_WeBWorK_into_Textbooks/2-Technical_Examples/2_3-Stress_Tests/2_3_5.pg problem_id = 5 problem_end -problem_start -source_file = Integrating_WeBWorK_into_Textbooks/2-Technical_Examples/2_3-Stress_Tests/2_3_6.pg -problem_id = 6 -problem_end diff --git a/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/header/1_9-Answer_Formats_and_Extra_Macros.pg b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/header/1_9-Answer_Formats_and_Extra_Macros.pg new file mode 100644 index 0000000000..5953c2ab4d --- /dev/null +++ b/examples/webwork/sample-chapter/my-generated/webwork/pg/Integrating_WeBWorK_into_Textbooks/header/1_9-Answer_Formats_and_Extra_Macros.pg @@ -0,0 +1,40 @@ +# Header file for problem set 1_9-Answer_Formats_and_Extra_Macros +# This header file can be used for both the screen and hardcopy output + +DOCUMENT(); + +loadMacros( + "PG.pl", + "PGbasicmacros.pl", + "PGML.pl", + "PGcourse.pl", +); + +TEXT($BEGIN_ONE_COLUMN); + +$texTopLine = "\noindent {\large \bf $studentName}\hfill{\large \bf {".protect_underbar($courseName)."}}"; +if (defined($sectionName) and ($sectionName ne '')) {$texTopLine .= " {\large \bf { Section: ".protect_underbar($sectionName)." } }"}; +$texTopLine .= "\par"; + +#################################################### +# +# MODES provides for distinct output for TeX and HTML +# +#################################################### + +TEXT(MODES( + TeX =>"$texTopLine", + HTML=>"", +)); + +TEXT(MODES( + TeX =>"\noindent{\large \sc {Assignment ".protect_underbar($setNumber)." due $formatedDueDate}}\par". + "\noindent \bigskip ", + HTML=>"WeBWorK Assignment ".protect_underbar($setNumber)." is due: $formattedDueDate. $PAR", +)); + +TEXT("This assignment contains exercises from Section 1.9 of Integrating WeBWorK into Textbooks."); + +TEXT($END_ONE_COLUMN); + +ENDDOCUMENT(); diff --git a/examples/webwork/sample-chapter/my-generated/webwork/pgml-data-attribute.xml b/examples/webwork/sample-chapter/my-generated/webwork/pgml-data-attribute.xml index 55e070368d..6255cb5214 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/pgml-data-attribute.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/pgml-data-attribute.xml @@ -1,6 +1,6 @@ - +

                  some PGML math: [`\frac{1}{2}+\frac{3}{2}=2`]; and some *bold text* makes:

                  some PGML math: \frac{1}{2}+\frac{3}{2}=2; and some bold text

                  diff --git a/examples/webwork/sample-chapter/my-generated/webwork/pretext-source-with-server-images.xml b/examples/webwork/sample-chapter/my-generated/webwork/pretext-source-with-server-images.xml index b7ba38932e..23848c832b 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/pretext-source-with-server-images.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/pretext-source-with-server-images.xml @@ -1,6 +1,6 @@ - + diff --git a/examples/webwork/sample-chapter/my-generated/webwork/radio-buttons-with-math.xml b/examples/webwork/sample-chapter/my-generated/webwork/radio-buttons-with-math.xml index 4e6d28efc5..1343409644 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/radio-buttons-with-math.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/radio-buttons-with-math.xml @@ -1,6 +1,6 @@ - +

                  There is math in each option for this question. Which expression is not a polynomial?

                  • diff --git a/examples/webwork/sample-chapter/my-generated/webwork/single-quote-in-table-cell.xml b/examples/webwork/sample-chapter/my-generated/webwork/single-quote-in-table-cell.xml index 1b0bd5d82b..f4b587deb5 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/single-quote-in-table-cell.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/single-quote-in-table-cell.xml @@ -1,6 +1,6 @@ - + @@ -10,7 +10,7 @@ - + - +

                    A table with minimal XML source.

                    diff --git a/examples/webwork/sample-chapter/my-generated/webwork/ww-PGML-format.xml b/examples/webwork/sample-chapter/my-generated/webwork/ww-PGML-format.xml index 41ce8e8269..fc4495aa20 100644 --- a/examples/webwork/sample-chapter/my-generated/webwork/ww-PGML-format.xml +++ b/examples/webwork/sample-chapter/my-generated/webwork/ww-PGML-format.xml @@ -1,6 +1,6 @@ - +

                    Smart double quotes: Life is about making an impact, not making an income.

                    Smart single quotes: Whatever the mind of man can conceive and believe, it can achieve.

                    Regular apostrophes: My siblings mothers daughter isnt my daughters siblings mother.

                    diff --git a/examples/webwork/sample-chapter/sample-chapter.ptx b/examples/webwork/sample-chapter/sample-chapter.ptx index 5890dcdf59..b30a5bfa6e 100644 --- a/examples/webwork/sample-chapter/sample-chapter.ptx +++ b/examples/webwork/sample-chapter/sample-chapter.ptx @@ -1230,7 +1230,7 @@ ENDDOCUMENT(); This image is a visual proof that \sum_{k=1}^{n}k equals what?

                    - + 21 blue balls are arranged in a triangular formation, with one at the top, then a row of two, a row of three, and so on until a row of six; @@ -1240,7 +1240,7 @@ ENDDOCUMENT(); until they intersect two orange balls; the effect is that each of the 1+2+3+4+5+6 blue balls corresponds to one pair from the 7 orange balls - + \begin{tikzpicture} \draw[dashed] (0.5-0.5*6.5,-0.866025*6.5) -- (7-0.5*6.5,-0.866025*6.5); @@ -1286,10 +1286,10 @@ ENDDOCUMENT(); Find the area of the rectangle.

                    - + a rectangle whose width is labeled cm and height is labeled cm - + \begin{tikzpicture} \draw[fill=blue!20] (0,0) --++ (6,0) node[pos=0.5,below] {\($b\)\,cm} --++ (0,4) node[pos=0.5,right] {\($a\)\,cm} --++ (-6,0) -- cycle; @@ -1324,10 +1324,10 @@ ENDDOCUMENT(); What are the roots of this polynomial?

                    - + the graph of a polynomial that crosses the x-axis at , , and . - + \begin{tikzpicture} \begin{axis} @@ -1357,9 +1357,9 @@ ENDDOCUMENT(); a printed at sign, and a percent sign used as a comment marker.

                    - + this image has pictures of text with special characters like $, %, and @ - + \begin{tikzpicture} \node at (0,0) {I need about \$3.50.}; @@ -1409,9 +1409,9 @@ ENDDOCUMENT(); Use the graph to solve the equation f(x)=1.

                    - + a plot of a curve on a cartesian set of axes; the x axis ranges from -1 to 4, and the y-axis ranges from -1 to 4; the curve enters from the left, below the x-axis, and curves upward and to the right until it reaches the point (0,0); from here it continues predominantly rightward for a bit, bending slightly upward more and more as it progresses; it passes through the points (,1) and (,2) before leaving the graph moving more and more upward and to the right. - +

                    @@ -1422,9 +1422,9 @@ ENDDOCUMENT(); The graph reveals that the solution set to f(x)=1 is .

                    - + a plot of a curve on a cartesian set of axes; the x axis ranges from -1 to 4, and the y-axis ranges from -1 to 4; the curve enters from the left, below the x-axis, and curves upward and to the right until it reaches the point (0,0); from here it continues predominantly rightward for a bit, bending slightly upward more and more as it progresses; it passes through the points (,1) and (,2) before leaving the graph moving more and more upward and to the right; a horizontal line segment moves rightward from y=1 on the y-axis until it reaches a point on the curve; a vertical line segment moves down from this point to x= on the x-axis. - + @@ -1492,6 +1492,71 @@ ENDDOCUMENT(); +
                    + Answer Formats and Extra Macros + +

                    Each answer blank may carry a category, which decorates the blank with a link to WeBWorK's help for entering an answer of that flavor. The gallery below exercises the categories whose answers need only the standard contexts; a second exercise loads extra macro files, with a pg-macros element, for the three categories that need them.

                    + + + A Gallery of Answer Formats + + + Context("Numeric"); + $angle = Real(45); + $decimal = Real(0.75); + $exponent = Real(3); + $logarithm = Compute("ln(2)"); + $limit = Real(6); + $syntaxanswer = Formula("x^2+1"); + Context("Interval"); + $interval = Compute("(1,5)"); + Context("Vector"); + $point = Point("(1,2)"); + $vector = Vector("<1,2>"); + + +

                    Nine flavors of answer, each blank linking to format help of its own kind.

                      +
                    1. An angle, in degrees, half of a right angle:

                    2. +
                    3. Three quarters, as a decimal:

                    4. +
                    5. The exponent in 2^3 = 8:

                    6. +
                    7. The natural logarithm of 2, exactly:

                    8. +
                    9. The value of \lim_{x\to 2}(x^2+2):

                    10. +
                    11. Any formula equal to x^2+1:

                    12. +
                    13. The open interval from 1 to 5:

                    14. +
                    15. The point where y=x+1 crosses x=1:

                    16. +
                    17. The vector from the origin to that point:

                    18. +

                    +
                    +
                    +
                    + + + Answers Needing Extra Macros + + + contextFraction.pl + contextInequalities.pl + parserNumberWithUnits.pl + + + Context("Fraction"); + $fraction = Fraction(3, 4); + Context("Inequalities"); + $inequality = Compute("x > 2"); + Context("Numeric"); + $quantity = NumberWithUnits("4 m"); + + +

                    Three more flavors, each needing a macro file loaded by pg-macros.

                      +
                    1. Three quarters, as a fraction:

                    2. +
                    3. The solutions of 3x > 6, as an inequality:

                    4. +
                    5. Four meters, a number with its units:

                    6. +

                    +
                    +
                    +
                    +
                    + @@ -2314,19 +2379,6 @@ ENDDOCUMENT(); - - -

                    - This exercise has no content in its statement. - It should throw a PTX warning during the representations build. -

                    -
                    - - - - -
                    -

                    diff --git a/schema/pretext-validation-plus.xsl b/schema/pretext-validation-plus.xsl index 0859ed39a3..8c39cc179f 100644 --- a/schema/pretext-validation-plus.xsl +++ b/schema/pretext-validation-plus.xsl @@ -480,6 +480,21 @@ along with PreTeXt. If not, see . + + + + + + + An <image> with a @pg-name attribute is drawn by the PG + code of a WeBWorK problem, and so must only appear within + a <webwork> element, not here. It will be ignored. + + + + + + diff --git a/schema/pretext.rnc b/schema/pretext.rnc index ff984bf639..ce3b74af5a 100644 --- a/schema/pretext.rnc +++ b/schema/pretext.rnc @@ -986,9 +986,23 @@ SideBySideNoNumber+ } - Image = ImageRaster | ImageCode + Image = ImageRaster | ImageCode | ImagePG + # An image drawn by the PG code of a WeBWorK problem, named + # by @pg-name. Like "var", the form is admitted schema-wide + # (it can appear deep within list items, say) but is + # exclusive to a "webwork" problem; the validation-plus + # stylesheet enforces the location. + ImagePG = + element image { + attribute pg-name {text}, + attribute width {text}?, + attribute margins {text}?, + empty + } ImageDescription = element description {(Paragraph | Tabular)+} - ImageShortDescription = element shortdescription {text} + # A "var" may ride along, per the schema-wide "var" pattern: + # the validation-plus stylesheet confines it to a WeBWorK problem + ImageShortDescription = element shortdescription {(text | WWVariable)*} ImageShortDescriptionCode = element shortdescription { (text | WWVariable)+ } @@ -1478,6 +1492,9 @@ SimpleLine+ ) } + # A "webwork" with @copy is an empty, lightweight reference + # to another authored problem (perhaps reseeded); the + # assembly resolves it to a duplicate WebWorkAuthored = element webwork { ( @@ -1485,7 +1502,6 @@ LabelID?, Component?, attribute seed {xsd:integer}?, - attribute copy {text}?, WWDescription?, WWMacros?, element pg-code {text}?, @@ -1495,6 +1511,14 @@ (IntroductionText?, TaskWW+, ConclusionText?) ) ) | + ( + UniqueID?, + LabelID?, + Component?, + attribute copy {text}, + attribute seed {xsd:integer}?, + empty + ) | text } BlockStatementWW = @@ -1519,11 +1543,13 @@ element macro-file {text}+ } WWVariable = - ## The WeBWorK "var" element appears in the RELAX-NG schema as a child of many elements, but almost always as a descendant of a "p" element or a "cell" element. As an element that is only relevant for a WeBWorK problem, occurrences of "var" must be within a "webwork" element. PreTeXt's additional validation will check on these two situations. + ## The WeBWorK "var" element appears in the RELAX-NG schema as a child of many elements, but almost always as a descendant of a "p" element or a "cell" element. As an element that is only relevant for a WeBWorK problem, occurrences of "var" must be within a "webwork" element. The validation-plus stylesheet will check on these two situations. element var { (attribute name {text}, attribute evaluator {text}?, attribute width {text}?, + # the variable holds PGML markup to be processed + attribute data {"pgml"}?, attribute category { "angle" | "decimal" | "exponent" | "formula" | "fraction" | "inequality" @@ -1531,7 +1557,7 @@ | "limit" | "number" | "point" | "syntax" | "quantity" | "vector" }?, - attribute form {"popup"|"buttons"|"checkboxes"|"none"}?) | + attribute form {"popup"|"buttons"|"checkboxes"|"none"|"array"}?) | (attribute form {"essay"}, attribute width {text}?) } diff --git a/schema/pretext.rng b/schema/pretext.rng index 5798535edb..20969ef765 100644 --- a/schema/pretext.rng +++ b/schema/pretext.rng @@ -2639,8 +2639,28 @@ + + + + + + + + + + + + + + @@ -2651,9 +2671,18 @@ + - + + + + + + @@ -3879,6 +3908,11 @@ + @@ -3897,9 +3931,6 @@ - - - @@ -3934,6 +3965,24 @@ + + + + + + + + + + + + + + + + + + @@ -3994,7 +4043,7 @@ - The WeBWorK "var" element appears in the RELAX-NG schema as a child of many elements, but almost always as a descendant of a "p" element or a "cell" element. As an element that is only relevant for a WeBWorK problem, occurrences of "var" must be within a "webwork" element. PreTeXt's additional validation will check on these two situations. + The WeBWorK "var" element appears in the RELAX-NG schema as a child of many elements, but almost always as a descendant of a "p" element or a "cell" element. As an element that is only relevant for a WeBWorK problem, occurrences of "var" must be within a "webwork" element. The validation-plus stylesheet will check on these two situations. @@ -4004,6 +4053,12 @@ + + + + pgml + + @@ -4032,6 +4087,7 @@ buttons checkboxes none + array diff --git a/schema/pretext.xml b/schema/pretext.xml index 596c7f3434..94ec54f8d1 100644 --- a/schema/pretext.xml +++ b/schema/pretext.xml @@ -766,7 +766,7 @@ -

                    A large class of similarly indivisible items are units on physical quantities. The quantity element is allowed to be empty, and the code should silently produce no output. Expressing non-emptiness here might get a bit messy, so an additional validation warning could be a good alternative.

                    +

                    A large class of similarly indivisible items are units on physical quantities. The quantity element is allowed to be empty, and the code should silently produce no output. Expressing non-emptiness here might get a bit messy, so a warning from the validation-plus stylesheet could be a good alternative.

                    SI units @@ -1918,9 +1918,23 @@ Images - Image = ImageRaster | ImageCode + Image = ImageRaster | ImageCode | ImagePG + # An image drawn by the PG code of a WeBWorK problem, named + # by @pg-name. Like "var", the form is admitted schema-wide + # (it can appear deep within list items, say) but is + # exclusive to a "webwork" problem; the validation-plus + # stylesheet enforces the location. + ImagePG = + element image { + attribute pg-name {text}, + attribute width {text}?, + attribute margins {text}?, + empty + } ImageDescription = element description {(Paragraph | Tabular)+} - ImageShortDescription = element shortdescription {text} + # A "var" may ride along, per the schema-wide "var" pattern: + # the validation-plus stylesheet confines it to a WeBWorK problem + ImageShortDescription = element shortdescription {(text | WWVariable)*} ImageShortDescriptionCode = element shortdescription { (text | WWVariable)+ } @@ -3208,6 +3222,9 @@ SimpleLine+ ) } + # A "webwork" with @copy is an empty, lightweight reference + # to another authored problem (perhaps reseeded); the + # assembly resolves it to a duplicate WebWorkAuthored = element webwork { ( @@ -3215,7 +3232,6 @@ LabelID?, Component?, attribute seed {xsd:integer}?, - attribute copy {text}?, WWDescription?, WWMacros?, element pg-code {text}?, @@ -3225,6 +3241,14 @@ (IntroductionText?, TaskWW+, ConclusionText?) ) ) | + ( + UniqueID?, + LabelID?, + Component?, + attribute copy {text}, + attribute seed {xsd:integer}?, + empty + ) | text } BlockStatementWW = @@ -3249,11 +3273,13 @@ element macro-file {text}+ } WWVariable = - ## The WeBWorK "var" element appears in the RELAX-NG schema as a child of many elements, but almost always as a descendant of a "p" element or a "cell" element. As an element that is only relevant for a WeBWorK problem, occurrences of "var" must be within a "webwork" element. PreTeXt's additional validation will check on these two situations. + ## The WeBWorK "var" element appears in the RELAX-NG schema as a child of many elements, but almost always as a descendant of a "p" element or a "cell" element. As an element that is only relevant for a WeBWorK problem, occurrences of "var" must be within a "webwork" element. The validation-plus stylesheet will check on these two situations. element var { (attribute name {text}, attribute evaluator {text}?, attribute width {text}?, + # the variable holds PGML markup to be processed + attribute data {"pgml"}?, attribute category { "angle" | "decimal" | "exponent" | "formula" | "fraction" | "inequality" @@ -3261,7 +3287,7 @@ | "limit" | "number" | "point" | "syntax" | "quantity" | "vector" }?, - attribute form {"popup"|"buttons"|"checkboxes"|"none"}?) | + attribute form {"popup"|"buttons"|"checkboxes"|"none"|"array"}?) | (attribute form {"essay"}, attribute width {text}?) }