ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: 2NUP, spreading a table on 2 pages
Date: Tue, 20 Jan 2009 17:09:28 +0100	[thread overview]
Message-ID: <B53E3905-C6DF-4AA4-91C8-B39B26F0E327@gmail.com> (raw)
In-Reply-To: <87sknevw1y.fsf@zapata.tots-ns.net>

[-- Attachment #1: booklet.tex --]
[-- Type: application/octet-stream, Size: 1203 bytes --]

\setuppapersize[A5][A4]
\setuparranging[2UP,rotated,doublesided]
\setuplayout[margin=1cm,width=middle,height=middle,topspace=0cm,backspace=1.2cm]
\setupcolors[state=start]
\showframe
\showgrid

\definetwopasslist{tableoffset}

\gettwopassdata{tableoffset}

\iftwopassdatafound
  \definelayout[\number\numexpr\twopassdata+1\relax][header=\the\dimexpr\headerheight+2\lineheight\relax]
\fi

\gettwopassdata{tableoffset}

\iftwopassdatafound
  \definelayout[\number\numexpr\twopassdata+1\relax][reset]
\fi

\setuplinetable[nx=2,width=.125\textwidth]

\definehead[tablehead][section]

\setuphead[tablehead][page=yes,before=,after=\blank]

\starttext

\dorecurse{5}
  {\section{Section #1}
   \dorecurse{2}{\input tufte\par}}

\tablehead{List des membres}

\lazysavetwopassdata{tableoffset}{1}{\pagenumber}

\startlinetable
\NC firstname \NC lastname \NC phone       \NC mobile      \NC postal code \NC city    \NC address        \NC\NR
\NC John      \NC Jonhsons \NC 0800/987654 \NC 0171/123456 \NC  12345      \NC New TeX \NC Meta street 12 \NC\NR
\stoplinetable

\lazysavetwopassdata{tableoffset}{2}{\pagenumber}

\page

\dorecurse{3}
  {\section{Section #1}
   \dorecurse{2}{\input tufte\par}}

\stoptext

[-- Attachment #2: Type: text/plain, Size: 541 bytes --]


Am 20.01.2009 um 16:25 schrieb Antoine Junod:

> In fact my reply was a bit fast: in the example below the table is
> split on pages 2 and 3. But the lines of the table are not
> aligned. I'll dig the sources too see if it's possible to do that. But
> if anyone has a solution, I'm interested :)

You can solve it with twopassdata and a few wrapper macros to hide
the underlying macros in your document. Take a look in my example
how this can be done.

You need the "arrange" key for texexec to let it work in imposition  
mode.

Wolfgang


[-- Attachment #3: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2009-01-20 16:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-20  8:20 Antoine Junod
2009-01-20  9:18 ` Diego Depaoli
2009-01-20 10:10   ` Antoine Junod
2009-01-20 11:25 ` Wolfgang Schuster
2009-01-20 12:09   ` Antoine Junod
2009-01-20 15:25     ` Antoine Junod
2009-01-20 16:09       ` Wolfgang Schuster [this message]
2009-01-21  9:16         ` Antoine Junod
2009-01-21 10:02           ` Wolfgang Schuster

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=B53E3905-C6DF-4AA4-91C8-B39B26F0E327@gmail.com \
    --to=schuster.wolfgang@googlemail.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).