On 6/4/2021 10:15 AM, Ajith R wrote:
Hi all,

I am new to context and need help in solving an error.

I am trying to print some numbers in a grid onto a transparent sheet as mirror images so 
that the numbers are correctly displayed when I view it from the non printed side. The 
numbers have a particular sequence which cannot be obtained from calculations. So, they 
are stored in an array of strings : l[0][0] := "38"; ...

I place them at the centre of the grid squares using the code below:

for i= 0 upto (row - 1):
for j= 0 upto (col - 1):
middle := 0.5[((( i * unit) + lm), ((j * unit) +  bm)), ((((i+1) * unit) + lm), 
(((j +1) * unit) +  bm))];
p := thelabel(l[j][i], middle);
draw p;

% q := p reflectedabout (0.5[urcorner p, ulcorner p], 0.5[lrcorner p, llcorner 
p]);
% draw q;
endfor
endfor

This works as expected. But, when I try to reflect the label by means of the 
commented code, I get an error :

tex error       > mp error on line 643 in file 
/home/ajith/Desktop/PlayGround/numgrid.tex:


(xpart T_,ypart T_,-0.00581xpart T_+0.00497ypart T_+0.15294,-0.00497xpart T_
-0.00581ypart T_+0.98824,-0.00497xpart T_-0.00581ypart T_+0.98825,0.00581xpart
T_-0.00497ypart T_-0.15294)
! Transform components aren't all known.
<to be read again>
;
<for(0)> ...lcorner.p];q:=p.reflectedabout(uq,lq);
draw.p; ENDFOR
<for(0)> ...=p.reflectedabout(uq,lq);draw.p;endfor
ENDFOR
<*> ...lectedabout (uq, lq); draw p; endfor endfor
StopPage ; ;
I'm unable to apply a partially specified transformation
except to a fully known pair or transform.
Proceed, and I'll omit the transformation.


I tried a mock example without the loops and that didn't throw an error.

How can I make it work within the loops?
In order answer that you have to make a MWE that we can run without the need to edit a file.

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to