ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Tim Steenvoorden <tim.steenvoorden@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Shift tabulate into margin and center
Date: Tue, 5 May 2020 09:05:41 +0200	[thread overview]
Message-ID: <93d618d2-450b-43b3-9c37-ac584be95013@Spark> (raw)
In-Reply-To: <2950d4bf-8358-43ac-baec-d8b6854ab2d6@Spark>


[-- Attachment #1.1: Type: text/plain, Size: 1650 bytes --]

Hi all,

Apparently the solution does not work with multiple blocks on the same page. Table floats get ill aligned and frame rules are drawn double (see attachment). How should I fix this?

Cheers,
Tim
On 4 May 2020, 20:42 +0200, Tim Steenvoorden <tim.steenvoorden@gmail.com>, wrote:
> Hi all,
>
> I’ve a page layout with a broad left margin. I’d like to create frames in the text which utilize the margin and the typearea with centered contents. I managed to do this with the following code, but I wonder if there is an easier and more elegant way to do this in ConTeXt, especially the centering of the tabulation.
>
> Cheers,
> Tim
>
>
> \startproduct test-tabulate
>
> \setuppapersize[B5]
> \setuplayout
> [backspace=13pc,
> leftmargin=8pc,
> leftmargindistance=1pc,
> width=24.5pc,
> rightmargin=0pc,
> %%
> topspace=4pc,
> header=0pc,
> height=49pc,
> footer=0pc,
> bottomdistance=2.5pc,
> bottom=1pc,
> location=middle]
>
> \define\fullwidth{\dimexpr(\leftmargindistance+\leftmarginwidth+\textwidth)}
>
> \section{First}
> \subsection{First first}
>
> \input tufte
>
> \setupnarrower[left=-9pc]
> \startnarrower[left]
> \startframedtext[frame=off,topframe=on,bottomframe=on,align=middle,width=\fullwidth]
> The whole frame should be shifted to the left.
> As the text, this table should centered in the box.
> \placefigure[none,force]{}
> \starttabulate[|l|r|]
> \NC 0 \NC 1 \NR
> \NC 2 \NC 3 \NR
> \NC 4 \NC 5 \NR
> \NC 6 \NC 7 \NR
> \NC 8 \NC 9 \NR
> \stoptabulate
> \startformula
> E=mc^2
> \stopformula
> \stopframedtext
> \stopnarrower
>
> \input tufte
>
> \stopproduct
>

[-- Attachment #1.2: Type: text/html, Size: 6206 bytes --]

[-- Attachment #2: test-tabulate.pdf --]
[-- Type: application/octet-stream, Size: 14590 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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:[~2020-05-05  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a41b220e-e6f8-4fc7-b91c-6af76fd4c561@Spark>
2020-05-04 18:42 ` Tim Steenvoorden
2020-05-05  7:05   ` Tim Steenvoorden [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=93d618d2-450b-43b3-9c37-ac584be95013@Spark \
    --to=tim.steenvoorden@gmail.com \
    --cc=ntg-context@ntg.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).