> I had to study your example to understand it.  It looks very
> robust because, except for TS/TE, it leaves the ms macros out
> of the equation.  

That was mainly for two reasons: (a) I wanted to demonstrate the
general principle independent of any macro package, and (b) I'm
not really proficient in ms to judge what the "best practices"
would be in this case.

However, I've played around a bit and come up with a solution
using only ms macros and troff primitives officially endorsed
for use with ms, plus mark and return.  It works without
explicit diversions, at the cost of having to manually adjust
for possibly different heights of the two blocks (which might
not be an issue for you if both tables have exactly the same
height and there are no table notes).


.\" tbl ms
.\" ----------------------------------------------------------------
.nr PO 2.5c           \" page offset = left margin
.nr LL 21c-(2*\n[PO]) \" line length = page width - 2 margins
.\" ----------------------------------------------------------------
.PP
Foo bar baz foo bar baz foo bar baz foo bar baz.
Foo bar baz foo bar baz foo bar baz foo bar baz.
Foo bar baz foo bar baz foo bar baz foo bar baz.
Foo bar baz foo bar baz foo bar baz foo bar baz.
.\" ----------------------------------------------------------------
.KS
.mk
.nr LL_full \n[LL]
.nr Gutter 1c
.nr LL_half (\n[LL_full]-\n[Gutter])/2
.nr LL \n[LL_half]
.PP
.TS \" expand not needed, just for demo
center box tab(#) expand;
css
ccc
lnn.
Table 1
_
Date#Min#Max
20/09/2013#5.2#12.6
21/09/2013#4.3#11.5
22/09/2013#2.7#10.1
23/09/2013#2.5# 9.7
24/09/2013#3.4#11.6
24/09/2013#4.5#12.7
25/09/2013#5.1#13.2
.TE
.I Notes:
you can even add some table notes or perhaps a caption.
.br
.rt
.nr LL \n[LL_full]
.IP "" \n[LL_half]u+\n[Gutter]u
.TS
center box tab(#) expand;
css
ccc
lnn.
Table 2
_
Date#Min#Max
26/09/2013#6.7#14.5
27/09/2013#5.8#14.0
28/09/2013#5.5#13.7
29/09/2013#5.2#13.5
30/09/2013#5.9#114.1
\01/10/2013#6.5#15.6
\02/10/2013#7.2#16.5
.TE
.sp 2 \" space required by notes in other column
.KE
.\" ----------------------------------------------------------------
.PP
Foo bar baz foo bar baz foo bar baz foo bar baz.
Foo bar baz foo bar baz foo bar baz foo bar baz.
Foo bar baz foo bar baz foo bar baz foo bar baz.
Foo bar baz foo bar baz foo bar baz foo bar baz.

Attachment: tblsidebyside-ms.pdf
Description: Adobe PDF document

Reply via email to