[system] / trunk / pg / lib / Parser / Context / Default.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Parser/Context/Default.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3586 Revision 3587
203# 203#
204# Special purpose contexts 204# Special purpose contexts
205# 205#
206 206
207use vars qw(%context); 207use vars qw(%context);
208use vars qw($fullContext $numericContext $complexContext 208use vars qw($fullContext $numericContext $complexContext $pointContext
209 $vectorContext $matrixContext $intervalContext); 209 $vectorContext $matrixContext $intervalContext);
210 210
211# 211#
212# The default Context 212# The default Context
213# 213#
279$vectorContext->functions->undefine('arg','mod','Re','Im','conj'); 279$vectorContext->functions->undefine('arg','mod','Re','Im','conj');
280$vectorContext->constants->replace(i=>Value::Vector->new(1,0,0)); 280$vectorContext->constants->replace(i=>Value::Vector->new(1,0,0));
281$vectorContext->constants->set(i=>{TeX=>'\boldsymbol{i}', perl=>'i'}); 281$vectorContext->constants->set(i=>{TeX=>'\boldsymbol{i}', perl=>'i'});
282 282
283# 283#
284# Point context (for symmetry)
285#
286$pointContext = $vectorContext->copy;
287
288#
284# Matrix context (square brackets make matrices in preference to points or intervals) 289# Matrix context (square brackets make matrices in preference to points or intervals)
285# 290#
286$matrixContext = $vectorContext->copy; 291$matrixContext = $vectorContext->copy;
287$matrixContext->parens->set('[' => {type => 'Matrix', removable => 0}); 292$matrixContext->parens->set('[' => {type => 'Matrix', removable => 0});
288 293
308# 313#
309%context = ( 314%context = (
310 Full => $fullContext, 315 Full => $fullContext,
311 Numeric => $numericContext, 316 Numeric => $numericContext,
312 Complex => $complexContext, 317 Complex => $complexContext,
318 Point => $pointContext,
313 Vector => $vectorContext, 319 Vector => $vectorContext,
314 Matrix => $matrixContext, 320 Matrix => $matrixContext,
315 Interval => $intervalContext, 321 Interval => $intervalContext,
316); 322);
317 323

Legend:
Removed from v.3586  
changed lines
  Added in v.3587

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9