| … | |
… | |
| 117 | |
117 | |
| 118 | |
118 | |
| 119 | =cut |
119 | =cut |
| 120 | |
120 | |
| 121 | |
121 | |
| 122 | sub display_matrix{ # will display a matrix in tex format. |
122 | sub display_matrix_mm{ # will display a matrix in tex format. |
| 123 | # the matrix can be either of type array or type 'Matrix' |
123 | # the matrix can be either of type array or type 'Matrix' |
| 124 | # my $ra_matrix = shift; |
124 | # my $ra_matrix = shift; |
| 125 | # my $out=''; |
125 | # my $out=''; |
| 126 | # if (ref($ra_matrix) eq 'Matrix' ) { |
126 | # if (ref($ra_matrix) eq 'Matrix' ) { |
| 127 | # my ($rows, $cols) = $ra_matrix->dim(); |
127 | # my ($rows, $cols) = $ra_matrix->dim(); |
| … | |
… | |
| 157 | # } else { |
157 | # } else { |
| 158 | # warn "The input" . ref($ra_matrix) . " doesn't make sense as input to display_matrix. "; |
158 | # warn "The input" . ref($ra_matrix) . " doesn't make sense as input to display_matrix. "; |
| 159 | # } |
159 | # } |
| 160 | # $out; |
160 | # $out; |
| 161 | |
161 | |
| 162 | return displaymat(@_, 'force_tex'=>1); |
162 | return display_matrix(@_, 'force_tex'=>1); |
| 163 | } |
163 | } |
| 164 | |
164 | |
|
|
165 | sub display_matrix_math_mode { |
|
|
166 | return display_matrix_mm(@_); |
|
|
167 | } |
|
|
168 | |
| 165 | sub displaymat { |
169 | sub display_matrix { |
| 166 | my $ra_matrix = shift; |
170 | my $ra_matrix = shift; |
| 167 | my %opts = @_; |
171 | my %opts = @_; |
| 168 | set_default_options(\%opts, |
172 | set_default_options(\%opts, |
| 169 | '_filter_name' => 'displaymat', |
173 | '_filter_name' => 'displaymat', |
| 170 | 'force_tex' => 0, |
174 | 'force_tex' => 0, |