Beginning learning MapleTA

MapleTA has been something I’ve been meaning to learn for some time now. I use MapleTA that others have written in my classes, but I want to learn it so I can write my own questions. But it’s been problematic since I’ve never seen any language reference or user guide or anything, so I looked briefly at questionbank source code of others but couldn’t find the motivation to really figure it out. Finally the other day I found a user guide. I read it yesterday on the train, and found some examples which I’m typing in and running. That’s good, but I must say the user guide could really use a bit of work by a professional technical writer. It’s usable, but it could be a lot better, and that would really open up MapleTA to a lot of people. They made it very GUI-based, but it’s not at all stand-alone, you do need to read the user guide. I also don’t know Maple itself, so I have to learn that. (I know Mathematica, I wonder if there’s a MathematicaTA, but in any case we’ve adopted MapleTA.) I found that I really only need to start in Chapter 7.

A few glitches in the user guide:

  • in chapter 7, the Color example doesn’t work. Furthermore, it asks you to click on ‘insert/edit response area’, but this button is unlabeled, you have to hover over all the buttons in the Add Question window and find the tooltip.
  • The Maple source code for the random set example is hyphenated at line breaks, so I typed in pos-int when the proper Maple function is posint. This also happened in the determinant example, but it was more obvious what to do there.
  • Chapter 8 has a random plane question and takes us through the Show Designer dialog, but in Chapter 7 we’ve already defined random variables (and polynomials and matrices) directly in the algorithm section, so Show Designer is a step backwards.
  • chapter 8 perimeter has an unexplained evalf in the maple-graded response for the grading code. how come other times we don’t need evalf and this time we do?
  • chapter 8 gradient field question uses some maple libraries, so i guess they assume you know maple fairly well before you try mapleta. might be good to have a little more explanation for people new to maple itself; for me id never probably take the time to learn maple unless it was to write up new material in mapleta, since ive already invested the time in mathematica.
  • the string match question section 8.8 has you enter the plotmaple command from the previous example into the algorithm box but doesnt use it since its got nothing to do with the example.
  • the sketch example in the latex section doesnt seem to work, though it seems like it would be really useful if it did work. when i converted and uploaded there was no graphing area.

I also discovered that

  • an “algorithmic variable” is a very general thing. It can contain code, images, plots, and lambda functions. Seems to be mostly for keeping Maple-rendered MathML of expressions.
  • And that Maple-graded question means only that it by default runs Maple on a string formed using the student’s answer.
  • There’s a fairly clunky link between MapleTA and Maple, you have to put things in maple(“whatever”), and only Maple can render MathML, so this leads to a large frequently recurring expression like maple(“printf(MathML:-ExportPresentation($matrix))”);
  • there’s a small note that we should wrap random variables in parentheses otherwise we get syntax errors if they’re negative along the lines of 5+-2.
  • its a little surprising that mapleta can do things like assume(x>=0, x<=1) and then have code based on that like the chapter 8 increasing function example. how does it check every point in the interval? or, in other places like chapter 7, that it can generate 2 random numbers and then have a condition afterwards that $b cannot equal $a. what does it do, backtrack if they're equal?
  • mapleta doesn’t save the questionbank that you’re working on automatically if you logout! all the examples i entered upto now vanished when i logged out. that is a big problem.
  • ive noticed even in the questions that im using from other people that maple’s graphs are often slightly off. for example when we do the x^3-x plot question in chapter 8, it doesnt actually go through the origin. this causes a lot of confusion, how is it possible that a program at maple’s level of usage and adoption makes this kind of plotting error in a simple 2d graph? shouldnt this have been a release-stopping bug in v1 of maple?
  • i didn’t really get why you would want to input the mapleta in latex, but i just ran it, and it actually looks good. its kind of “pretty printed” which is good. and the native qu format seems pretty ugly, every line needs to be started with the question bank number and some other number, and there’s no vim style files. so i guess doing the latex is nice, i will do it that way as much as i can. though the variables all have to have this \var{} notation which is clunky.

well that’s it for today. not a bad run, and i did learn quite a bit about maple and mapleta.


Get rid of black lines and grey backgrounds under LaTeX2html formulas

This was a problem for some time. Whenever I had an inline formula $x^2$ for example, there’d be an ugly, distracting line under it in LaTeX2html. Found the fix today, at this Wiki site at Drexel. Copying out the relevant portion for future use:

for those of us with root access, the following is a global hack-fix (i.e. it will fix the problem for all users):

In your file /usr/share/latex2html/ replaced the line

$DVIPSOPT = ‘ -Ppdf -E’;


$DVIPSOPT = ‘ -E’;

The ” -Ppdf” option supposedly does some extra formatting steps to optimize the output for pdf printing, but it ends up confusing latex2html in missing an entire row of pixels. It is non-essential and removing this option eliminates the problem. There are better fixes, see for details, that are more involved; but for those of us who regularly update our systems, or at least update latex2html whenever our distro has an update available, this hack-fix works just fine in the hopes that our distro will pick up and fix this bug on the next update of latex2html (in which case the more detailed fixes will have been over-written anyway).

My problem with grey backgrounds is also solved at this Drexel site by adding these lines to my ~/.latex2html-init:

# Force white background and black text
$BODYTEXT = “text=\”\#000000\” bgcolor=\”\#FFFFFF\””;
# This ensures that some figures do not end up with a grey background
# Tell LATEX:
$LATEX_COLOR = “\\pagecolor{white}”;


a simple cron file is better than cron-apt

ive been trying to get cron-apt to download and install packages. i was able to get it to update and download, but never to install, and i dont want to know how to do it anymore. really all you need to do is put an executable file in /etc/cron.daily/cronaptitude with

aptitude update
aptitude -y safe-upgrade

that’s all i wanted, and its so much simpler than cron-apt. i know there’s a “safety” issue with automatically upgrading, but ive stopped looked at specific packages years ago when i upgraded and havent had problems. sometimes X will break or the kernel will break, but this is not a problem. its easier to fix this when it happens once every couple of years than it is to not have cron upgrading automatically and then every week or 2 having a giant upgrade.

another thing which cropped up was that if i put that script in /etc/cron.daily then it works, but if i have root do crontab -e then it complains about paths. then in root’s crontab you have to add the line



daylight savings time on dualboot debian

been having some trouble with time on a dualboot debian laptop. i tried

dpkg-reconfigure tzdata
then edit /etc/rcS and set UTC=yes

but it didn’t work. the answer was just to do

date –set=whatevertime

i also found my previous notes on this problem, which were

so the machine was refusing to change the time using
hwclock –systohw
then i tried
hwclock –systohw –directisa

and it succeded, dont know if it will survive a reboot though.

then i tried hwclock –systohw –directisa –localtime
and it survived!!!! i dont know. also i added a parameter to the rcS init
file for –directisa

but i don’t remember anything about directisa or rcS init or why i would do that.