[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Graph Spanning Columns
From: |
Ted Harding |
Subject: |
Re: [Groff] Graph Spanning Columns |
Date: |
Sat, 14 May 2011 22:55:08 +0100 (BST) |
On 14-May-11 21:09:05, Paul O'Leary McCann wrote:
> I'm writing a paper in two-column format, but I have one
> large graph (generated with grap) with a caption that I'd
> like to span both columns.
> I was originally using the ms macros and I assumed that by
> using a display with BD I could get what I wanted, but I
> couldn't get it working.
>
> The best I've got so far is like this:
>
> .BD
> .1C
>#graph & caption
> .2C
> .DE
>
> But this causes an immediate break and leaves the rest of
> that column blank.
>
> Using KS/KE causes the document to superimpose a lot of
> text on that page.
>
> I also tried using mm's non-breaking 1C and keeps, but these
> resulted in either another empty column or text printing
> over part of the graph.
>
> What is the proper way to get a graph to span two columns
> in a document?
> -POLM
This is a first, somewhat general, reply, pending my working
out of a proper example. The main avenues of approach depend
on how you want your text to flow past the diagram (see below).
Yes, it is (to my taste) an unfortunate quirk of the MS macros
that switching from .2C to .1C, for instance, causes a page
break. The way I usually work round this, when I want such
a switch in mid-page, is to introduce a temporary re-definition
of page length, so that the page as initiated at the top of
the page stops at the point where you want to switch.
Then you do the .1C thing (e.g. insert a graphic) and, immediately
below that, restore the page length and do another .2C.
However, if you are in 2-column text, the result will be that
that your text will go down column 1 until it reaches the
diagram, then continue at the top of column 2. Then, after
you have inserted the diagram and switched back to 2-column,
it will start in column 1 below the diagram and then continue
onto column 2 below the diagram.
That is a perfectly possible text layout, and would certainly
be suitable is the text above the diagram were the entirety
of text explaining the diagram, and the text below the diagram
were a follow-on after the diagram. The break between the two
sections of text would then be naturally filled by the diagram.
However, if you want the text to run down column 1, jump over
the duagram, and continue below the diagram still in column 1,
and then jump to the top of column 2, run down column 2, jump
over the diagram, then continue below the diagram in column 2
till it reaches the bottom of the page, then you have to approach it
differently.
What I would do (which is usally on a "per-instance" basis
without making a special macro for it) is to
[A] At the top of the page, mark the current position with .mk,
them move down a chosen distance, set a line-trap there, then
insert the diagram. The line-trap should cause a move to below
the diagram.
[B] After inserting the diagram, move back up to the top of
the page (as set by .mk) and start the text. This should
then run down column 1, hit the trap and jump to below the
diagram, and continue down column 2. Then it will move to
the top of column 2 and proceed similarly. You may need to
repeat the setting of the line-trap.
Note that at no stage has there been a switch from .2C to .1C:
this is based on the assumption (true for most methods of
inserting a diagram such as .PS for pic-style graphics,
.PSPIC or \X'ps: import ... ' for importing EPS files)
that the drawing or graphic will extend beyond the current
line-length (i.e. the length of a line of text in one of
the columns) without making any fuss about it.
You can in any case set a temporary line-length that extends
across the whole page over the space occupied by the diagram,
and then re-set it to the line-length for 2-column text.
There are various ways to work round this sort of issue,
all involving a certain amount of "bare hands" work with
groff commands.
Hoping this helps, for a start!
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 14-May-11 Time: 22:55:05
------------------------------ XFMail ------------------------------