ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Table and rotation: push together 45 degree rotated cells
@ 2024-09-17 18:36 Gerion Entrup
  2024-09-18 12:44 ` [NTG-context] " Gerion Entrup
  0 siblings, 1 reply; 10+ messages in thread
From: Gerion Entrup @ 2024-09-17 18:36 UTC (permalink / raw)
  To: ntg-context list


[-- Attachment #1.1: Type: text/plain, Size: 1541 bytes --]

Hi,

I want to typeset a table where some of the column headings are really long, while in the columns itself consists only of numbers.
Therefore, my idea was to rotate the column headings but not 90 degrees (I found some solutions for that) but 45 degree.

It then would be beneficial to push together the rotated cells, so the text of one cell actually starts above the previous cell.
Do you know, how to achieve that?

Here is a minimal example:
```
\startsetups[table:rotated]
	\setupTABLE[frame=off]
	\setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}]
	\setupTABLE[row][2][align=flushright]
\stopsetups

\starttext
\define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]}
\bTABLE[setups=table:rotated]
	\bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European turtle dove} \eTD \eTR
	\bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD \bTD \digits{2} \eTD \eTR
\eTABLE
\stoptext
```
I would like to achieve that the text "Mexican redknee tarantula" is typeset right and above of "Water buffalo" so that the single columns have a width that is similar to the width of the single digit coming in the second row.

Another question in this context: Is is possible to specify a \setupTABLE command that works for column 2-4 starting from row 2?
Something like \setupTABLE[row][2-][column][2,3,4][background=color, backgroundcolor=red].
In this example this would cover all numbers but nothing else.

Best
Gerion

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-09-19 18:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-17 18:36 [NTG-context] Table and rotation: push together 45 degree rotated cells Gerion Entrup
2024-09-18 12:44 ` [NTG-context] " Gerion Entrup
2024-09-18 20:53   ` Wolfgang Schuster
2024-09-18 21:33     ` Hans Hagen
2024-09-18 22:19     ` Gerion Entrup
2024-09-19  5:54       ` Mikael Sundqvist
2024-09-19  7:35         ` Hans Hagen via ntg-context
2024-09-19 11:03           ` Gerion Entrup
2024-09-19 14:44             ` Hans Hagen
2024-09-19 18:17               ` Gerion Entrup

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).