From: Gerion Entrup <gerion.entrup@flump.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: [NTG-context] Re: How to specify a default formatting for TABLE
Date: Tue, 02 Jul 2024 00:23:06 +0200 [thread overview]
Message-ID: <4358478.ejJDZkT8p0@falbala> (raw)
In-Reply-To: <34663299-e8db-9bfe-f2ec-8a908366588a@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2015 bytes --]
Am Dienstag, 2. Juli 2024, 00:17:36 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 01.07.2024 um 23:56:
> > Hi,
> >
> > I want to format a bunch a tables with the same formatting.
> > It seems that specifying the \setupTABLE commands as part of the preamble works.
> >
> > However, I need some tables that are formatted in another way.
> > Is there a generic way to specify this?
> >
> > Here is a MWE:
> > [...]
> >
> > The last two tables should be formatted as if the four setupTABLE commands in the header are not existent.
> > My solution does not work, however.
>
> 1. Put your table settings in a setups-block and load the one you want
> at the start of your table.
>
> 2. You don't need \setupcolors[state=start] because colors are enabled
> by default (since a veee...eeery long time).
>
> 3. You can replace \bTD ... \eTD with \bTH ... \eTH for table headers to
> get bold text.
>
> %%%% begin example
> \startsetups[table:a]
> \setupTABLE [each] [frame=off,width=1cm,height=1cm,align={middle,lohi}]
> \setupTABLE [each] [background=color,backgroundcolor=lightgray]
> \stopsetups
>
> \startsetups[table:b]
> \setupTABLE [each]
> [frame=off,width=2cm,height=1.2\lineheight,align=middle]
> \setupTABLE [each] [topframe=on,bottomframe=on]
> \stopsetups
>
> \starttext
>
> \bTABLE
> \bTR
> \bTD A \eTD
> \bTD B \eTD
> \eTR
> \bTR
> \bTD C \eTD
> \bTD D \eTD
> \eTR
> \eTABLE
>
> \blank
>
> \bTABLE[setups=table:a]
> \bTR
> \bTD A \eTD
> \bTD B \eTD
> \eTR
> \bTR
> \bTD C \eTD
> \bTD D \eTD
> \eTR
> \eTABLE
>
> \blank
>
> \bTABLE[setups=table:b]
> \bTR
> \bTD A \eTD
> \bTD B \eTD
> \eTR
> \bTR
> \bTD C \eTD
> \bTD D \eTD
> \eTR
> \eTABLE
>
> \stoptext
> %%%% end example
>
> Wolfgang
Thank you very much! That are a bunch of nice tricks. The setups environment is really powerful.
I will actively search for this keyword in the documentation next time.
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
___________________________________________________________________________________
prev parent reply other threads:[~2024-07-01 22:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 21:56 [NTG-context] " Gerion Entrup
2024-07-01 22:17 ` [NTG-context] " Wolfgang Schuster
2024-07-01 22:23 ` Gerion Entrup [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=4358478.ejJDZkT8p0@falbala \
--to=gerion.entrup@flump.de \
--cc=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).