[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] .mk/.rt not work across a page?
From: |
Mike Bianchi |
Subject: |
Re: [Groff] .mk/.rt not work across a page? |
Date: |
Thu, 4 Sep 2014 11:25:22 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Sep 04, 2014 at 03:35:25PM +0100, Anton Shterenlikht wrote:
> >Date: Thu, 4 Sep 2014 12:31:09 +0200 (CEST)
> >From: Carsten Kunze <address@hidden>
> >To: address@hidden
> >
> >You could try
> >
> >.mk A
> >
> >and on the next page
> >
> >.sp |\nA
> >
> >(have not tested that.)
>
> In UNIX Text Processing, p. 462, the advice is
>
> .mk Q
> .sp |\nQu
>
> Neither your form nor theirs (with "u" at the end) work.
> I guess this is because this feature is used
> to affect vertical position on a single page,
> not across pages.
>
> Anton
If you are doing this at the top a page, the "no-space mode" is probably turned
on. See .ns and .rs in man 7 groff .
In theory, issuing an .rs should make it work, but I find with the mm
macros it is not reliable.
Rather than figuring out precisely why it doesn't alway work, I just output
a \& (Non-printable, zero-width glyph) which seems to reliably cancel the
no-space mode and then it does work. E.g.
\&
.nr Q 0.5i
.sp |\n[Q]u
Hi there
(I put all my register, string and character references inside [ ] so they
stand out. Just a matter of style.)
Give it a try.
I used:
groff -mm /tmp/i | gv -
for these experiments.
>> Gurus of groff internals << look at this!
Using MM macros.
\&
.nr Q \n[.ns]
.sp |0.5i
Q = \n[Q]
prints
Q = 1
That says to me "no-space mode is ON". Yes?
Now
.rs
.nr Q \n[.ns]
.sp |0.5i
Q = \n[Q]
Prints
Q = 0
1.0 inch down from the top edge, which is where MM normally starts normal text.
That says to me "no-space mode is OFF",
so position of the Q = [01] text is opposite of what I expect.
Am I confused about something?
Oddly, this works as expected.
.br
.rs
.nr Q \n[.ns]
.sp |0.5i
Q = \n[Q]
Prints
Q = 0
0.5 inch down from the top edge.
So there is some odd relationship between no-space and whether the line buffer
has been flushed?
What is going on?
--
Mike Bianchi
Foveal Systems
973 822-2085
address@hidden
http://www.AutoAuditorium.com
http://www.FovealMounts.com
Re: [Groff] .mk/.rt not work across a page?, Ralph Corderoy, 2014/09/04