ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: Re: rotated headers in natural tables
Date: Fri, 17 Mar 2023 14:03:44 +0100	[thread overview]
Message-ID: <7163f406-713b-b948-bef2-743339f3baa8@gmail.com> (raw)
In-Reply-To: <6d711cbf-fd4b-c0b1-d36c-4599c12db912@fiee.net>

Henning Hraban Ramm via ntg-context schrieb am 15.03.2023 um 19:15:
> Hi!
>
> In my table, I want the header texts to be 90˚ rotated and aligned to 
> the bottom of their cell. I couldn’t find an option to do that.
> Tried \dontleavehmode or \hfill in my \RtH macro to no avail.
> Is it possible?
>
>
> \define[1]{\RtH}{\rotate{#1}}
>
> \starttext
>
> \setupTABLE[offset=3pt]
> \setupTABLE[header][background=color,backgroundcolor=yellow,align=bottom]
> \bTABLE
> \bTABLEhead
> \bTR \bTH\RtH{animal}\eTH \bTH\RtH{size}\eTH \bTH\RtH{weight}\eTH 
> \bTH\RtH{average speed}\eTH \eTR

You can change the vertical alignment in a framed (and therefore also
natural tables and extreme tables) with align=high, align=low and 
align=lohi.

\bTR[align={middle,low},strut=no]
     \bTH \dontleavehmode\rotate{animal} \eTH
     \bTH \dontleavehmode\rotate{size} \eTH
     \bTH \dontleavehmode\rotate{weight} \eTH
     \bTH \dontleavehmode\rotate{average speed} \eTH
\eTR

\dontleavehmode is only needed when you set horizontal alignment
(align=middle) and strut=no ensures there is no extra space at the bottom
of the cells (remove the setting to see the difference).

Wolfgang

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

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

      parent reply	other threads:[~2023-03-17 13:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 18:15 Henning Hraban Ramm via ntg-context
2023-03-15 22:27 ` fv leung via ntg-context
2023-03-20 19:22   ` Henning Hraban Ramm via ntg-context
2023-03-15 23:32 ` Bruce Horrocks via ntg-context
2023-03-17 13:03 ` Wolfgang Schuster via ntg-context [this message]

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=7163f406-713b-b948-bef2-743339f3baa8@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.com \
    /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).