Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.programmer > #591 > unrolled thread

man page syntax for multiple Bold lines with no spaces between them?

Started byDavid Mathog <dmathog@gmail.com>
First post2011-05-17 12:09 -0700
Last post2011-05-17 19:36 -0700
Articles 11 — 4 participants

Back to article view | Back to comp.unix.programmer


Contents

  man page syntax for multiple Bold lines with no spaces between them? David Mathog <dmathog@gmail.com> - 2011-05-17 12:09 -0700
    Re: man page syntax for multiple Bold lines with no spaces between them? scott@slp53.sl.home (Scott Lurndal) - 2011-05-17 20:12 +0000
      Re: man page syntax for multiple Bold lines with no spaces between them? David Mathog <dmathog@gmail.com> - 2011-05-17 13:22 -0700
      Re: man page syntax for multiple Bold lines with no spaces between them? David Mathog <dmathog@gmail.com> - 2011-05-19 14:21 -0700
        Re: man page syntax for multiple Bold lines with no spaces between them? loozadroog <mijoryx@yahoo.com> - 2011-05-19 22:30 -0700
        Re: man page syntax for multiple Bold lines with no spaces between them? Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2011-05-20 13:35 +0100
          Re: man page syntax for multiple Bold lines with no spaces between them? David Mathog <dmathog@gmail.com> - 2011-05-20 08:55 -0700
            Re: man page syntax for multiple Bold lines with no spaces between them? scott@slp53.sl.home (Scott Lurndal) - 2011-05-20 22:12 +0000
    Re: man page syntax for multiple Bold lines with no spaces between them? loozadroog <mijoryx@yahoo.com> - 2011-05-17 14:50 -0700
      Re: man page syntax for multiple Bold lines with no spaces between them? David Mathog <dmathog@gmail.com> - 2011-05-17 15:32 -0700
        Re: man page syntax for multiple Bold lines with no spaces between them? loozadroog <mijoryx@yahoo.com> - 2011-05-17 19:36 -0700

#591 — man page syntax for multiple Bold lines with no spaces between them?

FromDavid Mathog <dmathog@gmail.com>
Date2011-05-17 12:09 -0700
Subjectman page syntax for multiple Bold lines with no spaces between them?
Message-ID<d7400684-a1a9-40fc-8128-74494b241242@k3g2000prl.googlegroups.com>
What is the syntax to use in a man page to achieve a format exactly
like this with no blank lines
added anywhere?

  BOLD TEXT1
  BOLD TEXT2
  BOLD TEXT3
       roman text

This method

.B BOLD TEXT1
.B BOLD TEXT2
.B BOLD TEXT3

puts an extra line between each pair of bold lines.

Thanks,

David Mathog

[toc] | [next] | [standalone]


#593

Fromscott@slp53.sl.home (Scott Lurndal)
Date2011-05-17 20:12 +0000
Message-ID<sEAAp.9364$716.6717@news.usenetserver.com>
In reply to#591
David Mathog <dmathog@gmail.com> writes:
>What is the syntax to use in a man page to achieve a format exactly
>like this with no blank lines
>added anywhere?
>
>  BOLD TEXT1
>  BOLD TEXT2
>  BOLD TEXT3
>       roman text
>
>This method
>
>.B BOLD TEXT1
>.B BOLD TEXT2
>.B BOLD TEXT3
>
>puts an extra line between each pair of bold lines.
>
>Thanks,
>
>David Mathog

\fBBoldText\fP  \fIItalicText\fP  \f(CWConstant-Width Text\fP

is the inline troff for emphasis.

scott

[toc] | [prev] | [next] | [standalone]


#594

FromDavid Mathog <dmathog@gmail.com>
Date2011-05-17 13:22 -0700
Message-ID<2652e661-2091-4a5b-9e75-53a6756a535f@r33g2000prh.googlegroups.com>
In reply to#593
On May 17, 1:12 pm, sc...@slp53.sl.home (Scott Lurndal) wrote:

> \fBBoldText\fP  \fIItalicText\fP  \f(CWConstant-Width Text\fP

Thanks, that works like a charm.

David

[toc] | [prev] | [next] | [standalone]


#622

FromDavid Mathog <dmathog@gmail.com>
Date2011-05-19 14:21 -0700
Message-ID<652a518e-ed09-4dc9-b493-80b57773238c@k15g2000pri.googlegroups.com>
In reply to#593
On May 17, 1:12 pm, sc...@slp53.sl.home (Scott Lurndal) wrote:
>
> \fBBoldText\fP  \fIItalicText\fP  \f(CWConstant-Width Text\fP

The string

\fBBold \fIItalic \fPNormal

Shows text
  Bold (in bold) Italic (in italic) Normal (in normal)

in my testing.  That's fine, but is  it always like that?
I could not find the relevant documentation to see what these
escape sequences do exactly.

Is it OK to use it as above, or should it be more HTML like, with
a close for each statement, like this:

\fBBold \fP\fIItalic \fPblah

?

Thanks,

David

[toc] | [prev] | [next] | [standalone]


#623

Fromloozadroog <mijoryx@yahoo.com>
Date2011-05-19 22:30 -0700
Message-ID<f5b928fe-bd1b-46a2-878e-cde737aeb3cb@j2g2000yqb.googlegroups.com>
In reply to#622
On May 19, 4:21 pm, David Mathog <dmat...@gmail.com> wrote:
> On May 17, 1:12 pm, sc...@slp53.sl.home (Scott Lurndal) wrote:
>
>
>
> > \fBBoldText\fP  \fIItalicText\fP  \f(CWConstant-Width Text\fP
>
> The string
>
> \fBBold \fIItalic \fPNormal
>
> Shows text
>   Bold (in bold) Italic (in italic) Normal (in normal)
>
> in my testing.  That's fine, but is  it always like that?
> I could not find the relevant documentation to see what these
> escape sequences do exactly.
>
> Is it OK to use it as above, or should it be more HTML like, with
> a close for each statement, like this:
>
> \fBBold \fP\fIItalic \fPblah
>
> ?
>
> Thanks,
>
> David

At the risk of again putting foot in mouth, I think the \escapes are
general troff features and not part of the man macros per se.
I don't think troff much cares whether you switch to roman before
switching to italic. It's probably "less efficient" by some trivial
amount.
Go with whatever makes the source more readable.

ldroog

ps.
According to man(7), font changes like .B do this:
        If no arguments are given, the command is applied to the
       following  line of text.
So this should work:
.B
BOLD TEXT1
.br
.B
BOLD TEXT2
.br
.B
BOLD TEXT3
.br

[toc] | [prev] | [next] | [standalone]


#629

FromGeoff Clare <geoff@clare.See-My-Signature.invalid>
Date2011-05-20 13:35 +0100
Message-ID<5q3ia8-ml9.ln1@leafnode-msgid.gclare.org.uk>
In reply to#622
David Mathog wrote:

> On May 17, 1:12 pm, sc...@slp53.sl.home (Scott Lurndal) wrote:
>>
>> \fBBoldText\fP  \fIItalicText\fP  \f(CWConstant-Width Text\fP
>
> The string
>
> \fBBold \fIItalic \fPNormal
>
> Shows text
>   Bold (in bold) Italic (in italic) Normal (in normal)
>
> in my testing.

Really?  It should show "Normal" in bold.

The \fP means revert to the previous font, and the font that was
previously in effect (i.e. before the \fI) was bold.

> Is it OK to use it as above, or should it be more HTML like, with
> a close for each statement, like this:
>
> \fBBold \fP\fIItalic \fPblah

It would be more usual to use:

  \fBBold\fP \fIItalic\fP blah

-- 
Geoff Clare <netnews@gclare.org.uk>

[toc] | [prev] | [next] | [standalone]


#631

FromDavid Mathog <dmathog@gmail.com>
Date2011-05-20 08:55 -0700
Message-ID<d545a697-d21c-4e70-a0f0-242cce1e1095@s41g2000prb.googlegroups.com>
In reply to#629
On May 20, 5:35 am, Geoff Clare <ge...@clare.See-My-Signature.invalid>
wrote:
> David Mathog wrote:
> > On May 17, 1:12 pm, sc...@slp53.sl.home (Scott Lurndal) wrote:
>
> >> \fBBoldText\fP  \fIItalicText\fP  \f(CWConstant-Width Text\fP
>
> > The string
>
> > \fBBold \fIItalic \fPNormal
>
> > Shows text
> >   Bold (in bold) Italic (in italic) Normal (in normal)
>
> > in my testing.
>
> Really?  It should show "Normal" in bold.

I ran that test by checking output from ManServer 1.07.  There are a
few inconsistencies between man and manserver, so I just went back and
tested it directly with man and the two were different.  The former
reverts to normal after the \fP, the latter goes to bold.  So I guess
the answer is to stick with

  \fBxxxx\fP\fIyyyy\fP

Interestingly this string:

normal \fBBold \fIItalic \fPnormal1 \fPnormal2 \fPnormal3 \fPnormal4
\fPnormal5

shows alternating bold and italic (as underlines) in man.  So \fP
picks up "last" only one level deep, where ManServer shows fonts

  normal bold italic normal normal normal normal  normal

which is, well, no levels deep, with \fP returning directly to Normal.

Thanks,

David

[toc] | [prev] | [next] | [standalone]


#633

Fromscott@slp53.sl.home (Scott Lurndal)
Date2011-05-20 22:12 +0000
Message-ID<HHBBp.2298$Ah2.2093@news.usenetserver.com>
In reply to#631
David Mathog <dmathog@gmail.com> writes:
>On May 20, 5:35=A0am, Geoff Clare <ge...@clare.See-My-Signature.invalid>
>wrote:
>> David Mathog wrote:
>> > On May 17, 1:12=A0pm, sc...@slp53.sl.home (Scott Lurndal) wrote:
>>
>> >> \fBBoldText\fP =A0\fIItalicText\fP =A0\f(CWConstant-Width Text\fP
>>
>> > The string
>>
>> > \fBBold \fIItalic \fPNormal
>>
>> > Shows text
>> > =A0 Bold (in bold) Italic (in italic) Normal (in normal)
>>
>> > in my testing.
>>
>> Really? =A0It should show "Normal" in bold.
>
>I ran that test by checking output from ManServer 1.07.  There are a
>few inconsistencies between man and manserver, so I just went back and
>tested it directly with man and the two were different.  The former
>reverts to normal after the \fP, the latter goes to bold.  So I guess
>the answer is to stick with
>
>  \fBxxxx\fP\fIyyyy\fP
>
>Interestingly this string:
>
>normal \fBBold \fIItalic \fPnormal1 \fPnormal2 \fPnormal3 \fPnormal4
>\fPnormal5
>
>shows alternating bold and italic (as underlines) in man.  So \fP
>picks up "last" only one level deep, where ManServer shows fonts

nroff(1) which is used by the man(1) command to format the manual page
will use overstriking for bold fonts and will understrike italics
(see nroff/troff technical discussion, section 2.2 in Documenters Workbench
Technical Discussion).

You can always use (on linux, YMMV):

  troff -man manual-page-source | ps2pdf - manpage.pdf

or

  tbl manual-page-source-with-tables | troff -man | ps2pdf - manpage.pdf


Then use xpdf, acroread or evince to examine the typeset manpage.

The documentation doesn't explicitly discuss the depth of the \fP stack, but
the implication is that it is only one level deep (and in the hundreds of
troff documents I've written over the last 30 years, I've never assumed that
\fP nests).

scott

[toc] | [prev] | [next] | [standalone]


#596

Fromloozadroog <mijoryx@yahoo.com>
Date2011-05-17 14:50 -0700
Message-ID<c1338231-cf01-4431-95a9-b00311f99235@d1g2000yqm.googlegroups.com>
In reply to#591
On May 17, 2:09 pm, David Mathog <dmat...@gmail.com> wrote:
> What is the syntax to use in a man page to achieve a format exactly
> like this with no blank lines
> added anywhere?
>
>   BOLD TEXT1
>   BOLD TEXT2
>   BOLD TEXT3
>        roman text
>
> This method
>
> .B BOLD TEXT1
> .B BOLD TEXT2
> .B BOLD TEXT3
>
> puts an extra line between each pair of bold lines.
>
> Thanks,
>
> David Mathog

I think if you use .B without an argument, it switches to boldface
until you switch to something else.

.B
BOLD TEXT1
.br
BOLD TEXT2
.br
BOLD TEXT3
.br
.R

[toc] | [prev] | [next] | [standalone]


#600

FromDavid Mathog <dmathog@gmail.com>
Date2011-05-17 15:32 -0700
Message-ID<a1496ecf-4e66-440e-903d-a3f8b8ddd08e@r35g2000prj.googlegroups.com>
In reply to#596
On May 17, 2:50 pm, loozadroog <mijo...@yahoo.com> wrote:

> I think if you use .B without an argument, it switches to boldface
> until you switch to something else.
>
> .B
> BOLD TEXT1
> .br
> BOLD TEXT2
> .br
> BOLD TEXT3
> .br
> .R

That didn't work for me, all three lines were regular text.

Thanks,

David

[toc] | [prev] | [next] | [standalone]


#604

Fromloozadroog <mijoryx@yahoo.com>
Date2011-05-17 19:36 -0700
Message-ID<cf8136fe-2abd-47ee-bdcb-71944d5e3be0@n10g2000yqf.googlegroups.com>
In reply to#600
On May 17, 5:32 pm, David Mathog <dmat...@gmail.com> wrote:
> On May 17, 2:50 pm, loozadroog <mijo...@yahoo.com> wrote:
>
> > I think if you use .B without an argument, it switches to boldface
> > until you switch to something else.
>
> > .B
> > BOLD TEXT1
> > .br
> > BOLD TEXT2
> > .br
> > BOLD TEXT3
> > .br
> > .R
>
> That didn't work for me, all three lines were regular text.
>
> Thanks,
>
> David

Sorry. I was looking at mm macros, not man. :(

[toc] | [prev] | [standalone]


Back to top | Article view | comp.unix.programmer


csiph-web