# Are "solved problems" suitable for PlanetMath?

Hello,

I am thinking of setting up one or more pages of math problems solved by Maxima, a symbolic computation system. I am imagining that there would be a main page and a page for each solved problem. Each problem page would have a brief discussion and then a solution with formulas, code, and graphics as needed. Is that something that is suitable for PlanetMath? I couldn’t find anything to say whether it is definitely OK or not OK. It’s not a problem if it’s not OK.

To make it more concrete, I am thinking that the solved problem pages will look something like this article (I didn’t write the article).

http://freakonometrics.hypotheses.org/11018

Thanks for any light you can shed on this question.

best,

Robert Dodier

### Re: Are "solved problems" suitable for PlanetMath - yes

Hi Robert:

This is exactly the topic I targeted in my thesis work and the PlanetMath system is totally ready accept this kind of input!

Please upload the problem statements as ”Problems” (click Add content) and then add the solutions through the links in the right-hand panel that appear on each problem’s page.

You can also connect problems to encyclopedia articles that deal with related topics.

Have a look at the ”Solution to Exercise 1.2” that was uploaded recently for an example.

Let me know if I can offer any other assistance or advice. BTW: Youll probably want to post source code between \begin{verbatim} and \end{verbatim} tags (we don’t have a syntax highlighter at the moment but we may add one eventually).

Joe

### Re: Are "solved problems" suitable for PlanetMath?

> Each problem page would have a brief discussion and then
> a solution with formulas, code, and graphics as needed. Is
> that something that is suitable for PlanetMath?

The answer is a resounding YES!! One of the new features
of our software platform is a problem/solution section which
is designed exactly for the sort of thing you have in mind
and we are looking for people who are interested in using this new feature.

> I couldn’t find anything to say whether it is definitely OK
> or not OK.

Unfortunately, we aren't finished reworking our documentation, so all we have online is still the old documentation which doesn't say anything about new features like the problem/solution section. So, to help fill in the gap, here is a quick overview of how you might go about doing what you described:

The main page for all the problems could assume the form of a collection. To create one, you look for the "collection" link under the "add content" menu on the left sidebar. Once you enter a problem, you can then add it to the collection.

To enter a problem, you use the "problem" link from the same "add content" menu. Once the problem is entered, it will come with a "add a solution to this problem". Click that to enter your solution.

Entering formulae is done using the usual LaTeX means; if you would like to define some special macro, you can do that too by adding it to the preamble.

To enter graphics, you can use our image gallery. Again going to the "add content" menu, go to the image link to upload a file to the gallery --- we support png, gif, and jpg formats. Once you have saved the image in the gallery, you can then include it in your problem or solution using a \includegraphics{filename} command.

As for Maxima code, you can certainly include a listing in your solution and have TeX pretty-print it. As it stands, however, our software won't understand or run it, but symbolic algebrea integration is on our develoment agenda. We aren't actively working on it right now because we have other things that need to get done (like properly documenting the new features we already have) but, if you're interested in seeing it happen sooner and especially if you're willing to help make it happen, we would be glad to work with you.

If you have any questions or aren't sure how something works, please feel free to contact me or post in the forum.

### more questions about solved problems

Hi guys, thanks a lot for the encouragement. I have a few questions.

About typesetting formulas, how is TeX rendered on PlanetMath? It looks pretty good, but I like this [1] even better; I am informed that wiki uses MathJax. Is there any room for installing different plugins or whatever it takes to render stuff differently?

About typesetting code, I am inclined to write it as HTML instead of TeX verbatim, since I'd like to colorize it at some point and I'm guessing that will be easier with HTML than TeX. Any opinions about that?

About graphics, I have toyed with the idea of working with a non-image format such as SVG or flot (Javascript). Any way to use such formats at PlanetMath?

About integration with Maxima (i.e., running Maxima to process some input), at the moment that isn't a goal for me; I'm happy enough preparing everything ahead of time and presenting it statically.

Thanks again for your response. Happy holidays!

Robert Dodier

### Re: more questions about solved problems

> About typesetting formulas, how is TeX rendered on PlanetMath?

It's rendered by conversion into MathML.

> It looks pretty good, but I like this [1] even better;

Looking at your link, this looks like an instance of a wiki engine which passes equations through TeX, then converts the result to a graphic file and pastes it in to the web page. We had something like this in a previous version of our software, but have since moved over to the current system since it allows us to encode the meaning, not just the appearance, in the rendered version.

> About typesetting code, I am inclined to write it as HTML
> instead of TeX verbatim, since I'd like to colorize it at
> some point and I'm guessing that will be easier with HTML
> than TeX. Any opinions about that?

On Planetary, it isn't possible to mix HTML and TeX in the same document. However, LaTeX does have a color package for the purpose of producing text in various colors. That isn't currently supported but we could look into it.

> About graphics, I have toyed with the idea of working with
> a non-image format such as SVG or flot (Javascript). Any
> way to use such formats at PlanetMath?

We don't currently have support for SVG and flot, but the LaTeXML team has announced that support for tikz and xy graphics format should be released sometime in the next few days.

### typesetting, etc.

> It's rendered by conversion into MathML.

Does it look OK in all browsers? I was under the impression that not browsers support MathML, but I could easily be mistaken.

> Looking at your link, this looks like an instance of a wiki engine which passes equations through TeX, then converts the result to a graphic file and pastes it in to the web page.

Hmm, that website uses Mediawiki + MathJax, which is supposed to be downloaded automatically with the document so that no client-side installation is needed. (I don't see images for equations.) What browser version are you running?

> LaTeX does have a color package for the purpose of producing text in various colors.

OK, I will keep that in mind. I don't have a way to generate colorized Maxima code yet, but it seems like it shouldn't be too hard. Maybe there is a way to run Vim to apply its colorization to the code and capture the output. Just guessing about that.

> the LaTeXML team has announced that support for tikz and xy graphics format should be released sometime in the next few days.

OK, great. Maxima uses Gnuplot to generate graphics, and it appears that Gnuplot can generate TikZ output. So that would be easy to try at some point.

Thanks for the info!

Robert Dodier

### Actually I think SVG will work, that's a how TikZ will render

Actually SVG should be fine. Robert: if you want to create a little ”Sandbox” article for testing, please go ahead and do that (you can un-tick the box that says ”Public” until you’re ready to share it, or just put a note at the top that says Work in Progress, people will be fine with that).

As Ray indicated, you can generally use either LaTeX or HTML, although we usually prefer LaTeX because it means we can export the content and typeset in books easily. But we can also convert from HTML to LaTeX later if you prefer HTML.

(I thought the color package was supported? Maybe I need to make my own sandbox article…)

### Re: Actually I think SVG will work, that's a how TikZ will rende

> Actually SVG should be fine

Sure, it'll render as HTML, so one should be able to use it if one writes an entry in HTML or as output of LaTeXML. However, is there a way to include raw SVG source in some suitable environment in the body of a TeX article on PM so as to have it render in the output?

> I thought the color package was supported? Maybe I need
> to make my own sandbox article…)

http://metameso.org/beta/node/87818

When I looked at it yesterday, it seemed not to be working. However, now that I checked it today, it is alright --- as you can see, the "the" appears in red, although the "solution" appears in blue because the autolinker got it.

### OK, SVG upload is currently not working!

Nevertheless, the site should be able to display SVG files, if you link to externally hosted images in your HTML (e.g. in Wikimedia Commons).

(Trying to get this working from inside LaTeX is proving tricky, I’ll update again if I manage to get it to work.)

### Re: typesetting, etc.

> Hmm, that website uses Mediawiki + MathJax, which is

I was mistaken --- after looking at the source code for the page, I noticed that it indeed was MathJax, as you said.

> I was under the impression that not browsers support
> MathML, but I could easily be mistaken.

You are correct about not all major browsers not yet supporting it, at least not without a plug-in; however, since MathML is now part of the HTML standard, I would expect that it is only a matter of time before all major browsers support it.

> I don't have a way to generate colorized Maxima code yet,
> but it seems like it shouldn't be too hard.

In LaTeX, there is the listings package for generating source code listings:

http://www.pvv.ntnu.no/~berland/latex/docs/listings.pdf

While Maxima is not natively supported by this package, it seems easy to add support for it:

http://www.variousconsequences.com/2009/04/maxima-latex-listings.html

The following has something to say about adding colored fonts to the listing package:

http://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings

Combining all this, it looks like plausible that one might be able to use the listings package to generate colorized Maxima output. Of course, there would also be the issue of introducing the package to LaTeXML but, if you're seriously interested, it looks like there is something here for us to work with.