Log Message:
-----------
Allow for vectors to be marked as Column Vectors.
Modified Files:
--------------
pg/lib/Parser:
List.pm
pg/macros:
Value.pl
Revision Data
-------------
Index: List.pm
===================================================================
RCS file: /webwork/cvs/system/pg/lib/Parser/List.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -Llib/Parser/List.pm -Llib/Parser/List.pm -u -r1.11 -r1.12
--- lib/Parser/List.pm
+++ lib/Parser/List.pm
@@ -216,7 +216,8 @@
$open = '\left' .$open if $open ne '';
$close = '\right'.$close if $close ne '';
foreach my $x (@{$self->{coords}}) {push(@coords,$x->TeX)}
- return $open.join(',',@coords).$close;
+ return $open.join(',',@coords).$close unless $self->{ColumnVector};
+ '\left[\begin{array}{c}'.join('\cr'."\n",@coords).'\cr\end{array}\right]';
}
#
Index: Value.pl
===================================================================
RCS file: /webwork/cvs/system/pg/macros/Value.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lmacros/Value.pl -Lmacros/Value.pl -u -r1.5 -r1.6
--- macros/Value.pl
+++ macros/Value.pl
@@ -16,6 +16,8 @@
sub Interval {Value::Interval->new(@_)}
sub Union {Value::Union->new(@_)}
+sub ColumnVector {Value::Vector->new(@_)->with(ColumnVector=>1,open=>undef,close=>undef)}
+
# sub Formula {Value::Formula->new(@_)}
#
# #
|