MyOpenMath in print

22 views
Skip to first unread message

Randall Pruim

unread,
Aug 25, 2023, 9:28:42 AM8/25/23
to PreTeXt support
I did a little experimenting with MyOpenMath, but I'm not able to build a print version of my book with those experiments included.  I get messages like

    critical: Cannot resolve URI /Users/rpruim/Courses/ula-ds/generated-assets/problems/mom-1175382.xml

Is this a known issue or am I doing something incorrectly?

My current plan is to just remove these for now, but I would be interested in including MOM exercises down the road.


Mark Fitch

unread,
Aug 25, 2023, 11:55:51 AM8/25/23
to pretext...@googlegroups.com

Are you using the pretext script or CLI? The CLI does not support MOM last I checked. That has to be done with the script.

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/13f72436-1892-4424-9643-1ead12c6fac8n%40googlegroups.com.

Randall Pruim

unread,
Aug 25, 2023, 12:16:25 PM8/25/23
to PreTeXt support
I was using the CLI.  But now I have another question: What do you mean by "the pretext script?".

Again, this isn't really urgent for me.  But if there is an easy fix, I'm glad to know about it.

Rob Beezer

unread,
Aug 25, 2023, 1:35:44 PM8/25/23
to pretext...@googlegroups.com
Let's take a step back.

Search the Guide for "myopenmath". Limited results, prominent one is:

Section 5.6: Directory Management
https://pretextbook.org/doc/guide/html/processing-directory-management.html#processing-directory-management

Search that page.

Search Guide on "pretext script". First two hits place you inside

Chapter 47: The pretext Script
https://pretextbook.org/doc/guide/html/pretext-script.html#pretext-script

Possible that is still not enough, but once you work through that, we can help.

Rob
>> https://groups.google.com/d/msgid/pretext-support/13f72436-1892-4424-9643-1ead12c6fac8n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/13f72436-1892-4424-9643-1ead12c6fac8n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/d32bbac4-54e5-472d-8767-6086448c08a8n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/d32bbac4-54e5-472d-8767-6086448c08a8n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Steven Clontz

unread,
Aug 27, 2023, 4:56:09 PM8/27/23
to PreTeXt support
Here's what you're looking for:

pretext devscript source/main.ptx -c mom -p publication/publication.ptx
pretext build



If you'd like MyOpenMath to be automatically generated like WeBWorK and other similar resources, we'd love to discuss it in our issue tracker here: https://github.com/PreTeXtBook/pretext-cli/issues

Randall Pruim

unread,
Aug 27, 2023, 7:33:43 PM8/27/23
to PreTeXt support
Steven,

Is the pretext the script or the CLI?

I would eventually like MyOpenMath to work a bit better, including (a) using the newer API to render the problems, (b) resizing the iframe so that the entire problem shows -- at least for most problems, and (c) easy generation of static versions.

I'm guessing (c) is the trickiest because I don't know what MOM has to offer in that regard.  For now, I'm developing MOM and my pretext book in parallel.  But I can imagine another phase where I go back and add some of my MOM problems into the text -- especially for problems that make good self-checks along the way.

I don't see an open issue for MyOpenMath.  Did you want me to create one?

Steven Clontz

unread,
Aug 27, 2023, 9:07:35 PM8/27/23
to PreTeXt support
I personally only recommend using the "PreTeXt-CLI" installed via `pip install pretext, run by `pretext` or `python -m pretext`. There is another command line interface, a.k.a. the "pretext/pretext script"; it has more features for processing PreTeXt components, but less features for maintaining a PreTeXt project as a whole. I call this the "devscript" as these days it's mainly used by PreTeXt developers, not end users.

When the "PreTeXt-CLI" is missing features made available by the "pretext/pretext script" such as MyOpenMath processing, we have created the "pretext devscript" command for "PreTeXt-CLI". So if the documentation says to run `pretext/pretext --foo bar`, you can run `pretext devscript --foo bar` or `python -m pretext devscript --foo bar` to get the same* result.

I don't think there's an existing MOM issue for PreTeXt-CLI - you are encouraged to open one so it is on the radar of the maintainers.


* Modulo some edge cases that hopefully won't bite you.

Rob Beezer

unread,
Aug 28, 2023, 11:46:56 AM8/28/23
to pretext...@googlegroups.com
On 8/27/23 18:07, Steven Clontz wrote:
> I personally only recommend using the "PreTeXt-CLI" installed via `pip install
> pretext, run by `pretext` or `python -m pretext`. There is another command line
> interface, a.k.a. the "pretext/pretext script"; it has more features for
> processing PreTeXt components, but less features for maintaining a PreTeXt
> project as a whole. I call this the "devscript" as these days it's mainly used
> by PreTeXt developers, not end users.

PreTeXt includes a collection of Python routines, which are necessary for some
features (MOM here) and some conveniences, like executing certain processing
step(s) that could be done with xsltproc and other tools.

The PreTeXt-CLI is a front end to these routines with additional features.

The pretext/pretext script is a more basic command-line interface, which is
more flexible, and supports every feature available in these Python routines.

I believe the steps Steven outlines are not able to produce braille. For this
reason, and others, I personally never recommend the "devscript" option.

Rob

Oscar Levin

unread,
Aug 28, 2023, 12:34:24 PM8/28/23
to PreTeXt support
For what it's worth, the CLI should be able to produce braille without using the `devscript` option.  Just set braille as your format in project.ptx.

If this is broken, please submit an issue.

Rob Beezer

unread,
Aug 28, 2023, 12:49:19 PM8/28/23
to pretext...@googlegroups.com
On 8/28/23 09:34, Oscar Levin wrote:
> For what it's worth, the CLI should be able to produce braille without using the
> `devscript` option.  Just set braille as your format in project.ptx.

How are the Python bindings for liblouis being installed? They are not a pip
package, and I need to build from source, along with a follow-up step. Maybe
there is another way?

Rob

Randall Pruim

unread,
Aug 29, 2023, 2:06:15 PM8/29/23
to PreTeXt support
As per Steven's suggestion, I've created a an issue on GitHub.  Perhaps Mark can add some additional info there since it seems he may have done more with MOM than anyone else has?
Reply all
Reply to author
Forward
0 new messages