ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: Angel M Alganza via ntg-context <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: Re: Auto width and height on table cells
Date: Thu, 30 Jun 2022 08:16:53 +0200	[thread overview]
Message-ID: <4c830a7d-f1c5-5eaa-c019-c950972e82e1@xs4all.nl> (raw)
In-Reply-To: <Yr03/xwD8ms0q/ui@zombi.ugr.es>

On 6/30/2022 7:43 AM, Angel M Alganza via ntg-context wrote:
> Hello,
> 
> I want some tables to occupy 100% of \textwidth and \textheight and for
> all columns to be the same width except one or two that I want to
> specify and for all rows to be the same height except for one or two,
> that I want to specify as well..
> For the moment, I'm doing it "manually", calculating column width as
> 
>    (\textwidth - width of fixed columns) / # rest of columns
> 
> and row height as
> 
>    (\textheight - height of fixed rows) / # rest of rows
> 
> I'm getting the result that I want, but it's a bit tedious.
> 
> Is it possible to have ConTeXt do all those calculations for me?
> I haven't been able to figure it out from the manuals and the wiki.
\starttext

\startxtable[option=stretch]
    \startxrow
        \startxcell[width=3cm,option=fixed] one \stopxcell
        \startxcell two \stopxcell
        \startxcell three \stopxcell
    \stopxrow
    \startxrow
        \startxcell a \stopxcell
        \startxcell b \stopxcell
        \startxcell c \stopxcell
    \stopxrow
\stopxtable

\stoptext


-----------------------------------------------------------------
                                           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	other threads:[~2022-06-30  6:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30  5:43 Angel M Alganza via ntg-context
2022-06-30  6:16 ` Hans Hagen via ntg-context [this message]
2022-06-30  6:40   ` Angel M Alganza via ntg-context
2022-06-30  7:02     ` Henning Hraban Ramm via ntg-context
2022-06-30  7:22       ` Angel M Alganza via ntg-context
2022-06-30  7:36         ` Hans Hagen via ntg-context
2022-06-30  7:46           ` Angel M Alganza via ntg-context
2022-06-30  8:26             ` Hans Hagen via ntg-context
2022-06-30  8:37               ` Angel M Alganza via ntg-context
2022-06-30 14:15             ` Pablo Rodriguez via ntg-context
2022-06-30 16:10               ` Angel M Alganza via ntg-context
2022-06-30 16:44                 ` Pablo Rodriguez via ntg-context
2022-06-30 10:12           ` Henning Hraban Ramm via ntg-context
2022-06-30 10:25             ` Angel M Alganza 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=4c830a7d-f1c5-5eaa-c019-c950972e82e1@xs4all.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@xs4all.nl \
    /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).