External images in local pg

16 views
Skip to first unread message

Sean Fitzpatrick

unread,
Sep 3, 2026, 11:47:15 AM (8 days ago) Sep 3
to PreTeXt support
I have a colleague working on a project for a computer science lab manual that has a bunch of local pg files for WeBWork, and some of them include external images.

Is there a way to use an external image in a PG file and have it show up in the static representation? She has it working fine once the question is activated.

Sean Fitzpatrick

unread,
Sep 3, 2026, 4:46:44 PM (8 days ago) Sep 3
to pretext...@googlegroups.com
We worked around this by putting the pg files onto the WeBWorK server. 

On Thu, Sep 3, 2026, 9:47 a.m. Sean Fitzpatrick <dsfitz...@gmail.com> wrote:
I have a colleague working on a project for a computer science lab manual that has a bunch of local pg files for WeBWork, and some of them include external images.

Is there a way to use an external image in a PG file and have it show up in the static representation? She has it working fine once the question is activated.

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/42aea6fd-ec87-4f20-b154-a126c55be3a2n%40googlegroups.com.

Juan Carlos Bustamante

unread,
Sep 5, 2026, 1:53:14 PM (6 days ago) Sep 5
to PreTeXt support
Hi,

Does this mean thay you copied the images "manually", outisde of pretext? or you managed to make pretext take care of this? In the first case, this workaround does not work when one uses https://webwork-ptx.aimath.org, right?

JC

Sean Fitzpatrick

unread,
Sep 5, 2026, 6:49:06 PM (6 days ago) Sep 5
to pretext...@googlegroups.com
Right. The use case here was originally, the author (not me) had a webwork folder containing pg files, with an img subfolder. 

That didn't result in images anywhere. So she tried putting the images online and linking. That got her images in the live version, but not in static. 

Since I have a WeBWorK server (two actually, one of which is for PreTeXt), the easiest solution was to create a course there, copy the webwork folder (with the img subfolder) into the course, and then include with
<webwork source="webwork/file.pg"/>

This isn't an option with the AIM server because we only provide the "anonymous" course for processing of WeBWorK problems from source. 

The other way to do processing of local pg files with images is to run a local insurance of WeBWorK. I forget the details, but there is support for local processing now.

Reply all
Reply to author
Forward
0 new messages