Skip to content

Add amsmath to the list of TeX packages in Plots.#1408

Open
somiaj wants to merge 1 commit into
openwebwork:PG-2.21from
somiaj:add-amsmath-to-plots
Open

Add amsmath to the list of TeX packages in Plots.#1408
somiaj wants to merge 1 commit into
openwebwork:PG-2.21from
somiaj:add-amsmath-to-plots

Conversation

@somiaj
Copy link
Copy Markdown
Contributor

@somiaj somiaj commented May 12, 2026

This is package contains some common tools that many may expect to be present when displaying mathematical formulas in labels, such as \dfrac.

This is package contains some common tools that many may
expect to be present when displaying mathematical formulas
in labels, such as `\dfrac`.
@somiaj somiaj force-pushed the add-amsmath-to-plots branch from e767435 to 03bf653 Compare May 12, 2026 22:06
@Alex-Jordan
Copy link
Copy Markdown
Contributor

Maybe it would be good to also add POD (to plot.pl?) to document which latex packages are available.

I wondered how long until someone hits an issue with some other tex package being unavailable? Not to add mission creep, but have you considered making texPackages configurable by the problem author using plots.pl?

@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented May 17, 2026

@Alex-Jordan this did come up in the meeting that plots doesn't have a way to configure the LaTeXImage object directly. But this kinda leads down a rabbit hole of how configurable should plots give the various outputs it supports. What about compatibility with jsxgraph, should this allow creating images that cannot also be created in jsxgraph, or whatever other plot output that could be added in the future?

There is more that can be done here, and maybe we should expose more of the LaTeXImage object to plots. This was just a quick fix to allow common things that many would expect so the tikz/pgfplots label output supports most of the stuff in jsxgraph via MathJax. If someone is really wanting to create a plot object with lots of custom libraries, maybe they should use LaTeXImage directly if they want that much control of the latex/tikiz output, instead of plots which is meant to be more independent of the back end of the plot being created. I think the real issue is someone creates something that shows up nicely in jsxgraph/html output only to find at a later date the hardcopy output is missing something.

It might be a loosing battle to try to deal with each use case, so a future PR could expose more of the LaTeXImage configuration to the plots object. But then authors will have to know what additional libraries to load since MathJax auto loads them.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

Alex-Jordan commented May 17, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants