Re: "mom": How to transition from two columns back to one?

2019-12-23 Thread Peter Schaffter
Steve --

On Mon, Dec 23, 2019, Steve Ross wrote:
> As a follow-up question, and after the above commands, why does
>      \n[#DOC_L_LENGTH]
> return the value of DOC_L_LENGTH (e.g., 468000) in machine units while,
> for example, both
>      \n[#LL]
> and
>      \n[LL]
> return the value of zero? 
> And likewise for, for example,
>      \n[#QUOTE_INDENT]
> and
>      \n[QUOTE_INDENT]
> I think that I don't understand how to access the LL and 
> QUOTE_INDENT registers.

They return zero because mom doesn't set any of these registers.
The register set by '.LL' is \n[#L_LENGTH].
The register set by '.QUOTE_INDENT n' or '.QUOTE_STYLE INDENT n'
is \n[#Q_OFFSET_VALUE].

Unless you're doing something fancy, there's no need to access
directly any of mom's registers.  Registers used by mom are entirely
set via macros.  Fundamental to mom's design is moving everything into
macro space, as opposed to the classical macro sets, which require
manipulating registers and strings at the groff request level.

-- 
Peter Schaffter
http://www.schaffter.ca



Re: "mom": How to transition from two columns back to one?

2019-12-17 Thread Peter Schaffter
Steve --

On Tue, Dec 17, 2019, Steve Ross via wrote:
> Is there a way in "mom" to force it to (more or less) evenly fill
> both columns with text and then exit back to a single column mode?

Yes and no. :)

It's a little hard to grasp precisely what you want from your ASCII
representation, but assuming a page that has 2-column text at the
top with some single-column, full-measure text underneath, you first
have to balance the columns yourself using .COL_NEXT or .COL_BREAK.

At the spot you want to break out of column mode, enter

  .SP
  .rr #COLUMNS
  .L_MARGIN \n[#DOC_L_MARGIN]u
  .LL \\n[#DOC_L_LENGTH]u

Subsequent text will be over the full measure.

If you wish to return to 2-column mode *on the same page*, enter

  .SP
  .nr #COLUMNS 1
  .nr #COL_NUM 1
  .L_MARGIN \n[#DOC_L_MARGIN]u
  .LL \n[#COL_L_LENGTH]u
  .COL_MARK

If you wish to *break to a new page* after the full-measure text and
reinstate 2-column mode,

  .nr #COLUMNS 1
  .nr #COL_NUM 1
  .LL \n[#COL_L_LENGTH]u
  .NEWPAGE
  .rr #NEWPAGE

-- 
Peter Schaffter
http://www.schaffter.ca



Re: "mom": How to transition from two columns back to one?

2019-12-17 Thread Bjarni Ingi Gislason
On Tue, Dec 17, 2019 at 05:39:41PM +, Steve Ross via wrote:
> Groff Mailing List,
> I'm a new user of "groff" and "mom", so please let me know if this is not the 
> appropriate forum for my question...
> With version 2.4 of the "mom" macro package, and in its "document processing" 
> mode (as opposed to the "typesetting mode"), I would like to put the majority 
> of my document in two columns, but then exit back to one column before adding 
> more text.  So, the last page would look something like this:
>  __/|                         
>                         ||                                                  
> || First column of text.    Second column of text.  || First column of text.  
>   Second column of text.  |
> | First column of text.    Second column of text.  |
> | First column of text.    Second column of text.  |
> | First column of text.    Second column of text.  |
> |                                                  || Another line of text 
> which is now in one column  || rather than two.                               
>   ||                                                  |
> |                                                  |
> |__|
> 
> Is there a way in "mom" to force it to (more or less) evenly fill both 
> columns with text and then exit back to a single column mode?
> Thanks in advance for any direction,-- Steve Ross

  I have never used "mom" but the procedure should be the same in all
searches.

  I assume you are looking for the macro that changes the formatting
from a two column format to the (usual) one column format.

1) look at the man page and search for relevant terms.

  Found nothing that fulfils the criteria.

  One description of a macro could be the right one.

2) search other documentation named in the man page.

  Found.

  So the mom man page in groff is missing the relevant term.

-- 
Bjarni I. Gislason