ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Marco Patzer via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Marco Patzer <lists@homerow.info>
Subject: Space before/after combinations + centring
Date: Wed, 17 Nov 2021 16:54:46 +0100	[thread overview]
Message-ID: <20211117165446.5f61d188@homerow> (raw)

Hi!

I'm in the process of converting some projects to LMTX. Combinations
lacking “”before” and “after” keys (that place content before/after
the *entire* combination, rather than the individual cell pairs), I
came up with the following ugliness – which worked for longer than
it deserved:

\unprotect

\unexpanded\def\startcombination
  {\blank[halfline]%%
   \startalignment[middle]%%
   \dontleavehmode
   \bgroup
   \pack_combinations_push
   \dodoubleempty\pack_combinations_start}

\unexpanded\def\stopcombination
  {\bgroup\normalexpanded{\egroup{}\ntimes{{}{}}\c_pack_combinations_y}% brr
   \dostoptagged
   \egroup
   \pack_combinations_pop
   \egroup
   \stopalignment
   \goodbreak\blank[halfline]}

\protect

\starttext
  \startcombination [2*2]
    \startcontent foo \stopcontent \startcaption 1 \stopcaption
    \startcontent bar \stopcontent \startcaption 2 \stopcaption
  \stopcombination
\stoptext

I added vertical spacing and mid-aligned the content without having
to change the sources, that was the idea. However, this fails in
LMTX:

  Undefined control sequence \pack_combinations_start

Does LMTX offer finer control over the combinations or do I have to
rewrite the sources files (to either use floats or surround the
combinations with the required commands)?

Marco

LMTX: current version: 2021.11.16 22:36
___________________________________________________________________________________
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:[~2021-11-17 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 15:54 Marco Patzer via ntg-context [this message]
2021-11-17 19:17 ` Wolfgang Schuster via ntg-context
2021-11-17 22:50   ` Marco Patzer via ntg-context
2021-11-18  7:57     ` 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=20211117165446.5f61d188@homerow \
    --to=ntg-context@ntg.nl \
    --cc=lists@homerow.info \
    /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).