[NTG-context] Shift tabulate into margin and center
Tim Steenvoorden
tim.steenvoorden at gmail.com
Tue May 5 09:05:41 CEST 2020
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 at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200505/c1a47f99/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-tabulate.pdf
Type: application/octet-stream
Size: 14590 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200505/c1a47f99/attachment-0001.obj>
More information about the ntg-context
mailing list