Forum archive 2000-2006

John E. Doner - display_matrix_mm

John E. Doner - display_matrix_mm

by Arnold Pizer -
Number of replies: 0
inactiveTopicdisplay_matrix_mm topic started 8/23/2005; 5:57:13 PM
last post 8/23/2005; 7:58:34 PM
userJohn E. Doner - display_matrix_mm  blueArrow
8/23/2005; 5:57:13 PM (reads: 337, responses: 2)
I tried to use display_matrix_mm from PGmatrixmacros.pl (Webwork 1.9) It was unable to display matrices in which the entries were in math mode, as of course they normally would be. I eventually discovered that each matrix entry was being placed inside an mboxtrue. Trying to work around this proved difficult, so I finally just changed the macro to eliminate the mbox, and at least on the example I was using, it seems to work ok.

Why in the world would an mbox be desired in this situation? The normal case is that matrix entries would be in math mode, and relatively short at that. mbox does exactly the wrong thing.

John Doner

<| Post or View Comments |>


userJohn Jones - Re: display_matrix_mm  blueArrow
8/23/2005; 7:40:36 PM (reads: 430, responses: 0)
You are right that it shouldn't so that it would agree with the documentation.

The reason it currently works that way is that code is shared between display_matrix and display_matrix_mm. The former is allowed to have ans_rule's in it, and I think they cause a problem if they are not in math mode. Off hand, that's the only reason I can think of for why the mbox is there. I'll take a look at it.

John

<| Post or View Comments |>


userJohn Jones - Re: display_matrix_mm  blueArrow
8/23/2005; 7:58:34 PM (reads: 418, responses: 0)
I changed the cvs version of PGmatrixmacros.pl so that display_matrix_mm should act in accordance with its documentation, so there is no mbox when it is called. But, if you call display_matrix, then each entry has to be put in math mode individually, which is what the examples in the documentation already showed.

John

<| Post or View Comments |>