groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-columns in ms


From: G. Branden Robinson
Subject: Re: Multi-columns in ms
Date: Sat, 29 Apr 2023 17:07:05 -0500

Hi Oliver,

At 2023-04-29T23:02:44+0200, Oliver Corff wrote:
> groff_ms(7) states that "All of them (i.e. .1C, .2C and .MC) force a
> page break if a multi-column mode is already set. However, if the
> current mode is single-column, starting a multi-column mode does _not_
> force a page break.
> 
> So,
> 
> .2C
> 
> Does not force a page break here, assuming that the text was in
> one-column mode, but
> 
> .1C
> 
> *does* force a page break.
> 
> Is there any chance to override that behaviour, e.g. if I want to
> split my text into two short columns (think a picture in the left
> column and some text with the picture in the right column)?

There's no inherent support for this.  It afflicts multiple macro
packages, though I don't know what mom(7) does.

The problem is that it is hard to say under that circumstance what the
right thing to do is if a footnote happens inside the multi-column area.
Dave Kemper and I have discussed this extensively in the venue of
several groff Savannah bugs regarding me(7).

Should the multi-column area have its own little footnote region before
single-column resumes?  Or should footnotes within the multi-column area
be saved until it's time to emit them after returning to single-column
mode?  Different authors are likely to answer differently.

The latter approach in particular presents challenges; footnote text is
formatted at the time the footnote mark occurs, but in a diversion.
When the page bottom is reached, a trap is sprung that causes the
footnote text's diversion to be emitted.

At the line length for which it was formatted.

Which is not the one that is applicable anymore.

> After ending the two-column mode, I want to contine on the same page.

I don't think any of the "classical" macro packages address this
scenario.  Maybe mom(7) does.

Maybe a solution would be to alter footnote macros, or provide an
alternative set of them, to store footnote text in a macro rather than a
diversion.  This could be an interesting challenge (not one I'm anxious
to undertake, though.)

> Also, how do I force a column to break? .bp forces a page break, it
> does not break a column.

This is something of an ms(7) FAQ and maybe I should add it to our
documentation.

Tell the formatter you "need" a ridiculous amount of vertical space,
where "ridiculous" is the length of your page, or more.  This will force
a column (or page) break.  The excess requested space is discarded.

.ne 200i

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]