groff
[Top][All Lists]
Advanced

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

Re: TAB character in groff output


From: G. Branden Robinson
Subject: Re: TAB character in groff output
Date: Tue, 2 Aug 2022 10:39:16 -0500

At 2022-08-02T14:14:58+0200, Alejandro Colomar wrote:
> I'd like to be able to produce ASCII HT ('\t' - horizontal tab) in man
> pages output.  I don't want to align things; I do want a tab
> character. Rationale: examples in fstab(5).
> 
> Is that possible?  I didn't find anything in groff_char(7).

As I understand it, this can't be done portably across output drivers
(PostScript, terminals, HTML).

Recall the broad variety of terminals in existence; they may not
necessarily support tabs (though many do), and those that do don't
necessarily use an ASCII tab character to move between them.  That's a
formatting concern, like carriage returns and line feeds.

Further, the very idea of a "tab stop" is not essential for a device
capable of general and precise positioning, like a plotter, or a page
description language (PostScript, PDF).

Are you trying to ensure that copy-and-paste will work?  I don't think
that's feasible.

What the groff documentation often does is use a right arrow special
character to indicate a tab, and tells the user so.

doc/ms.ms-.PP
doc/ms.ms-In this document,
doc/ms.ms:a right arrow (\[->]) is used to indicate a tab character in the 
input.
doc/ms.ms-.
doc/ms.ms-.

You can tell grotty(1) to use explicit tab characters instead of spaces
for motion to the next tab stop, but that requires a command-line
option.  A man page has no control over that, nor even if grotty(1) will
be the output driver.

Can you elucidate your objective?  Why do you want a tab character?

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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