ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Henning Hraban Ramm <texml@fiee.net>
Subject: [NTG-context] Re: MetaPost lines in tables?
Date: Mon, 19 Feb 2024 23:15:37 +0100	[thread overview]
Message-ID: <d58ef5b3-0624-5321-3b34-ff25d7986ef8@gmail.com> (raw)
In-Reply-To: <814993ec-2966-4f08-ab0e-2aae1a8c2ae8@fiee.net>

Henning Hraban Ramm schrieb am 19.02.2024 um 22:39:
> I guess I asked this a while ago, but I can’t find an answer:
> Is it possible to replace the lines of a TABLE with my own MetaPost 
> graphics?
> 
> ATM I’m trying to place my MP lines behind a frame-less TABLE; it will 
> probably work, but it’s a crutch…

The example below draws a custom border for the whole cell but you're 
free to draw only certain sides (leftboundary etc. helps) but don't 
forget to set the boundary box for the graphic (OverlayBox is the size 
of the cell).

%%%% begin example
\startuseMPgraphic{dottedborder}
   draw OverlayBox withpen pencircle scaled 2 dashed withdots withcolor 
"red";
\stopuseMPgraphic

\defineoverlay[dottedborder][\useMPgraphic{dottedborder}]

\starttext

\bTABLE[frame=off,background=dottedborder]
   \bTR
     \bTD Hello Table! \eTD
   \eTR
\eTABLE

\stoptext
%%%% end example

Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2024-02-19 22:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 21:39 [NTG-context] " Henning Hraban Ramm
2024-02-19 22:15 ` Wolfgang Schuster [this message]
2024-02-21 18:04   ` [NTG-context] " Henning Hraban Ramm
2024-02-21 18:43     ` Wolfgang Schuster
2024-02-21 18:47       ` Henning Hraban Ramm
2024-02-22 17:35         ` Hans Hagen via ntg-context
2024-02-22 18:12           ` Henning Hraban Ramm

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=d58ef5b3-0624-5321-3b34-ff25d7986ef8@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=texml@fiee.net \
    /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).