Interoperability of pretext and STACK

209 views
Skip to first unread message

Michael Obiero

unread,
Jan 14, 2025, 7:34:15 AMJan 14
to PreTeXt development
Hello all. 
We are looking into ways of integrating STACK into pretext. We already have a good integration of WeBWorK but there are some superior features of STACK that can complement Webwork within the project. Developers of STACK (Chris Sangwin  C.J.S...@ed.ac.uk and David Stern  d.a....@idems.international) will be happy to work with developers of PreTeXt on this.
Below are some comments from Chris

"I’ve been looking at PreTeXt myself – it’s a very impressive system.  We now have a stand-alone API for STACK.  We distribute this via Docker and minimal instructions are here.

 

https://github.com/maths/moodle-qtype_stack/blob/dev/doc/en/Installation/API.md

 

I’ve been getting to grips with both PreText and docker myself.  I’ve not had a chance to look at how webwork integrated with PreText in detail yet, but there is a very good prospect of us being able to support STACK question use through the API.  I’ll need help in getting this working, especially since I haven’t looked at the “player” website which includes webwork.  Would someone be able to give me any pointers for how this works please?"


Many thanks

Rob Beezer

unread,
Jan 15, 2025, 2:16:42 PMJan 15
to prete...@googlegroups.com
Dear Michael, Chris, David S, et alia,

Thanks for getting organized here on -dev. You got a great reply from Sean on
-support, and I will try to expand on that here.

We have a lot of experience with homework systems. Like everything we
integrate, each has its own set of challenges.

WeBWorK - a very long-running project, 10 years this summer. Continues to see
significant development work, see current outstanding PR. PreTeXt syntax
supports authoring WW problems.

Runestone - also fully integrated, now 5 years in. PTX syntax for a variety of
"common" problem types. Great hosting on Runestone Academy. Brad is
experimenting with SPLICE - a protocol for communicating scores and state.
Recently Brian Walton has extended randomized fill-in problems.

MyOpenMath - pretty good support. Mark Fitch is a liason with David Lippman,
MOM lead.

Doenet - some initial progress. Problems can be embedded in an #iframe for use
in HTML via our #interactive element. Only a substandard static representation.

So there are lots of examples to look at. You should also realize that
integration of a mature system with its own idiosyncrancies is a HUGE
development task and requires knowledgeable contributions and assistance.

As Sean already noted, a new feature typically is not accepted without "static"
respresentations that can be used for PDF/LaTeX, EPUB, braille, and more. These
would be in "stock" PreTeXt syntax so that any conversion can digest them. "We
only care about HTML," is not consistent with PreTeXt principles and design
goals. This happens in very different ways for WW, Runestome, and MOM. And
right now, not at all for Doenet. For a randomized problem, a static version
should have a consistent set of problem-inputs and answers.

An initial goal might be to mimic the Doenet approach to gain some experience
and see some results. It is not a long-run solution, but would allow you to get
your feet wet. We use the "sample article" as a test-bed, and it has at least
one Doenet problem in it, I think. Mostly it is connecting with a Doenet
server, so perhaps your API could service that approach.

Welcome,
Rob

On 1/14/25 4:34 AM, Michael Obiero wrote:
> Hello all.
> We are looking into ways of integrating STACK <https://stack-assessment.org/
> > into pretext. We already have a good integration of WeBWorK but there are
> some superior features of STACK that can complement Webwork within the project.
> Developers of STACK (Chris Sangwin C.J.S...@ed.ac.uk
> <mailto:C.J.S...@ed.ac.uk> and David Stern d.a....@idems.international)
> will be happy to work with developers of PreTeXt on this.
> Below are some comments from Chris
>
> "I’ve been looking at PreTeXt myself – it’s a very impressive system.  We now
> have a stand-alone API for STACK.  We distribute this via Docker and minimal
> instructions are here.
>
> __ __
>
> https://github.com/maths/moodle-qtype_stack/blob/dev/doc/en/Installation/API.md
> <https://github.com/maths/moodle-qtype_stack/blob/dev/doc/en/Installation/
> API.md>____
>
> __ __
>
> I’ve been getting to grips with both PreText and docker myself.  I’ve not had a
> chance to look at how webwork integrated with PreText in detail yet, but there
> is a very good prospect of us being able to support STACK question use through
> the API.  I’ll need help in getting this working, especially since I haven’t
> looked at the “player” website which includes webwork.  Would someone be able to
> give me any pointers for how this works please?"
>
>
> Many thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> e0de3f1a-a40e-4bb7-ae98-2687116baa99n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/e0de3f1a-a40e-4bb7-
> ae98-2687116baa99n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Alex Jordan

unread,
Jan 15, 2025, 2:26:27 PMJan 15
to prete...@googlegroups.com
It's already been suggested, but I would stress that it may be
relatively trivial to get a functioning problem embedded in a PTX HTML
page, but PreTeXt will want to produce print PDF, Braille, and other
static output formats too.

The similar projects so far accomplish this by producing PTX output
that PTX can run with. Is STACK ready to do that? In the case of
WeBWorK, it was designed from the start to be able to produce two very
different formats simultaneously: HTML and TeX. So the abstract
structure was there already to make it capable of producing PTX output
as well. Some systems out there might be designed from the start with
only HTML in mind, and then it could be a big project to retrofit them
to make PTX output as well. If STACK developers are following the
thread, what do you think about its readiness to make PTX output?
> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0NS5iZWV6ZXI.1736968600%40quikprotect.
Message has been deleted

Michael Obiero

unread,
Jan 25, 2025, 4:37:59 AMJan 25
to PreTeXt development
Many thanks for your suggestions. We already have static activities that we have already implemented in PreTeXt, and that should be sufficient for the pdf output. What we are looking at is embedding STACK questions in the html version of the book. 

Below are examples of questions we have in PreTeXt which are static. 
Pretext static questions.png
Similar STACK questions offer more interactivity for the learner in the html version of the book. Our desire is to have the interactivity in the online version of the book utilizing the many advantages of STACK, especially personalized feedback.

Mike

David Stern

unread,
Jan 25, 2025, 10:58:18 AMJan 25
to PreTeXt development
Hi everyone
Thanks Mike for clearly articulating your current need and to Rob for articulating the PreText perspective. 
Jordan if I understand you correctly you are stating that it should be "relatively trivial to get a functioning problem embedded in a PTX HTML
page." Which I believe is what would be needed to create the Pretext block which would have static content authored in PreText and use the STACK API to display a question (Task 1). If so this is great because I believe this would always need to be an option as there are many different ways a STACK question might want to be interpreted by an author for the text book. 
The other component will be to have STACK able to produce static question variants through the API in pretext (Task 2) so authors directly embed STACK questions without double authoring content.
If I have understood Jordan and Rob correctly Task 1 is relatively easy. I know that Task 2 will be hard an in certain cases almost impossible. I believe that the division of responsibility on this is broadly Task 1 is a Pretext embedding and hence best suited to being led by the Pretext community whereas Task 2 is a STACK API issue which should be led by the STACK developers.
Chris for Task 2 I wonder whether there is a subset of STACK questions which could be identified (probably those with no form of embedded HTML) which could be tackled first as a proof of concept.
Mike if my understanding is correct then your urgent need can be easily satisfied by Task 1 which may be 'easy' and hence able to meet your tight timelines. This will leave you with maintenance issues related to the STACK and pretext doubly authored content but I think in your context that is a fair price to pay.
Thanks all for engaging with this issue, I believe this integration will open up Pretext to a whole new audience.
David

Chris Sangwin

unread,
Jan 25, 2025, 12:16:35 PMJan 25
to PreTeXt development
Thanks David,

I think it would be very reasonable to expect STACK users to author their questions in a particular, restricted, way if they want to embed them into pretext.  We've supported markdown (not trouble-free but there right enough) from the point we use moodle.  I actually would prefer authors to use markdown, rather than arbitrary HTML for  a whole range of reasons.  

It would be relatively easy to for the STACK API to output a "static" version, and we would look to what webwork does in this situation as a guide.

I'm not underestimating the amount of work, or nervous about changing things at the STACK end. Indeed, to get a minimum demonstration of concept working we would restrict the features of STACK.

We already have a question testing framework for long-term support of STACK questions. It would be easy to add in a "suitable for pretext" functionality to validate a STACK question for use in this situation.  That's all possible as needed.

Ultimately the question comes down to cost-benefit for all concerned!

Chris

Alex Jordan

unread,
Jan 25, 2025, 3:12:42 PMJan 25
to prete...@googlegroups.com

Thanks Chris, David, Michael. Rob could confirm or correct me, but I think that David's Task 2 would need to be in effect first before PTX developers would invest time in Task 1. Or maybe not. In the past with MOM we essentially had Task 1 first. But that was in the old days, before the CLI, and when it was easier to have an experimental, partly functional feature.

Task 2 sounds like something where there should be collaboration between STACK developers and someone familiar with the PTX XML vocabulary. Just to understand the mapping from STACK source to PTX well.

An aside for Michael: WeBWorK/PG does have the ability to give custom responses to answers. I'm not sure if that's what you mean. But for example the WeBWorK sample chapter has an exercise asking for x^3*x^5, and if you enter x^15 there is special feedback for that. For each "flavor" of incorrect answer, you have to code the response you want (it's not AI). Is that the kind of thing you mean by personalized feedback? If so, send me an example exercise and I can show you how to code it. Or if not, please describe that more so I can confirm WeBWorK/PG can't already do this.

That last paragraph is not to be construed as sidestepping STACK integration with PTX, which would be great to have.


Rob Beezer

unread,
Jan 26, 2025, 12:17:46 PMJan 26
to prete...@googlegroups.com
Here is Task 0 to get started. More comments next.

1. Make a simple PreTeXt document, add a single exercise, whose content is a
single, short, meaningless #p.

2. Produce the HTML in the usual way. Make a copy of the *.html file with the
exercise.

3. Hand-edit the copy and replace the meaningless paragraph with a STACK
exercise. Keep the exercise simple, this is not about testing every STACK
feature. The first "Checkpoint" here is the sort of thing I mean:

Section 1.1: Arithmetic
https://pretextbook.org/examples/webwork/sample-chapter/html/sample-ww-chapter-4-2.html

4. Figure out what needs to be done to get that exercise "working". This is
the point of this project.

5. Reply here with the original HTML, the edited HTML, and careful instructions
to re-create the exercise working. An online demo of the result would also be
helpful.

I can review this in the next few days, but after that it will be a while before
I can come back to it. Allusions to "tight timelines" aren't very consistent
with our development model... ;-)

Rob

Rob Beezer

unread,
Jan 26, 2025, 12:50:55 PMJan 26
to prete...@googlegroups.com
Thanks for all the discussion. Consolidated comments.

Mike said:
> What we are looking at is embedding STACK questions in the html version of
the book.

Right. And I think this is clear to others - PreTeXt requires the ability to
automatically convert a *dynamic* version of a STACK problem into a faithful
*static* version, perhaps with one set of consistent random inputs and answers.
Created in PreTeXt itself, this absolves STACK developers from understanding
LaTeX/PDF, EPUB, Braille, etc.

David said:
> best suited to being led by the Pretext community

We need to know who that is. Who wants to be involved in this effort? Alex and
David F have shown interest. My bare-minimum participation will be more than I
can handle right now, so I do not expect to be the lead.

Chris said:
> very reasonable to expect STACK users to author their questions in a
particular, restricted, way

Good. I think that is a good starting place and to some extent very necessary.
In particular, I'm glad to see that "embedded HTML" need not be supported (that
would be a nightmare). If STACK wants to parse markdown, I guess that is fine,
but would not be my first choice. What do bold and italics font-changes really
*mean*? (Did you see me use markdown syntax just now to get a font change?)

Chris said:
> It would be relatively easy for the STACK API to output a "static" version

Very good! That's going to be key.

Chris said:
> It would be easy to add in a "suitable for pretext" functionality to validate
a STACK question for use in this situation.

Even better!

Alex said:
> Rob could confirm or correct me, but I think that David's Task 2 would need
to be in effect

I don't think we need to be too strict about this. And I'm not sure I see how
the existence of the CLI changes anything about development (it shouldn't).

I'll say it yet again: "But I only care about HTML output!" is a bad attitude
within the PreTeXt project. ;-) I think the STACK folks understand that.
Progress on the static representations will need to proceed before we commit to
the HTML versions.

Alex said:
> should be collaboration between STACK developers and someone familiar with
the PTX XML vocabulary.

That would be very useful. We can, of course, (mostly) validate PreTeXt syntax,
but *understanding* which constructions are best would be very helpful to the
STACK folks.

Looking forward to progress on Task 0.

Rob

Georg Osang

unread,
Mar 15, 2025, 10:51:50 AMMar 15
to PreTeXt development
Hello everyone,

I'm supporting Michael and his team with the Kenyan textbooks. I've had a look at Task 0 and produced a simple example of a STACK question inside a PreText-generated HTML: https://github.com/IDEMSInternational/pretext-stack-example
Assuming you have docker/docker-compose installed, seeing it in action should be as simple closing/downloading the repository, running `docker-compose up` and then viewing `http://localhost:8080/` in your browser.

I haven't polished it (so it behaves a bit different from e.g. a webwork question right now), but it's enough to render a simple question. You can see the code changes I made to the PreText HTML output, as well as the XML source of the STACK question here: https://github.com/IDEMSInternational/pretext-stack-example/commit/933936f578ceb2823b1dc5cbee8fa8376b98968c#diff-e2a59ceb5f2f9973543d16c27bc7c72fad7ecb28f36f92d2c823d7bda3d8875e

You might notice that STACK questions are quite bulky when directly exported. A lot of these are settings that are the same across pretty much all questions. The API now supports omitting these and will fill in sensible defaults. Still, I think in the current state adding a reference to a question file rather than including the XML directly inside the PTX would be more convenient, as generally questions are managed as individual files (or files containing collections of questions, which than can be referenced by their name). Maybe it's worthwhile supporting both options?

The buttons that appear when you load the question are a bit different to the way it works for webwork questions, but that's something I can definitely streamline. "Check Responses", "Randomize" and "Reset/Activate" definitely apply to STACK questions in the same way. STACK questions can contain multiple input fields, and after submitting answers, the feedback can appear interleaved with the original question text, but also after the question (mostly for general feedback).

I see that in the HTML version, the Webwork questions get encoded into Base64 (which I assume is sent to some Webwork server). With my current set up, I simply have the question files in the local file system, and the API is running locally as well in a Docker container.


I'll start looking into static versions of questions next. I assume they are generated at compile-time, and then they are embedded in e.g. the PDF or also the HTML to preview the question before you press the "Activate" button? I think most STACK questions should probably work reasonably well in a static version. There are some interactive questions where the learner will move graphical elements, and the prompts will be worded accordingly, where this is maybe less straightforward. Is there/could there be an option to provide an explicit static alternative in the PTX for those instances?


I'm looking forward to any feedback you might have, things you suggest I need to work on or issues that you see that I should take a closer look at.

Rob Beezer

unread,
Mar 17, 2025, 12:48:01 PMMar 17
to prete...@googlegroups.com
Dear Georg,

Thanks very much for your work on Task 0.

It seems I may not have permission on some server? Traceback appended below.
This is on a relatively fresh Debian system. I do not use Docker regularly, so
there may be a problem there I do not know about.

Our usual practice is to post live examples. Is it possible for you to
configure a public URL where (a) it is easier to see, and (b) more folks would
be inclined to have a look?

* You do not need to use WeBWorK as a model. Each such system gets shoe-horned
into PreTeXt in its own way, so not everything is by design.

* Managing problems file-by-file does make good sense. We like the idea that
your PreTeXt source contains the source of *all* of your content. So that
lobbies for some sort of source content (no matter how verbose). But we get
MyOpenMath problems off a server by an ID number, so this is not written in stone.

* I'm sure we can work out harmonizing buttons, but that should not be a
priority right now.

* WW Base64 is a WeBWorK design decision, not a PreTeXt constraint.

* A static preview in HTML (ala WeBWorK) is a nice feature and helps with
page-loading time. That too need not be a priority now, but it is good to keep
it in mind.

* Perhaps we've created some confusion with our use of the word "static". It
is not just non-randomized, though that is a big part of it. It is meant as the
opposite of "dynamic" which really just means anything but HTML. A PreTeXt
document can be rendered as a PDF, EPUB, braille, and more. Interactive
randomized HTML does not cut it in those settings.

The easiest way to accomodate this is to formulate a question in legal PreTeXt,
then we hand it off to whatever conversion routines we already have for
non-dynamic formats. So *this* should be a priority and will be the biggest
hurdle to having STACK in PreTeXt. There needs to be an automatic process for
converting each question to a static, PreTeXt-only version. (Task 1?)

MyOpenMath does this with an "endpoint" that returns a PTX version, given an ID.
A WeBWorK server will convert WW PG syntax into PTX. Runestone moved its
authoring language to PreTeXt, so we have native PTX syntax to cover Runestone's
well-defined discrete collection of question types. That STACK has an API
suggests to me that this will greatly ease some of this work.

I hope this all helps.

Rob

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


pretext-stack-example$ docker-compose up
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 705, in
urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 400, in
_make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.11/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.11/http/client.py", line 975, in send
self.connect()
File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30,
in connect
sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 789, in
urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 552, in
increment
raise six.reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 705, in
urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 400, in
_make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.11/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.11/http/client.py", line 975, in send
self.connect()
File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30,
in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13,
'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 214, in
_retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 46, in
inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13,
'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in <module>
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts',
'docker-compose')())

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
command_func()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in
perform_command
project = project_from_options('.', options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in
project_from_options
return get_project(
^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in
get_project
client = get_client(
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41,
in get_client
client = docker_client(
^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 170,
in docker_client
client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 197, in __init__
self._version = self._retrieve_server_version()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 221, in
_retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version:
('Connection aborted.', PermissionError(13, 'Permission denied'))
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515-a56b-67eac0e387ban%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/0606c24b-693f-4515-
> a56b-67eac0e387ban%40googlegroups.com?utm_medium=email&utm_source=footer>.

Georg Osang

unread,
Mar 20, 2025, 6:29:12 PMMar 20
to PreTeXt development
Hi Rob,

it may be that you have to run `sudo docker-compose up`. There is a setup of docker to get around the need for sudo, but I think by default it's needed.
I'll try to put this online somewhere so anyone can try it out easily, but I'll try to polish this a bit more and fix up a few things beforehand.

Thanks for the remarks, that's helpful and puts things in perspective!

So for the static version, we basically want an XML (PTX) that is an <exercise> element containing a statement, answer and possibly hints, solution and title, as documented here?
And inside these statement/solution etc elements, we can use any markup that is documented in the specification here?
As Chris mentioned, we can have this as one of the API calls. Though at least initially, there may be questions that don't offer themselves for conversion (at least not without explicit hints), like interactive questions where you have to move geometry elements. Would we just have to omit those questions from the compilation, or is there some mechanism to give an alternative PreText version? Or will we have to encode any such mechanism directly into the STACK question and the API call?

Best,
Georg

Rob Beezer

unread,
Mar 20, 2025, 10:56:01 PMMar 20
to prete...@googlegroups.com
Dear George,

> it may be that you have to run sudo

That was the trick. (But I'd rather not be setting something in motion that
does a bunch downloads while root!) Worked really well after that. Thanks,
that was a very successful test.

> So for the static version, we basically want an XML (PTX) that is an <exercise>
> element containing a statement, answer and possibly hints, solution and title,
> as documented here
<https://pretextbook.org/doc/guide/html/overview-exercises.html>?

Yes, that's it. But you can put in more than just #p. Things like a #image,
#tabular, etc are allowed in an #exercise. If a STACK problem had a
data/function table, you would want to write it out as a PTX #tabular, with
#row, #cell, etc.

If a STACK problem has an image, especially if it has randomized pieces (points,
functions), then it gets trickier. But we have this sort of thing working for
WeBWorK, and more recently for MyOpenMath. Save that for later.

When your server/API can render a (simple) problem in PreTeXt, then we can talk
about having our Python harvest them during the pre-processor phase ("assembly")
for feeding into other conversions. Testing LaTeX/PDF is the best route to see
how that process is coming along.

Rob

On 3/20/25 15:29, Georg Osang wrote:
> Hi Rob,
>
> it may be that you have to run `sudo docker-compose up`. There is a setup of
> docker to get around the need for sudo, but I think by default it's needed.
> I'll try to put this online somewhere so anyone can try it out easily, but I'll
> try to polish this a bit more and fix up a few things beforehand.
>
> Thanks for the remarks, that's helpful and puts things in perspective!
>
> So for the static version, we basically want an XML (PTX) that is an <exercise>
> element containing a statement, answer and possibly hints, solution and title,
> as documented here <https://pretextbook.org/doc/guide/html/overview-exercises.html>?
> And inside these statement/solution etc elements, we can use any markup that is
> documented in the specification here <https://pretextbook.org/doc/guide/html/
> topic-paragraphs.html>?
> example <https://github.com/IDEMSInternational/pretext-stack-example>
> > Assuming you have docker/docker-compose installed, seeing it in action
> should be
> > as simple closing/downloading the repository, running `docker-compose up`
> and
> > then viewing `http://localhost:8080/` <http://localhost:8080/> in your
> browser.
> >
> > I haven't polished it (so it behaves a bit different from e.g. a webwork
> > question right now), but it's enough to render a simple question. You can
> see
> > the code changes I made to the PreText HTML output, as well as the XML
> source of
> > the STACK question here: https://github.com/IDEMSInternational/pretext-
> stack- <https://github.com/IDEMSInternational/pretext-stack->
> <https://groups.google.com/d/msgid/pretext->
> > dev/0606c24b-693f-4515-a56b-67eac0e387ban%40googlegroups.com
> <http://40googlegroups.com> <https://
> > groups.google.com/d/msgid/pretext-dev/0606c24b-693f-4515- <http://
> groups.google.com/d/msgid/pretext-dev/0606c24b-693f-4515->
> > a56b-67eac0e387ban%40googlegroups.com?utm_medium=email&utm_source=footer
> <http://40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-
> dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Chris Sangwin

unread,
Mar 21, 2025, 5:38:02 AMMar 21
to prete...@googlegroups.com
Thanks everyone, it feels like we are making a start.

I'm very happy to discuss having the STACK API return a "static" version of a problem (e.g. a particular random variant) for inclusion in static formats such as PDF/print.  Of course, that throws away the whole point of STACK, but inclusion in pretext is an important application. And I can see situations where a colleagues produces a .pdf "problem sheet" backed up by dynamic, randomly generated questions of a similar type.

Georg, if you continue to plug away at the interface between the two we can develop the specification of what needs to change on the STACK side.  We already separate out <statement>, <answer> and <solution> fields.  The detail of precisely what format that's returned in (I think the API currently wraps maths with mathjax?) will need to be agreed.

We can agree to support only a subset of the stack functionality (not the dynamic input types such as Parsons inputs) within such a static questions, especially in version 1.

Chris


To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh.

Georg Osang

unread,
Jun 29, 2025, 7:02:12 PMJun 29
to PreTeXt development
Hi all,

I've familiarized myself a bit with the `pretext` and `pretext-cli` codebase, to get a better understanding of what needs to be done.
I've implemented a basic function to generate static versions of STACK questions, but it'd be good to get some guidance on how to proceed from here.
I've created a draft PR with more concrete questions, where you can also see and try out the function I wrote: https://github.com/PreTeXtBook/pretext/pull/2576
Let me know if you prefer to keep the discussion in here or in the PR.

Thanks!

Georg Osang

unread,
Jul 1, 2025, 2:14:58 PMJul 1
to prete...@googlegroups.com

(Copied from the PR) 

I've been working on generating static representations for STACK questions. I've written a function as a starting point (to be extended with error handling, etc), and you can test it on the example STACK question by running the stack_to_pretext.py script I added. (Note: The public STACK API server used in this example is a bit temperamental, so if you get an error the first time around, try again.)

I'm trying to figure out how to integrate this into the larger asset generation process. I assume this should happen akin to the webwork_to_xml function which generates the webwork_representations.xml with static and PG versions of the webwork questions. In the STACK case we'll only have the static version (at this point anyway), as for the dynamic version a STACK question XML file will simply be referenced in the HTML. I guess those STACK question XML files would then be assets, e.g. like image files referenced in the text.

The part I don't have a good understanding of is the work done by the XSL templates. For example, in webwork_to_xml, we apply extract-pg.xsl to the input XML and then pick out the server parameters from the resulting XML file (e.g. to get the API URL, which must originate from the publication PTX file), so that we can call the server to retrieve the questions and/or generate the static versions. Obviously, a lot more is going on in that XSL template, most of which isn't applicable to STACK, but I don't understand what I'd need to mirror from there and what to ignore.

Similarly, I don't really understand the work the XSL templates are doing when building a target, such as HTML or pdf. For STACK, all that'd need to happen is either take the static version from the representations file that we generated (e.g. PDF target), or simply insert a single div referencing the STACK question XML file (HTML target), something like

<div class="container-fluid que stack" data-qfile="questions/integrate.xml">

from the example where I embedded an interactive STACK question into HTML generated by pretext, as well as including the javascript headers. (I'll work on improving the actual Javascript logic to make it behave more closely to how webwork questions behave.)

Some pointers how to proceed from here would be really helpful, especially around the XSL templating. (I can make some sense of the pretext and pretext-cli python code if I dig into it a bit, but high-level guidance would still be helpful.)


You received this message because you are subscribed to a topic in the Google Groups "PreTeXt development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/gkZ4sSj8nVk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com.

Rob Beezer

unread,
Jul 2, 2025, 3:28:19 PMJul 2
to prete...@googlegroups.com
Dear Georg,

Thanks for your work on this. Sounds like you've made good progress. I'll look
at code once you get a chance to rebase this weekend.

You will have your hands full on the server-end eventually. So we can help with
the integration. I forget how far we got before, so maybe some duplication here.

1. Start with markup. Always start with markup.

exercise
introduction
stack
conclusion

We'll need to protect #stack from the #stack already used in side-by-sides.
This should look like how #webwork is structured.

2. Use pretext-html.xsl to turn that into the #div.stack you describe
below, and get a problem to render in HTML output. Presumably the PreTeXt
#stack will have some sort of attribute that has "integrate" or
"questions/integrate" or "questions/integrate.xml", however little an author can
get away with (we provide the rest).

3. Then some XSL to extract whatever is needed to get the server to produce a
static version. I'd use the MyOpenMath (MOM) code as an example, the WeBWorK
(WW) has a lot of extra stuff going on that ight get in your way. Python
applies this XSL, makes requests of the server, packages up static. I think I'd
rather do this as one-file-per-problem, like MOM, not one huge file like WW.

4. As these static versions should be "legal" PreTeXt, we just need to insert
them into the source as part of pretext-assembly.xsl.

5. Once we have good XSL and Python in place, then the CLI can integrate the
process as it has done for similar features.

So maybe three big steps (2, 3, 4), that might be best done one at a time.
Likely there will be a bit back-tracking at times, that's why it would be good
to split into steps. And it'll be easier for us to help with each discrete step.

Rob


On 7/1/25 11:14, Georg Osang wrote:
> (Copied from the PR)
>
> I've been working on generating static representations for STACK questions. I've
> written a function as a starting point (to be extended with error handling,
> etc), and you can test it on the example STACK question by running the |
> stack_to_pretext.py| <https://github.com/IDEMSInternational/pretext/
> commit/3c92a36d72aab8001d30a319c54e5d7f64a8b756#diff-069b78ae2d106f911fdf64ef19129b0269aa34eaf0329b532cb82f2f6f620072> script I added. (Note: The public STACK API server used in this example is a bit temperamental, so if you get an error the first time around, try again.)
>
> I'm trying to figure out how to integrate this into the larger asset generation
> process. I assume this should happen akin to the |webwork_to_xml| function which
> generates the |webwork_representations.xml| with static and PG versions of the
> webwork questions. In the STACK case we'll only have the static version (at this
> point anyway), as for the dynamic version a STACK question XML file will simply
> be referenced in the HTML. I guess those STACK question XML files would then be
> assets, e.g. like image files referenced in the text.
>
> The part I don't have a good understanding of is the work done by the XSL
> templates. For example, in |webwork_to_xml|, we apply |extract-pg.xsl| to the
> input XML and then pick out the server parameters from the resulting XML file
> (e.g. to get the API URL, which must originate from the publication PTX file),
> so that we can call the server to retrieve the questions and/or generate the
> static versions. Obviously, a lot more is going on in that XSL template, most of
> which isn't applicable to STACK, but I don't understand what I'd need to mirror
> from there and what to ignore.
>
> Similarly, I don't really understand the work the XSL templates are doing when
> building a target, such as HTML or pdf. For STACK, all that'd need to happen is
> either take the static version from the representations file that we generated
> (e.g. PDF target), or simply insert a single |div| referencing the STACK
> question XML file (HTML target), something like
>
> |<div class="container-fluid que stack" data-qfile="questions/integrate.xml"> |
>
> from the example <https://github.com/IDEMSInternational/pretext-stack-
> example> where I embedded an interactive STACK question into HTML generated by
> pretext, as well as including the javascript headers. (I'll work on improving
> the actual Javascript logic to make it behave more closely to how webwork
> questions behave.)
>
> Some pointers how to proceed from here would be really helpful, especially
> around the XSL templating. (I can make some sense of the |pretext| and |pretext-
> cli| python code if I dig into it a bit, but high-level guidance would still be
> helpful.)
>
>
> On Mon, Jun 30, 2025, 01:02 Georg Osang <geo...@gmail.com
> <mailto:geo...@gmail.com>> wrote:
>
> Hi all,
>
> I've familiarized myself a bit with the `pretext` and `pretext-cli`
> codebase, to get a better understanding of what needs to be done.
> I've implemented a basic function to generate static versions of STACK
> questions, but it'd be good to get some guidance on how to proceed from here.
> I've created a draft PR with more concrete questions, where you can also see
> and try out the function I wrote: https://github.com/PreTeXtBook/pretext/
> pull/2576 <https://github.com/PreTeXtBook/pretext/pull/2576>
> Let me know if you prefer to keep the discussion in here or in the PR.
>
> Thanks!
>
> On Friday, March 21, 2025 at 10:38:02 AM UTC+1 c.j.s...@gmail.com
> overview-exercises.html <https://pretextbook.org/doc/guide/html/
> overview-exercises.html>>?
> > And inside these statement/solution etc elements, we can use any
> markup that is
> > documented in the specification here <https://pretextbook.org/
> doc/guide/html/ <https://pretextbook.org/doc/guide/html/>
> pretext-stack- <https://github.com/IDEMSInternational/pretext-stack->
> >     example <https://github.com/IDEMSInternational/pretext-stack-
> example <https://github.com/IDEMSInternational/pretext-stack-example>>
> >      > Assuming you have docker/docker-compose installed, seeing
> it in action
> >     should be
> >      > as simple closing/downloading the repository, running
> `docker-compose up`
> >     and
> >      > then viewing `http://localhost:8080/` <http://
> localhost:8080/> <http://localhost:8080/ <http://localhost:8080/>>
> in your
> >     browser.
> >      >
> >      > I haven't polished it (so it behaves a bit different from
> e.g. a webwork
> >      > question right now), but it's enough to render a simple
> question. You can
> >     see
> >      > the code changes I made to the PreText HTML output, as
> well as the XML
> >     source of
> >      > the STACK question here: https://github.com/
> IDEMSInternational/pretext- <https://github.com/IDEMSInternational/
> pretext->
> >     stack- <https://github.com/IDEMSInternational/pretext-stack-
> >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>
> >      > dev/0606c24b-693f-4515-
> a56b-67eac0e387ban%40googlegroups.com <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>> <https://
> >      > groups.google.com/d/msgid/pretext-dev/0606c24b-693f-4515-
> <http://groups.google.com/d/msgid/pretext-dev/0606c24b-693f-4515->
> <http://
> > groups.google.com/d/msgid/pretext-dev/0606c24b-693f-4515-
> <http://groups.google.com/d/msgid/pretext-dev/0606c24b-693f-4515->>
> >      > a56b-67eac0e387ban%40googlegroups.com?
> utm_medium=email&utm_source=footer <http://40googlegroups.com?
> utm_medium=email&utm_source=footer>
> >     <http://40googlegroups.com?utm_medium=email&utm_source=footer
> <http://40googlegroups.com?utm_medium=email&utm_source=footer>>>.
> >
> > --
> > You received this message because you are subscribed to the
> Google Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send an email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> > dev+uns...@googlegroups.com>.
> > To view this discussion visit https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> > dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/
> msgid/pretext->
> > dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "PreTeXt development" group.
>
> To unsubscribe from this group and stop receiving emails from it,
> send an email to pretext-dev...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh <https://
> groups.google.com/d/msgid/pretext-dev/
> MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to pretext-
> dev+uns...@googlegroups.com <mailto:pretext-
> dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-
> dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-Aksy6ZrQ%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/
> CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-Aksy6ZrQ%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Georg Osang

unread,
Jul 6, 2025, 5:44:21 PMJul 6
to prete...@googlegroups.com
Hi Rob,

Thanks for your advice!

With Chris we've created a specification and an example for a minimal document containing a STACK question (examples/stack). Does that cover (1)? I assume we'll also have to extend the schema specification accordingly?

We'll need to protect #stack from the #stack already used in side-by-sides.
This should look like how #webwork is structured.
Do you suggest we should use a different name, or just be careful that any templates only match what they are supposed to match? 

2.  Use  pretext-html.xsl  to turn that into the  #div.stack  you describe
below, and get a problem to render in HTML output.  Presumably the PreTeXt
#stack will have some sort of attribute that has "integrate" or
"questions/integrate" or "questions/integrate.xml", however little an author can
get away with (we provide the rest).
I'll focus on this part for now. We aim to use the following to include a question:
<stack source="/01_integration_with_feedback.xml" /> 
The source references a local file path, which would be consistent with images. Images live in an assets folder (which after compilation also appears in the output; is copying that done by the CLI or elsewhere? Should we have our questions also in the assets folder and paths relative to that, and are they then copied over automatically?)
When developing, do you use the CLI to test the whole pipeline, or are there some more fine-grained operations?

3.  Then some XSL to extract whatever is needed to get the server to produce a
static version.  I'd use the MyOpenMath (MOM) code as an example, the WeBWorK
(WW) has a lot of extra stuff going on that ight get in your way.  Python
applies this XSL, makes requests of the server, packages up static.  I think I'd
rather do this as one-file-per-problem, like MOM, not one huge file like WW.
Is there an example of a document with MOM questions somewhere I can use to see what the output looks like?
A basic python function making requests to the server and post-processing the output to generate a static version is in the PR already, it's not connected to anything yet though.

Best,
Georg



To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/gkZ4sSj8nVk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh.

Rob Beezer

unread,
Jul 13, 2025, 10:41:50 PMJul 13
to prete...@googlegroups.com
Dear Georg,

Thanks for your careful work and your patience. Several big PreTeXt initiatives
have been evolving, and I have to rotate my attention between them. So I'm
sorry about the delay. I've looked over the PR carefully, but not actually run
with it yet. Two big items we should start with.

* The usual PreTeXt way would be to put a probem *directly* in the source,
rather than have a @file attribute and then put problems in files of their own
(I know I led you in that direction). So we would go something like

<exercise>
<title>A great exercise</title>

<stack>
[A bunch of STACK XML here]
</stack>
</exercise>

The HTML conversion would then "rip out" the necessary XML to feed to the
server. Or more accurately, put it into #div with a class name ("stack") that
meant it would get picked up by the server (as I think you describe in the PR).
We could, as the HTML gets created, rip it out into a file and then somehow the
API would pickup the filename and run with it, but that would also be a bit unusual.

This would mean some of your questions about generating assets would be
unnecessary or not needed.

(Authors could elect to have problems in their own XML file, which would be
"xi:include"'ed into the source as a convenience for organization.)

I see in the PR that this is problem 17332? Is their a server hosted version?
Would source here diverge over time?

* The narrative parts of the problem look like HTML, or perhaps PreTeXt, but
then become "character data" via CDATA sections. So they have been
un-XML-ified. Why so? What problem is being solved with this. CDATA is really
only a last resort, so consistent use is a bit of a red flag. (And we have
routines that will convert XML into equivalent text, such as when we need to
stuff HTML into JSON structures.

I'm sure there is lots I'm not understanding, but I hope those questions get us
going in the right direction. And perhaps you are just working on making static
versions? Maybe that's where I'm not making a connection.

Thanks,
Rob

On 7/6/25 14:44, Georg Osang wrote:
> Hi Rob,
>
> > <mailto:geo...@gmail.com <mailto:geo...@gmail.com>>> wrote:
> >
> >     Hi all,
> >
> >     I've familiarized myself a bit with the `pretext` and `pretext-cli`
> >     codebase, to get a better understanding of what needs to be done.
> >     I've implemented a basic function to generate static versions of STACK
> >     questions, but it'd be good to get some guidance on how to proceed
> from here.
> >     I've created a draft PR with more concrete questions, where you can
> also see
> >     and try out the function I wrote: https://github.com/PreTeXtBook/
> pretext/ <https://github.com/PreTeXtBook/pretext/>
> >     pull/2576 <https://github.com/PreTeXtBook/pretext/pull/2576 <https://
> github.com/PreTeXtBook/pretext/pull/2576>>
> >     Let me know if you prefer to keep the discussion in here or in the PR.
> >
> >     Thanks!
> >
> >     On Friday, March 21, 2025 at 10:38:02 AM UTC+1 c.j.s...@gmail.com
> <mailto:c.j.s...@gmail.com>
> >     <mailto:c.j.s...@gmail.com <mailto:c.j.s...@gmail.com>> wrote:
> >
> >         Thanks everyone, it feels like we are making a start.
> >
> >         I'm very happy to discuss having the STACK API return a "static"
> version
> >         of a problem (e.g. a particular random variant) for inclusion in
> static
> >         formats such as PDF/print.  Of course, that throws away the whole
> point
> >         of STACK, but inclusion in pretext is an important application. And I
> >         can see situations where a colleagues produces a .pdf "problem sheet"
> >         backed up by dynamic, randomly generated questions of a similar type.
> >
> >         Georg, if you continue to plug away at the interface between the
> two we
> >         can develop the specification of what needs to change on the STACK
> >         side.  We already separate out <statement>, <answer> and <solution>
> >         fields.  The detail of precisely what format that's returned in
> (I think
> >         the API currently wraps maths with mathjax?) will need to be agreed.
> >
> >         We can agree to support only a subset of the stack functionality (not
> >         the dynamic input types such as Parsons inputs) within such a static
> >         questions, especially in version 1.
> >
> >         Chris
> >
> >
> >         On Fri, Mar 21, 2025 at 2:56 AM 'Rob Beezer' via PreTeXt development
> >         <prete...@googlegroups.com <mailto:prete...@googlegroups.com>> wrote:
> >
> >             Dear George,
> >
> >               > it may be that you have to run sudo
> >
> >             That was the trick.  (But I'd rather not be setting something in
> >             motion that
> >             does a bunch downloads while root!)  Worked really well after
> that.
> >             Thanks,
> >             that was a very successful test.
> >
> >               > So for the static version, we basically want an XML (PTX)
> that
> >             is an <exercise>
> >               > element containing a statement, answer and possibly hints,
> >             solution and title,
> >               > as documented here
> >             <https://pretextbook.org/doc/guide/html/overview-
> exercises.html <https://pretextbook.org/doc/guide/html/overview-exercises.html>
> html/ <https://pretextbook.org/doc/guide/html/>
> >             overview-exercises.html <https://pretextbook.org/doc/guide/
> html/ <https://pretextbook.org/doc/guide/html/>
> >             overview-exercises.html>>?
> >              > And inside these statement/solution etc elements, we can
> use any
> >             markup that is
> >              > documented in the specification here <https://
> pretextbook.org/ <https://pretextbook.org/>
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >             pretext-stack- <https://github.com/IDEMSInternational/
> pretext-stack- <https://github.com/IDEMSInternational/pretext-stack->>
> >              >     example <https://github.com/IDEMSInternational/
> pretext-stack- <https://github.com/IDEMSInternational/pretext-stack->
> >             example <https://github.com/IDEMSInternational/pretext-stack-
> example <https://github.com/IDEMSInternational/pretext-stack-example>>>
> >              >      > Assuming you have docker/docker-compose installed,
> seeing
> >             it in action
> >              >     should be
> >              >      > as simple closing/downloading the repository, running
> >             `docker-compose up`
> >              >     and
> >              >      > then viewing `http://localhost:8080/` <http://
> localhost:8080/> <http://
> >             localhost:8080/> <http://localhost:8080/ <http://
> localhost:8080/> <http://localhost:8080/ <http://localhost:8080/>>>
> >             in your
> >              >     browser.
> >              >      >
> >              >      > I haven't polished it (so it behaves a bit
> different from
> >             e.g. a webwork
> >              >      > question right now), but it's enough to render a simple
> >             question. You can
> >              >     see
> >              >      > the code changes I made to the PreText HTML output, as
> >             well as the XML
> >              >     source of
> >              >      > the STACK question here: https://github.com/
> <https://github.com/>
> >             IDEMSInternational/pretext- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >             pretext->
> >              >     stack- <https://github.com/IDEMSInternational/pretext-
> stack- <https://github.com/IDEMSInternational/pretext-stack->
> >             <https://github.com/IDEMSInternational/pretext-stack-
> <https://github.com/IDEMSInternational/pretext-stack->>>
> >              >      > example/
> commit/933936f578ceb2823b1dc5cbee8fa8376b98968c#diff-
> dev...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> >              >      > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>>.
> >              >      > To view this discussion visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >             msgid/pretext- <https://groups.google.com/d/msgid/pretext-
> <https://groups.google.com/d/msgid/pretext->>
> >              >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>
> >              >      > dev/0606c24b-693f-4515-
> >             a56b-67eac0e387ban%40googlegroups.com
> <http://40googlegroups.com> <http://40googlegroups.com
> <http://40googlegroups.com>>
> >              >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>> <https://
> >              >      > groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515->
> >             <http://groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515->>
> >             <http://groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515->>>
> >              >      > a56b-67eac0e387ban%40googlegroups.com
> <http://40googlegroups.com>?
> >             utm_medium=email&utm_source=footer <http://40googlegroups.com
> <http://40googlegroups.com>?
> >             utm_medium=email&utm_source=footer>
> >              >     <http://40googlegroups.com?
> utm_medium=email&utm_source=footer <http://40googlegroups.com?
> utm_medium=email&utm_source=footer>
> >             <http://40googlegroups.com?utm_medium=email&utm_source=footer
> <http://40googlegroups.com?utm_medium=email&utm_source=footer>>>>.
> >              >
> >              > --
> >              > You received this message because you are subscribed to the
> >             Google Groups
> >              > "PreTeXt development" group.
> >              > To unsubscribe from this group and stop receiving emails
> from it,
> >             send an email
> >              > to pretext-dev...@googlegroups.com <mailto:pretext-
> dev...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> >              > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>>.
> >              > To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >             pretext- <https://groups.google.com/d/msgid/pretext-
> <https://groups.google.com/d/msgid/pretext->>
> >              >
> dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> >              > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext-> <http://groups.google.com/d/ <http://
> groups.google.com/d/>
> >             msgid/pretext->
> >              >
> dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> >             <http://40googlegroups.com <http://40googlegroups.com>>?
> >              > utm_medium=email&utm_source=footer>.
> >
> >             --
> >             You received this message because you are subscribed to the
> Google
> >             Groups "PreTeXt development" group.
> >
> >             To unsubscribe from this group and stop receiving emails from it,
> >             send an email to pretext-dev...@googlegroups.com
> <mailto:pretext-dev...@googlegroups.com>.
> >             To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >             pretext-dev/MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh <https://
> > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/d/msgid/
> pretext-dev/>
> >             MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh>.
> >
> >     --
> >     You received this message because you are subscribed to a topic in the
> >     Google Groups "PreTeXt development" group.
> >     To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >     To unsubscribe from this group and all its topics, send an email to
> pretext-
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >     dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> >     dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>?
> >     utm_medium=email&utm_source=footer>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>>.
> > To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-Aksy6ZrQ%40mail.gmail.com
> <http://40mail.gmail.com> <https://
> > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/d/msgid/
> pretext-dev/>
> > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-Aksy6ZrQ%40mail.gmail.com
> <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to pretext-
> dev+uns...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CAHDrpCeNFvtL9x-V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x-
> V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Georg Osang

unread,
Jul 14, 2025, 5:20:53 AMJul 14
to prete...@googlegroups.com
Hi Rob,

The XML file from the example, and in general STACK questions, are directly exported from Moodle (the learning management system where the STACK questions are authored and usually also deployed to students), hence the CDATA and not so human-friendly format.
I would treat them akin to an asset (like e.g. an image), and in fact have moved the STACK questions folder into an assets folder, and changed @file to @source, to be consistent with images now. Like, say, .pg files for webwork, these would be a black box for pretext. There is also work on a YAML format for these questions now, so the fact that these files are XML is just a coincidence.

We intend to auto-sync these questions from our Moodle server into a folder from where they can be included via file references. We could also consider sending identifiers rather than the full questions to the STACK API, and have the questions live on the STACK API server (like it is done for webwork), however, I think it is good to have all book-content be self-contained, and the API also currently doesn't support question references (though I assume it could be added without too much difficulty). I hope that answers your question below?
I see in the PR that this is problem 17332?  Is their a server hosted version?
Would source here diverge over time?

I think having a pretext-native XML format for STACK questions that is easy to author by hand (and that integrates with the pretext PTX schema, can be included directly or via xi:include, etc) could be something to think about in the future. Chris and Edmund have been working towards simplifying the XML format that comes from Moodle to some extent, but we'd need to decide what exactly we want here. Currently, the simplified format is still understood by the API, but maybe the Moodle XML would be generated via XSL from the pretext-native format? Either way, I would prioritize getting STACK supported via references to questions first.

Does that sound sensible to you?

The PR, in its current status, only concerns itself with generating static PTX versions from the Moodle XML files. (There's only a function doing the conversion, but it's not used/called anywhere yet.)
I've been working on the XSL for including STACK questions into HTML documents. I'll let you know once I have a demo.

Best,
Georg

To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/gkZ4sSj8nVk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh.

Rob Beezer

unread,
Jul 14, 2025, 10:41:30 AMJul 14
to prete...@googlegroups.com
Thanks, George. That clears up my confusion (and reminds me of a few things I
should have remembered). I'll be back with more (sooner this time?) when I can
take a bit to digest all this.

Rob

On 7/14/25 02:20, Georg Osang wrote:
> Hi Rob,
>
> On Mon, 14 Jul 2025 at 04:41, 'Rob Beezer' via PreTeXt development <pretext-
> d...@googlegroups.com <mailto:prete...@googlegroups.com>> wrote:
>
> Dear Georg,
>
> > d...@googlegroups.com <mailto:d...@googlegroups.com> <mailto:pretext-
> >     <https://github.com/IDEMSInternational/pretext/ <https://github.com/
> >      > from the example <https://github.com/IDEMSInternational/pretext-
> PreTeXtBook/ <https://github.com/PreTeXtBook/>
> >     pretext/ <https://github.com/PreTeXtBook/pretext/ <https://
> github.com/PreTeXtBook/pretext/>>
> >      >     pull/2576 <https://github.com/PreTeXtBook/pretext/pull/2576
> <https://github.com/PreTeXtBook/pretext/pull/2576> <https://
> > github.com/PreTeXtBook/pretext/pull/2576 <http://github.com/PreTeXtBook/
> <mailto:prete...@googlegroups.com> <mailto:prete...@googlegroups.com
> <mailto:prete...@googlegroups.com>>> wrote:
> >      >
> >      >             Dear George,
> >      >
> >      >               > it may be that you have to run sudo
> >      >
> >      >             That was the trick.  (But I'd rather not be setting
> something in
> >      >             motion that
> >      >             does a bunch downloads while root!)  Worked really
> well after
> >     that.
> >      >             Thanks,
> >      >             that was a very successful test.
> >      >
> >      >               > So for the static version, we basically want an
> XML (PTX)
> >     that
> >      >             is an <exercise>
> >      >               > element containing a statement, answer and
> possibly hints,
> >      >             solution and title,
> >      >               > as documented here
> >      >             <https://pretextbook.org/doc/guide/html/overview-
> exercises.html <https://pretextbook.org/doc/guide/html/overview-exercises.html>>
> >      >             <https://pretextbook.org/doc/guide/html/overview-
> guide/ <https://pretextbook.org/doc/guide/>
> >      >             overview-exercises.html <https://pretextbook.org/doc/
> guide/ <https://pretextbook.org/doc/guide/>
> >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/>>
> >      >             overview-exercises.html>>?
> >      >              > And inside these statement/solution etc elements,
> we can
> >     use any
> >      >             markup that is
> >      >              > documented in the specification here <https://
> > pretextbook.org/ <http://pretextbook.org/> <https://pretextbook.org/
> <https://pretextbook.org/>>
> >      >             doc/guide/html/ <https://pretextbook.org/doc/guide/
> html/ <https://pretextbook.org/doc/guide/html/>
> >     <https://pretextbook.org/doc/guide/html/ <https://pretextbook.org/
> >     IDEMSInternational/ <https://github.com/IDEMSInternational/ <https://
> >      >              >     example <https://github.com/IDEMSInternational/
> <https://github.com/IDEMSInternational/pretext-stack->>
> >      >             example <https://github.com/IDEMSInternational/
> pretext-stack- <https://github.com/IDEMSInternational/pretext-stack->
> >     example <https://github.com/IDEMSInternational/pretext-stack-example
> <https://github.com/IDEMSInternational/pretext-stack-example>>>>
> >      >              >      > Assuming you have docker/docker-compose
> installed,
> >     seeing
> >      >             it in action
> >      >              >     should be
> >      >              >      > as simple closing/downloading the
> repository, running
> >      >             `docker-compose up`
> >      >              >     and
> >      >              >      > then viewing `http://localhost:8080/`
> <http://localhost:8080/> <http://
> >     localhost:8080/> <http://
> >      >             localhost:8080/> <http://localhost:8080/ <http://
> localhost:8080/> <http://
> >     localhost:8080/> <http://localhost:8080/ <http://localhost:8080/>
> <http://localhost:8080/ <http://localhost:8080/>>>>
> >      >             in your
> >      >              >     browser.
> >      >              >      >
> >      >              >      > I haven't polished it (so it behaves a bit
> >     different from
> >      >             e.g. a webwork
> >      >              >      > question right now), but it's enough to
> render a simple
> >      >             question. You can
> >      >              >     see
> >      >              >      > the code changes I made to the PreText HTML
> output, as
> >      >             well as the XML
> >      >              >     source of
> >      >              >      > the STACK question here: https://github.com/
> <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >             IDEMSInternational/pretext- <https://github.com/
> <https://github.com/>
> >     IDEMSInternational/ <https://github.com/IDEMSInternational/ <https://
> github.com/IDEMSInternational/>>
> >      >             pretext->
> >      >              >     stack- <https://github.com/IDEMSInternational/
> pretext- <https://github.com/IDEMSInternational/pretext->
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>
> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      >              >      > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>>.
> >      >              >      > To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >             msgid/pretext- <https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>>
> >      >              >     <https://groups.google.com/d/msgid/pretext-
> <https://groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->> <https://
> >      > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/
> msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/>
> >     pretext->>>
> >      >              >      > dev/0606c24b-693f-4515-
> >      >             a56b-67eac0e387ban%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> <http://40googlegroups.com <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>>
> >      >              >     <http://40googlegroups.com
> <http://40googlegroups.com> <http://40googlegroups.com
> <http://40googlegroups.com>>
> >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>> <https://
> >      >              >      > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515->
> >      >             <http://groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515->>
> >      >             <http://
> >      >              > groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515->
> >     <http://groups.google.com/d/msgid/pretext-dev/0606c24b-693f-4515-
> <http://groups.google.com/d/msgid/pretext-dev/0606c24b-693f-4515->>
> >      >             <http://groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515->>>
> >      >              >      > a56b-67eac0e387ban%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>?
> >      >             utm_medium=email&utm_source=footer
> <http://40googlegroups.com <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>?
> >      >             utm_medium=email&utm_source=footer>
> >      >              >     <http://40googlegroups.com
> <http://40googlegroups.com>?
> >     utm_medium=email&utm_source=footer <http://40googlegroups.com
> <http://40googlegroups.com>?
> >     utm_medium=email&utm_source=footer>
> >      >             <http://40googlegroups.com?
> utm_medium=email&utm_source=footer <http://40googlegroups.com?
> utm_medium=email&utm_source=footer>
> >     <http://40googlegroups.com?utm_medium=email&utm_source=footer
> <http://40googlegroups.com?utm_medium=email&utm_source=footer>>>>>.
> >      >              >
> >      >              > --
> >      >              > You received this message because you are
> subscribed to the
> >      >             Google Groups
> >      >              > "PreTeXt development" group.
> >      >              > To unsubscribe from this group and stop receiving
> emails
> >     from it,
> >      >             send an email
> >      >              > to pretext-dev...@googlegroups.com <mailto:pretext-
> dev...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>
> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      >              > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>>.
> >      >              > To view this discussion visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/>>
> >      >             pretext- <https://groups.google.com/d/msgid/pretext-
> <https://groups.google.com/d/msgid/pretext->
> >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>>
> >      >              >
> >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >              > groups.google.com/d/msgid/pretext- <http://
> pretext->> <http://groups.google.com/d/ <http://groups.google.com/d/> <http://
> > groups.google.com/d/ <http://groups.google.com/d/>>
> >      >             msgid/pretext->
> >      >              >
> >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >             <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>?
> >      >              > utm_medium=email&utm_source=footer>.
> >      >
> >      >             --
> >      >             You received this message because you are subscribed
> to the
> >     Google
> >      >             Groups "PreTeXt development" group.
> >      >
> >      >             To unsubscribe from this group and stop receiving
> emails from it,
> >      >             send an email to pretext-dev...@googlegroups.com
> <mailto:pretext-dev...@googlegroups.com>
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> dev...@googlegroups.com>>.
> >      >             To view this discussion visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/>>
> >      >             pretext-dev/MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh
> <https://
> >      > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/
> d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/>
> >     pretext-dev/>
> >      >             MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh>.
> >      >
> >      >     --
> >      >     You received this message because you are subscribed to a
> topic in the
> >      >     Google Groups "PreTeXt development" group.
> >      >     To unsubscribe from this topic, visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >     To unsubscribe from this group and all its topics, send an
> email to
> >     pretext-
> >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>>.
> >      >     To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>
> >      >     dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/>
> >     pretext->
> >      >     dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>?
> >      >     utm_medium=email&utm_source=footer>.
> >      >
> >      > --
> >      > You received this message because you are subscribed to the Google
> Groups
> >      > "PreTeXt development" group.
> >      > To unsubscribe from this group and stop receiving emails from it,
> send an
> >     email
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>>.
> >      > To view this discussion visit https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >     dev/ <https://groups.google.com/d/msgid/pretext-dev/ <https://
> groups.google.com/d/msgid/pretext-dev/>>
> >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> >     <http://40mail.gmail.com <http://40mail.gmail.com>> <https://
> >      > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/
> d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/>
> >     pretext-dev/>
> >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> >     <http://40mail.gmail.com <http://40mail.gmail.com>>?
> >      > utm_medium=email&utm_source=footer>.
> >
> >     --
> >     You received this message because you are subscribed to a topic in the
> >     Google Groups "PreTeXt development" group.
> >     To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >     To unsubscribe from this group and all its topics, send an email to
> pretext-
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> >     MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh <https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext-dev/MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> > CAHDrpCeNFvtL9x-V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> <http://40mail.gmail.com>
> > <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x- <https://
> groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x->
> > V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to pretext-
> dev+uns...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/
> CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Georg Osang

unread,
Jul 22, 2025, 5:28:59 AMJul 22
to prete...@googlegroups.com
Hi all,

I've pushed new changes so that when running `pretext build html` on the minimal STACK example,
output with a functional STACK question is produced that you can test. (Note: Upon the first run the question takes a while to run as the example STACK API is deployed as a cloud function which takes a moment to spin up after it hasn't been in use for a while.)

A few challenges I've encountered:
- I haven't figured out how to extract the server URL from the publication.ptx file, so I'm using a hardcoded one for now
- We have conflicting versions of MathJax. Pretext seems to be using MathJax 3 while STACK is using MathJax 2. If I only include MathJax 3 (done by default), the STACK questions are not rendering. If I include MathJax 2, everything seems to be looking fine (I've also tried LaTeX embedded in e.g. introduction text outside of STACK questions), but under the hood we're getting errors:
Uncaught TypeError: can't access property "input", MathJax._ is undefined

I want to align the behaviour a bit more to how webwork questions behave, so the Javascript code will need some major refactoring from my end. Any style guidelines/conventions to adhere to would be helpful though. Currently, when generating the HTML body in the XSL I'm adding an @onload attribute so that a function is called assigning IDs to each STACK question and generating all the HTML elements, maybe there are different preferred ways of handling this. Haven't added any CSS yet either.

No changes to the static version yet, i.e. the python function generating the static version of the STACK question isn't being called anywhere yet.

Best,
Georg



To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/gkZ4sSj8nVk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh.

Chris Sangwin

unread,
Jul 22, 2025, 12:15:34 PMJul 22
to prete...@googlegroups.com
Georg,

Great progress, thank you.  We plan to support MathJax 3 with STACK - basically we will follow along with the default version used by Moodle.  Let's try to get that fixed at the STACK end if this helps?

Chris

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CAHDrpCe4NCjb74UcTKK_eCF%2BHtULQC2JSwhaPyPUHrbRFqqD4w%40mail.gmail.com.

Rob Beezer

unread,
Jul 23, 2025, 12:17:56 PMJul 23
to prete...@googlegroups.com
Dear Georg,

Thanks for the new work.

I built the minimal sample as HTML, and I got the antiderivative correct on my
firat try. ;-) Working well. Thanks for putting this all together.

I'm going to chase through the markup and code carefully now that I have a block
of time, so look for comments soon.

Thanks for your patience, I'm sorry I have not been able to provide prompt
feedback to your substantial efforts.

Rob

On 7/22/25 02:28, Georg Osang wrote:
> Hi all,
>
> I've pushed new changes <https://github.com/PreTeXtBook/pretext/pull/2576/files>
> so that when running `pretext build html` on the minimal STACK example,
> output with a functional STACK question is produced that you can test. (Note:
> Upon the first run the question takes a while to run as the example STACK API is
> deployed as a cloud function which takes a moment to spin up after it hasn't
> been in use for a while.)
>
> A few challenges I've encountered:
> - I haven't figured out how to extract the server URL from the publication.ptx
> file, so I'm using a hardcoded one for now
> - We have conflicting versions of MathJax. Pretext seems to be using MathJax 3
> while STACK is using MathJax 2. If I only include MathJax 3 (done by default),
> the STACK questions are not rendering. If I include MathJax 2, everything seems
> to be looking fine (I've also tried LaTeX embedded in e.g. introduction text
> outside of STACK questions), but under the hood we're getting errors:
>
> Uncaught TypeError: can't access property "input", MathJax._ is undefined
> <anonymous>http://localhost:8128/output/html/_static/pretext/js/lib/
> mathjaxknowl3.js <http://localhost:8128/output/html/_static/pretext/js/lib/
> mathjaxknowl3.js>:2
>
>
> I want to align the behaviour a bit more to how webwork questions behave, so the
> Javascript code will need some major refactoring from my end. Any style
> guidelines/conventions to adhere to would be helpful though. Currently, when
> generating the HTML body in the XSL I'm adding an @onload attribute so that a
> function is called assigning IDs to each STACK question and generating all the
> HTML elements, maybe there are different preferred ways of handling this.
> Haven't added any CSS yet either.
>
> No changes to the static version yet, i.e. the python function generating the
> static version of the STACK question isn't being called anywhere yet.
>
> Best,
> Georg
>
>
>
> On Mon, 14 Jul 2025 at 16:41, 'Rob Beezer' via PreTeXt development <pretext-
> > d...@googlegroups.com <mailto:d...@googlegroups.com> <mailto:pretext-
> d...@googlegroups.com <mailto:prete...@googlegroups.com>>> wrote:
> >
> >     Dear Georg,
> >
> <mailto:d...@googlegroups.com <mailto:d...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext->
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext/ <https://github.com/IDEMSInternational/pretext/ <https://
> github.com/IDEMSInternational/pretext/> <https://github.com/ <https://
> github.com/>
> >      >      > from the example <https://github.com/IDEMSInternational/
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> >     PreTeXtBook/ <https://github.com/PreTeXtBook/ <https://github.com/
> PreTeXtBook/>>
> >      >     pretext/ <https://github.com/PreTeXtBook/pretext/ <https://
> github.com/PreTeXtBook/pretext/> <https://
> > github.com/PreTeXtBook/pretext/ <http://github.com/PreTeXtBook/pretext/>>>
> PreTeXtBook/pretext/pull/2576> <http://github.com/PreTeXtBook/ <http://
> github.com/PreTeXtBook/>
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html>>>
> >      >      >             <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html>>>?
> >      >      >
> doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://pretextbook.org/
> doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/html/>>>
> >      >      >             overview-exercises.html <https://
> pretextbook.org/doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://pretextbook.org/
> doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/html/>>>
> >      >      >             overview-exercises.html>>?
> >      >      >              > And inside these statement/solution etc
> elements,
> >     we can
> >      >     use any
> >      >      >             markup that is
> >      >      >              > documented in the specification here <https://
> >      > pretextbook.org/ <http://pretextbook.org/> <http://
> >      >      >             doc/guide/html/ <https://pretextbook.org/doc/
> pretextbook.org/doc/guide/html/> <https://pretextbook.org/ <https://
> pretextbook.org/>
> <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext-stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/pretext-
> >      >      >              >     example <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/pretext-
> >      >      >             example <https://github.com/IDEMSInternational/
> >      >     example <https://github.com/IDEMSInternational/pretext-stack-
> example <https://github.com/IDEMSInternational/pretext-stack-example>
> >     <https://github.com/IDEMSInternational/pretext-stack-example
> <https://github.com/IDEMSInternational/pretext-stack-example>>>>>
> >      >      >              >      > Assuming you have docker/docker-compose
> >     installed,
> >      >     seeing
> >      >      >             it in action
> >      >      >              >     should be
> >      >      >              >      > as simple closing/downloading the
> >     repository, running
> >      >      >             `docker-compose up`
> >      >      >              >     and
> >      >      >              >      > then viewing `http://localhost:8080/`
> <http://localhost:8080/>
> >     <http://localhost:8080/ <http://localhost:8080/>> <http://
> >      >     localhost:8080/> <http://
> >      >      >             localhost:8080/> <http://localhost:8080/
> <http://localhost:8080/> <http://
> >     localhost:8080/> <http://
> >      >     localhost:8080/> <http://localhost:8080/ <http://
> >     <http://localhost:8080/ <http://localhost:8080/> <http://
> localhost:8080/ <http://localhost:8080/>>>>>
> >      >      >             in your
> >      >      >              >     browser.
> >      >      >              >      >
> >      >      >              >      > I haven't polished it (so it behaves
> a bit
> >      >     different from
> >      >      >             e.g. a webwork
> >      >      >              >      > question right now), but it's enough to
> >     render a simple
> >      >      >             question. You can
> >      >      >              >     see
> >      >      >              >      > the code changes I made to the
> PreText HTML
> >     output, as
> >      >      >             well as the XML
> >      >      >              >     source of
> >      >      >              >      > the STACK question here: https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     <https://github.com/ <https://github.com/> <https://
> github.com/ <https://github.com/>>>
> >      >      >             IDEMSInternational/pretext- <https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     IDEMSInternational/ <https://github.com/IDEMSInternational/
> <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext->
> >      >      >              >     stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext- <https://github.com/IDEMSInternational/pretext- <https://
> github.com/IDEMSInternational/pretext->>
> >      >     stack- <https://github.com/IDEMSInternational/pretext-stack-
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext-
> >> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      >              >      > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              >      > To view this discussion visit https://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>> <https://
> >      >      >             msgid/pretext- <https://groups.google.com/d/
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> >      >      >              >     <https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->> <https://
> >     pretext->> <https://
> >      >      > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext-> <http://groups.google.com/d/ <http://
> groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->
> >      >      >             <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>
> >      >      >             <http://
> >      >      >              > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515->
> >      >     <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>>
> >      >      >              >      > a56b-67eac0e387ban%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <mailto:pretext-dev...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>
> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext-
> >> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      >              > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              > To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/> <https://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>>
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>>
> >      >      >              >
> >      >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> pretext->> <http://
> >     pretext->> <http://groups.google.com/d/ <http://groups.google.com/d/>
> <http://groups.google.com/d/ <http://groups.google.com/d/>> <http://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>>>
> >      >      >             msgid/pretext->
> >      >      >              >
> >      >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>
> <http://40googlegroups.com <http://40googlegroups.com>>>>?
> >      >      >              > utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      >             --
> >      >      >             You received this message because you are
> subscribed
> >     to the
> >      >     Google
> >      >      >             Groups "PreTeXt development" group.
> >      >      >
> >      >      >             To unsubscribe from this group and stop receiving
> >     emails from it,
> >      >      >             send an email to pretext-
> dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> dev...@googlegroups.com>>
> >      >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>.
> >      >      >             To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/> <https://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>>
> >      >      >             pretext-dev/MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh
> >     <https://
> >      >      > groups.google.com/d/msgid/pretext-dev/ <http://
> groups.google.com/d/msgid/pretext-dev/> <http://groups.google.com/ <http://
> groups.google.com/>
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      >             MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh>.
> >      >      >
> >      >      >     --
> >      >      >     You received this message because you are subscribed to a
> >     topic in the
> >      >      >     Google Groups "PreTeXt development" group.
> >      >      >     To unsubscribe from this topic, visit https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/> <https://
> > groups.google.com/d/topic/ <http://groups.google.com/d/topic/>>>
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/> <https://
> > groups.google.com/d/topic/ <http://groups.google.com/d/topic/>>>
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >      >     To unsubscribe from this group and all its topics, send an
> >     email to
> >      >     pretext-
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext- <mailto:pretext-
> > <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      >     To view this discussion visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/>>
> >      >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>
> >      >      >
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> groups.google.com/d/msgid/pretext-> <http://groups.google.com/d/ <http://
> groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext->
> >      >      >
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>?
> >      >      >     utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      > --
> >      >      > You received this message because you are subscribed to the
> Google
> >     Groups
> >      >      > "PreTeXt development" group.
> >      >      > To unsubscribe from this group and stop receiving emails
> from it,
> >     send an
> >      >     email
> >      >      > to pretext-dev...@googlegroups.com
> <mailto:pretext-dev%2Bunsu...@googlegroups.com> <mailto:pretext-
> <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext- <mailto:pretext-
> > <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      > To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>
> >      >     dev/ <https://groups.google.com/d/msgid/pretext-dev/ <https://
> groups.google.com/d/msgid/pretext-dev/> <https://
> > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/d/msgid/
> pretext-dev/>>>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>> <https://
> >      >      > groups.google.com/d/msgid/pretext-dev/ <http://
> groups.google.com/d/msgid/pretext-dev/> <http://groups.google.com/ <http://
> groups.google.com/>
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>>?
> >      >      > utm_medium=email&utm_source=footer>.
> >      >
> >      >     --
> >      >     You received this message because you are subscribed to a
> topic in the
> >      >     Google Groups "PreTeXt development" group.
> >      >     To unsubscribe from this topic, visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >     To unsubscribe from this group and all its topics, send an
> email to
> >     pretext-
> >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>.
> >      >     To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/
> <https://groups.google.com/d/msgid/pretext-dev/>>
> >      >     MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh <https://
> >      >     pretext-dev/MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh>.
> >      >
> >      > --
> >      > You received this message because you are subscribed to the Google
> Groups
> >      > "PreTeXt development" group.
> >      > To unsubscribe from this group and stop receiving emails from it,
> send an
> >     email
> >      > to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> >      > CAHDrpCeNFvtL9x-
> V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> >      > <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x-
> <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x-> <https://
> > groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x- <http://
> groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x->>
> >      > V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> <http://40mail.gmail.com>
> >     <http://40mail.gmail.com <http://40mail.gmail.com>>?
> >      > utm_medium=email&utm_source=footer>.
> >
> >     --
> >     You received this message because you are subscribed to a topic in the
> >     Google Groups "PreTeXt development" group.
> >     To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >     To unsubscribe from this group and all its topics, send an email to
> pretext-
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> >     MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh <https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext-dev/MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to pretext-
> dev+uns...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CAHDrpCe4NCjb74UcTKK_eCF%2BHtULQC2JSwhaPyPUHrbRFqqD4w%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/
> CAHDrpCe4NCjb74UcTKK_eCF%2BHtULQC2JSwhaPyPUHrbRFqqD4w%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Jul 23, 2025, 12:23:04 PMJul 23
to prete...@googlegroups.com
Thanks, Chris, for your attention to this effort.

I know you need to track what Moodle does.

Not to throw a spanner in the works: MathJax 4 is rumored to be out of beta on
July 31. I'm hoping that we move on that change quickly.

https://github.com/PreTeXtBook/pretext/issues/1841

Hard to say right now, but perhaps when a STACK problem is embedded, we will be
able to run *our* MJ across the problems? Always a fiddle, but we seem to hit
this problem regularly and usually devise a solution. At a minimum, we have
some expertise.

Rob

On 7/22/25 09:15, Chris Sangwin wrote:
> Georg,
>
> Great progress, thank you.  We plan to support MathJax 3 with STACK - basically
> we will follow along with the default version used by Moodle.  Let's try to get
> that fixed at the STACK end if this helps?
>
> Chris
>
> On Tue, Jul 22, 2025 at 10:28 AM Georg Osang <geo...@gmail.com
> <mailto:geo...@gmail.com>> wrote:
>
> Hi all,
>
> I've pushed new changes <https://github.com/PreTeXtBook/pretext/pull/2576/
> files> so that when running `pretext build html` on the minimal STACK example,
> output with a functional STACK question is produced that you can test.
> (Note: Upon the first run the question takes a while to run as the example
> STACK API is deployed as a cloud function which takes a moment to spin up
> after it hasn't been in use for a while.)
>
> A few challenges I've encountered:
> - I haven't figured out how to extract the server URL from the
> publication.ptx file, so I'm using a hardcoded one for now
> - We have conflicting versions of MathJax. Pretext seems to be using MathJax
> 3 while STACK is using MathJax 2. If I only include MathJax 3 (done by
> default), the STACK questions are not rendering. If I include MathJax 2,
> everything seems to be looking fine (I've also tried LaTeX embedded in e.g.
> introduction text outside of STACK questions), but under the hood we're
> getting errors:
>
> Uncaught TypeError: can't access property "input", MathJax._ is undefined
> <anonymous>http://localhost:8128/output/html/_static/pretext/js/lib/
> mathjaxknowl3.js <http://localhost:8128/output/html/_static/pretext/js/
> lib/mathjaxknowl3.js>:2
>
>
> I want to align the behaviour a bit more to how webwork questions behave, so
> the Javascript code will need some major refactoring from my end. Any style
> guidelines/conventions to adhere to would be helpful though. Currently, when
> generating the HTML body in the XSL I'm adding an @onload attribute so that
> a function is called assigning IDs to each STACK question and generating all
> the HTML elements, maybe there are different preferred ways of handling
> this. Haven't added any CSS yet either.
>
> No changes to the static version yet, i.e. the python function generating
> the static version of the STACK question isn't being called anywhere yet.
>
> Best,
> Georg
>
>
>
> <mailto:d...@googlegroups.com <mailto:d...@googlegroups.com>>
> <mailto:pretext- <mailto:pretext->
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> github.com/IDEMSInternational/pretext/> <https://github.com/ <https://
> github.com/>
> >      >      > from the example <https://github.com/
> IDEMSInternational/pretext- <https://github.com/IDEMSInternational/pretext->
> >     stack- <https://github.com/IDEMSInternational/pretext-stack-
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> <https://github.com/PreTeXtBook/pretext/> <https://
> > github.com/PreTeXtBook/pretext/ <http://github.com/PreTeXtBook/
> pretext/>>>
> >      >      >     pull/2576 <https://github.com/PreTeXtBook/pretext/
> pull/2576 <https://github.com/PreTeXtBook/pretext/pull/2576>
> PreTeXtBook/pretext/pull/2576> <http://github.com/PreTeXtBook/ <http://
> github.com/PreTeXtBook/>
> <mailto:prete...@googlegroups.com>> <mailto:prete...@googlegroups.com
> <mailto:prete...@googlegroups.com>
> >     <mailto:prete...@googlegroups.com
> <mailto:prete...@googlegroups.com>>>> wrote:
> >      >      >
> >      >      >             Dear George,
> >      >      >
> >      >      >               > it may be that you have to run sudo
> >      >      >
> >      >      >             That was the trick.  (But I'd rather not be
> setting
> >     something in
> >      >      >             motion that
> >      >      >             does a bunch downloads while root!)  Worked
> really
> >     well after
> >      >     that.
> >      >      >             Thanks,
> >      >      >             that was a very successful test.
> >      >      >
> >      >      >               > So for the static version, we basically
> want an
> >     XML (PTX)
> >      >     that
> >      >      >             is an <exercise>
> >      >      >               > element containing a statement, answer and
> >     possibly hints,
> >      >      >             solution and title,
> >      >      >               > as documented here
> >      >      >             <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html>>>
> >      >      >             <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html>>>?
> >      >      >
> pretextbook.org/doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://
> pretextbook.org/doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/
> html/>>>
> >      >      >             overview-exercises.html <https://
> pretextbook.org/doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://
> pretextbook.org/doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/
> html/>>>
> >      >      >             overview-exercises.html>>?
> >      >      >              > And inside these statement/solution etc
> elements,
> >     we can
> >      >     use any
> >      >      >             markup that is
> >      >      >              > documented in the specification here
> <https://
> >      > pretextbook.org/ <http://pretextbook.org/> <http://
> >      >      >             doc/guide/html/ <https://pretextbook.org/
> doc/guide/ <https://pretextbook.org/doc/guide/>
> >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://pretextbook.org/ <https://
> pretextbook.org/>
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     IDEMSInternational/ <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext-stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/
> pretext-stack- <https://github.com/IDEMSInternational/pretext-stack->
> >     <https://github.com/IDEMSInternational/pretext-stack- <https://
> github.com/IDEMSInternational/pretext-stack->>>>
> >      >      >              >     example <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/
> pretext-stack- <https://github.com/IDEMSInternational/pretext-stack->
> >     <https://github.com/IDEMSInternational/pretext-stack- <https://
> github.com/IDEMSInternational/pretext-stack->>>
> >      >      >             example <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext-stack- <https://github.com/IDEMSInternational/pretext-
> stack- <https://github.com/IDEMSInternational/pretext-stack->>
> >      >     example <https://github.com/IDEMSInternational/pretext-
> stack-example <https://github.com/IDEMSInternational/pretext-stack-example>
> >     <https://github.com/IDEMSInternational/pretext-stack-example
> <https://github.com/IDEMSInternational/pretext-stack-example>>>>>
> >      >      >              >      > Assuming you have docker/docker-
> compose
> >     installed,
> >      >     seeing
> >      >      >             it in action
> >      >      >              >     should be
> >      >      >              >      > as simple closing/downloading the
> >     repository, running
> >      >      >             `docker-compose up`
> >      >      >              >     and
> >      >      >              >      > then viewing `http://
> localhost:8080/` <http://localhost:8080/>
> >     <http://localhost:8080/ <http://localhost:8080/>> <http://
> >      >     localhost:8080/> <http://
> >      >      >             localhost:8080/> <http://localhost:8080/
> <http://localhost:8080/> <http://
> >     localhost:8080/> <http://
> >      >     localhost:8080/> <http://localhost:8080/ <http://
> localhost:8080/> <http://localhost:8080/ <http://localhost:8080/>>
> >     <http://localhost:8080/ <http://localhost:8080/> <http://
> localhost:8080/ <http://localhost:8080/>>>>>
> >      >      >             in your
> >      >      >              >     browser.
> >      >      >              >      >
> >      >      >              >      > I haven't polished it (so it
> behaves a bit
> >      >     different from
> >      >      >             e.g. a webwork
> >      >      >              >      > question right now), but it's
> enough to
> >     render a simple
> >      >      >             question. You can
> >      >      >              >     see
> >      >      >              >      > the code changes I made to the
> PreText HTML
> >     output, as
> >      >      >             well as the XML
> >      >      >              >     source of
> >      >      >              >      > the STACK question here: https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     <https://github.com/ <https://github.com/> <https://
> github.com/ <https://github.com/>>>
> >      >      >             IDEMSInternational/pretext- <https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     IDEMSInternational/ <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext->
> >      >      >              >     stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext- <https://github.com/IDEMSInternational/pretext-
> <https://github.com/IDEMSInternational/pretext->>
> >      >     stack- <https://github.com/IDEMSInternational/pretext-
> >      >      >             <https://github.com/IDEMSInternational/
> pretext-stack- <https://github.com/IDEMSInternational/pretext-stack->
> >     <https://github.com/IDEMSInternational/pretext-stack- <https://
> github.com/IDEMSInternational/pretext-stack->>
> >      >     <https://github.com/IDEMSInternational/pretext-stack-
> <https://github.com/IDEMSInternational/pretext-stack-> <https://
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> >      >      >              >      > to pretext-
> dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext-
> <mailto:pretext->> <mailto:pretext- <mailto:pretext-> <mailto:pretext-
> <mailto:pretext->>>
> >      >      >              >      > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              >      > To view this discussion visit
> https://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>> <https://
> >      >      >             msgid/pretext- <https://groups.google.com/
> d/msgid/ <https://groups.google.com/d/msgid/>
> >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>>
> >      >      >              >     <https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->> <https://
> >      > groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/>
> >     pretext->> <https://
> <http://groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> <http://40googlegroups.com <http://40googlegroups.com>>>>> <https://
> >      >      >              >      > groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext-> <http://
> >     <http://groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->
> >      >      >             <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>
> >      >      >             <http://
> >      >      >              > groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515->
> >      >     <http://groups.google.com/d/msgid/pretext-
> dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>>
> >      >      >              >      >
> <mailto:pretext-dev...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>
> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext-
> <mailto:pretext->> <mailto:pretext- <mailto:pretext-> <mailto:pretext-
> <mailto:pretext->>>
> >      >      >              > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              > To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/> <https://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>>
> >      >      >             pretext- <https://groups.google.com/d/
> msgid/pretext- <https://groups.google.com/d/msgid/pretext->
> >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>>
> >      >      >              >
> >      >
>  dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->> <http://
> >     pretext->> <http://groups.google.com/d/ <http://
> groups.google.com/d/> <http://groups.google.com/d/ <http://
> groups.google.com/d/>> <http://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>>>
> >      >      >             msgid/pretext->
> >      >      >              >
> >      >
>  dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>
> <http://40googlegroups.com <http://40googlegroups.com>>>>?
> >      >      >              > utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      >             --
> >      >      >             You received this message because you are
> subscribed
> >     to the
> >      >     Google
> >      >      >             Groups "PreTeXt development" group.
> >      >      >
> >      >      >             To unsubscribe from this group and stop
> receiving
> >     emails from it,
> >      >      >             send an email to pretext-
> dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> dev...@googlegroups.com>>
> >      >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>.
> >      >      >             To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/> <https://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>>
> >      >      >             pretext-dev/
> MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh
> >     <https://
> >      >      > groups.google.com/d/msgid/pretext-dev/ <http://
> groups.google.com/d/msgid/pretext-dev/> <http://groups.google.com/
> <http://groups.google.com/>
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      >             MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh>.
> >      >      >
> >      >      >     --
> >      >      >     You received this message because you are
> subscribed to a
> >     topic in the
> >      >      >     Google Groups "PreTeXt development" group.
> >      >      >     To unsubscribe from this topic, visit https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/> <https://
> > groups.google.com/d/topic/ <http://groups.google.com/d/topic/>>>
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >      >     To unsubscribe from this group and all its topics,
> send an
> >     email to
> >      >     pretext-
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      >     To view this discussion visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/>>
> >      >     pretext- <https://groups.google.com/d/msgid/pretext-
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> <http://groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext->
> >      >      >
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>?
> >      >      >     utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      > --
> >      >      > You received this message because you are subscribed to
> the Google
> >     Groups
> >      >      > "PreTeXt development" group.
> >      >      > To unsubscribe from this group and stop receiving
> emails from it,
> >     send an
> >      >     email
> >      >      > to pretext-dev...@googlegroups.com
> <mailto:pretext-dev%2Bunsu...@googlegroups.com> <mailto:pretext-
> <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      > To view this discussion visit https://
> groups.google.com/d/msgid/ <https://groups.google.com/d/msgid/>
> >      >     dev/ <https://groups.google.com/d/msgid/pretext-dev/
> <https://groups.google.com/d/msgid/pretext-dev/> <https://
> > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/d/
> msgid/pretext-dev/>>>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>> <https://
> >      >      > groups.google.com/d/msgid/pretext-dev/ <http://
> groups.google.com/d/msgid/pretext-dev/> <http://groups.google.com/
> <http://groups.google.com/>
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>>?
> >      >      > utm_medium=email&utm_source=footer>.
> >      >
> >      >     --
> >      >     You received this message because you are subscribed to a
> topic in the
> >      >     Google Groups "PreTeXt development" group.
> >      >     To unsubscribe from this topic, visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >     To unsubscribe from this group and all its topics, send an
> email to
> >     pretext-
> >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> <mailto:dev%25252Bun...@googlegroups.com>>>.
> >      >     To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >      >     MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh <https://
> >      >     pretext-dev/MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh>.
> >      >
> >      > --
> >      > You received this message because you are subscribed to the
> Google Groups
> >      > "PreTeXt development" group.
> >      > To unsubscribe from this group and stop receiving emails from
> it, send an
> >     email
> >      > to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>>.
> >      > To view this discussion visit https://groups.google.com/d/
> msgid/pretext- <https://groups.google.com/d/msgid/pretext->
> >      > CAHDrpCeNFvtL9x-
> V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> CAHDrpCeNFvtL9x- <https://groups.google.com/d/msgid/pretext-dev/
> CAHDrpCeNFvtL9x-> <https://
> > groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x- <http://
> groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x->>
> >      > V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> <http://40mail.gmail.com>
> >     <http://40mail.gmail.com <http://40mail.gmail.com>>?
> >      > utm_medium=email&utm_source=footer>.
> >
> >     --
> >     You received this message because you are subscribed to a topic
> in the
> >     Google Groups "PreTeXt development" group.
> >     To unsubscribe from this topic, visit https://groups.google.com/
> d/topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >     To unsubscribe from this group and all its topics, send an email
> to pretext-
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com> <mailto:pretext-
> <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> >     MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh <https://groups.google.com/
> d/msgid/ <https://groups.google.com/d/msgid/>
> >     pretext-dev/MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh>.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send an email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> > To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh <https://groups.google.com/d/
> msgid/pretext-dev/MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CAHDrpCe4NCjb74UcTKK_eCF%2BHtULQC2JSwhaPyPUHrbRFqqD4w%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/
> CAHDrpCe4NCjb74UcTKK_eCF%2BHtULQC2JSwhaPyPUHrbRFqqD4w%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CAO-
> sG%2B3vcv2sqXOfG_V8G2SpJ0vmy%2BD7NaLRjrLmZS4dn_JjCw%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/CAO-
> sG%2B3vcv2sqXOfG_V8G2SpJ0vmy%2BD7NaLRjrLmZS4dn_JjCw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Jul 23, 2025, 2:07:44 PMJul 23
to prete...@googlegroups.com
Dear Georg,

Good work. I think I have a handle on the code now.

> I haven't figured out how to extract the server URL from the publication.ptx
file

I think what you have in the PR is correct, and is definitely necessary. But
you also need to add the publication entry to an overall "map" of sorts. About
Line 3150 in "publisher-variables.xsl", or search on the string "pi:publisher".

> We have conflicting versions of MathJax.

Well you are just loading MathJax JS just like we do. For kicks, I commented
out your loading of MJ 2 in hopes that our MJ 3 would take over. Not that
simple. ;-) But telling. First error in the console is from
"stackapicalls.js" at a line that looks like:

MathJax.Hub.Queue(["Typeset", MathJax.Hub]);

which I think is definitely an old MJ 2 thing. I suspect we can set some sort
of JS boolean variable, "stack-in-pretext", so that the STACK JS could presume
MJ 4 was about already. If the math/LaTeX is generic enough, it shouldn't
matter. I'm unsure what happens if the rest of a PreTeXt page has some math
(like inside paragraphs) if STACK is loading MJ 2, and we are loading MJ 3/4.
Chaos, I would guess. Let's not work too hard on this until we know more about
our transition from 3 to 4.

> so the Javascript code will need some major refactoring from my end. Any
style guidelines/conventions to adhere to would be helpful though.

At some point, I'll ask somebody else to review the JS - I'm not knowledgeable
enough.

More in a minute.

Rob


On 7/22/25 02:28, Georg Osang wrote:
> Hi all,
>
> so that when running `pretext build html` on the minimal STACK example,
> output with a functional STACK question is produced that you can test. (Note:
> Upon the first run the question takes a while to run as the example STACK API is
> deployed as a cloud function which takes a moment to spin up after it hasn't
> been in use for a while.)
>
> A few challenges I've encountered:
> - I haven't figured out how to extract the server URL from the publication.ptx
> file, so I'm using a hardcoded one for now
> - We have conflicting versions of MathJax. Pretext seems to be using MathJax 3
> while STACK is using MathJax 2. If I only include MathJax 3 (done by default),
> the STACK questions are not rendering. If I include MathJax 2, everything seems
> to be looking fine (I've also tried LaTeX embedded in e.g. introduction text
> outside of STACK questions), but under the hood we're getting errors:
>
> Uncaught TypeError: can't access property "input", MathJax._ is undefined
> <anonymous>http://localhost:8128/output/html/_static/pretext/js/lib/
> mathjaxknowl3.js <http://localhost:8128/output/html/_static/pretext/js/lib/
> mathjaxknowl3.js>:2
>
>
> I want to align the behaviour a bit more to how webwork questions behave, so the
> Javascript code will need some major refactoring from my end. Any style
> guidelines/conventions to adhere to would be helpful though. Currently, when
> generating the HTML body in the XSL I'm adding an @onload attribute so that a
> function is called assigning IDs to each STACK question and generating all the
> HTML elements, maybe there are different preferred ways of handling this.
> Haven't added any CSS yet either.
>
> No changes to the static version yet, i.e. the python function generating the
> static version of the STACK question isn't being called anywhere yet.
>
> Best,
> Georg
>
>
>
> On Mon, 14 Jul 2025 at 16:41, 'Rob Beezer' via PreTeXt development <pretext-
> > d...@googlegroups.com <mailto:d...@googlegroups.com> <mailto:pretext-
> d...@googlegroups.com <mailto:prete...@googlegroups.com>>> wrote:
> >
> >     Dear Georg,
> >
> <mailto:d...@googlegroups.com <mailto:d...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext->
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext/ <https://github.com/IDEMSInternational/pretext/ <https://
> github.com/IDEMSInternational/pretext/>>
> >      >      > from the example <https://github.com/IDEMSInternational/
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> >     PreTeXtBook/ <https://github.com/PreTeXtBook/ <https://github.com/
> PreTeXtBook/>>
> >      >     pretext/ <https://github.com/PreTeXtBook/pretext/ <https://
> github.com/PreTeXtBook/pretext/> <https://
> > github.com/PreTeXtBook/pretext/ <http://github.com/PreTeXtBook/pretext/>>>
> PreTeXtBook/pretext/pull/2576> <http://github.com/PreTeXtBook/ <http://
> github.com/PreTeXtBook/>
> >      >      >             <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html>>>
> >      >      >             <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html>>>?
> >      >      >
> doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://pretextbook.org/
> doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/html/>>>
> >      >      >             overview-exercises.html <https://
> pretextbook.org/doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://pretextbook.org/
> doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/html/>>>
> >      >      >             overview-exercises.html>>?
> >      >      >              > And inside these statement/solution etc
> elements,
> >     we can
> >      >     use any
> >      >      >             markup that is
> >      >      >              > documented in the specification here <https://
> >      > pretextbook.org/ <http://pretextbook.org/> <http://
> >      >      >             doc/guide/html/ <https://pretextbook.org/doc/
> pretextbook.org/doc/guide/html/> <https://pretextbook.org/ <https://
> pretextbook.org/>
> <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext-stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/pretext-
> >      >      >              >     example <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/pretext-
> >      >      >             example <https://github.com/IDEMSInternational/
> >      >     example <https://github.com/IDEMSInternational/pretext-stack-
> example <https://github.com/IDEMSInternational/pretext-stack-example>
> >     <https://github.com/IDEMSInternational/pretext-stack-example
> <https://github.com/IDEMSInternational/pretext-stack-example>>>>>
> >      >      >              >      > Assuming you have docker/docker-compose
> >     installed,
> >      >     seeing
> >      >      >             it in action
> >      >      >              >     should be
> >      >      >              >      > as simple closing/downloading the
> >     repository, running
> >      >      >             `docker-compose up`
> >      >      >              >     and
> >      >      >              >      > then viewing `http://localhost:8080/`
> <http://localhost:8080/>
> >     <http://localhost:8080/ <http://localhost:8080/>> <http://
> >      >     localhost:8080/> <http://
> >      >      >             localhost:8080/> <http://localhost:8080/
> <http://localhost:8080/> <http://
> >     localhost:8080/> <http://
> >      >     localhost:8080/> <http://localhost:8080/ <http://
> >     <http://localhost:8080/ <http://localhost:8080/> <http://
> localhost:8080/ <http://localhost:8080/>>>>>
> >      >      >             in your
> >      >      >              >     browser.
> >      >      >              >      >
> >      >      >              >      > I haven't polished it (so it behaves
> a bit
> >      >     different from
> >      >      >             e.g. a webwork
> >      >      >              >      > question right now), but it's enough to
> >     render a simple
> >      >      >             question. You can
> >      >      >              >     see
> >      >      >              >      > the code changes I made to the
> PreText HTML
> >     output, as
> >      >      >             well as the XML
> >      >      >              >     source of
> >      >      >              >      > the STACK question here: https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     <https://github.com/ <https://github.com/> <https://
> github.com/ <https://github.com/>>>
> >      >      >             IDEMSInternational/pretext- <https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     IDEMSInternational/ <https://github.com/IDEMSInternational/
> <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext->
> >      >      >              >     stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext- <https://github.com/IDEMSInternational/pretext- <https://
> github.com/IDEMSInternational/pretext->>
> >      >     stack- <https://github.com/IDEMSInternational/pretext-stack-
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext-
> >> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      >              >      > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              >      > To view this discussion visit https://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>> <https://
> >      >      >             msgid/pretext- <https://groups.google.com/d/
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> >      >      >              >     <https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->> <https://
> >     pretext->> <https://
> >      >      > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext-> <http://groups.google.com/d/ <http://
> groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->
> >      >      >             <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>
> >      >      >             <http://
> >      >      >              > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515->
> >      >     <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>>
> >      >      >              >      > a56b-67eac0e387ban%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <mailto:pretext-dev...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>
> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext-
> >> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      >              > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              > To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/> <https://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>>
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>>
> >      >      >              >
> >      >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> pretext->> <http://
> >     pretext->> <http://groups.google.com/d/ <http://groups.google.com/d/>
> <http://groups.google.com/d/ <http://groups.google.com/d/>> <http://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>>>
> >      >      >             msgid/pretext->
> >      >      >              >
> >      >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>
> <http://40googlegroups.com <http://40googlegroups.com>>>>?
> >      >      >              > utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      >             --
> >      >      >             You received this message because you are
> subscribed
> >     to the
> >      >     Google
> >      >      >             Groups "PreTeXt development" group.
> >      >      >
> >      >      >             To unsubscribe from this group and stop receiving
> >     emails from it,
> >      >      >             send an email to pretext-
> dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> dev...@googlegroups.com>>
> >      >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>.
> >      >      >             To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> >      >      >             pretext-dev/MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh
> >     <https://
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      >             MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh>.
> >      >      >
> >      >      >     --
> >      >      >     You received this message because you are subscribed to a
> >     topic in the
> >      >      >     Google Groups "PreTeXt development" group.
> >      >      >     To unsubscribe from this topic, visit https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/> <https://
> > groups.google.com/d/topic/ <http://groups.google.com/d/topic/>>>
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >      >     To unsubscribe from this group and all its topics, send an
> >     email to
> >      >     pretext-
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext- <mailto:pretext-
> > <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      >     To view this discussion visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/>>
> >      >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>
> >      >      >
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> groups.google.com/d/msgid/pretext-> <http://groups.google.com/d/ <http://
> groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext->
> >      >      >
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>?
> >      >      >     utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      > --
> >      >      > You received this message because you are subscribed to the
> Google
> >     Groups
> >      >      > "PreTeXt development" group.
> >      >      > To unsubscribe from this group and stop receiving emails
> from it,
> >     send an
> >      >     email
> >      >      > to pretext-dev...@googlegroups.com
> <mailto:pretext-dev%2Bunsu...@googlegroups.com> <mailto:pretext-
> <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext- <mailto:pretext-
> > <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      > To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>
> >      >     dev/ <https://groups.google.com/d/msgid/pretext-dev/ <https://
> groups.google.com/d/msgid/pretext-dev/> <https://
> > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/d/msgid/
> pretext-dev/>>>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>> <https://
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>>?
> >      >      > utm_medium=email&utm_source=footer>.
> >      >
> >      >     --
> >      >     You received this message because you are subscribed to a
> topic in the
> >      >     Google Groups "PreTeXt development" group.
> >      >     To unsubscribe from this topic, visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >     To unsubscribe from this group and all its topics, send an
> email to
> >     pretext-
> >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> <mailto:dev%25252Bun...@googlegroups.com>>>.
> >      >     To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >      >     MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh <https://
> >      >     pretext-dev/MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh>.
> >      >
> >      > --
> >      > You received this message because you are subscribed to the Google
> Groups
> >      > "PreTeXt development" group.
> >      > To unsubscribe from this group and stop receiving emails from it,
> send an
> >     email
> >      > to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> >      > CAHDrpCeNFvtL9x-
> V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> >      > <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x-
> <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x-> <https://
> > groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x- <http://
> groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x->>
> >      > V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> <http://40mail.gmail.com>
> >     <http://40mail.gmail.com <http://40mail.gmail.com>>?
> >      > utm_medium=email&utm_source=footer>.
> >
> >     --
> >     You received this message because you are subscribed to a topic in the
> >     Google Groups "PreTeXt development" group.
> >     To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >     To unsubscribe from this group and all its topics, send an email to
> pretext-
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> >     MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh <https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext-dev/MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to pretext-
> dev+uns...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/

Rob Beezer

unread,
Jul 23, 2025, 2:08:42 PMJul 23
to prete...@googlegroups.com
Dear Georg and Chris,

OK, I think we have enough proof-of-concept in place to start doing things more
carefully and deliberately.

It always starts with markup. We want to take advantage of a lot of PreTeXt
infrastructure for #exercise. So, mirroring how we work with other systems, we
should go

exercise
title
introduction
stack
conclusion

#exercise gets you numbers, back-of-the-book answers, and lots more.

#introduction lets you indicate how a STACK problem fits into the text (e.g.
different notation), and you can do things like cross-reference defintions,
theorems, and examples that are relevant/helpful.

Here's the main thing: how do we identify a particular STACK problem? You have
a file path, which I would prefer not to use (see current WW/PGML thread). The
problem file in your example suggests it is problem 17332. Is that a world-wide
identifier of that problem? In other words, can we go:

<stack question="17332"/>

Somehow you retrieved the question file from a Moodle server. And it is XML!
(Even if you say that is a coincidence.) Can you elaborate on that process? In
particular, can we automate it via some Python hitting some server? The goal
would be for an author to say as little as possible and for PreTeXt to
(transparently to the author) place these XML files into our *generated*
collection. This is somwhat more akin to our MyOpenMath model than for WeBWorK.

This generates a slew of questions that demonstrates how unfamiliar I am with STACK.

* Is there a single canonical world-wide source-of-truth server? (This how we
use Runestone.) I think you would have sent me there if there were.

* If not, are there disparate versions in production use at different locations?

* Do the problem collections differ across server installations?

* Do problems have unique world-wide stable identifiers (17332,
"01_integration_with_feedback")?

* As an instructor can I author a STACK question, put it onto my server, and it
never leaves my institution?

* Maybe the Docker container for use generating static versions answers a lot
of these questions (and maybe you already told me that).

Next steps in a minute.

Rob


On 7/22/25 02:28, Georg Osang wrote:
> Hi all,
>
> so that when running `pretext build html` on the minimal STACK example,
> output with a functional STACK question is produced that you can test. (Note:
> Upon the first run the question takes a while to run as the example STACK API is
> deployed as a cloud function which takes a moment to spin up after it hasn't
> been in use for a while.)
>
> A few challenges I've encountered:
> - I haven't figured out how to extract the server URL from the publication.ptx
> file, so I'm using a hardcoded one for now
> - We have conflicting versions of MathJax. Pretext seems to be using MathJax 3
> while STACK is using MathJax 2. If I only include MathJax 3 (done by default),
> the STACK questions are not rendering. If I include MathJax 2, everything seems
> to be looking fine (I've also tried LaTeX embedded in e.g. introduction text
> outside of STACK questions), but under the hood we're getting errors:
>
> Uncaught TypeError: can't access property "input", MathJax._ is undefined
> mathjaxknowl3.js>:2
>
>
> I want to align the behaviour a bit more to how webwork questions behave, so the
> Javascript code will need some major refactoring from my end. Any style
> guidelines/conventions to adhere to would be helpful though. Currently, when
> generating the HTML body in the XSL I'm adding an @onload attribute so that a
> function is called assigning IDs to each STACK question and generating all the
> HTML elements, maybe there are different preferred ways of handling this.
> Haven't added any CSS yet either.
>
> No changes to the static version yet, i.e. the python function generating the
> static version of the STACK question isn't being called anywhere yet.
>
> Best,
> Georg
>
>
>
> On Mon, 14 Jul 2025 at 16:41, 'Rob Beezer' via PreTeXt development <pretext-
> > d...@googlegroups.com <mailto:d...@googlegroups.com> <mailto:pretext-
> d...@googlegroups.com <mailto:prete...@googlegroups.com>>> wrote:
> >
> >     Dear Georg,
> >
> <mailto:d...@googlegroups.com <mailto:d...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext->
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext/ <https://github.com/IDEMSInternational/pretext/ <https://
> github.com/IDEMSInternational/pretext/>>
> >      >      > from the example <https://github.com/IDEMSInternational/
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> >     PreTeXtBook/ <https://github.com/PreTeXtBook/ <https://github.com/
> PreTeXtBook/>>
> >      >     pretext/ <https://github.com/PreTeXtBook/pretext/ <https://
> github.com/PreTeXtBook/pretext/> <https://
> > github.com/PreTeXtBook/pretext/ <http://github.com/PreTeXtBook/pretext/>>>
> PreTeXtBook/pretext/pull/2576> <http://github.com/PreTeXtBook/ <http://
> github.com/PreTeXtBook/>
> >      >      >             <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html>>>
> >      >      >             <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html>>>?
> >      >      >
> doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://pretextbook.org/
> doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/html/>>>
> >      >      >             overview-exercises.html <https://
> pretextbook.org/doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://pretextbook.org/
> doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/html/>>>
> >      >      >             overview-exercises.html>>?
> >      >      >              > And inside these statement/solution etc
> elements,
> >     we can
> >      >     use any
> >      >      >             markup that is
> >      >      >              > documented in the specification here <https://
> >      > pretextbook.org/ <http://pretextbook.org/> <http://
> >      >      >             doc/guide/html/ <https://pretextbook.org/doc/
> pretextbook.org/doc/guide/html/> <https://pretextbook.org/ <https://
> pretextbook.org/>
> <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext-stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/pretext-
> >      >      >              >     example <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/pretext-
> >      >      >             example <https://github.com/IDEMSInternational/
> >      >     example <https://github.com/IDEMSInternational/pretext-stack-
> example <https://github.com/IDEMSInternational/pretext-stack-example>
> >     <https://github.com/IDEMSInternational/pretext-stack-example
> <https://github.com/IDEMSInternational/pretext-stack-example>>>>>
> >      >      >              >      > Assuming you have docker/docker-compose
> >     installed,
> >      >     seeing
> >      >      >             it in action
> >      >      >              >     should be
> >      >      >              >      > as simple closing/downloading the
> >     repository, running
> >      >      >             `docker-compose up`
> >      >      >              >     and
> >      >      >              >      > then viewing `http://localhost:8080/`
> <http://localhost:8080/>
> >     <http://localhost:8080/ <http://localhost:8080/>> <http://
> >      >     localhost:8080/> <http://
> >      >      >             localhost:8080/> <http://localhost:8080/
> <http://localhost:8080/> <http://
> >     localhost:8080/> <http://
> >      >     localhost:8080/> <http://localhost:8080/ <http://
> >     <http://localhost:8080/ <http://localhost:8080/> <http://
> localhost:8080/ <http://localhost:8080/>>>>>
> >      >      >             in your
> >      >      >              >     browser.
> >      >      >              >      >
> >      >      >              >      > I haven't polished it (so it behaves
> a bit
> >      >     different from
> >      >      >             e.g. a webwork
> >      >      >              >      > question right now), but it's enough to
> >     render a simple
> >      >      >             question. You can
> >      >      >              >     see
> >      >      >              >      > the code changes I made to the
> PreText HTML
> >     output, as
> >      >      >             well as the XML
> >      >      >              >     source of
> >      >      >              >      > the STACK question here: https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     <https://github.com/ <https://github.com/> <https://
> github.com/ <https://github.com/>>>
> >      >      >             IDEMSInternational/pretext- <https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     IDEMSInternational/ <https://github.com/IDEMSInternational/
> <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext->
> >      >      >              >     stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext- <https://github.com/IDEMSInternational/pretext- <https://
> github.com/IDEMSInternational/pretext->>
> >      >     stack- <https://github.com/IDEMSInternational/pretext-stack-
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext-
> >> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      >              >      > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              >      > To view this discussion visit https://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>> <https://
> >      >      >             msgid/pretext- <https://groups.google.com/d/
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> >      >      >              >     <https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->> <https://
> >     pretext->> <https://
> >      >      > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext-> <http://groups.google.com/d/ <http://
> groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->
> >      >      >             <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>
> >      >      >             <http://
> >      >      >              > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515->
> >      >     <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>>
> >      >      >              >      > a56b-67eac0e387ban%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <mailto:pretext-dev...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>
> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext-
> >> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      >              > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              > To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/> <https://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>>
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>>
> >      >      >              >
> >      >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> pretext->> <http://
> >     pretext->> <http://groups.google.com/d/ <http://groups.google.com/d/>
> <http://groups.google.com/d/ <http://groups.google.com/d/>> <http://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>>>
> >      >      >             msgid/pretext->
> >      >      >              >
> >      >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>
> <http://40googlegroups.com <http://40googlegroups.com>>>>?
> >      >      >              > utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      >             --
> >      >      >             You received this message because you are
> subscribed
> >     to the
> >      >     Google
> >      >      >             Groups "PreTeXt development" group.
> >      >      >
> >      >      >             To unsubscribe from this group and stop receiving
> >     emails from it,
> >      >      >             send an email to pretext-
> dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> dev...@googlegroups.com>>
> >      >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>.
> >      >      >             To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> >      >      >             pretext-dev/MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh
> >     <https://
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      >             MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh>.
> >      >      >
> >      >      >     --
> >      >      >     You received this message because you are subscribed to a
> >     topic in the
> >      >      >     Google Groups "PreTeXt development" group.
> >      >      >     To unsubscribe from this topic, visit https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/> <https://
> > groups.google.com/d/topic/ <http://groups.google.com/d/topic/>>>
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >      >     To unsubscribe from this group and all its topics, send an
> >     email to
> >      >     pretext-
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext- <mailto:pretext-
> > <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      >     To view this discussion visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/>>
> >      >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>
> >      >      >
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> groups.google.com/d/msgid/pretext-> <http://groups.google.com/d/ <http://
> groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext->
> >      >      >
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>?
> >      >      >     utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      > --
> >      >      > You received this message because you are subscribed to the
> Google
> >     Groups
> >      >      > "PreTeXt development" group.
> >      >      > To unsubscribe from this group and stop receiving emails
> from it,
> >     send an
> >      >     email
> >      >      > to pretext-dev...@googlegroups.com
> <mailto:pretext-dev%2Bunsu...@googlegroups.com> <mailto:pretext-
> <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext- <mailto:pretext-
> > <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      > To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>
> >      >     dev/ <https://groups.google.com/d/msgid/pretext-dev/ <https://
> groups.google.com/d/msgid/pretext-dev/> <https://
> > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/d/msgid/
> pretext-dev/>>>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>> <https://
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>>?
> >      >      > utm_medium=email&utm_source=footer>.
> >      >
> >      >     --
> >      >     You received this message because you are subscribed to a
> topic in the
> >      >     Google Groups "PreTeXt development" group.
> >      >     To unsubscribe from this topic, visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >     To unsubscribe from this group and all its topics, send an
> email to
> >     pretext-
> >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> <mailto:dev%25252Bun...@googlegroups.com>>>.
> >      >     To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >      >     MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh <https://
> >      >     pretext-dev/MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh>.
> >      >
> >      > --
> >      > You received this message because you are subscribed to the Google
> Groups
> >      > "PreTeXt development" group.
> >      > To unsubscribe from this group and stop receiving emails from it,
> send an
> >     email
> >      > to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> >      > CAHDrpCeNFvtL9x-
> V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> >      > <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x-
> <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x-> <https://
> > groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x- <http://
> groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x->>
> >      > V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> <http://40mail.gmail.com>
> >     <http://40mail.gmail.com <http://40mail.gmail.com>>?
> >      > utm_medium=email&utm_source=footer>.
> >
> >     --
> >     You received this message because you are subscribed to a topic in the
> >     Google Groups "PreTeXt development" group.
> >     To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >     To unsubscribe from this group and all its topics, send an email to
> pretext-
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> >     MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh <https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext-dev/MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to pretext-
> dev+uns...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/

Rob Beezer

unread,
Jul 23, 2025, 2:10:23 PMJul 23
to prete...@googlegroups.com
Dear Georg,

Some suggestions on how to proceed.

* Try taking what you have on the current PR and experiment with putting the
question into our sample article. Your minimal article is great, but it will
mask larger integration questions, which we should discover sooner rather than
later. I'm predicting a big problem with MathJax. At a minimum, report back,
and you might add a commit to the current PR so others can experiment.

* Once we have a better idea about markup (discussion starting with previous
message), lets start a new PR, and just put source in it: main.ptx,
publication.ptx, questions/, etc. You could make changes to get the publication
variable for the server going. Don't concern yourself yet with making this
"work" at all, we are just agreeing on markup.

* Soon, I will need to integrate this into our templates for #exercise, while
you can work on things like the HTML #div and the JS. To a large extent this
should just begin with copying out of the current PR - don't think that all is
being abandoned.

Rob


On 7/22/25 02:28, Georg Osang wrote:
> Hi all,
>
> so that when running `pretext build html` on the minimal STACK example,
> output with a functional STACK question is produced that you can test. (Note:
> Upon the first run the question takes a while to run as the example STACK API is
> deployed as a cloud function which takes a moment to spin up after it hasn't
> been in use for a while.)
>
> A few challenges I've encountered:
> - I haven't figured out how to extract the server URL from the publication.ptx
> file, so I'm using a hardcoded one for now
> - We have conflicting versions of MathJax. Pretext seems to be using MathJax 3
> while STACK is using MathJax 2. If I only include MathJax 3 (done by default),
> the STACK questions are not rendering. If I include MathJax 2, everything seems
> to be looking fine (I've also tried LaTeX embedded in e.g. introduction text
> outside of STACK questions), but under the hood we're getting errors:
>
> Uncaught TypeError: can't access property "input", MathJax._ is undefined
> mathjaxknowl3.js>:2
>
>
> I want to align the behaviour a bit more to how webwork questions behave, so the
> Javascript code will need some major refactoring from my end. Any style
> guidelines/conventions to adhere to would be helpful though. Currently, when
> generating the HTML body in the XSL I'm adding an @onload attribute so that a
> function is called assigning IDs to each STACK question and generating all the
> HTML elements, maybe there are different preferred ways of handling this.
> Haven't added any CSS yet either.
>
> No changes to the static version yet, i.e. the python function generating the
> static version of the STACK question isn't being called anywhere yet.
>
> Best,
> Georg
>
>
>
> On Mon, 14 Jul 2025 at 16:41, 'Rob Beezer' via PreTeXt development <pretext-
> > d...@googlegroups.com <mailto:d...@googlegroups.com> <mailto:pretext-
> d...@googlegroups.com <mailto:prete...@googlegroups.com>>> wrote:
> >
> >     Dear Georg,
> >
> <mailto:d...@googlegroups.com <mailto:d...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext->
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext/ <https://github.com/IDEMSInternational/pretext/ <https://
> github.com/IDEMSInternational/pretext/>>
> >      >      > from the example <https://github.com/IDEMSInternational/
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> >     PreTeXtBook/ <https://github.com/PreTeXtBook/ <https://github.com/
> PreTeXtBook/>>
> >      >     pretext/ <https://github.com/PreTeXtBook/pretext/ <https://
> github.com/PreTeXtBook/pretext/> <https://
> > github.com/PreTeXtBook/pretext/ <http://github.com/PreTeXtBook/pretext/>>>
> PreTeXtBook/pretext/pull/2576> <http://github.com/PreTeXtBook/ <http://
> github.com/PreTeXtBook/>
> >      >      >             <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html <https://pretextbook.org/doc/guide/html/overview-
> exercises.html>>>
> >      >      >             <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html <https://pretextbook.org/doc/guide/html/
> overview- <https://pretextbook.org/doc/guide/html/overview->
> >     <https://pretextbook.org/doc/guide/html/overview- <https://
> pretextbook.org/doc/guide/html/overview->>
> >      >     exercises.html>>>?
> >      >      >
> doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://pretextbook.org/
> doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/html/>>>
> >      >      >             overview-exercises.html <https://
> pretextbook.org/doc/ <https://pretextbook.org/doc/>
> >     guide/ <https://pretextbook.org/doc/guide/ <https://pretextbook.org/
> doc/guide/>>
> >      >     html/ <https://pretextbook.org/doc/guide/html/ <https://
> pretextbook.org/doc/guide/html/> <https://
> > pretextbook.org/doc/guide/html/ <http://pretextbook.org/doc/guide/html/>>>
> >      >      >             overview-exercises.html>>?
> >      >      >              > And inside these statement/solution etc
> elements,
> >     we can
> >      >     use any
> >      >      >             markup that is
> >      >      >              > documented in the specification here <https://
> >      > pretextbook.org/ <http://pretextbook.org/> <http://
> >      >      >             doc/guide/html/ <https://pretextbook.org/doc/
> pretextbook.org/doc/guide/html/> <https://pretextbook.org/ <https://
> pretextbook.org/>
> <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext-stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/pretext-
> >      >      >              >     example <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     <https://github.com/IDEMSInternational/ <https://github.com/
> IDEMSInternational/>>
> >      >     pretext-stack- <https://github.com/IDEMSInternational/pretext-
> >      >      >             example <https://github.com/IDEMSInternational/
> >      >     example <https://github.com/IDEMSInternational/pretext-stack-
> example <https://github.com/IDEMSInternational/pretext-stack-example>
> >     <https://github.com/IDEMSInternational/pretext-stack-example
> <https://github.com/IDEMSInternational/pretext-stack-example>>>>>
> >      >      >              >      > Assuming you have docker/docker-compose
> >     installed,
> >      >     seeing
> >      >      >             it in action
> >      >      >              >     should be
> >      >      >              >      > as simple closing/downloading the
> >     repository, running
> >      >      >             `docker-compose up`
> >      >      >              >     and
> >      >      >              >      > then viewing `http://localhost:8080/`
> <http://localhost:8080/>
> >     <http://localhost:8080/ <http://localhost:8080/>> <http://
> >      >     localhost:8080/> <http://
> >      >      >             localhost:8080/> <http://localhost:8080/
> <http://localhost:8080/> <http://
> >     localhost:8080/> <http://
> >      >     localhost:8080/> <http://localhost:8080/ <http://
> >     <http://localhost:8080/ <http://localhost:8080/> <http://
> localhost:8080/ <http://localhost:8080/>>>>>
> >      >      >             in your
> >      >      >              >     browser.
> >      >      >              >      >
> >      >      >              >      > I haven't polished it (so it behaves
> a bit
> >      >     different from
> >      >      >             e.g. a webwork
> >      >      >              >      > question right now), but it's enough to
> >     render a simple
> >      >      >             question. You can
> >      >      >              >     see
> >      >      >              >      > the code changes I made to the
> PreText HTML
> >     output, as
> >      >      >             well as the XML
> >      >      >              >     source of
> >      >      >              >      > the STACK question here: https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     <https://github.com/ <https://github.com/> <https://
> github.com/ <https://github.com/>>>
> >      >      >             IDEMSInternational/pretext- <https://
> github.com/ <https://github.com/>
> >     <https://github.com/ <https://github.com/>>
> >      >     IDEMSInternational/ <https://github.com/IDEMSInternational/
> <https://github.com/IDEMSInternational/> <https://
> > github.com/IDEMSInternational/ <http://github.com/IDEMSInternational/>>>
> >      >      >             pretext->
> >      >      >              >     stack- <https://github.com/
> IDEMSInternational/ <https://github.com/IDEMSInternational/>
> >     pretext- <https://github.com/IDEMSInternational/pretext- <https://
> github.com/IDEMSInternational/pretext->>
> >      >     stack- <https://github.com/IDEMSInternational/pretext-stack-
> > github.com/IDEMSInternational/pretext-stack- <http://github.com/
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext-
> >> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      >              >      > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              >      > To view this discussion visit https://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>> <https://
> >      >      >             msgid/pretext- <https://groups.google.com/d/
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> >      >      >              >     <https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->> <https://
> >     pretext->> <https://
> >      >      > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext-> <http://groups.google.com/d/ <http://
> groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->
> >      >      >             <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>
> >      >      >             <http://
> >      >      >              > groups.google.com/d/msgid/pretext- <http://
> groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext->
> >     dev/0606c24b-693f-4515->
> >      >     <http://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext-> <http://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>
> >      >     dev/0606c24b-693f-4515- <http://groups.google.com/d/msgid/
> pretext- <http://groups.google.com/d/msgid/pretext->
> >     <http://groups.google.com/d/msgid/pretext- <http://groups.google.com/
> d/msgid/pretext->>
> >      >     dev/0606c24b-693f-4515->>>
> >      >      >              >      > a56b-67eac0e387ban%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <mailto:pretext-dev...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>
> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> >      > dev...@googlegroups.com <mailto:dev...@googlegroups.com>
> <mailto:dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>
> >     <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext-
> >> <mailto:pretext- <mailto:pretext-> <mailto:pretext- <mailto:pretext->>>
> >      >      >              > dev+uns...@googlegroups.com
> <mailto:dev%2Buns...@googlegroups.com>
> >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Buns...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Buns...@googlegroups.com>>>>.
> >      >      >              > To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/> <https://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>>
> >      >     <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>>
> >      >      >              >
> >      >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> pretext->> <http://
> >     pretext->> <http://groups.google.com/d/ <http://groups.google.com/d/>
> <http://groups.google.com/d/ <http://groups.google.com/d/>> <http://
> >      > groups.google.com/d/ <http://groups.google.com/d/> <http://
> groups.google.com/d/ <http://groups.google.com/d/>>>
> >      >      >             msgid/pretext->
> >      >      >              >
> >      >     dev/4ed7b276-8aab-4ef3-9fde-8a34749e8360n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>
> <http://40googlegroups.com <http://40googlegroups.com>>>>?
> >      >      >              > utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      >             --
> >      >      >             You received this message because you are
> subscribed
> >     to the
> >      >     Google
> >      >      >             Groups "PreTeXt development" group.
> >      >      >
> >      >      >             To unsubscribe from this group and stop receiving
> >     emails from it,
> >      >      >             send an email to pretext-
> dev...@googlegroups.com <mailto:pretext-dev...@googlegroups.com>
> >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> dev...@googlegroups.com>>
> >      >     <mailto:pretext-dev...@googlegroups.com <mailto:pretext-
> > dev...@googlegroups.com <mailto:dev...@googlegroups.com>>>.
> >      >      >             To view this discussion visit https://
> > groups.google.com/d/ <http://groups.google.com/d/> <https://
> groups.google.com/d/ <https://groups.google.com/d/>>
> >      >     msgid/ <https://groups.google.com/d/msgid/ <https://
> >      >      >             pretext-dev/MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh
> >     <https://
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      >             MTAwMDAxMy5iZWV6ZXI.1742525759%40pnsh>.
> >      >      >
> >      >      >     --
> >      >      >     You received this message because you are subscribed to a
> >     topic in the
> >      >      >     Google Groups "PreTeXt development" group.
> >      >      >     To unsubscribe from this topic, visit https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> >      >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/> <https://
> > groups.google.com/d/topic/ <http://groups.google.com/d/topic/>>>
> >      >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >      >     To unsubscribe from this group and all its topics, send an
> >     email to
> >      >     pretext-
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext- <mailto:pretext-
> > <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      >     To view this discussion visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/>>
> >      >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext-> <https://
> > groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->>>
> >      >      >
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> groups.google.com/d/msgid/pretext-> <http://groups.google.com/d/ <http://
> groups.google.com/d/>
> >     msgid/pretext-> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext->
> >      >      >
>  dev/582fca98-4132-4143-8ac4-5c57379ba234n%40googlegroups.com
> <http://40googlegroups.com>
> >     <http://40googlegroups.com <http://40googlegroups.com>>
> >      >     <http://40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>>?
> >      >      >     utm_medium=email&utm_source=footer>.
> >      >      >
> >      >      > --
> >      >      > You received this message because you are subscribed to the
> Google
> >     Groups
> >      >      > "PreTeXt development" group.
> >      >      > To unsubscribe from this group and stop receiving emails
> from it,
> >     send an
> >      >     email
> >      >      > to pretext-dev...@googlegroups.com
> <mailto:pretext-dev%2Bunsu...@googlegroups.com> <mailto:pretext-
> <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> <mailto:dev%25252Bun...@googlegroups.com>>> <mailto:pretext-
> <mailto:pretext->
> >     <mailto:pretext- <mailto:pretext->> <mailto:pretext- <mailto:pretext-
> > <mailto:pretext- <mailto:pretext->>>
> >      >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>
> >      >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>
> >     <mailto:dev%252Buns...@googlegroups.com
> <mailto:dev%25252Bun...@googlegroups.com>>>>.
> >      >      > To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext- <https://groups.google.com/d/msgid/pretext- <https://
> groups.google.com/d/msgid/pretext->>
> >      >     dev/ <https://groups.google.com/d/msgid/pretext-dev/ <https://
> groups.google.com/d/msgid/pretext-dev/> <https://
> > groups.google.com/d/msgid/pretext-dev/ <http://groups.google.com/d/msgid/
> pretext-dev/>>>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>> <https://
> >     d/msgid/pretext-dev/> <http://groups.google.com/d/msgid/ <http://
> groups.google.com/d/msgid/> <http://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>
> >      >     pretext-dev/>
> >      >      > CAHDrpCdnZDy2Rmn73UABjWZJXaVxBKMHbGDN5dAGP-
> >     Aksy6ZrQ%40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>
> >      >     <http://40mail.gmail.com <http://40mail.gmail.com>
> <http://40mail.gmail.com <http://40mail.gmail.com>>>?
> >      >      > utm_medium=email&utm_source=footer>.
> >      >
> >      >     --
> >      >     You received this message because you are subscribed to a
> topic in the
> >      >     Google Groups "PreTeXt development" group.
> >      >     To unsubscribe from this topic, visit https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://
> groups.google.com/d/ <https://groups.google.com/d/>
> >     topic/ <https://groups.google.com/d/topic/ <https://
> groups.google.com/d/topic/>>
> >      >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >      >     To unsubscribe from this group and all its topics, send an
> email to
> >     pretext-
> >      > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com>
> >     <mailto:dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>> <mailto:pretext-
> <mailto:pretext-> <mailto:pretext- <mailto:pretext->>
> <mailto:dev%25252Bun...@googlegroups.com>>>.
> >      >     To view this discussion visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >      >     MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh <https://
> >      >     pretext-dev/MTAwMDA0OC5iZWV6ZXI.1751484497%40pnsh>.
> >      >
> >      > --
> >      > You received this message because you are subscribed to the Google
> Groups
> >      > "PreTeXt development" group.
> >      > To unsubscribe from this group and stop receiving emails from it,
> send an
> >     email
> >      > to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> >      > CAHDrpCeNFvtL9x-
> V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> >      > <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x-
> <https://groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x-> <https://
> > groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x- <http://
> groups.google.com/d/msgid/pretext-dev/CAHDrpCeNFvtL9x->>
> >      > V6GsZbhn%2B1HGCNMW_zR4%3DiFvKe24WrdBeAQ%40mail.gmail.com
> <http://40mail.gmail.com>
> >     <http://40mail.gmail.com <http://40mail.gmail.com>>?
> >      > utm_medium=email&utm_source=footer>.
> >
> >     --
> >     You received this message because you are subscribed to a topic in the
> >     Google Groups "PreTeXt development" group.
> >     To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/
> topic/ <https://groups.google.com/d/topic/>
> >     pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> >     To unsubscribe from this group and all its topics, send an email to
> pretext-
> > dev+uns...@googlegroups.com
> <mailto:dev%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > dev%2Bunsu...@googlegroups.com
> <mailto:dev%252Buns...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext-dev/ <https://groups.google.com/d/msgid/pretext-dev/>
> >     MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh <https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> >     pretext-dev/MTAwMDAzMi5iZWV6ZXI.1752460906%40pnsh>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-dev...@googlegroups.com <mailto:pretext-
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> > CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com
> <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PreTeXt development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe <https://groups.google.com/d/topic/
> pretext-dev/gkZ4sSj8nVk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to pretext-
> dev+uns...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAxOS5iZWV6ZXI.1752504087%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/

Chris Sangwin

unread,
Jul 24, 2025, 5:33:04 AMJul 24
to prete...@googlegroups.com
Thanks Georg,

If you have specific suggestions of what needs to be done on the STACK side please let me know!

Chris


To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CAHDrpCfmiXL3VnKoWuOGsPSyhCVcYz_roRi0A2Q3T9E0YqqJfw%40mail.gmail.com.

Georg Osang

unread,
Jul 25, 2025, 6:07:23 AMJul 25
to prete...@googlegroups.com
Hi Rob,

There are no universal identifiers for STACK questions.
17332 is the Moodle-internal ID from the particular Moodle server it was pulled from, but if I were to import it on a different server, it would get a new ID.

STACK questions can live in learning management systems (Moodle/ILIAS servers), exported as XML or YAML files, or also on the server with the STACK API (it has a `/sample.php` to preview the questions that are stored on the server as files, if any, but currently, the API requires you to send the content of an XML/YAML file as part of a request). Every institution is going to have their own server(s). On Moodle, content is organized into courses with access management, and these courses contain STACK question banks. So given this distributed situation, currently the unit of sharing are the exported files.
There is work going on towards using git repositories with XML (or YAML) files as a means for sharing questions between institutions, with an interface to it which provides a means for searching questions and importing/exporting selected questions to ILIAS/Moodle servers and across git repos from different owners. But it is also being built for distributed ownership, and I don't see there being a centralized server.

Questions tend to be authored directly in Moodle, but especially with the API and the upcoming YAML format, I expect hand-authoring to become more common.

For Moodle specifically, there are two ways of exporting questions: One is to export collections of questions (or an individual question) from a Moodle course. Anyone with access to the course can do that, and you will get a single XML file containing multiple questions. I already support this in my PR as in addition to the source (filename), you can also specify a question name which I then use as an identifier within that file.
The other option is gitsync, which is an automated way to pull and push questions from a Moodle course to a local file system (with the expectation that this will be managed using git). At least the setup for this needs admin privileges, and the usage is a bit technical, so it's not immediately accessible to everyone, but I expect that this will be the mechanism used by the above-mentioned sharing system that is being developed.

So specifically for your questions:
*  Is there a single canonical world-wide source-of-truth server? (This how we
use Runestone.)  I think you would have sent me there if there were.
No.

*  If not, are there disparate versions in production use at different locations?
Different types of servers (Moodle, ILIAS, ...) with different or no interface for pulling questions, different access rights and different question banks.

*  Do the problem collections differ across server installations?
Yes. 

*  Do problems have unique world-wide stable identifiers (17332,
"01_integration_with_feedback")?
No. 

*  As an instructor can I author a STACK question, put it onto my server, and it
never leaves my institution?
Yes, as long as the institution doesn't decide to migrate to a different learning management server or wipe old data.
I can also share my question with other institutions by exporting it (which is common practice). 

*  Maybe the Docker container for use generating static versions answers a lot
of these questions (and maybe you already told me that).
The static version and the live HTML version are generated through the same API call.
For the static version, I do some additional post-processing of the response in Python (which will probably need some more work to cover all cases).

So I think referencing question files in the PreText book is going to be the most reliable and reproducible solution at this point.
I could imagine also including references to questions from other git repos, once this becomes common practice.
I sync my questions using gitsync from a Moodle server to a git repository. There may be a case for skipping that step and directly
specifying a Moodle server, but that needs an appropriate API on the Moodle side (I assume some gitsync code can be reused here)
and makes errors harder to debug (how can I know whether someone renamed or moved a question on the server) and run (have to
manage credentials). So I can see that being an additional option, but wouldn't want that to be the only option.

Our team in Kenya has been working on competency based curriculum textbooks, and we've started including some STACK questions
there. This is the repository of questions the team authored for this purpose.
They are synced from a Moodle server via gitsync (which tracks questions via some internal ID, so after the initial pull from the server, the filenames/paths
remain stable even if someone renames/moves the question on the server).
This is the repository of the PreText book itself (the questions themselves are not yet included, as I'm deciding on the repository structure for the questions
and whether to use submodules). In the preview, these `<stack>` tags are obviously ignored, but I have compiled a preview with my dev
Incidentally, it seems that even though I'm including both versions of MathJax (and getting some internal errors), the pages themselves
look fine, surprisingly. But modulo adding the questions to the textbook repo (directly or as a submodule),
this is roughly how I was envisioning the process to look like.

I'll take a look at the next tasks you suggested, probably starting with extracting the publication variables.

Best,
Georg






Chris Sangwin

unread,
Jul 25, 2025, 6:19:37 AMJul 25
to prete...@googlegroups.com
Dear all,

Just for the record, we're having discussion in the STACK community about question metadata that might include some kind of "Global ID".  Lots of obvious difficulties with uniqueness, edits, etc.  Not insoluble.

The model I have in mind is to make the source of a PreTeXt publication self-contained.  That would therefore include the source of any STACK questions on which it relies.  Someone will have to agree to host online interactive versions on a server in any case.

The YAML is now working (thanks to Edmund), and we now have design questions on how to improve and complete this.  We also have XML fragments working, so a question author can specify differences from a template, rather than specify all settings in each question. Both YAML and XML will make embedding STACK questions in other content much better, and much easier to maintain. E.g. authors can change STACK options such as using the "decimal separator" option from "." (UK and former colonies mostly) to "," (most of Europe, ...) in one template and re-build the project.

If you would like STACK to add global unique IDs of some kind, and have specific suggestions please comment on the discussion here:  https://github.com/maths/moodle-qtype_stack/issues/1171  If PreTeXt has a working model we could look at that would me much appreciated!  We're likely to implement this soon anyway.

Chris


David W. Farmer

unread,
Jul 25, 2025, 3:17:17 PMJul 25
to prete...@googlegroups.com

I suggest that whenever PreTeXt incorporates a resource by external id,
it always is of the form:

repository : id

or maybe

namespace : id

For example, WeBWoRK, GeoGebra, YouTube, ....

The way the resource is specified may not appear to be explicitly
that way (maybe part of it is in a publisher file, or maybe it is
hard-coded into the XSL). But maybe it should be. Then accessing
STACK by id is not a special case: the repository being queried
has its id for that resource.

Regards,

David

Rob Beezer

unread,
Jul 26, 2025, 1:14:49 PMJul 26
to prete...@googlegroups.com
Yes, when we receive some object fully-baked in some other system, it would be
good to record its provenance, whether it has some global identifier or not.

When a WeBWorK problem is given by a path into the server's Open Problem Library
collection, we preserve some of that information. In this case, something like
the server address, WW version of the server software, libray path, and date
accessed, might be worth having and recording. We could do similar things with
MyOpenMath, and STACK.

Rob Beezer

unread,
Aug 15, 2025, 2:52:47 PMAug 15
to prete...@googlegroups.com
Dear Georg,

As I keep saying, thanks for your patience, and for your careful work. Several
big PreTeXt initiatives these days, so I have to hop from one to the other.

I've built on your PR to incorporate the test STACK question into the Sample
Article and produce HTML output.

https://github.com/PreTeXtBook/pretext/pull/2576

Big change in setup/philosophy. I'd like STACK questions (exported XML) to be
an explicit part of the PreTeXt XML source. So the #stack element should hold
all the XML of a question, from #quiz on down. As a practical matter we can
keep the question in its own file (in the source tree) and "xi:include" it
(which is what I am doing). First thing we do in an XML build is to dump all
this XML to a file *in the output of the HTML build*." So all your questions
about "generated assets", etc are moot. And there are other technical
advantages (and some gotchas).

One thing a question file will need is a namespace. See my follow-on commits
for exact use/specification. The STACK project may want to use something else
(which is easy to change now). It is URL-ish but does not need to ever point to
anything available on the web, it is just an identifier you own.

Really easy to integrate exercise/stack into our processing. See new commit.
Numbering, titles, etc all work as expected.

Problem renders - but not on page load. :-( I have to ask for a "new question"
and then everything is fine. I've pursued a few conjectures, but no luck.
Since the "new" question seems 100% functional, we must be close. I'm hoping it
is some easy JS adjustment or something.

Rendering is local. Now I just built the sample article at the website and it
is not functioning at all (and I'm out of time for right now). Everything seems
to be in place... (though I seem to be having some problems loading other
resources, like Sage Cell.) And I forgot one edit. Stay tuned.

I want to have a STACK question or two in the sample article, so regular testing
will expose any problems. I also want the sample article to be self-contained,
so I will eventually unravel the "xi:include" to put all the (ugly) XML right
there. I have not touched your separate testing example - mostly since I think
it would be a good exercise for you to make the adjustments to source, and test.
That can be an evolving demonstration and torture-test, but it will see
less-regular testing in light of other modifications. It would be good to
mostly organize that with the xi:include mechanism. Perhaps one problem can be
bare source inside a #stack, in a regular source file.

I have tidied up the publisher variable for the server. Within the XSL you
should now find the (global) variable $stack-server is available and is set
for the sample article. I think you will want to modify the "stack-js" template
to set a JS variable to the value given by the XSL variable. I can help some,
but this is probably best for you to do and test.

Nothing done with static versions or related Python. Small chance I could
attack that later today.

Rob

Rob Beezer

unread,
Aug 15, 2025, 4:17:51 PMAug 15
to prete...@googlegroups.com
On 8/15/25 11:52, 'Rob Beezer' via PreTeXt development wrote:
> Problem renders - but not on page load.  :-(  I have to ask for a "new question"
> and then everything is fine.  I've pursued a few conjectures, but no luck. Since
> the "new" question seems 100% functional, we must be close.  I'm hoping it is
> some easy JS adjustment or something.
>
> Rendering is local.  Now I just built the sample article at the website and it
> is not functioning at all (and I'm out of time for right now).  Everything seems
> to be in place... (though I seem to be having some problems loading other
> resources, like Sage Cell.)  And I forgot one edit.  Stay tuned.
Updated sample article from website is giving me fits in Firefox. But seems to
do OK in Chrome (subject to having to ask for a "new" question). Behaves
locally in Firefox.

I'm hoping I have not put up something defective at the website. Folks that are
better with JS and the console might have a look around?

Thanks,
Rob

Rob Beezer

unread,
Aug 15, 2025, 10:12:04 PMAug 15
to prete...@googlegroups.com
Quick update: the same problem that appears in HTML output is being ripped out
of source, sent to a STACK server, received as PreTeXt (static representation)
and being realized in PDF output.

Lots of rough edges, but I can clean-up and push hopefully without breaking
anything. ;-)

Rob

Andrew Scholer

unread,
Aug 16, 2025, 12:25:22 AMAug 16
to prete...@googlegroups.com
Rob - 

Your Firefox issue is related to loading two versions of MathJax.

In stackapicalls.js line 168, when this is evaluated:
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
Chrome is seeing MathJax as 2.7.7 (the version you load as part of stack-js
Firefox is seeing MathJax 3.2.2 that is loaded by the normal part of the page

Andrew Scholer (he/him/his)
Computer Science Instructor
Chemeketa Community College


--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzNC5iZWV6ZXI.1755310321%40pnsh.

Rob Beezer

unread,
Aug 16, 2025, 12:09:46 PMAug 16
to prete...@googlegroups.com
Right!

Thanks very much, I'd forgotten all about that from earlier work. :-(

Rob

On 8/15/25 21:24, Andrew Scholer wrote:
> Rob -
>
> Your Firefox issue is related to loading two versions of MathJax.
>
> In stackapicalls.js line 168, when this is evaluated:
> MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
> Chrome is seeing MathJax as 2.7.7 (the version you load as part of stack-js
> Firefox is seeing MathJax 3.2.2 that is loaded by the normal part of the page
>
> Andrew Scholer (he/him/his)
> Computer Science Instructor
> Chemeketa Community College
> 503.589.7649
> computerscience.chemeketa.edu/people/andrew-scholer/ <http://
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAzNC5iZWV6ZXI.1755310321%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAzNC5iZWV6ZXI.1755310321%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CACm44N_Ut_Ydqex%2BS68xsuXC1yBu51CJVb-T_1p-7Aa_aqeM3w%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/CACm44N_Ut_Ydqex%2BS68xsuXC1yBu51CJVb-
> T_1p-7Aa_aqeM3w%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Aug 16, 2025, 12:32:03 PMAug 16
to prete...@googlegroups.com
I've commented out the nascent STACK example in the sample article. Not yet
ready for that. It is available for those (Georg) who want to test.

Website is refreshed and back to its near-normal.

I've made a beta *with* the sample problem (and so, all the STACK JS, etc.). It
has problems because of dueling MathJax, try to see Exercise 4.2.3.3, "STACK
integration question".

https://pretextbook.org/beta/stack-2025-08-16

Rob

Rob Beezer

unread,
Aug 16, 2025, 12:43:29 PMAug 16
to prete...@googlegroups.com
Dear Georg,

Lots of progress yesterday on STACK! As you have seen. Here are a few bumps in
the road that you could work on next. Sorta in order of importance.


* Dueling MathJax. We load v3.x. STACK is now loading v2.7.7. Can't have
that. ;-) Commented out v2.7.7 and apparently the (three?) calls

MathJax.Hub.Queue(["Typeset", MathJax.Hub]);

don't work at all. Could those upgrade to something that works with v3? And we
want to upgrade all of PreTeXt to v4 (out just a few days ago) so maybe there is
a future-proof way that will work for v3 and v4.


* Figure out why we have to ask for a new question, and do not get an initial
version with the loaded page.


* Static: the #fillin created for an answer blank needs to be an empty element.
Invalid XML as it is now.


* I'm generating the static version on a one-file per-question basis. It needs
to have one overall XML element around everything to be legitimate.
#stack-static, #stack-pretext, #pretext-stack, doesn't really matter. We could
even put it into a STACK namespace down the road. I've added something by hand
for testing, and I can (temporarily) add it via the Python that is managing this
generation. Holler if you think/prefer this lives in the Python.


I expect we will be iterating on the static versions for a while, but that will
be incremental. Thanks again for all your work on this.

Rob

Rob Beezer

unread,
Aug 16, 2025, 6:23:02 PMAug 16
to prete...@googlegroups.com
Code to convert a STACK question to a static PreTeXt version has been merged.
So EPUB, PDF, braille, etc, should all be capable now of showing a fixed version
of such a question.

Georg - I was very carefull to mine your Python demonstration script over the
course of several commits building up the Python code in the main PreTeXt Python
library. And your name is on the commit where it originated from PR #2576.
Have a look, and I hope that is all OK with you.

@Oscar - you could add another generation step to the CLI. Maybe keep it on a
branch, while Georg and I work through a few rough spots. Not 100% ready yet,
though the interface should not really change.

Rob

Oscar Levin

unread,
Aug 17, 2025, 10:54:15 AMAug 17
to PreTeXt development
Great timing!  I'm just about to release the next CLI version and I've thrown this and the citeproc generation into it as easter eggs.  Anyone interested will be able to run `pretext generate stack` (or `pretext generate references`) to test those out.  But normal builds will not attempt to generate automatically, so this is just for testing.

Out now in 2.28.

Chris Sangwin

unread,
Aug 17, 2025, 2:21:40 PMAug 17
to prete...@googlegroups.com
Thanks everyone.  I'm watching all this discussion - very happy to adapt STACK as needed (e.g. options to support specific MathJax versions).  Please let me know if STACK needs to change!

Chris


--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.

Rob Beezer

unread,
Aug 19, 2025, 2:10:07 PMAug 19
to prete...@googlegroups.com
Thanks, Chris. I suspect Georg is going to know best when and how to get your
involvement. And I can watch the PreTeXt side of things.

Rob
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/51e4c1f0-7c90-482b-a655-c565bfe7e3e8n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/51e4c1f0-7c90-482b-a655-
> c565bfe7e3e8n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CAO-
> sG%2B1KtXVPH5oGJEqNL%3DpA7y12eioCWe3rJyJCVNZ0cQkNwQ%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/CAO-
> sG%2B1KtXVPH5oGJEqNL%3DpA7y12eioCWe3rJyJCVNZ0cQkNwQ%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Georg Osang

unread,
Aug 21, 2025, 10:24:51 PMAug 21
to prete...@googlegroups.com
Hi Rob,

Thanks a lot for your work over the last few days to integrate my changes into your codebase!
I think this gives me a clear path forward on the next changes, starting with the publisher variables.
(Though not immediately as I'm on vacation two out of the next three weeks.)

Now that we're using xi:include for the questions, there are schema warnings (e.g. other tags inside of `<input>`)
as we haven't defined a schema yet? Though I think we don't want to define a schema at this point while it is still evolving
(e.g. question fragments). If we later wanted to also include questions in YAML format would we then use
`<xi:include parse="text"`? How would PreText decide which format the content is in then? (But maybe it doesn't
need to as the API can handle both?)

Dueling MathJax.
@Chris Sangwin You mentioned options to support specific MathJax versions. I don't have a good understanding
of this issue at this point. Simply looking at what the API returns, this seems to be MathJax agnostic (except for the
iframes) so I feel like this is something I should somehow be able to fix client-side?
The LaTeX from STACK questions only renders if I include MathJax 2; if I only use the default config of MathJax 3
that comes with PreText it doesn't render, but is this maybe a configuration issue rather than version issue?
From this issue, I see MathJax 3 is part of STACK milestone 4.11, so what does that entail exactly?
I notice the API sample page is using MathJax 2.

 Static: the #fillin created for an answer blank needs to be an empty element.
  Invalid XML as it is now.
Forgot the closing tag there (Also explains why earlier I got the somewhat cryptic
"Cannot resolve URI `.../stack-integration.ptx` even when the file was at the specified location).
I pushed a fix (alongside with an update to the minimal STACK example) here: 
I can add a few more STACK questions to that article at some later point in time.

Figure out why we have to ask for a new question, and do not get an initial
version with the loaded page.
This is by design (currently), and akin to the "Activate" button for webwork. No API calls are done on page load,
only once the button is pressed. There are some plans to make the buttons behave a bit more similar to WebWork,
but that's all Javascript for me to take on at some later point.

Georg


You received this message because you are subscribed to a topic in the Google Groups "PreTeXt development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/gkZ4sSj8nVk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAyNy5iZWV6ZXI.1755627004%40pnsh.

Chris Sangwin

unread,
Aug 22, 2025, 4:30:29 AMAug 22
to prete...@googlegroups.com, geo...@gmail.com
Dear all,

Mike presented a demo of some online PreTeXt books with STACK questions (used for the Ethiopian "Basic Maths" course) yesterday at the STACK International Advisory Board meeting. It's impressive, and was working well.  Thanks @geo...@gmail.com this all looks excellent.

Honestly, I don't have a good understanding of the precice MathJax issue either!  In principle this is _not_ something which STACK (as a stateless question type) should really get involved in.  The idea would be to return LaTeX and let the browser worry about that.  If only life were so simple!  In particular, we have to load MathJax into iframe content (as you mention).  STACK has this function https://github.com/maths/moodle-qtype_stack/blob/master/vle_specific.php#L204 which should be used throughout our codebase.

The API sample page also has to load something (See https://github.com/maths/moodle-qtype_stack/blob/master/api/config_sample.txt#L107 for the config.) I expect we will match that config to the default used by Moodle.

I think the truth is that we've been using MathJax 2 for ages, and during that time things like iframes have come along and we may have hard-wired settings into places which should really be options.  Now is the time to weed this out, which we will do.  Let's use this issue https://github.com/maths/moodle-qtype_stack/issues/1512 to resolve the STACK side of things.

I think it's perfectly reasonable to add an optional parameter to the API call which specifies the MathJAX url.  That can then be used within any iframes we create.  Do you need that?  If so, please could you raise a separate issue?

Thanks again Georg, it all looks like a very valuable and exciting development.  We're about to release about 2/3 of the HELM materials (https://www.lboro.ac.uk/departments/mlsc/student-resources/helm-workbooks/) as STACK open educational resources.  These materials are battle tested over 20 years, constitute most of a classic large engineering mathematics textbook and (the paper versions) are still widely used.  The STACK versions have been used in Edinburgh for 5 years, and are now reliable and well written.  We haven't done all of HELM yet (some content appears not to be needed any more), but what we have is thousands of carefully arranged interactive questions.  This will be a valuable boost to anyone wanting content on the HELM topics in PreTeXt documents.

Chris

Rob Beezer

unread,
Aug 22, 2025, 12:07:12 PMAug 22
to prete...@googlegroups.com
On 8/20/25 13:29, Georg Osang wrote:
> I think this gives me a clear path forward on the next changes, starting with
> the publisher variables.

Great.

> (Though not immediately as I'm on vacation two out of the next three weeks.)

No worries. No deadlines in this project.

> Now that we're using xi:include for the questions, there are schema warnings
> (e.g. other tags inside of `<input>`)
> as we haven't defined a schema yet? Though I think we don't want to define a
> schema at this point while it is still evolving
> (e.g. question fragments).

Some PreTeXt warnings about coincidental elements (#input for one) went away
when I added a namespace. The PreTeXt schema should get more attention than it
does, but I think we'll be able to separate a STACK schema from the PreTeXt one
via namespaces.

> If we later wanted to also include questions in YAML
> format would we then use
> `<xi:include parse="text"`? How would PreText decide which format the content is
> in then? (But maybe it doesn't
> need to as the API can handle both?)

YAML? That's new (or another thing I've forgotten about). Having questions as
XML is a huge plus. A text version gives us little room to maneuver. I already
have to fight the slow creep of JSON! In any event, it is easy to "see" that
the current version has a #question element (say) and know what sort of XML it
is. This is the sort of visibility we lose with plain text. The whole point of
choosing XML is in part so we don't have to parse LaTeX (yet anothr markup
language).

> Dueling MathJax.

Reply to Chris' post in a minute.

> Forgot the closing tag there (Also explains why earlier I got the somewhat cryptic
> "Cannot resolve URI `.../stack-integration.ptx` even when the file was at the
> specified location).
> I pushed a fix (alongside with an update to the minimal STACK example) here:
> https://github.com/IDEMSInternational/pretext/commits/stack-sample/ <https://
> github.com/IDEMSInternational/pretext/commits/stack-sample/>

Great - thanks for the fix.

> Figure out why we have to ask for a new question, and do not get an initial
> version with the loaded page.
>
> This is by design (currently), and akin to the "Activate" button for webwork. No
> API calls are done on page load,
> only once the button is pressed. There are some plans to make the buttons behave
> a bit more similar to WebWork,
> but that's all Javascript for me to take on at some later point.

I think I had forgotten about that. Sorry if I seem absent-minded. Off and on
with other PreTeXt initiatives, I lose track of what's going on with each.

Rob

Rob Beezer

unread,
Aug 22, 2025, 12:33:10 PMAug 22
to prete...@googlegroups.com
On 8/22/25 01:30, Chris Sangwin wrote:
> Mike presented a demo of some online PreTeXt books with STACK questions (used
> for the Ethiopian "Basic Maths" course) yesterday at the STACK International
> Advisory Board meeting. It's impressive, and was working well.  Thanks
> @geo...@gmail.com <mailto:geo...@gmail.com> this all looks excellent.

Great - that's good to hear.

MathJax:

The LaTeX being produced (for HTML and static) seems fine to me and should not
be at issue (except perhaps in isolated instances).

Georg's recent work loaded MathJax 2 into the HTML #head. Then we load MathJax
3 into the #head, as a routine matter. (Maybe the order is reversed.) So
having two versions/instances around is sure to be trouble. But it is not a
simple matter of killing the v2 loading - tried that already.

Georg provided two Javascript files, and I don't really have the skills to know
everything they are doing. But they interact with MathJax. For example,
"stackapicalls.js" has a line that looks like:

MathJax.Hub.Queue(["Typeset", MathJax.Hub]);

Not sure if this is re-purposed JS, or one-off JS for PreTeXt support. In any
event, maybe this is v2 syntax not supported by v3, or it is assuming a
different configuration, or I don't know what. We have an extensive
configuration - for example we output HTML where all the math/LaTeX is already
marked with spans and divs (since we know it comes only from #m, #me, #md,...)
and then we tell MJ that it does not have to parse the page any more than
looking for these spans and divs. When you show a preview of a student's input
for an answer, maybe you are inside an iframe doing mathJax rendering
on-the-fly? I'd guess that where maybe we need to coordinate?

> We're about to release about 2/3 of the HELM materials

HELM looks great, I wasn't aware of all that. (I did a review of my trig,
Workbook 4.) I think those would translate quite nicely and naturally to PreTeXt.

> Honestly, I don't have a good understanding of the precice MathJax issue
> either!  In principle this is _not_ something which STACK (as a stateless
> question type) should really get involved in.  The idea would be to return LaTeX
> and let the browser worry about that.  If only life were so simple!  In
> particular, we have to load MathJax into iframe content (as you mention).  STACK
> has this function https://github.com/maths/moodle-qtype_stack/blob/master/
> vle_specific.php#L204 <https://github.com/maths/moodle-qtype_stack/blob/master/
> vle_specific.php#L204> which should be used throughout our codebase.
>
> The API sample page also has to load something (See https://github.com/maths/
> moodle-qtype_stack/blob/master/api/config_sample.txt#L107 <https://github.com/
> maths/moodle-qtype_stack/blob/master/api/config_sample.txt#L107> for the
> config.) I expect we will match that config to the default used by Moodle.
>
> I think the truth is that we've been using MathJax 2 for ages, and during that
> time things like iframes have come along and we may have hard-wired settings
> into places which should really be options.  Now is the time to weed this
> out, which we will do.  Let's use this issue https://github.com/maths/moodle-
> qtype_stack/issues/1512 <https://github.com/maths/moodle-qtype_stack/
> issues/1512> to resolve the STACK side of things.
>
> I think it's perfectly reasonable to add an optional parameter to the API call
> which specifies the MathJAX url.  That can then be used within any iframes we
> create.  Do you need that?  If so, please could you raise a separate issue?
>
> Thanks again Georg, it all looks like a very valuable and exciting development.
> We're about to release about 2/3 of the HELM materials (https://www.lboro.ac.uk/
> departments/mlsc/student-resources/helm-workbooks/ <https://www.lboro.ac.uk/
> departments/mlsc/student-resources/helm-workbooks/>) as STACK open educational
> @Chris Sangwin <mailto:c.j.s...@gmail.com> You mentioned options to
> support specific MathJax versions. I don't have a good understanding
> of this issue at this point. Simply looking at what the API returns, this
> seems to be MathJax agnostic (except for the
> iframes) so I feel like this is something I should somehow be able to fix
> client-side?
> The LaTeX from STACK questions only renders if I include MathJax 2; if I
> only use the default config of MathJax 3
> that comes with PreText it doesn't render, but is this maybe a
> configuration issue rather than version issue?
> From this issue <https://github.com/maths/moodle-qtype_stack/issues/1512>,
> I see MathJax 3 is part of STACK milestone 4.11, so what does that entail
> exactly?
> I notice the API sample page is using MathJax 2.
>
>  Static: the #fillin created for an answer blank needs to be an empty
> element.
>   Invalid XML as it is now.
>
> Forgot the closing tag there (Also explains why earlier I got the somewhat
> cryptic
> "Cannot resolve URI `.../stack-integration.ptx` even when the file was at
> the specified location).
> I pushed a fix (alongside with an update to the minimal STACK example) here:
> https://github.com/IDEMSInternational/pretext/commits/stack-sample/
> <https://github.com/IDEMSInternational/pretext/commits/stack-sample/>
> I can add a few more STACK questions to that article at some later point in
> time.
>
> Figure out why we have to ask for a new question, and do not get an initial
> version with the loaded page.
>
> This is by design (currently), and akin to the "Activate" button for
> webwork. No API calls are done on page load,
> only once the button is pressed. There are some plans to make the buttons
> behave a bit more similar to WebWork,
> but that's all Javascript for me to take on at some later point.
>
> Georg
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CAO-
> sG%2B1SaEemY9n%3DkzyFvacz6-PBr_eUzrJAR6uibhO_ov_ORw%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/CAO-sG%2B1SaEemY9n%3DkzyFvacz6-
> PBr_eUzrJAR6uibhO_ov_ORw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Georg Osang

unread,
Aug 22, 2025, 2:32:07 PMAug 22
to prete...@googlegroups.com
Hi Rob,

Some PreTeXt warnings about coincidental elements (#input for one) went away
when I added a namespace.  The PreTeXt schema should get more attention than it
does, but I think we'll be able to separate a STACK schema from the PreTeXt one
via namespaces.
When you say you added a namespace, is that something you did when authoring the
content, or is that a feature to be added to the PreText code?
I'm not really aware of namespaces in PreText.

Georg provided two Javascript files, and I don't really have the skills to know
everything they are doing.  But they interact with MathJax.  For example,
"stackapicalls.js" has a line that looks like:
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
Not sure if this is re-purposed JS, or one-off JS for PreTeXt support.  In any
event, maybe this is v2 syntax not supported by v3, or it is assuming a
different configuration, or I don't know what.  We have an extensive
configuration - for example we output HTML where all the math/LaTeX is already
marked with spans and divs (since we know it comes only from #m, #me, #md,...)
and then we tell MJ that it does not have to parse the page any more than
looking for these spans and divs.  When you show a preview of a student's input
for an answer, maybe you are inside an iframe doing mathJax rendering
on-the-fly?  I'd guess that where maybe we need to coordinate? 
That line of code is specific to MathJax2. I tried replacing it with (what the MathJax
documentation claims is) the equivalent for MathJax3, but didn't get it to work.
Basic LaTeX in the question text still didn't render. If you have specific spans/divs
that you tell MathJax to look for that might explain it.
The iframes are specifically for elements like JSXGraph inputs, and those explicitly
load MathJax2. I don't know if that interferes with the other stuff given it's in an iframe,
but either way, I guess that's something to worry about later maybe (and would have to
be changed on the STACK side).

YAML?  That's new (or another thing I've forgotten about).  Having questions as
XML is a huge plus.  A text version gives us little room to maneuver.  I already
have to fight the slow creep of JSON!  In any event, it is easy to "see" that
the current version has a #question element (say) and know what sort of XML it
is.  This is the sort of visibility we lose with plain text.  The whole point of
choosing XML is in part so we don't have to parse LaTeX (yet anothr markup
language).
This is still in development as far as I know, but at this point we're sending the entire
content to the API anyway both for static and interactive versions, so PreText doesn't
have to worry about the content.
We don't control the Moodle XML format, and it is somewhat cumbersome to hand-edit,
so the YAML was meant to address that.
But with PreText in the mix, there's more to this, as for example the API won't understand
pretext-specific markup (e.g. <alert>), while some question authors use some HTML in their
STACK question which PreText doesn't understand (e.g. <b>). So while we might want some
pretext-native format at some point (hand-editable, with PreText markup) whose markup gets
converted to HTML for the interactive version, realistically, many questions already exist and
some may use some non-PreText HTML markup, so while for the interactive version PreText can just
ignore the question content entirely, to get a static version we might want to have a heuristic
that does *something* with those HTML tags.

Best,
Georg
 

You received this message because you are subscribed to a topic in the Google Groups "PreTeXt development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/gkZ4sSj8nVk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.

Rob Beezer

unread,
Aug 22, 2025, 7:14:08 PMAug 22
to prete...@googlegroups.com


On 8/22/25 11:31, Georg Osang wrote:
> When you say you added a namespace, is that something you did when authoring the
> content, or is that a feature to be added to the PreText code?
> I'm not really aware of namespaces in PreText.

It was added to the PreTeXt source with an xmlns attribute on the outermost
element of the STACK question. Doesn't (yet) help with schema. But prevented
our warnings about mis-using #input from being raised by a STACK #input.


> Georg provided two Javascript files, and I don't really have the skills to know
> everything they are doing.  But they interact with MathJax.  For example,
> "stackapicalls.js" has a line that looks like:
> MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
>
> Not sure if this is re-purposed JS, or one-off JS for PreTeXt support.  In any
> event, maybe this is v2 syntax not supported by v3, or it is assuming a
> different configuration, or I don't know what.  We have an extensive
> configuration - for example we output HTML where all the math/LaTeX is already
> marked with spans and divs (since we know it comes only from #m, #me, #md,...)
> and then we tell MJ that it does not have to parse the page any more than
> looking for these spans and divs.  When you show a preview of a student's input
> for an answer, maybe you are inside an iframe doing mathJax rendering
> on-the-fly?  I'd guess that where maybe we need to coordinate?
>
> That line of code is specific to MathJax2. I tried replacing it with (what the
> MathJax
> documentation claims is) the equivalent for MathJax3, but didn't get it to work.
> Basic LaTeX in the question text still didn't render. If you have specific
> spans/divs
> that you tell MathJax to look for that might explain it.

Look anywhere in our HTML output for examples. You'll see the class names in
the MathJax configuration.

> The iframes are specifically for elements like JSXGraph inputs, and those explicitly
> load MathJax2. I don't know if that interferes with the other stuff given it's
> in an iframe,
> but either way, I guess that's something to worry about later maybe (and would
> have to
> be changed on the STACK side).

OK - it does sound like that is down the line.
Understood. At some point, somebody is going to want *something* on the PreTeXt
side based on what is inside the source of the question. Not only do we not
*want* to parse text, we have very few good tools in XSL to do so. Thus, we
can't be very sophisticated. XML on the other hand is super-easy.

Rob

Georg Osang

unread,
Sep 6, 2025, 2:35:28 PM (17 hours ago) Sep 6
to prete...@googlegroups.com
I have tidied up the publisher variable for the server.  Within the XSL you
should now find the (global) variable  $stack-server  is available and is set
for the sample article. 
Only a minor update, but with the above I was to make it so that the STACK API URL is read from the publisher variables rather than hardcoded. PR: https://github.com/PreTeXtBook/pretext/pull/2693

Will look at the conflicting MathJax next (though at earliest in a week from now).


--
You received this message because you are subscribed to a topic in the Google Groups "PreTeXt development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/gkZ4sSj8nVk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages