The attribute
+
+ /publication/webwork/@interactive-processing
+
+ can have value webwork2 (the default). Once the standalone PG renderer is
+ better at supporting live rendering, it will also be possible to set this to
+ renderer. When exercises are live, embedded in HTML, this
+ is the method that will be used. Either communicating with a webwork2 server
+ or a PG renderer.
+
+
+
PG Location
The attribute
@@ -1035,6 +1049,20 @@
+
+ PG Renderer
+
+ The URL to a PG renderer instance is in the attribute
+
+ /publication/webwork/@renderer
+
+ It should include the protocol (e.g.http or https) and not
+ include a trailing slash. The renderer should use PG 2.19 or later. The default
+ value is https://webwork-dev.aimath.org. At this time, this is the only
+ instance of the PG renderer that is configured to work for .
+
- You can embed exercises in your project. This requires using a
- webwork2 server that is version 2.16 or later. The server could be the AIM
- server that has been set up for this purpose, so to get started, there is no need to establish
- your own webwork2 server.
+ You can embed exercises in your project. This requires using either a
+ webwork2 server that is version 2.16 or later, or a PG renderer that uses PG 2.19 or
+ later. Either of these could be AIM servers that have been set up for this purpose, so to get
+ started, there is no need to establish your own webwork2 server or PG renderer.
Part of the process can optionally be sped up by using a local copy of the pg
@@ -177,6 +177,27 @@
+
+ Using a PG rendering service
+
+ problems can be processed using a standalone PG renderer. At this time, this
+ feature is under development. There is one functional renderer on an AIM server. We hope to
+ make the renderer something that is easy for anyone to install at other locations. The
+ renderer is more lightweight than a webwork2 server and runs significantly faster
+ (although not as fast as using local pg).
+
+
+ To use this processing method, in a publisher file, you can set the webwork element
+ to have static-processing with value renderer. This will use the AIM
+ instance of the renderer. When the renderer becomes something you can install on other
+ servers, you will have another publisher option to specify where it is.
+
+
+ At this time, you will still need to use a webwork2 server for problems in your HTML
+ output to render as live interactive exercises.
+
+
+
Configuring a webwork2 Server for
@@ -189,7 +210,7 @@
needs to be 2.16 or later for use with .
- The only thing you need to do at the serverlevel is set the web server to use certain headers
+ The only thing you need to do at the server level is set the web server to use certain headers
on content that is fetched. These headers tell a web browser that you are authorizing it to
display content from this web server as embedded content inside pages from another web server
(in particular, where you are hosting you book).
@@ -295,7 +316,7 @@
Allowed to view course home page which should also be set to login_proctor.
- In the Accounts Manager(Classlist Editor in older versions of ), add a user named
+ In the Accounts Manager (Classlist Editor in older versions of ), add a user named
anonymous (again, you could use some other name), and set that user's permission level
to login_proctor, the permission level one higher than student. Set that user's
password to anonymous (again, you could use some other password). Note that because
@@ -362,30 +383,34 @@
- PG Macros from the Source
+ PG Macros from the source
The project's exercises may rely on PG macros that are written into the project's
source. For example, the exercises might have TikZ images that rely on
docinfo/latex-image-preamble.
- For this, a PG macro library file must be built and placed in the host course's
- templates/macros/ folder before attempting to process the
- exercises. To build this macro library, run:
+ For this, a PG macro library file must be built and placed wherever it is needed. To build
+ this macro library, run:
- pretext -c pg-macros aota.ptx
-
- aota.ptx in the example is the root file for your project. You could also
- specify a location to place the resulting macro library file:
-
- pretext -c pg-macros -d some/file/path aota.ptx
+ pretext/pretext/pretext -c pg-macros -p publication.xml mainfile.ptx
+
+
+ publication.xml should be your project's publisher file that declares a
+ generated folder, and you may need to include the path to this file.
+
+
+ mainfile.ptx should be the main file for your project.
+
+
+ This will place the PG macros file in generated/webwork/pg/[TITLE]/macros/ where
+ [TITLE] is a file-safe version of the title of your project. If you are using a host
+ course on a webwork2 server, plase this macros file in that course's macros folder.
- Once you have the macro library file, upload it to the host course's
- templates/macros folder. If your project relies on the AIM server and you
- need to supply a macro library file to a host course on that server, post to
- pretex-support@googlegroups.com and we can help with that.
+ If the project's source changes in such a way that these PG macros would change, this file
+ should be regenerated.
@@ -535,7 +560,8 @@
that you wrote, set defintion files corresponding to the sections (or other chunks) of your
project, and header files for those sets. All of this was placed into your project's
generated/webwork/pg folder when you executed pretext -c webwork, so you could
- find it there and package it all up to send to your server.
+ find it there and package it all up to send to your server.
+
Alternativley, you may run the following:
@@ -568,33 +594,9 @@
- Certain aspects of specifying borders of a tabular are not
- realizable in a PGML table. Specifically,
-
-
-
- Specifying column-specific top border attributes are not implemented.
-
-
-
-
- Cell-specific bottom border attributes are not implemented.
-
-
-
-
- medium and major table rule-thickness attributes will be handled as
- if they were minor.
-
-
-
-
-
-
-
- When constructing a list (ul or ol) specifying some number of
- columns (using the cols attribute) will be ignored. PGML markup has no way
- to declare multicolumn lists.
+ When constructing a list (ul or ol)
+ specifying some number of columns (using the cols attribute)
+ will be ignored. PGML markup has no way to declare multicolumn lists.
diff --git a/examples/webwork/Makefile b/examples/webwork/Makefile
index 2d159c85c7..287c0feb3e 100644
--- a/examples/webwork/Makefile
+++ b/examples/webwork/Makefile
@@ -114,15 +114,16 @@ PGOUT = $(SCRATCH)/pg
# folder. There are no macros for the minimal example, so omitted.
sample-chapter-macros:
- install -d $(PGOUT)/macros
- cd $(PGOUT)/macros; \
- $(PTX)/pretext/pretext -v -c pg-macros -p $(SMPCPUB) $(SMPC)
+ $(PTX)/pretext/pretext -v -c pg-macros -p $(SMPCPUB) -d $(PGOUT)/macros $(SMPC)
#########################################################################
# Extract webwork problems into a single XML file.
# Location is within generated folder (named in the publisher file),
# within "webwork" subfolder
+# This also produces PG files for each problem, PG macros, set defintion
+# files for problem sets, and set header files all within the "webwork/pg"
+# folder
sample-chapter-representations:
$(PTX)/pretext/pretext -v -c webwork -p $(SMPCPUB) $(SMPC)
diff --git a/examples/webwork/minimal/external/images/webwork-logo.png b/examples/webwork/minimal/external/images/webwork-logo.png
deleted file mode 100644
index 8b1ff68554..0000000000
Binary files a/examples/webwork/minimal/external/images/webwork-logo.png and /dev/null differ
diff --git a/examples/webwork/minimal/publication.xml b/examples/webwork/minimal/publication.xml
index 290cda6078..2f74fc6b4b 100644
--- a/examples/webwork/minimal/publication.xml
+++ b/examples/webwork/minimal/publication.xml
@@ -28,6 +28,14 @@ along with PreTeXt. If not, see .
+ ` +
'' +
+ '