Vertical Space in troff

Vertical Space in troff

Post by Arnold, Jo » Sun, 18 Jul 1993 05:52:00



Hey Everbody,

I'm having a slight problem with a troff file printing correctly.
Simply put, I've got a title page for a document I've been preparing.
It's four lines long. In the file itself, I've got the following:

fz 1 16
bd 1 4
sp 15           #Therein lies the rub#
ce 4
I line1
I line2
I line3
fz 1 12
sp 2
I line4

The bold, centering, and italics work great, but I want the text
centered vertically on the page as well.  No matter what I try
(by replacing .sp 15 with any number ignominious troff requests),
The text will NOT adjust down to the center of the page.  I've even
used .LP with 15 cr-lfs, as well as doing something I'm pretty
embarrassed to confess: 15 consecutive lines with space-.br.  All
to no avail.  To give you an idea of my experience with nroff and
troff, I might consider selling my mother for WordPerfect for Unix!

I'm running SunOS 4.1.3 on a Sparc10.  I've looked at the man pages,
browsed through Answerbook, and considered taking a dive off of a
*short* cliff, maybe two feet or so.

Anyways, not really a critical problem, but one that's testing my
will.  I know I'm probably missing something really obvious and simple,
but if anyone out there has a suggestion, I'd appreciate it.

By the way, I'm using:

% troff -ms -t <filename> | lpr -t

Thanks for any input.

===================================================================

CDSI - ITS Development       ||  voice  (210) 536-3579
Brooks AFB, Texas            ||====================================
==============================/
- This is only a Test.  Had it been an actual emergency, we would
have fled in terror and you would not have been notified.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 
 
 

Vertical Space in troff

Post by Robert Hartm » Sun, 18 Jul 1993 08:36:48



>I'm having a slight problem with a troff file printing correctly.
...
>The bold, centering, and italics work great, but I want the text
>centered vertically on the page as well.  No matter what I try
>(by replacing .sp 15 with any number ignominious troff requests),
>The text will NOT adjust down to the center of the page.  

Try using an absolute vertical space request like this:

        .sp |3.5i

-r

 
 
 

Vertical Space in troff

Post by Dave Thom » Tue, 20 Jul 1993 18:18:00


Quote:>>I'm having a slight problem with a troff file printing correctly.
>...
>>The bold, centering, and italics work great, but I want the text
>>centered vertically on the page as well.  No matter what I try
>>(by replacing .sp 15 with any number ignominious troff requests),
>>The text will NOT adjust down to the center of the page.  

You might be in NO SPACE mode. Try a .rs before the .sp and
see if it makes a difference!

Dave
--

Thanks

 
 
 

Vertical Space in troff

Post by Ray Jon » Wed, 21 Jul 1993 06:58:34



Quote:>Hey Everbody,
>I'm having a slight problem with a troff file printing correctly.
>Simply put, I've got a title page for a document I've been preparing.
>It's four lines long. In the file itself, I've got the following:
>fz 1 16
>bd 1 4
>sp 15               #Therein lies the rub#
>ce 4
>I line1
>I line2
>I line3
>fz 1 12
>sp 2
>I line4
>The bold, centering, and italics work great, but I want the text
>centered vertically on the page as well.  No matter what I try
>(by replacing .sp 15 with any number ignominious troff requests),
>The text will NOT adjust down to the center of the page.  I've even
>used .LP with 15 cr-lfs, as well as doing something I'm pretty
>embarrassed to confess: 15 consecutive lines with space-.br.  All
>to no avail.  To give you an idea of my experience with nroff and
>troff, I might consider selling my mother for WordPerfect for Unix!

Using raw troff (no macro packages) you can verticle space to anywhere on
the page with
.sp |3.5i
(space to 3.5 inches from the top of the page)
However, if you are useing some of the macro packages (at least with mm
macros) this won't work by itself if the space request is the first thing on
the page.  In that case you need to print something (anything) first.  I
usually print an "unpaded space" prior to the virticle space request.  The
sequence looks like:
\0
.sp |3.5i
--

Ray A. Jones; Celestial Software       | spelling errors in this missive
8545 S.E. 68th Street                  | approaches unity. If this bothers you,
Mercer Island, WA 98040;(206) 236-1676 | run it through your spell checker!
 
 
 

Vertical Space in troff

Post by David Allso » Tue, 20 Jul 1993 18:06:07



>Hey Everbody,

>I'm having a slight problem with a troff file printing correctly.
>Simply put, I've got a title page for a document I've been preparing.
>It's four lines long. In the file itself, I've got the following:
> [stuff...]
>The bold, centering, and italics work great, but I want the text
>centered vertically on the page as well.
>The text will NOT adjust down to the center of the page.

This is a common one, is it in a FAQ somewhere? Anyway, [ntg]roff ignore
all vertical space requests until they have actually printed a character
of some sort at the top of the first page.  Thus, you need to print an
invisible character somewhere, e.g.

        ________________________________________
        |.ft R
        |\& \" this is a zero-width space
        |.sp 15
        |.ft B
        |.ce
        |TITLE TEXT
        |.ft R
        |...

BTW, if you're having trouble with ?roff, read your local documentation on
the macro packages available (mm, ms, me).  Writing vanilla troff is a
quick way to go insane...
-------------------------------------------------------------------------------

SeaChange Ltd., 1 St. George's Place,    | the standard Unix shell prompt so
York, YO2 2DT, Great Britain             | that it reads:
Tel: +44 904 611666 Fax: +44 904 610412  |     Were you sure?
-------------------------------------------------------------------------------

 
 
 

Vertical Space in troff

Post by Wolfgang Schlu » Wed, 28 Jul 1993 01:19:56




: >Hey Everbody,
: >
: >I'm having a slight problem with a troff file printing correctly.
: >Simply put, I've got a title page for a document I've been preparing.
: >It's four lines long. In the file itself, I've got the following:
: > [stuff...]
: >The bold, centering, and italics work great, but I want the text
: >centered vertically on the page as well.
: >The text will NOT adjust down to the center of the page.

: ...
just put the macro ".rs" (restore spacing) in your source file before
you call ".sp xx". This turnes off the no-space mode, which is invoked
with ".ns" in most macro packages (as far as I know).

from our man-page:

Quote:> ...The no-space mode is turned off when when a line of output occurs,
> or with ".rs"

hope that helps,
--

..!unido!marco!wolf     marco GmbH, 85221 Dachau                tel: 08131/51610
 
 
 

Vertical Space in troff

Post by Ray Jon » Fri, 30 Jul 1993 02:00:45





>: >Hey Everbody,
>: >
>: >I'm having a slight problem with a troff file printing correctly.
>: >Simply put, I've got a title page for a document I've been preparing.
>: >It's four lines long. In the file itself, I've got the following:
>: > [stuff...]
>: >The bold, centering, and italics work great, but I want the text
>: >centered vertically on the page as well.
>: >The text will NOT adjust down to the center of the page.
>: ...
>just put the macro ".rs" (restore spacing) in your source file before
>you call ".sp xx". This turnes off the no-space mode, which is invoked
>with ".ns" in most macro packages (as far as I know).

There is another way (isn't there always?) to start spacing.  In some of the
macro packages (mm I know for sure) you must print something before you can
do a verticle space.  I normally print an unpadded space as the first
character
\0
After that, you can use relative spacing
.sp 2.5i
"space down 2.5 inches", or absolute spacing.
.sp |5.25i
"space 5.25 inches down from the top of the page.
--

Ray A. Jones; Celestial Software       | spelling errors in this missive
8545 S.E. 68th Street                  | approaches unity. If this bothers you,
Mercer Island, WA 98040;(206) 236-1676 | run it through your spell checker!
 
 
 

1. How to control vertical space in itemized list?

Hi,

    I would like control the vertical space between lines in an
"itemize" list.  I would also want to make the distance between
the first "itemize" item and the previous line short.  Is there
any way to do them in LaTeX?  Any suggestion is highly appreciated.

    Best regards,

    --Chijang Huang.
==============================

2. Do you want to hack Unix ? Here's how !!!

3. dvie72 and vertical blank space

4. md5 passwords & backwards compatability

5. 1 question about n/troff error "Out of temp file space"

6. showmount for Linux?

7. Jazz Drive has space but system will says out of space

8. GNU tar source?

9. Rebinding M-space and C-space on an IBM HFT (RS6000/AIX 3.1)?

10. What is a single address space & multi address space?

11. device out of space-can't free up space

12. Kernel space to user space

13. exchange data from user space to kernel space