ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* recursion in a table
@ 2022-05-01 18:43 Henning Hraban Ramm via ntg-context
  2022-05-02  0:30 ` Aditya Mahajan via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-05-01 18:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm

Hi,
I was playing with the example from 
https://wiki.contextgarden.net/Scaling_Rotating_Mirroring_Clipping#Location_parameter 
and tried to put it in a tabulate:


\useMPlibrary[dum]
\setupexternalfigures[width=3em,height=2em,frame=on,]

%\def\TXT{\ruledhbox{\bf(XyX)}}
\def\TXT{\externalfigure[pic]}

\starttabulate[|l|l|l|l|l|l|]
     \NC\NC normal\NC depth\NC fit\NC broad\NC high\NC\NR
     \HL
\dostepwiserecurse{0}{359}{45}{%
%\expanded{\setuprotate[rotation=\recurselevel]}
     \NC{\expanded{\recurselevel}˚}%
 
\NC{\ruledhbox{X\rotate[location=normal,rotation=\recurselevel]{\TXT}X}}%
     \NC{\ruledhbox{X\rotate[location=depth,rotation=\recurselevel] 
{\TXT}X}}%
     \NC{\ruledhbox{X\rotate[location=fit,rotation=\recurselevel] 
{\TXT}X}}%
     \NC{\ruledhbox{X\rotate[location=broad,rotation=\recurselevel] 
{\TXT}X}}%
     \NC{\ruledhbox{X\rotate[location=high,rotation=\recurselevel] 
{\TXT}X}}%
   \NC\NR}
%    \HL % error
\stoptabulate


This works, but \recurselevel is always 0. I know I must expand it (like 
in the original example), but I can’t make it work within the tabulation.
In the first column, \expanded{\recurselevel} stays 0, and 
rotation=\expanded{\recurselevel} gives an error, while the \setuprotate 
line has no effect (if I remove "rotation=\recurselevel", of course).

How would that work?

Also, \HL doesn’t work at the end, and the second line of the error 
message makes no sense:
"""
I expect to see \noalign only after the \cr of an alignment.
Proceed, and I'll ignore this case.
mtx-context     | fatal error: return code: 1
"""

Hraban
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-02  7:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-01 18:43 recursion in a table Henning Hraban Ramm via ntg-context
2022-05-02  0:30 ` Aditya Mahajan via ntg-context
2022-05-02  7:16   ` Hans Hagen via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).