ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan via ntg-context <ntg-context@ntg.nl>
To: Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl>
Cc: Aditya Mahajan <adityam@umich.edu>
Subject: Re: recursion in a table
Date: Sun, 1 May 2022 20:30:11 -0400 (EDT)	[thread overview]
Message-ID: <nycvar.YAK.7.78.908.2205012025570.213641@nqv-guvaxcnq> (raw)
In-Reply-To: <bb78221b-2e94-0c9d-da31-d5d86bddedec@fiee.net>

[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]

On Sun, 1 May 2022, Henning Hraban Ramm via ntg-context wrote:

> 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}˚}%

Untested, but I think that you might need:

\expanded{\NC \recurselevel \noexpand\NC ... }

> 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?

Remind me of a more-than-a-decade-old discussion on the mailing list, summarized here:

https://adityam.github.io/context-blog/post/tex-programming/

> Also, \HL doesn’t work at the end, and the second line of the error 
> message makes no sense:

I find that in such cases, using Lua (CLD) is the simplest solution

Aditya

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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	other threads:[~2022-05-02  0:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-01 18:43 Henning Hraban Ramm via ntg-context
2022-05-02  0:30 ` Aditya Mahajan via ntg-context [this message]
2022-05-02  7:16   ` Hans Hagen via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YAK.7.78.908.2205012025570.213641@nqv-guvaxcnq \
    --to=ntg-context@ntg.nl \
    --cc=adityam@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).