diff --git a/macros/contexts/contextInequalities.pl b/macros/contexts/contextInequalities.pl index 6f3d134e4..6f6b89ebd 100644 --- a/macros/contexts/contextInequalities.pl +++ b/macros/contexts/contextInequalities.pl @@ -890,7 +890,8 @@ package Inequalities::Set; sub string { my $self = shift; my $equation = shift; - my $x = $self->{varName} || ($self->context->variables->names)[0]; + my $context = $self->context; + my $x = $self->{varName} || ($context->variables->names)[0]; $x = $context->{variables}{$x}{string} if defined $context->{variables}{$x}{string}; my @coords = (); foreach my $a (@{ $self->data }) { @@ -908,7 +909,8 @@ sub string { sub TeX { my $self = shift; my $equation = shift; - my $x = $self->{varName} || ($self->context->variables->names)[0]; + my $context = $self->context; + my $x = $self->{varName} || ($context->variables->names)[0]; $x = $context->{variables}{$x}{TeX} if defined $context->{variables}{$x}{TeX}; $x =~ s/^([^_]+)_?(\d+)$/$1_{$2}/; my @coords = ();